rawstudio-2.0/0000755000175000017500000000000011547430073010401 500000000000000rawstudio-2.0/profiles/0000755000175000017500000000000011547430100012213 500000000000000rawstudio-2.0/profiles/SONY_DSLR-A380-simple.dcp0000755000175000017500000000034011537130700016141 00000000000000IIRCV! fZSONY DSLR-A380'4''G'jA' '''2'SONY DSLR-A380 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A580-simple.dcp0000755000175000017500000000050011537130700016141 00000000000000IIRCn! ~" Z[$Sony DSLR-A580' 'N''4,' ' 'm'',','e'3'/'( '''S'Sony DSLR-A580 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-410-simple.dcp0000755000175000017500000000033611537130700016037 00000000000000IIRCV! dZOLYMPUS E-410"''''='"''' '-'OLYMPUS E-410 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D70-simple.dcp0000755000175000017500000000032611537130700015410 00000000000000IIRC V! `ZNIKON D704'''' >' ''''NIKON D70 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A290-simple.dcp0000755000175000017500000000050011537130700016137 00000000000000IIRCn! ~" Z[$SONY DSLR-A290;'9'-''`:' 'h''8''4''G'jA' '''2'SONY DSLR-A290 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S3Pro-simple.dcp0000755000175000017500000000036011537130700017773 00000000000000IIRCV! nZFUJIFILM FinePix S3Pro.'''!'HB''' 'F'FUJIFILM FinePix S3Pro SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/EPSON_R-D1-simple.dcp0000755000175000017500000000033011537130700015522 00000000000000IIRC V! bZEPSON R-D1''$''>' '@'P''EPSON R-D1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_NEX-5-simple.dcp0000755000175000017500000000047011537130700015564 00000000000000IIRC n! z" Z[ SONY NEX-56'r'T'1',' ''''''L''0' ''L'@'SONY NEX-5 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S6000fd-simple.dcp0000644000175000017500000000052411541412537020054 00000000000000IIRCn! " Z[ 8Fujifilm FinePix S6000fd4;'''-'2' 'v'j''T1'''4':''j' ''FUJIFILM FinePix S6000fd SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_FZ40-simple.dcp0000755000175000017500000000051011537130700016571 00000000000000IIRCn! " Z[,Panasonic DMC-FZ40:''S'''[ 'o'''G5'a''^'%'~ '<'' 'Panasonic DMC-FZ40 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/simple-src/0000755000175000017500000000000011547430102014273 500000000000000rawstudio-2.0/profiles/simple-src/SAMSUNG_S85-simple.xml0000644000175000017500000000236211536021334020004 00000000000000 SAMSUNG S85 Simple 21 0 0.565300 0.168600 -0.085100 0.195200 1.252900 -0.429300 -0.150100 -0.404200 1.210700 3 SAMSUNG S85 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/CINE_660-simple.xml0000644000175000017500000000235311536021334017341 00000000000000 CINE 660 Simple 21 0 0.357300 0.700200 -0.164800 0.101900 1.082000 -0.239800 -0.149900 0.143900 1.016100 3 CINE 660 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_SP570UZ-simple.xml0000644000175000017500000000237211536021334020516 00000000000000 OLYMPUS SP570UZ Simple 21 0 0.603900 0.182900 -0.098800 0.290400 1.217200 -0.473600 -0.114600 -0.404400 1.152200 3 OLYMPUS SP570UZ CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_E2100-simple.xml0000644000175000017500000000236211536021334017655 00000000000000 NIKON E2100 Simple 21 0 0.687000 0.276000 -0.181100 0.233600 1.266800 -0.476600 -0.163400 -0.425100 1.345400 3 NIKON E2100 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A850-simple.xml0000644000175000017500000000237011536021334020256 00000000000000 SONY DSLR-A850 Simple 21 0 0.844000 0.117900 -0.060800 0.286600 1.309800 -0.566500 -0.036500 -0.116200 0.541300 3 SONY DSLR-A850 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_DCS_Pro_14nx-simple.xml0000644000175000017500000000237711536021334021452 00000000000000 Kodak DCS Pro 14nx Simple 21 0 0.544500 0.399700 -0.187600 0.284600 1.385000 -0.642700 -0.023200 0.239300 0.549400 3 Kodak DCS Pro 14nx CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_COOLPIX_P6000-simple.xml0000644000175000017500000000240211536021334021063 00000000000000 NIKON COOLPIX P6000 Simple 21 0 0.580100 0.096800 -0.083700 0.236800 1.258400 -0.470600 -0.091400 -0.336700 0.969800 3 NIKON COOLPIX P6000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_500D-simple.xml0000644000175000017500000000236711536021334020471 00000000000000 Canon EOS 500D Simple 21 0 0.656100 0.327600 -0.192100 0.264000 1.439900 -0.682100 -0.064600 0.071200 0.476300 3 Canon EOS 500D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Contax_N_Digital-simple.xml0000644000175000017500000000237311536021334021400 00000000000000 Contax N Digital Simple 21 0 0.706000 0.567900 -0.367700 0.291600 1.654300 -0.928000 -0.105300 0.128500 0.777700 3 Contax N Digital CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_E5700-simple.xml0000644000175000017500000000260111536021334017662 00000000000000 NIKON E5700 Simple 21 0 0.021100 0.902800 0.077800 0.578200 1.002100 -0.496900 0.314800 -0.011300 0.553700 0.236800 1.147800 -0.536800 3 NIKON E5700 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-450-simple.xml0000644000175000017500000000236611536021334020156 00000000000000 OLYMPUS E-450 Simple 21 0 0.741600 0.230900 -0.178000 0.207300 1.561300 -0.759400 -0.109500 -0.242500 0.874500 3 OLYMPUS E-450 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S5000-simple.xml0000644000175000017500000000241011536021334021640 00000000000000 FUJIFILM FinePix S5000 Simple 21 0 0.698200 0.233400 -0.170200 0.227600 1.506900 -0.720400 -0.101900 -0.273200 0.875400 3 FUJIFILM FinePix S5000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_S95-simple.xml0000644000175000017500000000330711536021334021740 00000000000000 Canon PowerShot S95 Simple 17 21 0.517200 0.040400 0.016300 0.243700 0.862100 -0.065600 -0.023200 -0.826800 1.541900 0.465100 0.100100 -0.018000 0.193100 0.959800 -0.123600 -0.127900 -0.589600 1.344000 3 Canon PowerShot S95 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_A720-simple.xml0000644000175000017500000000240411536021334021766 00000000000000 Canon PowerShot A720 Simple 21 0 0.389200 0.195300 -0.106200 0.150000 1.001000 -0.129300 -0.157900 -0.560000 1.488600 3 Canon PowerShot A720 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Mamiya_ZD-simple.xml0000644000175000017500000000235511536021334020044 00000000000000 Mamiya ZD Simple 21 0 0.596100 0.594100 -0.371200 0.201500 1.671700 -0.868900 -0.136300 0.257900 0.764500 3 Mamiya ZD CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_NEX-3-simple.xml0000644000175000017500000000326611536021334017676 00000000000000 SONY NEX-3 Simple 17 21 0.743100 0.130700 -0.052700 0.320200 1.150700 -0.430300 -0.017200 -0.193400 0.671000 0.697600 0.186800 -0.085400 0.275300 1.243500 -0.488000 -0.043600 -0.155000 0.654900 3 SONY NEX-3 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSC-R1-simple.xml0000644000175000017500000000236211536021334017771 00000000000000 SONY DSC-R1 Simple 21 0 0.741400 0.211700 -0.182100 0.252600 1.567000 -0.804200 -0.069400 -0.264100 0.851200 3 SONY DSC-R1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-G2-simple.xml0000644000175000017500000000330211536021334021067 00000000000000 Panasonic DMC-G2 Simple 17 21 0.766800 0.109700 -0.034900 0.314800 1.110700 -0.384200 -0.030100 -0.455000 1.043300 0.671000 0.143700 -0.037700 0.231700 1.268300 -0.476500 -0.111400 -0.340000 1.011300 3 Panasonic DMC-G2 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_20D-simple.xml0000644000175000017500000000236611536021334020405 00000000000000 Canon EOS 20D Simple 21 0 0.746200 0.223400 -0.198300 0.242400 1.578300 -0.807100 -0.089100 -0.053700 0.659900 3 Canon EOS 20D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/PENTAX_K200D-simple.xml0000644000175000017500000000236411536021334020031 00000000000000 PENTAX K200D Simple 21 0 0.852400 0.109400 -0.112900 0.226000 1.651700 -0.869300 -0.090700 -0.267800 0.918600 3 PENTAX K200D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_A610-simple.xml0000644000175000017500000000240411536021334021764 00000000000000 Canon PowerShot A610 Simple 21 0 0.517200 0.185900 -0.132500 0.220900 1.344900 -0.546700 -0.162200 -0.652400 1.588700 3 Canon PowerShot A610 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS-1D_Mark_IV-simple.xml0000644000175000017500000000240411536021334021603 00000000000000 Canon EOS-1D Mark IV Simple 21 0 0.578700 0.182400 -0.056100 0.236100 1.201400 -0.410900 -0.079500 -0.022000 0.601400 3 Canon EOS-1D Mark IV CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_550D-simple.xml0000644000175000017500000000327611536021334020476 00000000000000 Canon EOS 550D Simple 17 21 0.640900 0.098600 -0.015600 0.336200 1.022200 -0.310600 -0.034900 -0.244900 0.775500 0.603900 0.154000 -0.041600 0.253400 1.159700 -0.382500 -0.085700 -0.116400 0.694100 3 Canon EOS 550D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D3000-simple.xml0000644000175000017500000000236211536021334017654 00000000000000 NIKON D3000 Simple 21 0 0.826300 0.124200 -0.135400 0.225100 1.689400 -0.907500 -0.093500 -0.245800 0.873600 3 NIKON D3000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_G3-simple.xml0000644000175000017500000000240011536021334021622 00000000000000 Canon PowerShot G3 Simple 21 0 0.766400 0.284400 -0.230000 0.260500 1.418900 -0.657300 -0.107300 -0.278100 0.921200 3 Canon PowerShot G3 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D2X-simple.xml0000644000175000017500000000235611536021334017566 00000000000000 NIKON D2X Simple 21 0 0.714800 0.068000 -0.079700 0.255200 1.590000 -0.830100 -0.125500 -0.276900 1.023100 3 NIKON D2X CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_SX110_IS-simple.xml0000644000175000017500000000241411536021334022525 00000000000000 Canon PowerShot SX110 IS Simple 21 0 0.363600 0.195800 -0.117600 0.129200 1.088300 -0.202100 -0.155000 -0.566100 1.435000 3 Canon PowerShot SX110 IS CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SAMSUNG_GX20-simple.xml0000644000175000017500000000327111537764506020125 00000000000000 SAMSUNG GX20 Simple 17 21 0.769900 0.226700 -0.109400 0.171900 1.482100 -0.647100 0.003500 -0.454900 1.128100 0.718000 0.326400 -0.219900 0.137300 1.609300 -0.749300 -0.086800 -0.271400 0.942700 3 SAMSUNG GX20 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_A640-simple.xml0000644000175000017500000000240411536021334021767 00000000000000 Canon PowerShot A640 Simple 21 0 0.499000 0.292500 -0.164700 0.198600 1.191000 -0.368000 -0.142000 -0.544400 1.340700 3 Canon PowerShot A640 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D1-simple.xml0000644000175000017500000000235411536021334017433 00000000000000 NIKON D1 Simple 21 0 0.952100 0.349400 -0.284600 0.197200 1.571300 -0.761100 -0.214100 -0.472600 1.677200 3 NIKON D1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Ricoh_A12_50mm-simple.xml0000644000175000017500000000331311537130677020546 00000000000000 Ricoh A12 50mm Simple 17 21 0.798100 0.055900 -0.006200 0.266000 1.176600 -0.410800 0.048300 -0.844100 1.398000 0.710400 0.128000 -0.050700 0.252000 1.283100 -0.509200 -0.068900 -0.256000 0.884900 3 RICOH GR A12 50mm F2.5 MACRO CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS-1D_Mark_III-simple.xml0000644000175000017500000000240611536021334021701 00000000000000 Canon EOS-1D Mark III Simple 21 0 0.732600 0.185800 -0.171400 0.231100 1.614500 -0.835000 -0.097600 -0.054000 0.629100 3 Canon EOS-1D Mark III CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-LX1-simple.xml0000644000175000017500000000237611536021334021235 00000000000000 Panasonic DMC-LX1 Simple 21 0 0.892700 0.094500 -0.092000 0.250100 1.595200 -0.831400 -0.123000 -0.418700 1.070400 3 Panasonic DMC-LX1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_F8-simple.xml0000644000175000017500000000240211536021334021407 00000000000000 FUJIFILM FinePix F8 Simple 21 0 0.806900 0.227700 -0.153100 0.220800 1.516800 -0.724800 -0.112000 -0.388800 1.104400 3 FUJIFILM FinePix F8 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D3S-simple.xml0000644000175000017500000000235611536021334017562 00000000000000 NIKON D3S Simple 21 0 0.758700 0.150900 -0.066000 0.254100 1.260300 -0.487400 -0.069400 -0.240600 0.882800 3 NIKON D3S CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS-1DS-simple.xml0000644000175000017500000000236511536021334020364 00000000000000 Canon EOS-1DS Simple 21 0 0.816100 0.363200 -0.289200 0.247200 1.521200 -0.752000 -0.174300 0.363100 0.437400 3 Canon EOS-1DS CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_DCS760C-simple.xml0000644000175000017500000000236511536021334020315 00000000000000 Kodak DCS760C Simple 21 0 0.292600 0.027400 0.228500 0.032300 1.392300 -0.434400 -0.141100 -0.630900 1.662300 3 Kodak DCS760C CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Phase_One_H_20-simple.xml0000644000175000017500000000236711536021334020646 00000000000000 Phase One H 20 Simple 21 0 0.602000 0.184000 -0.032700 0.080800 1.590800 -0.671500 -0.010900 0.185500 0.131300 3 Phase One H 20 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D7000-simple.xml0000644000175000017500000000327011536021334017657 00000000000000 Nikon D7000 Simple 17 21 0.781400 0.109900 -0.045300 0.342200 1.103300 -0.399900 -0.024300 -0.305800 0.864200 0.718100 0.205000 -0.104300 0.279800 1.238900 -0.487100 -0.072400 -0.223900 0.819800 3 Nikon D7000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/KODAK_EASYSHARE_Z1015-simple.xml0000644000175000017500000000240611536021334021264 00000000000000 KODAK EASYSHARE Z1015 Simple 21 0 0.544700 0.152300 -0.109000 0.264700 1.234300 -0.469400 -0.099200 -0.428600 1.126500 3 KODAK EASYSHARE Z1015 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-LC1-simple.xml0000644000175000017500000000237611536021334021210 00000000000000 Panasonic DMC-LC1 Simple 21 0 0.768500 0.342600 -0.296000 0.244800 1.526600 -0.755500 -0.127500 -0.406900 1.134000 3 Panasonic DMC-LC1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Leaf_Aptus_65-simple.xml0000644000175000017500000000236511536021334020570 00000000000000 Leaf Aptus 65 Simple 21 0 0.556200 0.460500 -0.281100 0.228000 1.658200 -0.877700 -0.119000 0.141400 0.791400 3 Leaf Aptus 65 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_DCS620X-simple.xml0000644000175000017500000000236511536021334020335 00000000000000 Kodak DCS620X Simple 21 0 0.225800 0.460200 0.089500 -0.213700 -0.002100 1.222100 0.015400 -0.623100 1.309500 3 Kodak DCS620X CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A200-simple.xml0000644000175000017500000000237011536021334020243 00000000000000 SONY DSLR-A200 Simple 21 0 0.710300 0.059500 -0.071500 0.222500 1.634500 -0.848500 -0.092800 -0.309100 0.984700 3 SONY DSLR-A200 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_E995-simple.xml0000644000175000017500000000257711536021334017631 00000000000000 NIKON E995 Simple 21 0 0.009600 0.908300 0.068800 0.594900 0.984000 -0.492400 0.334200 -0.055800 0.581400 0.218900 1.176200 -0.554700 3 NIKON E995 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_E4300-simple.xml0000644000175000017500000000236211536021334017661 00000000000000 NIKON E4300 Simple 21 0 0.552400 0.221900 -0.145700 0.233600 1.266800 -0.476600 -0.140300 -0.364900 1.154800 3 NIKON E4300 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D1H-simple.xml0000644000175000017500000000235611536021334017545 00000000000000 NIKON D1H Simple 21 0 0.860600 0.280800 -0.237700 0.193400 1.559200 -0.745400 -0.092600 -0.216600 0.757700 3 NIKON D1H CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_40D-simple.xml0000644000175000017500000000236611536021334020407 00000000000000 Canon EOS 40D Simple 21 0 0.731500 0.255300 -0.202500 0.244100 1.536500 -0.765300 -0.085600 -0.074700 0.607100 3 Canon EOS 40D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A330-simple.xml0000644000175000017500000000237011536021334020247 00000000000000 SONY DSLR-A330 Simple 21 0 0.710300 0.059500 -0.071400 0.222500 1.634600 -0.848500 -0.092900 -0.309100 0.984700 3 SONY DSLR-A330 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_SP510UZ-simple.xml0000644000175000017500000000237211536021334020510 00000000000000 OLYMPUS SP510UZ Simple 21 0 0.672100 0.180500 -0.120000 0.308400 1.312700 -0.588100 -0.101000 -0.360700 1.059300 3 OLYMPUS SP510UZ CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D3100-simple.xml0000644000175000017500000000327011536021334017654 00000000000000 Nikon D3100 Simple 17 21 0.863200 0.147200 -0.067500 0.295500 1.194900 -0.455000 -0.041000 -0.282000 0.830600 0.796800 0.248300 -0.128800 0.240800 1.315000 -0.532700 -0.081300 -0.216700 0.791100 3 Nikon D3100 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D300-simple.xml0000644000175000017500000000236011536021334017572 00000000000000 NIKON D300 Simple 21 0 0.806900 0.321700 -0.268900 0.225500 1.630200 -0.846500 -0.071500 -0.199200 0.903000 3 NIKON D300 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_E5000-simple.xml0000644000175000017500000000260111536021334017653 00000000000000 NIKON E5000 Simple 21 0 0.009600 0.908300 0.068800 0.594900 0.984000 -0.492400 0.334200 -0.055800 0.581400 0.218900 1.176200 -0.554700 3 NIKON E5000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/KODAK_EOSDCS3B-simple.xml0000644000175000017500000000236711536021334020313 00000000000000 KODAK EOSDCS3B Simple 21 0 0.103100 0.063400 0.198500 0.020600 1.221900 -0.247800 -0.094000 -0.270000 0.989800 3 KODAK EOSDCS3B CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_SP550UZ-simple.xml0000644000175000017500000000237211536021334020514 00000000000000 OLYMPUS SP550UZ Simple 21 0 0.651600 0.175000 -0.102900 0.295700 1.279900 -0.543200 -0.104900 -0.400600 1.159700 3 OLYMPUS SP550UZ CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S9000-simple.xml0000644000175000017500000000241011536021334021644 00000000000000 FUJIFILM FinePix S9000 Simple 21 0 0.869200 0.227500 -0.180900 0.253800 1.502700 -0.738500 -0.114500 -0.342300 1.049100 3 FUJIFILM FinePix S9000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Imacon_Ixpress-simple.xml0000644000175000017500000000237011536021334021152 00000000000000 Imacon Ixpress Simple 21 0 0.603800 0.274200 -0.124800 0.142400 1.376500 -0.518800 -0.070400 -0.141500 0.702500 3 Imacon Ixpress CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Phase_One_P65-simple.xml0000644000175000017500000000236511536021334020526 00000000000000 Phase One P65 Simple 21 0 0.492300 0.434400 -0.239700 0.135800 1.635000 -0.770600 -0.191600 0.126800 0.852200 3 Phase One P65 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS-1D-simple.xml0000644000175000017500000000236411536021334020240 00000000000000 Canon EOS-1D Simple 21 0 0.769000 0.423600 -0.326700 0.168700 1.641500 -0.809700 -0.102000 -0.017900 0.680600 3 Canon EOS-1D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SAMSUNG_NX100-simple.xml0000644000175000017500000000327411536021334020176 00000000000000 Samsung NX100 Simple 17 21 0.912500 0.135800 -0.044400 0.189100 1.327400 -0.501300 -0.064800 -0.492800 1.168100 0.833100 0.264700 -0.135200 0.152000 1.463900 -0.611100 -0.116800 -0.323400 1.033200 3 Samsung NX100 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D60-simple.xml0000644000175000017500000000235611536021334017522 00000000000000 NIKON D60 Simple 21 0 0.826300 0.124200 -0.135400 0.225100 1.689400 -0.907500 -0.093500 -0.245800 0.873600 3 NIKON D60 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-G1-simple.xml0000644000175000017500000000237411536021334021076 00000000000000 Panasonic DMC-G1 Simple 21 0 0.722000 0.302200 -0.245800 0.203300 1.615600 -0.812400 -0.105600 -0.206500 0.819900 3 Panasonic DMC-G1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/KODAK_P880-simple.xml0000644000175000017500000000236011536021334017576 00000000000000 KODAK P880 Simple 21 0 0.790400 0.219400 -0.162600 0.236000 1.526700 -0.748000 -0.137600 -0.466200 1.280500 3 KODAK P880 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-FZ30-simple.xml0000644000175000017500000000240011536021334021277 00000000000000 Panasonic DMC-FZ30 Simple 21 0 0.824600 0.207100 -0.167000 0.260000 1.549100 -0.791800 -0.114100 -0.402900 1.097600 3 Panasonic DMC-FZ30 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Konica_Minolta_DiMAGE_A200-simple.xml0000644000175000017500000000242011536021334022642 00000000000000 Konica Minolta DiMAGE A200 Simple 21 0 0.774300 0.132400 -0.120900 0.277100 1.553500 -0.811200 -0.098600 -0.248700 0.856000 3 Konica Minolta DiMAGE A200 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D70-simple.xml0000644000175000017500000000235611536021334017523 00000000000000 NIKON D70 Simple 21 0 0.733000 0.078300 -0.085900 0.249800 1.588400 -0.823800 -0.078900 -0.242200 0.773200 3 NIKON D70 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Fuji_HS10-simple.xml0000644000175000017500000000332111536021334017654 00000000000000 Fujifilm FinePix HS10/11 Simple 17 21 0.544000 0.075100 0.064000 0.313600 0.786100 -0.046500 0.003000 -0.608800 1.203400 0.458200 0.173800 0.002200 0.239900 0.930600 -0.133300 -0.094800 -0.429500 1.090900 3 Fujifilm FinePix HS10 HS11 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Leaf_Aptus_75-simple.xml0000644000175000017500000000236511536021334020571 00000000000000 Leaf Aptus 75 Simple 21 0 0.556200 0.460500 -0.281100 0.228000 1.658200 -0.877700 -0.119000 0.141400 0.791400 3 Leaf Aptus 75 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/CASIO_EX-S20-simple.xml0000644000175000017500000000236411536021334020026 00000000000000 CASIO EX-S20 Simple 21 0 0.733400 0.269500 -0.161600 0.205100 1.318300 -0.505600 -0.114800 -0.399400 1.184000 3 CASIO EX-S20 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_SLTA55V-simple.xml0000644000175000017500000000327411536021334020146 00000000000000 SONY SLT-A55V Simple 17 21 0.704600 0.113300 -0.050100 0.333600 1.131600 -0.421900 -0.017800 -0.178000 0.603100 0.673900 0.152400 -0.074100 0.285600 1.228500 -0.481300 -0.041100 -0.149200 0.593200 3 Sony SLT-A55V CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/MINOLTA_DYNAX_7-simple.xml0000644000175000017500000000237211536021334020525 00000000000000 MINOLTA DYNAX 7 Simple 21 0 0.687100 0.092500 -0.092700 0.245100 1.572700 -0.803700 -0.109900 -0.310400 1.023900 3 MINOLTA DYNAX 7 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Neutral-With-Tonecurve-Prophoto.xml0000644000175000017500000000242411536021334023043 00000000000000 Neutral ProPhotoRGB With Tonecurve 21 0 1.119400 0.000000 0.000000 0.018900 1.469500 -0.503100 -0.047200 -0.236100 1.243300 3 Passthrough Tonecurve ProPhoto CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_Pro90-simple.xml0000644000175000017500000000262611536021334022274 00000000000000 Canon PowerShot Pro90 Simple 21 0 0.057700 1.123000 -0.177000 0.585900 1.001100 -0.516200 0.429400 -0.098700 0.464200 0.223500 0.989600 -0.496300 3 Canon PowerShot Pro90 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D100-simple.xml0000644000175000017500000000236011536021334017570 00000000000000 NIKON D100 Simple 21 0 0.646400 0.145500 -0.140200 0.235400 1.671900 -0.898300 -0.078200 -0.093300 0.590200 3 NIKON D100 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_10D-simple.xml0000644000175000017500000000236611536021334020404 00000000000000 Canon EOS 10D Simple 21 0 0.826600 0.317800 -0.253600 0.259200 1.433500 -0.671400 -0.111800 -0.200000 0.819700 3 Canon EOS 10D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A900-simple.xml0000644000175000017500000000237011536021334020252 00000000000000 SONY DSLR-A900 Simple 21 0 0.865400 0.180300 -0.161800 0.291900 1.612000 -0.884500 -0.039700 -0.107200 0.520900 3 SONY DSLR-A900 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_NEX-5-simple.xml0000644000175000017500000000326611536021334017700 00000000000000 SONY NEX-5 Simple 17 21 0.743100 0.130700 -0.052700 0.320200 1.150700 -0.430300 -0.017200 -0.193400 0.671000 0.697600 0.186800 -0.085400 0.275300 1.243500 -0.488000 -0.043600 -0.155000 0.654900 3 SONY NEX-5 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_400D-simple.xml0000644000175000017500000000237011536021334020462 00000000000000 Canon EOS 400D Simple 21 0 0.779600 0.141400 -0.127800 0.281200 1.554400 -0.815600 -0.099000 -0.150100 0.705400 3 Canon EOS 400D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_SP350-simple.xml0000644000175000017500000000236611536021334020236 00000000000000 OLYMPUS SP350 Simple 21 0 0.741800 0.093900 -0.078600 0.257800 1.430600 -0.667100 -0.106900 -0.483600 1.207800 3 OLYMPUS SP350 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/CASIO_EX-Z750-simple.xml0000644000175000017500000000236611536021334020131 00000000000000 CASIO EX-Z750 Simple 21 0 0.463200 0.375100 -0.175500 0.117500 1.373000 -0.490300 -0.109900 -0.387300 1.081900 3 CASIO EX-Z750 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_A650-simple.xml0000644000175000017500000000240411536021334021770 00000000000000 Canon PowerShot A650 Simple 21 0 0.453900 0.203100 -0.106500 0.195800 1.093500 -0.264500 -0.098300 -0.311100 0.966000 3 Canon PowerShot A650 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-20-simple.xml0000644000175000017500000000236411536021334020065 00000000000000 OLYMPUS E-20 Simple 21 0 0.714200 0.245200 -0.204500 0.189500 1.403600 -0.580700 -0.149900 -0.473200 1.317300 3 OLYMPUS E-20 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_ProBack-simple.xml0000644000175000017500000000236711536021334020667 00000000000000 Kodak ProBack Simple 21 0 0.421000 -0.018000 0.347700 -0.016500 1.101900 -0.091500 -0.291800 -0.831600 2.117900 3 Kodak ProBack CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D700-simple.xml0000644000175000017500000000236011536021334017576 00000000000000 NIKON D700 Simple 21 0 0.809300 0.200800 -0.192500 0.229500 1.654100 -0.874700 -0.066300 -0.217100 0.813900 3 NIKON D700 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_G2-simple.xml0000644000175000017500000000240011536021334021621 00000000000000 Canon PowerShot G2 Simple 21 0 0.779000 0.281900 -0.229100 0.253700 1.438200 -0.671500 -0.104900 -0.269300 0.908700 3 Canon PowerShot G2 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_E4500-simple.xml0000644000175000017500000000260111536021334017657 00000000000000 NIKON E4500 Simple 21 0 0.009600 0.908300 0.068800 0.594900 0.984000 -0.492400 0.334200 -0.055800 0.581400 0.218900 1.176200 -0.554700 3 NIKON E4500 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-GF1-simple.xml0000644000175000017500000000237611536021334021206 00000000000000 Panasonic DMC-GF1 Simple 21 0 0.733000 0.286600 -0.235300 0.209900 1.608500 -0.810600 -0.101100 -0.190200 0.788800 3 Panasonic DMC-GF1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_DCS520C-simple.xml0000644000175000017500000000236711536021334020311 00000000000000 Kodak DCS520C Simple 21 0 0.322500 -0.060500 0.285800 -0.029700 1.137000 -0.149000 -0.340100 -1.086000 2.454200 3 Kodak DCS520C CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSC-V3-simple.xml0000644000175000017500000000236211536021334017777 00000000000000 SONY DSC-V3 Simple 21 0 0.812800 0.111100 -0.094800 0.306000 1.508800 -0.789400 -0.069200 -0.257100 0.751100 3 SONY DSC-V3 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D40-simple.xml0000644000175000017500000000235611536021334017520 00000000000000 NIKON D40 Simple 21 0 0.789700 0.085000 -0.087400 0.254300 1.574800 -0.813800 -0.080600 -0.166800 0.699200 3 NIKON D40 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Neutral-With-Tonecurve-sRGB.xml0000644000175000017500000000241211536021334022023 00000000000000 Neutral sRGB With Tonecurve 21 0 1.405200 -0.229000 0.071900 0.033500 1.916100 -0.978800 -0.490600 -1.616900 3.133900 3 Passthrough Tonecurve sRGB CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Minolta_DiMAGE_Z2-simple.xml0000644000175000017500000000237611536021334021261 00000000000000 Minolta DiMAGE Z2 Simple 21 0 0.552400 0.221900 -0.145700 0.233600 1.266800 -0.476600 -0.140300 -0.364900 1.154800 3 Minolta DiMAGE Z2 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_1100D-simple.xml0000644000175000017500000000330011537130677020546 00000000000000 Canon EOS 1100D Simple 17 21 0.723400 0.116500 -0.036200 0.331300 1.079500 -0.365900 -0.052900 -0.169600 0.687300 0.672800 0.201600 -0.090300 0.253500 1.230800 -0.456300 -0.089300 -0.090400 0.644400 3 Canon EOS 1100D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_A470-simple.xml0000644000175000017500000000240411536021334021770 00000000000000 Canon PowerShot A470 Simple 21 0 0.489200 0.228900 -0.090700 0.248600 1.062000 -0.277000 -0.128400 -0.455500 1.293200 3 Canon PowerShot A470 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_E550-simple.xml0000644000175000017500000000240611536021334021554 00000000000000 FUJIFILM FinePix E550 Simple 21 0 0.806900 0.227700 -0.153100 0.220800 1.516800 -0.724800 -0.112000 -0.388800 1.104400 3 FUJIFILM FinePix E550 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/KODAK_P712-simple.xml0000644000175000017500000000236011536021334017570 00000000000000 KODAK P712 Simple 21 0 0.604400 0.184300 -0.134200 0.276800 1.269500 -0.516300 -0.082300 -0.331400 0.965800 3 KODAK P712 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-5-simple.xml0000644000175000017500000000327011536021334020005 00000000000000 Olympus E-5 Simple 17 21 0.805000 0.115600 -0.034200 0.279600 1.143700 -0.388300 -0.061200 -0.473000 1.144900 0.750400 0.174200 -0.069500 0.220600 1.259300 -0.457600 -0.132500 -0.378300 1.120000 3 Olympus E-5 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-FZ28-simple.xml0000644000175000017500000000240011536021334021306 00000000000000 Panasonic DMC-FZ28 Simple 21 0 0.554300 0.214000 -0.130500 0.291600 1.281200 -0.541200 -0.099300 -0.348800 1.010900 3 Panasonic DMC-FZ28 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S5200-simple.xml0000644000175000017500000000241011536021334021642 00000000000000 FUJIFILM FinePix S5200 Simple 21 0 0.862100 0.231100 -0.180300 0.258900 1.504000 -0.744200 -0.098800 -0.280400 0.963600 3 FUJIFILM FinePix S5200 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-GF2-simple.xml0000644000175000017500000000330411536021334021177 00000000000000 Panasonic DMC-GF2 Simple 17 21 0.783700 0.191100 -0.122600 0.251400 1.456300 -0.688200 -0.047200 -0.254800 0.832900 0.733000 0.286600 -0.235300 0.209900 1.608500 -0.810600 -0.101100 -0.190200 0.788800 3 Panasonic DMC-GF2 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-500-simple.xml0000644000175000017500000000236611536021334020152 00000000000000 OLYMPUS E-500 Simple 21 0 0.663000 0.420500 -0.255600 0.187100 1.374200 -0.548100 -0.029900 -0.196800 0.813600 3 OLYMPUS E-500 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_XZ-1-simple.xml0000644000175000017500000000327111537130677020173 00000000000000 OLYMPUS XZ-1 Simple 17 21 0.567200 0.082400 0.027200 0.282200 0.848500 -0.084300 -0.030700 -0.504600 1.128300 0.515800 0.141700 -0.006200 0.229300 0.920800 -0.114100 -0.107400 -0.409500 1.090100 3 Olympus XZ-1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_SP560UZ-simple.xml0000644000175000017500000000237211536021334020515 00000000000000 OLYMPUS SP560UZ Simple 21 0 0.622300 0.196800 -0.116800 0.291100 1.298600 -0.558700 -0.098200 -0.367700 1.091500 3 OLYMPUS SP560UZ CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-FZ8-simple.xml0000644000175000017500000000237611536021334021240 00000000000000 Panasonic DMC-FZ8 Simple 21 0 0.637900 0.214400 -0.147600 0.307700 1.357500 -0.634100 -0.080200 -0.275500 0.898600 3 Panasonic DMC-FZ8 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_S40-simple.xml0000644000175000017500000000240211536021334021721 00000000000000 Canon PowerShot S40 Simple 21 0 0.901300 0.282900 -0.231800 0.290000 1.423100 -0.686900 -0.094000 -0.248700 0.851000 3 Canon PowerShot S40 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D3-simple.xml0000644000175000017500000000235411536021334017435 00000000000000 NIKON D3 Simple 21 0 0.809300 0.200800 -0.192500 0.229500 1.654100 -0.874700 -0.066300 -0.217100 0.813900 3 NIKON D3 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_SP3-simple.xml0000644000175000017500000000236211536021334020065 00000000000000 OLYMPUS SP3 Simple 21 0 0.757200 0.121700 -0.102900 0.270700 1.442100 -0.690100 -0.106700 -0.444500 1.176600 3 OLYMPUS SP3 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-30-simple.xml0000644000175000017500000000236411536021334020066 00000000000000 OLYMPUS E-30 Simple 21 0 0.760700 0.254200 -0.186500 0.192900 1.589400 -0.776300 -0.111100 -0.186100 0.814400 3 OLYMPUS E-30 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_E8800-simple.xml0000644000175000017500000000236211536021334017672 00000000000000 NIKON E8800 Simple 21 0 0.761000 0.152000 -0.144200 0.289400 1.576200 -0.845100 -0.091300 -0.231400 0.797100 3 NIKON E8800 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_G12-simple.xml0000644000175000017500000000330711536021334021711 00000000000000 Canon PowerShot G12 Simple 17 21 0.509700 0.053600 0.005000 0.245000 0.901400 -0.107300 -0.027400 -0.709600 1.410500 0.436600 0.108300 -0.027000 0.193500 0.985800 -0.150800 -0.124800 -0.550100 1.324400 3 Canon PowerShot G12 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Leaf_CMost-simple.xml0000644000175000017500000000235611536021334020207 00000000000000 Leaf CMost Simple 21 0 0.653600 0.734900 -0.453600 0.227500 1.458500 -0.670100 0.044900 0.218900 0.395200 3 Leaf CMost CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A230-simple.xml0000644000175000017500000000237011536021334020246 00000000000000 SONY DSLR-A230 Simple 21 0 0.710300 0.059500 -0.071500 0.222500 1.634500 -0.848500 -0.092800 -0.309100 0.984700 3 SONY DSLR-A230 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_C5060-simple.xml0000644000175000017500000000236611536021334020161 00000000000000 OLYMPUS C5060 Simple 21 0 0.760200 0.117600 -0.113500 0.205800 1.569000 -0.766200 -0.130700 -0.336200 1.044500 3 OLYMPUS C5060 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SAMSUNG_GX-1-simple.xml0000644000175000017500000000236411536021334020103 00000000000000 SAMSUNG GX-1 Simple 21 0 1.224200 0.086300 -0.102200 0.253100 1.620700 -0.860300 -0.118900 -0.243800 1.050400 3 SAMSUNG GX-1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S2Pro-simple.xml0000644000175000017500000000241011536021334022076 00000000000000 FUJIFILM FinePix S2Pro Simple 21 0 0.769700 0.211100 -0.150700 0.164700 1.542300 -0.703300 -0.140200 -0.469000 1.249200 3 FUJIFILM FinePix S2Pro CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-330-simple.xml0000644000175000017500000000236611536021334020153 00000000000000 OLYMPUS E-330 Simple 21 0 0.824900 0.303500 -0.231900 0.206700 1.599000 -0.797900 -0.108400 -0.247300 0.896100 3 OLYMPUS E-330 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Minolta_DiMAGE_7i-simple.xml0000644000175000017500000000330311536021334021274 00000000000000 Minolta DiMAGE 7i Simple 17 21 0.826500 0.219400 -0.155600 0.280200 1.417000 -0.672100 0.005800 -0.644900 1.352400 0.756000 0.335900 -0.279700 0.243400 1.558500 -0.787500 -0.119900 -0.379100 1.105000 3 Minolta DiMAGE 7i CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-G10-simple.xml0000644000175000017500000000330411536021334021150 00000000000000 Panasonic DMC-G10 Simple 17 21 0.766800 0.109700 -0.034900 0.314800 1.110700 -0.384200 -0.030100 -0.455000 1.043300 0.671000 0.143700 -0.037700 0.231700 1.268300 -0.476500 -0.111400 -0.340000 1.011300 3 Panasonic DMC-G10 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-PL2-simple.xml0000644000175000017500000000327411537130677020256 00000000000000 OLYMPUS E-PL2 Simple 17 21 0.749400 0.112400 -0.028000 0.222400 1.150600 -0.351200 -0.101500 -0.659000 1.543200 0.702300 0.167000 -0.059200 0.176700 1.238700 -0.398700 -0.180600 -0.555200 1.503000 3 Olympus E-PL2 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_5D-simple.xml0000644000175000017500000000236411536021334020326 00000000000000 Canon EOS 5D Simple 21 0 0.764900 0.213100 -0.196800 0.248000 1.595400 -0.829700 -0.097200 -0.047900 0.634700 3 Canon EOS 5D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A290-simple.xml0000644000175000017500000000327611536021334020262 00000000000000 SONY DSLR-A290 Simple 17 21 0.722400 0.042800 -0.040800 0.298700 1.494400 -0.768300 -0.021100 -0.199100 0.645900 0.721800 0.074600 -0.087500 0.251200 1.674600 -0.914500 -0.057900 -0.148400 0.603800 3 SONY DSLR-A290 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_SX1_IS-simple.xml0000644000175000017500000000241011536021334022360 00000000000000 Canon PowerShot SX1 IS Simple 21 0 0.497000 0.105800 -0.030800 0.330900 1.303000 -0.597400 -0.050200 -0.025900 0.657800 3 Canon PowerShot SX1 IS CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_5D_Mark_II-simple.xml0000644000175000017500000000240311536021334021653 00000000000000 Canon EOS 5D Mark II Simple 21 0 0.665100 0.193700 -0.149600 0.248000 1.547400 -0.779800 -0.083000 0.060300 0.471600 3 Canon EOS 5D Mark II CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_G11-simple.xml0000644000175000017500000000240211536021334021703 00000000000000 Canon PowerShot G11 Simple 21 0 0.447100 0.085000 -0.009800 0.204900 0.986400 -0.161200 -0.106900 -0.481700 1.217700 3 Canon PowerShot G11 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_A50-simple.xml0000644000175000017500000000262111536021334021703 00000000000000 Canon PowerShot A50 Simple 21 0 0.021700 1.117500 -0.140400 0.620000 0.987900 -0.554000 0.393900 0.068400 0.343600 0.177600 0.984600 -0.530000 3 Canon PowerShot A50 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-FZ18-simple.xml0000644000175000017500000000240011536021334021305 00000000000000 Panasonic DMC-FZ18 Simple 21 0 0.557500 0.215500 -0.126700 0.275300 1.333100 -0.580900 -0.093500 -0.306000 0.993200 3 Panasonic DMC-FZ18 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Leaf_Valeo_6-simple.xml0000644000175000017500000000236211536021334020452 00000000000000 Leaf Valeo 6 Simple 21 0 0.653600 0.734900 -0.453600 0.227500 1.458500 -0.670100 0.044900 0.218900 0.395200 3 Leaf Valeo 6 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Konica_Minolta_DiMAGE_A2-simple.xml0000644000175000017500000000241411536021334022505 00000000000000 Konica Minolta DiMAGE A2 Simple 21 0 0.776300 0.098100 -0.096600 0.276200 1.550600 -0.807300 -0.105300 -0.272600 0.909700 3 Konica Minolta DiMAGE A2 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_E900-simple.xml0000644000175000017500000000240611536021334021553 00000000000000 FUJIFILM FinePix E900 Simple 21 0 0.863900 0.244000 -0.202200 0.257400 1.507100 -0.746100 -0.107800 -0.252600 0.918300 3 FUJIFILM FinePix E900 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/PENTAX_K10D-simple.xml0000644000175000017500000000236211536021334017746 00000000000000 PENTAX K10D Simple 21 0 0.970500 0.080300 -0.081800 0.211200 1.517200 -0.717000 -0.080300 -0.286300 0.956600 3 PENTAX K10D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_C80-simple.xml0000644000175000017500000000236211536021334020012 00000000000000 OLYMPUS C80 Simple 21 0 0.776000 0.097900 -0.094200 0.270300 1.571400 -0.823800 -0.101400 -0.250900 0.860600 3 OLYMPUS C80 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-FX150-simple.xml0000644000175000017500000000240211536021334021362 00000000000000 Panasonic DMC-FX150 Simple 21 0 0.560900 0.264100 -0.179700 0.305800 1.337700 -0.611900 -0.092500 -0.290700 0.908200 3 Panasonic DMC-FX150 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SAMSUNG_GX10-simple.xml0000644000175000017500000000327111537764506020124 00000000000000 SAMSUNG GX10 Simple 17 21 0.962500 0.065400 -0.057900 0.258700 1.503400 -0.743400 0.005300 -0.457500 1.126500 0.979300 0.088300 -0.097500 0.218200 1.651400 -0.862200 -0.081100 -0.296500 0.967900 3 Samsung GX10 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS-simple.xml0000644000175000017500000000235611536021334017777 00000000000000 Canon EOS Simple 21 0 0.826600 0.317800 -0.253600 0.259200 1.433500 -0.671400 -0.111800 -0.200000 0.819700 3 Canon EOS CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_Pro1-simple.xml0000644000175000017500000000240411536021334022176 00000000000000 Canon PowerShot Pro1 Simple 21 0 0.732300 0.081700 -0.076500 0.273000 1.511700 -0.764300 -0.099900 -0.352200 1.006200 3 Canon PowerShot Pro1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_C70-simple.xml0000644000175000017500000000236211536021334020011 00000000000000 OLYMPUS C70 Simple 21 0 0.732100 0.157700 -0.139000 0.248800 1.517700 -0.749800 -0.114600 -0.379100 1.079300 3 OLYMPUS C70 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-510-simple.xml0000644000175000017500000000236611536021334020153 00000000000000 OLYMPUS E-510 Simple 21 0 0.781700 0.230000 -0.178300 0.211200 1.562400 -0.763900 -0.103300 -0.252900 0.878500 3 OLYMPUS E-510 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D70s-simple.xml0000644000175000017500000000326511536021334017706 00000000000000 NIKON D70s Simple 17 21 0.726700 0.042000 -0.031800 0.290200 1.407800 -0.671200 0.022000 -0.431100 0.950500 0.733000 0.078300 -0.085900 0.249800 1.588300 -0.823800 -0.078900 -0.242100 0.773200 3 NIKON D70s CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_SP500UZ-simple.xml0000644000175000017500000000237211536021334020507 00000000000000 OLYMPUS SP500UZ Simple 21 0 0.648200 0.226200 -0.154800 0.326000 1.233400 -0.521100 -0.066600 -0.341500 0.949300 3 OLYMPUS SP500UZ CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_F7-simple.xml0000644000175000017500000000240211536021334021406 00000000000000 FUJIFILM FinePix F7 Simple 21 0 0.773600 0.256500 -0.186300 0.210700 1.504700 -0.703600 -0.120100 -0.321900 1.000400 3 FUJIFILM FinePix F7 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/PENTAX_K-r-simple.xml0000644000175000017500000000236011536021334017736 00000000000000 PENTAX K-r Simple 21 0 0.868000 0.136900 -0.085800 0.293900 1.189200 -0.447700 -0.068000 -0.298800 0.960100 3 PENTAX K-r CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/PENTAX_K1-simple.xml0000644000175000017500000000235611536021334017565 00000000000000 PENTAX K1 Simple 21 0 1.168800 0.094700 -0.110800 0.272000 1.583400 -0.837700 -0.132400 -0.315700 1.109500 3 PENTAX K1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_60D-simple.xml0000644000175000017500000000327411536021334020410 00000000000000 Canon EOS 60D simple 17 21 0.641300 0.124200 -0.033700 0.292900 1.096300 -0.350500 -0.049100 -0.189700 0.742800 0.605100 0.212900 -0.088700 0.221100 1.242600 -0.440800 -0.092500 -0.099400 0.671900 3 Canon EOS 60D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D90-simple.xml0000644000175000017500000000235611536021334017525 00000000000000 NIKON D90 Simple 21 0 0.806400 0.282600 -0.243400 0.262200 1.600800 -0.847400 -0.051900 -0.140300 0.730900 3 NIKON D90 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/CINE-simple.xml0000644000175000017500000000234411536021334016746 00000000000000 CINE Simple 21 0 0.661300 0.328600 -0.018900 0.268900 1.034500 -0.265900 -0.028500 -0.289800 1.362000 3 CINE CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_SLTA33-simple.xml0000644000175000017500000000327211536021334020012 00000000000000 SONY SLT-A33 Simple 17 21 0.740300 0.144600 -0.065200 0.326500 1.172700 -0.458500 -0.012800 -0.139300 0.598800 0.683400 0.206600 -0.102400 0.273400 1.277900 -0.522100 -0.036600 -0.122100 0.606900 3 Sony SLT-A33 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S9500-simple.xml0000644000175000017500000000241011536021334021651 00000000000000 FUJIFILM FinePix S9500 Simple 21 0 0.869200 0.227500 -0.180900 0.253800 1.502700 -0.738500 -0.114500 -0.342300 1.049100 3 FUJIFILM FinePix S9500 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D200-simple.xml0000644000175000017500000000236011536021334017571 00000000000000 NIKON D200 Simple 21 0 0.805300 0.155000 -0.152700 0.242200 1.644700 -0.875800 -0.076300 -0.224800 0.836700 3 NIKON D200 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_FZ40-simple.xml0000644000175000017500000000330411536021334020703 00000000000000 Panasonic DMC-FZ40 Simple 17 21 0.480400 0.025000 0.087900 0.316300 0.813900 -0.077600 -0.017300 -0.778400 1.510300 0.410800 0.115200 0.031600 0.243000 0.963300 -0.169800 -0.137100 -0.553500 1.363900 3 Panasonic DMC-FZ40 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D2H-simple.xml0000644000175000017500000000235611536021334017546 00000000000000 NIKON D2H Simple 21 0 0.683000 0.412000 -0.297500 0.202400 1.661700 -0.859400 -0.061500 -0.090100 0.571000 3 NIKON D2H CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-FZ50-simple.xml0000644000175000017500000000240011536021334021301 00000000000000 Panasonic DMC-FZ50 Simple 21 0 0.653700 0.263100 -0.192200 0.322000 1.335100 -0.623100 -0.059400 -0.270900 0.790600 3 Panasonic DMC-FZ50 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_Pro70-simple.xml0000644000175000017500000000262611536021334022272 00000000000000 Canon PowerShot Pro70 Simple 21 0 0.134200 1.087300 -0.223800 0.661000 0.987000 -0.552100 0.452200 -0.002500 0.393900 0.152900 0.981800 -0.415500 3 Canon PowerShot Pro70 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S7000-simple.xml0000644000175000017500000000241011536021334021642 00000000000000 FUJIFILM FinePix S7000 Simple 21 0 0.750500 0.239900 -0.200300 0.223800 1.505100 -0.715300 -0.131200 -0.350600 1.019000 3 FUJIFILM FinePix S7000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-GH1-simple.xml0000644000175000017500000000237611536021334021210 00000000000000 Panasonic DMC-GH1 Simple 21 0 0.598400 0.311200 -0.233100 0.296900 1.385200 -0.653500 -0.053200 -0.146600 0.629900 3 Panasonic DMC-GH1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/KODAK_EasyShare_Z980-simple.xml0000644000175000017500000000240411536021334021554 00000000000000 KODAK EasyShare Z980 Simple 21 0 0.490800 0.239800 -0.121400 0.225700 1.189100 -0.389300 -0.110100 -0.355900 1.131300 3 KODAK EasyShare Z980 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_G6-simple.xml0000644000175000017500000000240011536021334021625 00000000000000 Canon PowerShot G6 Simple 21 0 0.748500 0.130500 -0.144800 0.307200 1.480700 -0.761300 -0.087100 -0.377500 0.987700 3 Canon PowerShot G6 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS-1D_Mark_II-simple.xml0000644000175000017500000000240411536021334021566 00000000000000 Canon EOS-1D Mark II Simple 21 0 0.866400 0.191900 -0.174400 0.250400 1.594800 -0.831200 -0.072400 -0.058200 0.626400 3 Canon EOS-1D Mark II CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_7D-simple.xml0000644000175000017500000000236411536021334020330 00000000000000 Canon EOS 7D Simple 21 0 0.619800 0.177200 -0.059300 0.239600 1.176100 -0.387600 -0.085600 -0.099600 0.684400 3 Canon EOS 7D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S20Pro-simple.xml0000644000175000017500000000241211536021334022160 00000000000000 FUJIFILM FinePix S20Pro Simple 21 0 0.773600 0.256500 -0.186300 0.210700 1.504700 -0.703600 -0.120100 -0.321900 1.000400 3 FUJIFILM FinePix S20Pro CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S3Pro-simple.xml0000644000175000017500000000241011536021334022077 00000000000000 FUJIFILM FinePix S3Pro Simple 21 0 0.800600 0.274100 -0.212000 0.198800 1.696800 -0.892700 -0.129400 -0.461200 1.180700 3 FUJIFILM FinePix S3Pro CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D3X-simple.xml0000644000175000017500000000235611536021334017567 00000000000000 NIKON D3X Simple 21 0 0.745700 0.251200 -0.217000 0.271800 1.555500 -0.808500 -0.064800 -0.198600 0.717100 3 NIKON D3X CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Sinar-simple.xml0000644000175000017500000000234611536021334017306 00000000000000 Sinar Simple 21 0 0.418200 0.556500 -0.104200 0.068800 1.112600 -0.263900 -0.222200 -0.271200 1.508400 3 Sinar CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_S90-simple.xml0000644000175000017500000000240211536021334021726 00000000000000 Canon PowerShot S90 Simple 21 0 0.468300 0.085200 -0.008300 0.207800 0.990200 -0.167700 -0.104900 -0.501600 1.237400 3 Canon PowerShot S90 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_D60-simple.xml0000644000175000017500000000236611536021334020411 00000000000000 Canon EOS D60 Simple 21 0 0.848300 0.322800 -0.264000 0.293700 1.448900 -0.716800 -0.089000 -0.134100 0.618800 3 Canon EOS D60 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-1-simple.xml0000644000175000017500000000236211536021334020002 00000000000000 OLYMPUS E-1 Simple 21 0 0.831100 0.412200 -0.269900 0.108900 1.587800 -0.702700 -0.094500 -0.476700 1.184600 3 OLYMPUS E-1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/PENTAX_K-7-simple.xml0000644000175000017500000000236011536021334017643 00000000000000 PENTAX K-7 Simple 21 0 0.861500 0.289800 -0.222400 0.166300 1.696700 -0.864800 -0.067800 -0.294700 0.914200 3 PENTAX K-7 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SAMSUNG_EX1-simple.xml0000644000175000017500000000327011537764506020041 00000000000000 SAMSUNG EX1 Simple 17 21 0.483500 0.084300 -0.023300 0.230800 1.037700 -0.236600 -0.044500 -0.321500 0.937900 0.457600 0.138100 -0.076000 0.206600 1.132800 -0.314400 -0.099400 -0.249800 0.889800 3 SAMSUNG EX1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_D2000-simple.xml0000644000175000017500000000237311536021334020543 00000000000000 Canon EOS D2000 Simple 21 0 0.322500 -0.060500 0.285800 -0.029700 1.137000 -0.149000 -0.340100 -1.086000 2.454200 3 Canon EOS D2000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_C7070-simple.xml0000644000175000017500000000236611536021334020164 00000000000000 OLYMPUS C7070 Simple 21 0 0.636500 0.172300 -0.145100 0.243600 1.485000 -0.711400 -0.109500 -0.353100 1.025200 3 OLYMPUS C7070 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_E8700-simple.xml0000644000175000017500000000236211536021334017671 00000000000000 NIKON E8700 Simple 21 0 0.735400 0.140700 -0.130700 0.264300 1.558300 -0.805100 -0.103600 -0.258300 0.848900 3 NIKON E8700 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/KODAK_DCS460-simple.xml0000644000175000017500000000236311536021334020005 00000000000000 KODAK DCS460 Simple 21 0 0.127300 0.067000 0.220600 0.023000 1.168500 -0.194400 -0.096700 -0.220600 1.059200 3 KODAK DCS460 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/PENTAX_K20D-simple.xml0000644000175000017500000000236211536021334017747 00000000000000 PENTAX K20D Simple 21 0 0.718000 0.326400 -0.219900 0.137300 1.609200 -0.749300 -0.086800 -0.271400 0.942700 3 PENTAX K20D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A580-simple.xml0000644000175000017500000000327611536021334020264 00000000000000 Sony DSLR-A580 Simple 17 21 0.704600 0.113300 -0.050100 0.333600 1.131600 -0.421900 -0.017800 -0.178000 0.603100 0.673900 0.152400 -0.074100 0.285600 1.228500 -0.481300 -0.041100 -0.149200 0.593200 3 Sony DSLR-A580 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Leica-S2-simple.xml0000644000175000017500000000326211540227436017535 00000000000000 Leica S2 Simple 17 21 0.811900 0.241400 -0.079500 0.268000 1.172400 -0.408100 -0.024400 -0.075300 0.525700 0.737900 0.294800 -0.104800 0.219200 1.245600 -0.442300 -0.044700 -0.072100 0.562700 3 Leica S2 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_IS-1-simple.xml0000644000175000017500000000236511536021334020171 00000000000000 FUJIFILM IS-1 Simple 21 0 0.770300 0.087500 0.028900 0.199900 1.059900 -0.233200 -0.144100 -1.080700 2.146100 3 FUJIFILM IS-1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/CINE_650-simple.xml0000644000175000017500000000235311536021334017340 00000000000000 CINE 650 Simple 21 0 0.357300 0.700200 -0.164800 0.101900 1.082000 -0.239800 -0.149900 0.143900 1.016100 3 CINE 650 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-520-simple.xml0000644000175000017500000000236611536021334020154 00000000000000 OLYMPUS E-520 Simple 21 0 0.728700 0.226900 -0.174800 0.204800 1.563500 -0.759600 -0.102000 -0.232200 0.834400 3 OLYMPUS E-520 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_600D-simple.xml0000644000175000017500000000327611537130677020506 00000000000000 Canon EOS 600D Simple 17 21 0.644200 0.105800 -0.027200 0.320000 1.060000 -0.336100 -0.043100 -0.191600 0.716400 0.593100 0.194400 -0.081900 0.237800 1.218400 -0.430000 -0.088200 -0.090700 0.646100 3 Canon EOS 600D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SAMSUNG_NX11-simple.xml0000644000175000017500000000327211537130677020131 00000000000000 SAMSUNG NX11 Simple 17 21 0.912500 0.135800 -0.044400 0.189100 1.327400 -0.501300 -0.064800 -0.492800 1.168100 0.833100 0.264700 -0.135200 0.152000 1.463900 -0.611100 -0.116800 -0.323400 1.033200 3 Samsung NX11 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/EPSON_R-D1-simple.xml0000644000175000017500000000236011536021334017635 00000000000000 EPSON R-D1 Simple 21 0 0.714500 0.059200 -0.070400 0.256400 1.601200 -0.842900 -0.073200 -0.187800 0.682700 3 EPSON R-D1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/PENTAX_645D-simple.xml0000644000175000017500000000327011536021334017730 00000000000000 PENTAX 645D Simple 17 21 0.735300 0.199800 -0.026700 0.220300 1.112000 -0.304700 -0.052100 -0.460300 1.112500 0.628700 0.287400 -0.066700 0.183100 1.169900 -0.332900 -0.115800 -0.359300 1.064600 3 PENTAX 645D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A300-simple.xml0000644000175000017500000000237011536021334020244 00000000000000 SONY DSLR-A300 Simple 21 0 0.710300 0.059500 -0.071500 0.222500 1.634500 -0.848500 -0.092800 -0.309100 0.984700 3 SONY DSLR-A300 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_G9-simple.xml0000644000175000017500000000240011536021334021630 00000000000000 Canon PowerShot G9 Simple 21 0 0.574300 0.169600 -0.141800 0.262500 1.325400 -0.562100 -0.059800 -0.214100 0.736800 3 Canon PowerShot G9 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A5-simple.xml0000644000175000017500000000236411536021334020111 00000000000000 SONY DSLR-A5 Simple 21 0 0.737100 0.143500 -0.070900 0.302900 1.254200 -0.522800 -0.010300 -0.058000 0.495000 3 SONY DSLR-A5 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_DCS660C-simple.xml0000644000175000017500000000236711536021334020316 00000000000000 Kodak DCS660C Simple 21 0 0.280200 -0.012900 0.371100 -0.052100 1.119300 -0.079100 -0.273900 -0.635100 1.824400 3 Kodak DCS660C CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A350-simple.xml0000644000175000017500000000237011536021334020251 00000000000000 SONY DSLR-A350 Simple 21 0 0.721700 0.074600 -0.087500 0.251300 1.674600 -0.914600 -0.057800 -0.148400 0.603800 3 SONY DSLR-A350 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Phase_One_P_30-simple.xml0000644000175000017500000000237011536021334020651 00000000000000 Phase One P 30 Simple 21 0 0.708700 0.467100 -0.320600 0.217300 1.497600 -0.702000 -0.003700 -0.024500 0.451600 3 Phase One P 30 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S100FS-simple.xml0000644000175000017500000000241211536021334022007 00000000000000 FUJIFILM FinePix S100FS Simple 21 0 0.604500 0.198400 -0.146600 0.305800 1.376700 -0.652400 -0.106500 -0.435500 1.152100 3 FUJIFILM FinePix S100FS CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A380-simple.xml0000644000175000017500000000237011536021334020254 00000000000000 SONY DSLR-A380 Simple 21 0 0.721800 0.074600 -0.087500 0.251200 1.674600 -0.914500 -0.057900 -0.148400 0.603800 3 SONY DSLR-A380 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/KODAK_NC2000-simple.xml0000644000175000017500000000236311536021334017744 00000000000000 KODAK NC2000 Simple 21 0 0.129100 0.008200 0.212100 0.064200 0.991900 -0.046500 -0.080300 -0.605500 1.389100 3 KODAK NC2000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_E950-simple.xml0000644000175000017500000000260011536021334017603 00000000000000 NIKON E950 Simple 21 0 -0.026300 0.658500 0.366700 0.329900 0.762500 -0.257200 0.227600 -0.186700 1.035900 0.179300 1.142500 -0.403300 3 NIKON E950 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_20Da-simple.xml0000644000175000017500000000237011536021334020541 00000000000000 Canon EOS 20Da Simple 21 0 0.656100 0.182400 -0.162300 0.203900 1.463300 -0.655000 -0.138200 -0.506500 1.415500 3 Canon EOS 20Da CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Phase_One_P_2-simple.xml0000644000175000017500000000236511536021334020574 00000000000000 Phase One P 2 Simple 21 0 0.751700 0.425300 -0.303800 0.147600 1.662600 -0.813400 -0.023700 0.073200 0.290500 3 Phase One P 2 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Minolta_DiMAGE_5-simple.xml0000644000175000017500000000237411536021334021130 00000000000000 Minolta DiMAGE 5 Simple 21 0 0.801400 0.288700 -0.242600 0.223700 1.447600 -0.655600 -0.096300 -0.294200 0.898300 3 Minolta DiMAGE 5 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D5000-simple.xml0000644000175000017500000000236211536021334017656 00000000000000 NIKON D5000 Simple 21 0 0.806400 0.282600 -0.243300 0.262200 1.600800 -0.847400 -0.051900 -0.140300 0.730900 3 NIKON D5000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/PENTAX_K-x-simple.xml0000644000175000017500000000236011536021334017744 00000000000000 PENTAX K-x Simple 21 0 0.741000 0.123400 -0.041100 0.266800 1.264400 -0.502500 -0.062500 -0.283700 0.884300 3 PENTAX K-x CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Minolta_DiMAGE_A1-simple.xml0000644000175000017500000000237611536021334021227 00000000000000 Minolta DiMAGE A1 Simple 21 0 0.834000 0.272000 -0.227300 0.194300 1.632300 -0.822000 -0.116700 -0.254700 0.927400 3 Minolta DiMAGE A1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-P1-simple.xml0000644000175000017500000000236411536021334020124 00000000000000 OLYMPUS E-P1 Simple 21 0 0.823500 0.238000 -0.183100 0.210300 1.570500 -0.771500 -0.102100 -0.205000 0.834300 3 OLYMPUS E-P1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/KODAK_P850-simple.xml0000644000175000017500000000236011536021334017573 00000000000000 KODAK P850 Simple 21 0 0.624600 0.179200 -0.148100 0.255800 1.458700 -0.694600 -0.110200 -0.383600 1.051100 3 KODAK P850 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_A5-simple.xml0000644000175000017500000000261711536021334021630 00000000000000 Canon PowerShot A5 Simple 21 0 0.054700 1.088300 -0.155400 0.594700 1.016400 -0.525900 0.409400 0.161100 0.292600 0.195200 0.947500 -0.480100 3 Canon PowerShot A5 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-400-simple.xml0000644000175000017500000000236611536021334020151 00000000000000 OLYMPUS E-400 Simple 21 0 0.856800 0.358000 -0.290400 0.253600 1.476100 -0.710700 -0.002100 -0.148300 0.616900 3 OLYMPUS E-400 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-GH2-simple.xml0000644000175000017500000000330411536021334021201 00000000000000 Panasonic DMC-GH2 Simple 17 21 0.605000 0.150400 -0.050000 0.308300 1.062000 -0.328100 -0.040900 -0.286400 0.797000 0.529800 0.239000 -0.101800 0.248400 1.172400 -0.391300 -0.080600 -0.241000 0.778000 3 Panasonic DMC-GH2 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SAMSUNG_NX5-simple.xml0000644000175000017500000000327011546160032020036 00000000000000 SAMSUNG NX5 Simple 17 21 0.912500 0.135800 -0.044400 0.189100 1.327400 -0.501300 -0.064800 -0.492800 1.168100 0.833100 0.264700 -0.135200 0.152000 1.463900 -0.611100 -0.116800 -0.323400 1.033200 3 Samsung NX5 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_DCS330C-simple.xml0000644000175000017500000000236711536021334020310 00000000000000 Kodak DCS330C Simple 21 0 0.222000 -0.023300 0.355100 -0.039600 1.007300 -0.010300 -0.280100 -0.757200 2.062000 3 Kodak DCS330C CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_S3_IS-simple.xml0000644000175000017500000000240611536021334022237 00000000000000 Canon PowerShot S3 IS Simple 21 0 0.494600 0.207400 -0.131500 0.229400 1.275400 -0.481900 -0.147900 -0.531800 1.438300 3 Canon PowerShot S3 IS CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-420-simple.xml0000644000175000017500000000236611536021334020153 00000000000000 OLYMPUS E-420 Simple 21 0 0.741600 0.230900 -0.178000 0.207300 1.561200 -0.759400 -0.109500 -0.242500 0.874600 3 OLYMPUS E-420 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_G5-simple.xml0000644000175000017500000000240011536021334021624 00000000000000 Canon PowerShot G5 Simple 21 0 0.721200 0.232800 -0.162200 0.230100 1.386100 -0.597200 -0.093300 -0.287200 0.975700 3 Canon PowerShot G5 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Leica-M8-simple.xml0000644000175000017500000000326111537130677017542 00000000000000 Leica M8 Simple 17 21 0.716000 0.247300 -0.088600 0.241900 1.217500 -0.432500 0.128000 -0.531500 1.047000 0.657800 0.400600 -0.242500 0.185600 1.411900 -0.586000 -0.030500 -0.219600 0.767500 3 Leica M8 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S6000fd-simple.xml0000644000175000017500000000332111541412537022162 00000000000000 FUJIFILM FinePix S6000fd Simple 17 21 0.712700 0.189800 -0.116200 0.251900 1.281600 -0.507500 0.020500 -0.778000 1.515600 0.709100 0.278200 -0.219800 0.196200 1.499700 -0.686000 -0.140100 -0.488600 1.262800 3 Fujifilm FinePix S6000fd CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSC-F828-simple.xml0000644000175000017500000000260711536021334020140 00000000000000 SONY DSC-F828 Simple 21 0 0.348100 1.140100 -0.724200 0.681800 0.219900 -0.151700 0.299800 1.545900 -0.822600 -0.077700 -0.191000 0.792400 3 SONY DSC-F828 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_DCS_Pro_SLR-simple.xml0000644000175000017500000000237511536021334021316 00000000000000 Kodak DCS Pro SLR Simple 21 0 0.544500 0.399700 -0.187600 0.284600 1.385000 -0.642700 -0.023200 0.239300 0.549400 3 Kodak DCS Pro SLR CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_S60-simple.xml0000644000175000017500000000240211536021334021723 00000000000000 Canon PowerShot S60 Simple 21 0 0.708200 0.199600 -0.142200 0.257300 1.540300 -0.780400 -0.079700 -0.248200 0.879500 3 Canon PowerShot S60 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Leaf_Aptus_54S-simple.xml0000644000175000017500000000236711536021334020713 00000000000000 Leaf Aptus 54S Simple 21 0 0.577100 0.578600 -0.367300 0.242800 1.595300 -0.825100 -0.131400 0.174600 0.823600 3 Leaf Aptus 54S CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A700-simple.xml0000644000175000017500000000237011536021334020250 00000000000000 SONY DSLR-A700 Simple 21 0 0.724900 0.234100 -0.194300 0.239100 1.629500 -0.857400 -0.035900 -0.080500 0.577500 3 SONY DSLR-A700 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_E8400-simple.xml0000644000175000017500000000236211536021334017666 00000000000000 NIKON E8400 Simple 21 0 0.756000 0.134200 -0.109800 0.259900 1.571800 -0.815400 -0.099200 -0.232000 0.784200 3 NIKON E8400 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-300-simple.xml0000644000175000017500000000236611536021334020150 00000000000000 OLYMPUS E-300 Simple 21 0 0.655700 0.451800 -0.285300 0.183000 1.407100 -0.578800 -0.034800 -0.176100 0.782800 3 OLYMPUS E-300 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_30D-simple.xml0000644000175000017500000000236611536021334020406 00000000000000 Canon EOS 30D Simple 21 0 0.704600 0.190400 -0.171400 0.239600 1.562100 -0.788000 -0.100000 -0.030300 0.625700 3 Canon EOS 30D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A560-simple.xml0000644000175000017500000000327511536021334020261 00000000000000 Sony DSLR-A560 Simple 17 21 0.793400 0.073900 -0.021900 0.337000 1.119700 -0.412400 0.041100 -0.369400 0.770200 0.737100 0.143500 -0.070900 0.302900 1.254200 -0.522800 -0.010300 -0.058000 0.495000 3 Sony DSLR-A560 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_D30-simple.xml0000644000175000017500000000236611536021334020406 00000000000000 Canon EOS D30 Simple 21 0 0.877500 0.307500 -0.243800 0.306800 1.306400 -0.580300 -0.131200 -0.268900 0.980500 3 Canon EOS D30 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-L1-simple.xml0000644000175000017500000000237411536021334021103 00000000000000 Panasonic DMC-L1 Simple 21 0 0.762900 0.354200 -0.280500 0.204000 1.636700 -0.834900 -0.102500 -0.188500 0.805400 3 Panasonic DMC-L1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_C5050-simple.xml0000644000175000017500000000236611536021334020160 00000000000000 OLYMPUS C5050 Simple 21 0 0.623700 0.230600 -0.165300 0.190100 1.429400 -0.607900 -0.127300 -0.312400 1.050800 3 OLYMPUS C5050 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-PL1-simple.xml0000644000175000017500000000236611536021334020242 00000000000000 OLYMPUS E-PL1 Simple 21 0 0.823500 0.238000 -0.183100 0.210300 1.570500 -0.771500 -0.102100 -0.205000 0.834300 3 OLYMPUS E-PL1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A550-simple.xml0000644000175000017500000000327511536021334020260 00000000000000 SONY DSLR-A550 Simple 17 21 0.793400 0.073900 -0.021900 0.337000 1.119700 -0.412400 0.041100 -0.369400 0.770200 0.737100 0.143500 -0.070900 0.302900 1.254200 -0.522800 -0.010300 -0.058000 0.495000 3 SONY DSLR-A550 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/PENTAX_K2000-simple.xml0000644000175000017500000000236411536021334020005 00000000000000 PENTAX K2000 Simple 21 0 0.810400 0.037500 -0.028200 0.232900 1.304600 -0.515200 -0.115500 -0.360400 1.105700 3 PENTAX K2000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-L10-simple.xml0000644000175000017500000000237611536021334021165 00000000000000 Panasonic DMC-L10 Simple 21 0 0.703900 0.300500 -0.245600 0.210000 1.590400 -0.792000 -0.105000 -0.194200 0.802500 3 Panasonic DMC-L10 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_A630-simple.xml0000644000175000017500000000240411536021334021766 00000000000000 Canon PowerShot A630 Simple 21 0 0.534800 0.310500 -0.219100 0.161700 1.447200 -0.608700 -0.175700 -0.530800 1.420100 3 Canon PowerShot A630 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_G10-simple.xml0000644000175000017500000000240211536021334021702 00000000000000 Canon PowerShot G10 Simple 21 0 0.556100 0.175000 -0.100300 0.287900 1.249200 -0.504700 -0.102800 -0.390600 1.109300 3 Canon PowerShot G10 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_DCS_Pro_14-simple.xml0000644000175000017500000000237311536021334021100 00000000000000 Kodak DCS Pro 14 Simple 21 0 0.619800 0.400600 -0.245500 0.203900 1.645800 -0.858800 -0.077600 0.312800 0.779100 3 Kodak DCS Pro 14 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Minolta_DiMAGE_7-simple.xml0000644000175000017500000000237411536021334021132 00000000000000 Minolta DiMAGE 7 Simple 21 0 0.774400 0.301900 -0.247000 0.228100 1.455600 -0.667600 -0.099800 -0.277700 0.914400 3 Minolta DiMAGE 7 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_450D-simple.xml0000644000175000017500000000237011536021334020467 00000000000000 Canon EOS 450D Simple 21 0 0.742700 0.268100 -0.198200 0.267200 1.506400 -0.753900 -0.082100 -0.026200 0.578400 3 Canon EOS 450D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S9100-simple.xml0000644000175000017500000000241011536021334021645 00000000000000 FUJIFILM FinePix S9100 Simple 21 0 0.880000 0.249600 -0.189500 0.243500 1.489900 -0.716500 -0.128500 -0.451500 1.234300 3 FUJIFILM FinePix S9100 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/PENTAX_K-m-simple.xml0000644000175000017500000000236011536021334017731 00000000000000 PENTAX K-m Simple 21 0 0.810400 0.037500 -0.028200 0.232900 1.304600 -0.515200 -0.115500 -0.360400 1.105700 3 PENTAX K-m CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/MOTOROLA_PIXL-simple.xml0000644000175000017500000000236611536021334020324 00000000000000 MOTOROLA PIXL Simple 21 0 0.530800 0.323400 -0.067300 0.170400 1.182500 -0.335000 -0.105100 -0.100700 0.905600 3 MOTOROLA PIXL CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_S50-simple.xml0000644000175000017500000000240211536021334021722 00000000000000 Canon PowerShot S50 Simple 21 0 0.656900 0.217200 -0.151600 0.228800 1.423400 -0.634800 -0.086300 -0.257100 0.888200 3 Canon PowerShot S50 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Ricoh_A12_28mm-simple.xml0000644000175000017500000000331311537130677020553 00000000000000 Ricoh A12 28mm Simple 17 21 0.744100 0.101000 -0.041000 0.293600 1.194300 -0.452700 -0.023700 -0.429500 1.080200 0.668500 0.187300 -0.094300 0.237100 1.315800 -0.530400 -0.093300 -0.315900 1.022800 3 RICOH GR LENS A12 28mm F2.5 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Leaf-simple.xml0000644000175000017500000000234311536021334017076 00000000000000 Leaf Simple 21 0 0.577100 0.578600 -0.367300 0.242800 1.595300 -0.825100 -0.131400 0.174600 0.823600 3 Leaf CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_S30-simple.xml0000644000175000017500000000240211536021334021720 00000000000000 Canon PowerShot S30 Simple 21 0 0.767000 0.258100 -0.219700 0.200600 1.466200 -0.655200 -0.112900 -0.365200 1.056600 3 Canon PowerShot S30 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S5Pro-simple.xml0000644000175000017500000000241011536021334022101 00000000000000 FUJIFILM FinePix S5Pro Simple 21 0 0.810000 0.244800 -0.194700 0.199800 1.714300 -0.911700 -0.130400 -0.511000 1.230000 3 FUJIFILM FinePix S5Pro CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-LX3-simple.xml0000644000175000017500000000237611536021334021237 00000000000000 Panasonic DMC-LX3 Simple 21 0 0.608300 0.256800 -0.178200 0.316100 1.330700 -0.613400 -0.065500 -0.266800 0.812800 3 Panasonic DMC-LX3 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/AGFAPHOTO_DC-833m-simple.xml0000644000175000017500000000237611536021334020603 00000000000000 AGFAPHOTO DC-833m Simple 21 0 0.549100 0.237800 -0.127100 0.258700 1.027200 -0.249600 -0.115500 -0.389800 1.185100 3 AGFAPHOTO DC-833m CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/KODAK_EOSDCS1-simple.xml0000644000175000017500000000236511536021334020205 00000000000000 KODAK EOSDCS1 Simple 21 0 0.127300 0.067000 0.220600 0.023000 1.168500 -0.194400 -0.096700 -0.220600 1.059200 3 KODAK EOSDCS1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/MINOLTA_DYNAX_5-simple.xml0000644000175000017500000000237211536021334020523 00000000000000 MINOLTA DYNAX 5 Simple 21 0 0.664400 0.088200 -0.082900 0.231600 1.576200 -0.795700 -0.108600 -0.328300 1.028400 3 MINOLTA DYNAX 5 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D50-simple.xml0000644000175000017500000000235611536021334017521 00000000000000 NIKON D50 Simple 21 0 0.733000 0.078300 -0.085900 0.249800 1.588400 -0.823800 -0.078900 -0.242200 0.773200 3 NIKON D50 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_G1-simple.xml0000644000175000017500000000262011536021334021624 00000000000000 Canon PowerShot G1 Simple 21 0 0.055700 1.105100 -0.156600 0.607700 0.990800 -0.514600 0.434400 -0.114100 0.474300 0.217200 0.946700 -0.477800 3 Canon PowerShot G1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Phase_One_P_45-simple.xml0000644000175000017500000000237011536021334020657 00000000000000 Phase One P 45 Simple 21 0 0.584900 0.449200 -0.261900 0.170200 1.407600 -0.568400 -0.011700 -0.002400 0.505300 3 Phase One P 45 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SAMSUNG_NX10-simple.xml0000644000175000017500000000327211537764506020134 00000000000000 SAMSUNG NX10 Simple 17 21 0.912500 0.135800 -0.044400 0.189100 1.327400 -0.501300 -0.064800 -0.492800 1.168100 0.833100 0.264700 -0.135200 0.152000 1.463900 -0.611100 -0.116800 -0.323400 1.033200 3 Samsung NX10 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A500-simple.xml0000644000175000017500000000327511536021334020253 00000000000000 SONY DSLR-A500 Simple 17 21 0.832000 0.067300 -0.017700 0.311700 1.173900 -0.447100 0.046700 -0.512800 0.954800 0.762500 0.141900 -0.069100 0.278600 1.307600 -0.557400 -0.027800 -0.112700 0.604600 3 SONY DSLR-A500 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_DCS620C-simple.xml0000644000175000017500000000236711536021334020312 00000000000000 Kodak DCS620C Simple 21 0 0.345300 -0.048900 0.258600 -0.027200 1.174900 -0.205400 -0.314900 -1.017500 2.361700 3 Kodak DCS620C CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S5500-simple.xml0000644000175000017500000000241011536021334021645 00000000000000 FUJIFILM FinePix S5500 Simple 21 0 0.742100 0.116500 -0.099300 0.254200 1.442800 -0.676600 -0.125500 -0.443100 1.194000 3 FUJIFILM FinePix S5500 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_S70-simple.xml0000644000175000017500000000240211536021334021724 00000000000000 Canon PowerShot S70 Simple 21 0 0.788900 0.098900 -0.090100 0.290600 1.446300 -0.711500 -0.083200 -0.381000 0.997600 3 Canon PowerShot S70 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_E5400-simple.xml0000644000175000017500000000236211536021334017663 00000000000000 NIKON E5400 Simple 21 0 0.683900 0.268000 -0.209800 0.226600 1.576600 -0.791900 -0.100100 -0.298700 0.934900 3 NIKON E5400 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Minolta_DiMAGE_7Hi-simple.xml0000644000175000017500000000240011536021334021401 00000000000000 Minolta DiMAGE 7Hi Simple 21 0 0.728500 0.305600 -0.247500 0.233900 1.435800 -0.652100 -0.124200 -0.389400 1.136800 3 Minolta DiMAGE 7Hi CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_FZ100-simple.xml0000644000175000017500000000330611536021334020762 00000000000000 Panasonic DMC-FZ100 Simple 17 21 0.624000 0.092400 0.122600 0.263900 0.893600 -0.115500 -0.032600 -0.933500 1.848100 0.524800 0.223800 0.036600 0.186900 1.076500 -0.239300 -0.176100 -0.614600 1.619700 3 Panasonic DMC-FZ100 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_A530-simple.xml0000644000175000017500000000240411536021334021765 00000000000000 Canon PowerShot A530 Simple 21 0 0.826600 0.317800 -0.253600 0.259200 1.433500 -0.671400 -0.111800 -0.200000 0.819700 3 Canon PowerShot A530 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Ricoh_S10_24-72mm-simple.xml0000644000175000017500000000331611537130677021020 00000000000000 Ricoh S10 24-70mm Simple 17 21 0.527500 0.018900 0.036600 0.224800 0.844200 -0.030900 0.085100 -1.198000 1.746700 0.457700 0.089500 -0.010700 0.205200 1.027200 -0.203800 -0.087800 -0.404300 1.053100 3 RICOH S10 24-72mm F2.5-4.4 VC CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S6-simple.xml0000644000175000017500000000240211536021334021422 00000000000000 FUJIFILM FinePix S6 Simple 21 0 0.709100 0.278200 -0.219800 0.196200 1.499600 -0.686100 -0.140100 -0.488700 1.262800 3 FUJIFILM FinePix S6 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_E2500-simple.xml0000644000175000017500000000260111536021334017655 00000000000000 NIKON E2500 Simple 21 0 0.009600 0.908300 0.068800 0.594900 0.984000 -0.492400 0.334200 -0.055800 0.581400 0.218900 1.176200 -0.554700 3 NIKON E2500 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_DCS315C-simple.xml0000644000175000017500000000236511536021334020311 00000000000000 Kodak DCS315C Simple 21 0 0.225000 0.164900 0.611300 -0.013700 0.854600 0.075600 -0.251000 -0.482700 1.752300 3 Kodak DCS315C CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A100-simple.xml0000644000175000017500000000237011536021334020242 00000000000000 SONY DSLR-A100 Simple 21 0 0.718100 0.059600 -0.071000 0.229000 1.621500 -0.840500 -0.077400 -0.281100 0.943700 3 SONY DSLR-A100 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS-1Ds_Mark_II-simple.xml0000644000175000017500000000240611536021334021753 00000000000000 Canon EOS-1Ds Mark II Simple 21 0 0.763300 0.177100 -0.161800 0.237800 1.592600 -0.818000 -0.086700 -0.060200 0.651700 3 Canon EOS-1Ds Mark II CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Konica_Minolta_Maxxum_7D-simple.xml0000644000175000017500000000332211536021334023005 00000000000000 Konica Minolta Maxxum 7D Simple 17 21 0.683900 0.063600 -0.051300 0.281100 1.444900 -0.701900 -0.007600 -0.495500 1.203600 0.687100 0.092600 -0.092800 0.245200 1.572700 -0.803700 -0.109900 -0.310400 1.023900 3 Konica Minolta Maxxum 7D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_50D-simple.xml0000644000175000017500000000236511536021334020407 00000000000000 Canon EOS 50D Simple 21 0 0.700500 0.317800 -0.177400 0.278400 1.396400 -0.649300 -0.059300 0.061600 0.492000 3 Canon EOS 50D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-PL1s-simple.xml0000644000175000017500000000327611537130677020442 00000000000000 OLYMPUS E-PL1s Simple 17 21 0.795900 0.118500 -0.032900 0.251300 1.169700 -0.391100 -0.068700 -0.484800 1.180000 0.741500 0.181000 -0.070900 0.200300 1.275700 -0.457200 -0.139300 -0.387200 1.140900 3 Olympus E-PL1s CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_1000D-simple.xml0000644000175000017500000000237211536021334020541 00000000000000 Canon EOS 1000D Simple 21 0 0.753300 0.143700 -0.124400 0.292800 1.512300 -0.781800 -0.097700 -0.113900 0.677100 3 Canon EOS 1000D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Micron_2010-simple.xml0000644000175000017500000000236011536021334020117 00000000000000 Micron 2010 Simple 21 0 0.464300 0.090000 0.325000 0.015400 0.916600 0.014700 -0.203600 -0.356100 1.580500 3 Micron 2010 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-410-simple.xml0000644000175000017500000000236611536021334020152 00000000000000 OLYMPUS E-410 Simple 21 0 0.746900 0.257500 -0.200900 0.208200 1.576600 -0.776100 -0.102600 -0.258200 0.885600 3 OLYMPUS E-410 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Apple_QuickTake-simple.xml0000644000175000017500000000237111536021334021232 00000000000000 Apple QuickTake Simple 21 0 0.170200 0.116900 0.587000 -0.034000 0.656100 0.197100 -0.274600 -0.463000 1.752200 3 Apple QuickTake CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D80-simple.xml0000644000175000017500000000235611536021334017524 00000000000000 NIKON D80 Simple 21 0 0.852000 0.136300 -0.149000 0.217100 1.694000 -0.905500 -0.088300 -0.241000 0.862900 3 NIKON D80 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-LX2-simple.xml0000644000175000017500000000237611536021334021236 00000000000000 Panasonic DMC-LX2 Simple 21 0 0.704900 0.214600 -0.170000 0.327200 1.351900 -0.645000 -0.062300 -0.281000 0.804800 3 Panasonic DMC-LX2 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SAMSUNG_WB2000-simple.xml0000644000175000017500000000327511536021334020243 00000000000000 Samsung WB2000 Simple 17 21 0.495700 0.123400 0.030800 0.220300 0.872800 -0.056600 -0.038000 -0.437500 1.238900 0.457600 0.178700 -0.002200 0.173300 0.953400 -0.100000 -0.115500 -0.355700 1.209300 3 Samsung WB2000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Konica_Minolta_Maxxum_5D-simple.xml0000644000175000017500000000332111536021334023002 00000000000000 Konica Minolta Maxxum 5D Simple 17 21 0.655800 0.062800 -0.048900 0.269300 1.454300 -0.701600 0.016200 -0.562500 1.256100 0.664400 0.088200 -0.082900 0.231600 1.576200 -0.795700 -0.108600 -0.328300 1.028400 3 Konica Minolta Maxxum 5D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Leica-X1-native.xml0000644000175000017500000000325411537130677017545 00000000000000 Leica X1 DNG 17 21 1.012500 0.091400 -0.047400 0.367200 1.155500 -0.475400 0.022500 -0.231900 0.787000 0.976000 0.155000 -0.100800 0.302100 1.285900 -0.554900 -0.034200 -0.152800 0.716900 0 LEICA X1 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Ricoh_Digital_3-simple.xml0000644000175000017500000000330211537130677021162 00000000000000 Ricoh Digital 3 Simple 17 21 0.531900 0.121900 -0.064000 0.266600 1.154900 -0.388700 0.045300 -0.465000 1.027200 0.526500 0.185900 -0.136700 0.231200 1.305600 -0.514700 -0.065500 -0.249600 0.817000 3 Ricoh GR DIGITAL 3 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Neutral-With-Tonecurve-AdobeRGB.xml0000644000175000017500000000242211536021334022574 00000000000000 Neutral AdobeRGB With Tonecurve 21 0 1.348800 -0.140700 0.028700 0.033500 1.916100 -0.978800 -0.341300 -0.610500 1.962400 3 Passthrough Tonecurve AdobeRGB CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_LX5-simple.xml0000644000175000017500000000330111536021334020625 00000000000000 Panasonic DMC-LX5 Simple 17 21 0.544000 0.075100 0.064000 0.313600 0.786100 -0.046500 0.003000 -0.608800 1.203400 0.458200 0.173800 0.002200 0.239900 0.930600 -0.133300 -0.094800 -0.429500 1.090900 3 Panasonic DMC-LX5 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_ProBack645-simple.xml0000644000175000017500000000237311536021334021123 00000000000000 Kodak ProBack645 Simple 21 0 0.494800 0.012200 0.254500 0.047300 1.303700 -0.355500 -0.147000 -0.606000 1.641400 3 Kodak ProBack645 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Ricoh_GX200-simple.xml0000644000175000017500000000327511537130677020134 00000000000000 Ricoh GX200 Simple 17 21 0.564500 0.111800 -0.057200 0.276200 1.123000 -0.363900 0.031300 -0.422100 0.981600 0.566000 0.158100 -0.112500 0.236300 1.254300 -0.465900 -0.062600 -0.236800 0.804000 3 Ricoh RICOH GX200 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Panasonic_DMC-FZ35-simple.xml0000644000175000017500000000240011536021334021304 00000000000000 Panasonic DMC-FZ35 Simple 21 0 0.462000 0.230400 -0.111700 0.248000 1.239300 -0.460400 -0.089000 -0.278000 0.993800 3 Panasonic DMC-FZ35 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_DCS560C-simple.xml0000644000175000017500000000236611536021334020314 00000000000000 Kodak DCS560C Simple 21 0 0.313600 0.022600 0.254200 -0.028500 1.041000 -0.103300 -0.312500 -0.717200 2.048200 3 Kodak DCS560C CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-3-simple.xml0000644000175000017500000000236211536021334020004 00000000000000 OLYMPUS E-3 Simple 21 0 0.738900 0.210000 -0.161800 0.201000 1.560600 -0.753300 -0.111500 -0.287500 0.948700 3 OLYMPUS E-3 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_300D-simple.xml0000644000175000017500000000237011536021334020461 00000000000000 Canon EOS 300D Simple 21 0 0.826600 0.317800 -0.253600 0.259200 1.433500 -0.671400 -0.111800 -0.200000 0.819700 3 Canon EOS 300D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_A620-simple.xml0000644000175000017500000000240411536021334021765 00000000000000 Canon PowerShot A620 Simple 21 0 0.532800 0.167300 -0.090600 0.205200 1.236700 -0.421100 -0.159000 -0.632100 1.558200 3 Canon PowerShot A620 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A390-simple.xml0000644000175000017500000000327611536021334020263 00000000000000 SONY DSLR-A390 Simple 17 21 0.722400 0.042800 -0.040800 0.298700 1.494400 -0.768300 -0.021100 -0.199100 0.645900 0.721800 0.074600 -0.087500 0.251200 1.674600 -0.914500 -0.057900 -0.148400 0.603800 3 SONY DSLR-A390 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_IS_Pro-simple.xml0000644000175000017500000000237211536021334020651 00000000000000 FUJIFILM IS Pro Simple 21 0 0.810000 0.244800 -0.194700 0.199800 1.714300 -0.911700 -0.130400 -0.511000 1.230000 3 FUJIFILM IS Pro CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SONY_DSLR-A450-simple.xml0000644000175000017500000000327511536021334020257 00000000000000 SONY DSLR-A450 Simple 17 21 0.793400 0.073900 -0.021900 0.337000 1.119700 -0.412400 0.041100 -0.369400 0.770200 0.737100 0.143500 -0.070900 0.302900 1.254200 -0.522800 -0.010300 -0.058000 0.495000 3 SONY DSLR-A450 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/KODAK_DCS420-simple.xml0000644000175000017500000000236311536021334020001 00000000000000 KODAK DCS420 Simple 21 0 0.221600 0.062800 0.234300 0.048400 1.108300 -0.153700 -0.064400 -0.185200 1.086800 3 KODAK DCS420 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Kodak_DCS720X-simple.xml0000644000175000017500000000236511536021334020336 00000000000000 Kodak DCS720X Simple 21 0 0.272800 0.622100 -0.101900 -0.128600 0.184600 0.955600 0.095000 -0.588400 1.177500 3 Kodak DCS720X CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D40X-simple.xml0000644000175000017500000000236011536021334017643 00000000000000 NIKON D40X Simple 21 0 0.844900 0.121300 -0.132900 0.215100 1.692800 -0.902500 -0.091100 -0.254300 0.881900 3 NIKON D40X CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_D1X-simple.xml0000644000175000017500000000235611536021334017565 00000000000000 NIKON D1X Simple 21 0 0.852100 0.305500 -0.267900 0.187500 1.724200 -0.911400 -0.097500 -0.224500 0.770200 3 NIKON D1X CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SAMSUNG_GX-1S-simple.xml0000644000175000017500000000327411537764506020247 00000000000000 SAMSUNG GX-1S Simple 17 21 1.183300 0.068800 -0.064600 0.294700 1.472200 -0.741800 -0.030500 -0.402900 1.210300 1.224200 0.086300 -0.102200 0.253100 1.620800 -0.860300 -0.118900 -0.243900 1.050400 3 Samsung GX-1S CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S5600-simple.xml0000644000175000017500000000241011536021334021646 00000000000000 FUJIFILM FinePix S5600 Simple 21 0 0.862100 0.231100 -0.180300 0.258900 1.504000 -0.744200 -0.098800 -0.280400 0.963600 3 FUJIFILM FinePix S5600 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_350D-simple.xml0000644000175000017500000000237011536021334020466 00000000000000 Canon EOS 350D Simple 21 0 0.764200 0.171900 -0.153000 0.297500 1.588100 -0.864500 -0.096500 -0.061700 0.601800 3 Canon EOS 350D CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-10-simple.xml0000644000175000017500000000236411536021334020064 00000000000000 OLYMPUS E-10 Simple 21 0 0.660300 0.225600 -0.193400 0.158000 1.454200 -0.606200 -0.141600 -0.450000 1.274500 3 OLYMPUS E-10 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S5100-simple.xml0000644000175000017500000000241011536021334021641 00000000000000 FUJIFILM FinePix S5100 Simple 21 0 0.742100 0.116500 -0.099300 0.254200 1.442800 -0.676600 -0.125500 -0.443100 1.194000 3 FUJIFILM FinePix S5100 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/PENTAX_K-5-simple.xml0000644000175000017500000000236011536021334017641 00000000000000 PENTAX K-5 Simple 21 0 0.648100 0.170500 -0.097300 0.188100 1.230100 -0.399500 -0.113600 -0.256400 0.848400 3 PENTAX K-5 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/NIKON_COOLPIX_P7000-simple.xml0000644000175000017500000000331011536021334021063 00000000000000 Nikon Coolpix P7000 Simple 17 21 0.494300 0.073800 -0.018800 0.244500 1.012600 -0.222200 -0.000600 -0.540600 1.279500 0.445500 0.138000 -0.079100 0.220200 1.123900 -0.316900 -0.111100 -0.367900 1.143200 3 Nikon Coolpix P7000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS-1Ds_Mark_III-simple.xml0000644000175000017500000000241011536021334022057 00000000000000 Canon EOS-1Ds Mark III Simple 21 0 0.744800 0.188700 -0.173200 0.235300 1.601700 -0.825500 -0.093000 -0.021100 0.585900 3 Canon EOS-1Ds Mark III CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/OLYMPUS_E-620-simple.xml0000644000175000017500000000236611536021334020155 00000000000000 OLYMPUS E-620 Simple 21 0 0.782400 0.233700 -0.172500 0.200800 1.568100 -0.760900 -0.109200 -0.219800 0.845300 3 OLYMPUS E-620 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/FUJIFILM_FinePix_S9600-simple.xml0000644000175000017500000000241011536021334021652 00000000000000 FUJIFILM FinePix S9600 Simple 21 0 0.880000 0.249600 -0.189500 0.243500 1.489900 -0.716500 -0.128500 -0.451500 1.234300 3 FUJIFILM FinePix S9600 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_PowerShot_S45-simple.xml0000644000175000017500000000240211536021334021726 00000000000000 Canon PowerShot S45 Simple 21 0 0.804100 0.259700 -0.207700 0.275100 1.417400 -0.668200 -0.095500 -0.233300 0.816300 3 Canon PowerShot S45 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS_D6000-simple.xml0000644000175000017500000000237211536021334020546 00000000000000 Canon EOS D6000 Simple 21 0 0.313600 0.022600 0.254200 -0.028500 1.041000 -0.103300 -0.312500 -0.717200 2.048200 3 Canon EOS D6000 CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/SAMSUNG_GX-1L-simple.xml0000644000175000017500000000327411537764506020240 00000000000000 SAMSUNG GX-1L Simple 17 21 1.183300 0.068800 -0.064600 0.294700 1.472200 -0.741800 -0.030500 -0.402900 1.210300 1.224200 0.086300 -0.102200 0.253100 1.620800 -0.860300 -0.118900 -0.243900 1.050400 3 Samsung GX-1L CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/simple-src/Canon_EOS-1D_Mark_II_N-simple.xml0000644000175000017500000000241011536021334022040 00000000000000 Canon EOS-1D Mark II N Simple 21 0 0.804200 0.193800 -0.180100 0.250000 1.582500 -0.818000 -0.082200 -0.046600 0.624000 3 Canon EOS-1D Mark II N CC-BY-SA 3.0, rawstudio.org rawstudio-2.0/profiles/Canon_PowerShot_G12-simple.dcp0000755000175000017500000000051211537130700017576 00000000000000IIRCn! " Z[.Canon PowerShot G127'H'''6#' '2'''3'' ''&''';''Canon PowerShot G12 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/PENTAX_K-x-simple.dcp0000755000175000017500000000033011537130700015631 00000000000000IIRC V! bZPENTAX K-x"'''_'d1'l 'e'''PENTAX K-x SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_400D-simple.dcp0000755000175000017500000000034011537130700016347 00000000000000IIRCV! fZCanon EOS 400D'#'"'$'<' '''t'Canon EOS 400D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_600D-simple.dcp0000644000175000017500000000050011537130700016344 00000000000000IIRCn! ~" Z[$Canon EOS 600D''Q''h)' ''"'*'='u''4'/'J '''+'Canon EOS 600D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_500D-simple.dcp0000755000175000017500000000034011537130700016350 00000000000000IIRCV! fZCanon EOS 500D''z'['?8'P '' ''Canon EOS 500D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A230-simple.dcp0000755000175000017500000000034011537130700016133 00000000000000IIRCV! fZSONY DSLR-A230w&''`''?''5'S''SONY DSLR-A230 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/MINOLTA_DYNAX_5-simple.dcp0000755000175000017500000000034211537130700016410 00000000000000IIRCV! fZMINOLTA DYNAX 5,('-'''=' ''r''MINOLTA DYNAX 5 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_30D-simple.dcp0000755000175000017500000000033611537130700016273 00000000000000IIRCV! dZCanon EOS 30Dq'''8'='\ 'N'p''Canon EOS 30D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Leica-S2-simple.dcp0000644000175000017500000000046411540227436015426 00000000000000IIRC n! x" Z[Leica S2'' ''-'x ''n '''/'A''0''' ''Leica S2 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Leaf_Aptus_65-simple.dcp0000755000175000017500000000033611537130700016456 00000000000000IIRCV! dZLeaf Aptus 65''Z''@'''''Leaf Aptus 65 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S20Pro-simple.dcp0000755000175000017500000000036211537130700020054 00000000000000IIRCV! nZFUJIFILM FinePix S20Pro''m'O'':';'' '8'FUJIFILM FinePix S20Pro SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_C7070-simple.dcp0000755000175000017500000000033611537130700016051 00000000000000IIRCV! dZOLYMPUS C7070 ('5''6':' 'U'''OLYMPUS C7070 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S5100-simple.dcp0000755000175000017500000000036011537130700017535 00000000000000IIRCV! nZFUJIFILM FinePix S5100.''''\8' ''''FUJIFILM FinePix S5100 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS-1Ds_Mark_II-simple.dcp0000755000175000017500000000035611537130700017647 00000000000000IIRCV! lZCanon EOS-1Ds Mark IIu''' '6>'J ''''Canon EOS-1Ds Mark II SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D1X-simple.dcp0000755000175000017500000000032611537130700015452 00000000000000IIRC V! `ZNIKON D1X';'1'f'ZC'S'' 'I!'NIKON D1X SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_NEX-3-simple.dcp0000755000175000017500000000047011537130700015562 00000000000000IIRC n! z" Z[ SONY NEX-36'r'T'1',' ''''''L''0' ''L'@'SONY NEX-3 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/rawstudio-cameras.xml0000755000175000017500000007774311546160032016337 00000000000000 rawstudio-2.0/profiles/SONY_DSLR-A350-simple.dcp0000755000175000017500000000034011537130700016136 00000000000000IIRCV! fZSONY DSLR-A350'4''F'jA' '''1'SONY DSLR-A350 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D40X-simple.dcp0000755000175000017500000000033011537130700015530 00000000000000IIRC V! bZNIKON D40Xs"''q'' B'g'''!'NIKON D40X SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Minolta_DiMAGE_7i-simple.dcp0000755000175000017500000000050611537130700017170 00000000000000IIRCn! " Z[*Minolta DiMAGE 7i4'':''Z7' '''I '*+'1'Q'='<' '' ''Minolta DiMAGE 7i SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Ricoh_Digital_3-simple.dcp0000644000175000017500000000050611537130700017040 00000000000000IIRCn! " Z[*Ricoh GR DIGITAL 3 (''''-'j '''''@'q''3' ''C''Ricoh Digital 3 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Kodak_ProBack645-simple.dcp0000755000175000017500000000034411537130700017011 00000000000000IIRCV! hZKodak ProBack645@'T'B''2'' 'z'T'Kodak ProBack645 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-520-simple.dcp0000755000175000017500000000033611537130700016041 00000000000000IIRCV! dZOLYMPUS E-520 '''T'='',''w'OLYMPUS E-520 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_G3-simple.dcp0000755000175000017500000000035011537130700017516 00000000000000IIRCV! jZCanon PowerShot G3#'#''S'm7'- '' ''Canon PowerShot G3 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSC-F828-simple.dcp0000755000175000017500000000036611537130700016032 00000000000000IIRCV! dZSONY DSC-F828''''c<' ''''',' 'SONY DSC-F828 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Kodak_DCS315C-simple.dcp0000755000175000017500000000033611537130700016177 00000000000000IIRCV! dZKodak DCS315CsD'%'2''b!'w''q''Kodak DCS315C SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D60-simple.dcp0000755000175000017500000000032611537130700015407 00000000000000IIRC V! `ZNIKON D60 "'f'Y''A''''G 'NIKON D60 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_G10-simple.dcp0000755000175000017500000000035211537130700017576 00000000000000IIRCV! jZCanon PowerShot G10U+'''I'0'? ''''Canon PowerShot G10 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_D2000-simple.dcp0000755000175000017500000000034211537130700016427 00000000000000IIRCV! fZCanon EOS D2000_'''.'j,''* '' 'Canon EOS D2000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_1100D-simple.dcp0000644000175000017500000000050211537130700016422 00000000000000IIRCn! ~" Z[&Canon EOS 1100D'`'''+*' '''B','x''-'0' 'y''H'Canon EOS 1100D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/PENTAX_K-5-simple.dcp0000755000175000017500000000033011537130700015526 00000000000000IIRC V! bZPENTAX K-5$!'''e' 0'Y'3''Q'PENTAX K-5 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_D60-simple.dcp0000755000175000017500000000033611537130700016276 00000000000000IIRCV! dZCanon EOS D60,''''8'y '' '#!'Canon EOS D60 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_60D-simple.dcp0000755000175000017500000000047611537130700016303 00000000000000IIRCn! |" Z[ "Canon EOS 60D'''O'*'q ''' '?''c''0'''Q''Canon EOS 60D simpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_A530-simple.dcp0000755000175000017500000000035411537130700017661 00000000000000IIRCV! lZCanon PowerShot A530 '0'''7' ''j 'J 'Canon PowerShot A530 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-30-simple.dcp0000755000175000017500000000033411537130700015753 00000000000000IIRC V! dZOLYMPUS E-30''''>''' ''OLYMPUS E-30 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_E995-simple.dcp0000755000175000017500000000036011537130700015507 00000000000000IIRC V! bZNIKON E995U'-'''' ''p&'=''{#'`'NIKON E995 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_LX5-simple.dcp0000755000175000017500000000050611537130700016523 00000000000000IIRCn! " Z[*Panasonic DMC-LX5/'8''/''@ '''@'*'9'L''Z$'_ ''''Panasonic DMC-LX5 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_SP570UZ-simple.dcp0000755000175000017500000000034211537130700016403 00000000000000IIRCV! fZOLYMPUS SP570UZ-'4'''/'X '$'%''OLYMPUS SP570UZ SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S6-simple.dcp0000755000175000017500000000035211537130700017316 00000000000000IIRCV! jZFUJIFILM FinePix S6T1'''3':''j' ''FUJIFILM FinePix S6 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Ricoh_GX200-simple.dcp0000644000175000017500000000050011537130700015773 00000000000000IIRCn! " Z[$Ricoh RICOH GX200X&''9''+' ''^' 'h''''0'; ''-''Ricoh GX200 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Phase_One_P_2-simple.dcp0000755000175000017500000000033611537130700016462 00000000000000IIRCV! dZPhase One P 2Y ''':'@''"'']'Phase One P 2 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_E8700-simple.dcp0000755000175000017500000000033211537130700015556 00000000000000IIRC V! bZNIKON E8700)!''''<'S ''''NIKON E8700 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_S50-simple.dcp0000755000175000017500000000035211537130700017616 00000000000000IIRCV! jZCanon PowerShot S50"'''4'7'''|''Canon PowerShot S50 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Kodak_DCS520C-simple.dcp0000755000175000017500000000033611537130700016175 00000000000000IIRCV! dZKodak DCS520C_'''.'j,''* '' 'Kodak DCS520C SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_SP3-simple.dcp0000755000175000017500000000033211537130700015752 00000000000000IIRC V! bZOLYMPUS SP3-''' 'U8' ''''OLYMPUS SP3 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SAMSUNG_NX10-simple.dcp0000644000175000017500000000047411537764506016025 00000000000000IIRC n! |" Z[  Samsung NX10-''x'k'3'c'D'N'#'\('^'p'!'/9'''W ' 'SAMSUNG NX10 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_S40-simple.dcp0000755000175000017500000000035211537130700017615 00000000000000IIRCV! jZCanon PowerShot S40>!'I'T'+'7'T '' '5#'Canon PowerShot S40 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Kodak_DCS560C-simple.dcp0000755000175000017500000000033611537130700016201 00000000000000IIRCV! dZKodak DCS560CP''''('' ''@ 'Kodak DCS560C SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-FZ35-simple.dcp0000755000175000017500000000035011537130700017200 00000000000000IIRCV! jZPanasonic DMC-FZ35&'$'''i0' '' ' 'Panasonic DMC-FZ35 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Konica_Minolta_DiMAGE_A2-simple.dcp0000644000175000017500000000036411537130700020376 00000000000000IIRCV! pZ Konica Minolta DiMAGE A2#'Z''w'<' ':''S'Konica Minolta DiMAGE A2 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Kodak_DCS620C-simple.dcp0000755000175000017500000000033611537130700016176 00000000000000IIRCV! dZKodak DCS620CA\'A'''-'' ''} 'Kodak DCS620C SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/PENTAX_K1-simple.dcp0000755000175000017500000000032611537130700015452 00000000000000IIRC V! `ZPENTAX K1W+'''G'=' '''-'PENTAX K1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-620-simple.dcp0000755000175000017500000000033611537130700016042 00000000000000IIRCV! dZOLYMPUS E-620!'j''G'A=''C'! ''OLYMPUS E-620 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_10D-simple.dcp0000755000175000017500000000033611537130700016271 00000000000000IIRCV! dZCanon EOS 10D '0'''7' ''j 'J 'Canon EOS 10D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-PL1s-simple.dcp0000644000175000017500000000050011537130700016300 00000000000000IIRCn! ~" Z[$Olympus E-PL1s.''Q''-' '''','''$'1'';'''OLYMPUS E-PL1s SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D300-simple.dcp0000755000175000017500000000033011537130700015457 00000000000000IIRC V! bZNIKON D300F#'8'5''?''' ''NIKON D300 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Phase_One_H_20-simple.dcp0000755000175000017500000000034011537130700016525 00000000000000IIRCV! fZPhase One H 20!'?'''$>'(''0''Phase One H 20 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Leaf_Aptus_54S-simple.dcp0000755000175000017500000000034011537130700016572 00000000000000IIRCV! fZLeaf Aptus 54S, ''''Q>'| ''''Leaf Aptus 54S SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-LX1-simple.dcp0000755000175000017500000000034611537130700017122 00000000000000IIRCV! hZPanasonic DMC-LX1)''2''P>' 'h''"'Panasonic DMC-LX1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/sRGB-linear.icc0000644000175000017500000000147111526533645014702 000000000000009lcms0mntrRGB XYZ #$acspAPPLlcms-lcms dmndjdeschdmddhwtptPrXYZdbXYZxgXYZrTRCgTRCbTRCchrm$cprtEdesc(lcms internal)descsRGB built-indescsRGB built-inXYZ =XYZ o8XYZ $XYZ bcurvcurvcurvchrmT{L&f\textCopyright (c) 2010 Hewlett-Packard Development Company, LLP.rawstudio-2.0/profiles/Apple_QuickTake-simple.dcp0000755000175000017500000000034211537130700017120 00000000000000IIRCV! fZApple QuickTakerD''F'''''''Apple QuickTake SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-510-simple.dcp0000755000175000017500000000033611537130700016040 00000000000000IIRCV! dZOLYMPUS E-510Q"''')'='@' '''OLYMPUS E-510 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_F8-simple.dcp0000755000175000017500000000035211537130700017303 00000000000000IIRCV! jZFUJIFILM FinePix F8$+''''@;'''''FUJIFILM FinePix F8 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SAMSUNG_GX20-simple.dcp0000644000175000017500000000047411537764506016017 00000000000000IIRC n! |" Z[  SAMSUNG GX20,';'#''9'''''$'f'''>']'i' ' 'SAMSUNG GX20 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/KODAK_EASYSHARE_Z1015-simple.dcp0000755000175000017500000000035611537130700017160 00000000000000IIRCV! lZKODAK EASYSHARE Z1015,'B' ''70'W '''G'KODAK EASYSHARE Z1015 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D2X-simple.dcp0000755000175000017500000000032611537130700015453 00000000000000IIRC V! `ZNIKON D2X''/'''>' ''''NIKON D2X SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Makefile.am0000644000175000017500000005072111546160032014177 00000000000000rawstudiodir = $(datadir)/rawstudio/profiles rawstudio_DATA = rawstudio-cameras.xml\ generic_camera_profile.icc\ sRGB.icc\ prophoto.icc\ compatibleWithAdobeRGB1998.icc\ sRGB-linear.icc\ prophoto-linear.icc\ compatibleWithAdobeRGB1998-linear.icc\ Neutral-With-Tonecurve-sRGB.dcp\ Neutral-With-Tonecurve-AdobeRGB.dcp\ Neutral-With-Tonecurve-Prophoto.dcp\ AGFAPHOTO_DC-833m-simple.dcp\ Apple_QuickTake-simple.dcp\ Canon_EOS_1000D-simple.dcp\ Canon_EOS_1100D-simple.dcp\ Canon_EOS_10D-simple.dcp\ Canon_EOS_20D-simple.dcp\ Canon_EOS_20Da-simple.dcp\ Canon_EOS_300D-simple.dcp\ Canon_EOS_30D-simple.dcp\ Canon_EOS_350D-simple.dcp\ Canon_EOS_400D-simple.dcp\ Canon_EOS_40D-simple.dcp\ Canon_EOS_450D-simple.dcp\ Canon_EOS_500D-simple.dcp\ Canon_EOS_550D-simple.dcp\ Canon_EOS_50D-simple.dcp\ Canon_EOS_5D_Mark_II-simple.dcp\ Canon_EOS_5D-simple.dcp\ Canon_EOS_600D-simple.dcp\ Canon_EOS_60D-simple.dcp\ Canon_EOS_7D-simple.dcp\ Canon_EOS_D2000-simple.dcp\ Canon_EOS_D30-simple.dcp\ Canon_EOS_D60-simple.dcp\ Canon_EOS_D6000-simple.dcp\ Canon_EOS-1D_Mark_II_N-simple.dcp\ Canon_EOS-1D_Mark_II-simple.dcp\ Canon_EOS-1D_Mark_III-simple.dcp\ Canon_EOS-1D_Mark_IV-simple.dcp\ Canon_EOS-1D-simple.dcp\ Canon_EOS-1Ds_Mark_II-simple.dcp\ Canon_EOS-1Ds_Mark_III-simple.dcp\ Canon_EOS-1DS-simple.dcp\ Canon_EOS-simple.dcp\ Canon_PowerShot_A470-simple.dcp\ Canon_PowerShot_A5-simple.dcp\ Canon_PowerShot_A50-simple.dcp\ Canon_PowerShot_A530-simple.dcp\ Canon_PowerShot_A610-simple.dcp\ Canon_PowerShot_A620-simple.dcp\ Canon_PowerShot_A630-simple.dcp\ Canon_PowerShot_A640-simple.dcp\ Canon_PowerShot_A650-simple.dcp\ Canon_PowerShot_A720-simple.dcp\ Canon_PowerShot_G1-simple.dcp\ Canon_PowerShot_G10-simple.dcp\ Canon_PowerShot_G11-simple.dcp\ Canon_PowerShot_G12-simple.dcp\ Canon_PowerShot_G2-simple.dcp\ Canon_PowerShot_G3-simple.dcp\ Canon_PowerShot_G5-simple.dcp\ Canon_PowerShot_G6-simple.dcp\ Canon_PowerShot_G9-simple.dcp\ Canon_PowerShot_Pro1-simple.dcp\ Canon_PowerShot_Pro70-simple.dcp\ Canon_PowerShot_Pro90-simple.dcp\ Canon_PowerShot_S3_IS-simple.dcp\ Canon_PowerShot_S30-simple.dcp\ Canon_PowerShot_S40-simple.dcp\ Canon_PowerShot_S45-simple.dcp\ Canon_PowerShot_S50-simple.dcp\ Canon_PowerShot_S60-simple.dcp\ Canon_PowerShot_S70-simple.dcp\ Canon_PowerShot_SX1_IS-simple.dcp\ Canon_PowerShot_SX110_IS-simple.dcp\ Canon_PowerShot_S90-simple.dcp\ Canon_PowerShot_S95-simple.dcp\ CASIO_EX-S20-simple.dcp\ CASIO_EX-Z750-simple.dcp\ CINE_650-simple.dcp\ CINE_660-simple.dcp\ CINE-simple.dcp\ Contax_N_Digital-simple.dcp\ EPSON_R-D1-simple.dcp\ FUJIFILM_FinePix_E550-simple.dcp\ FUJIFILM_FinePix_E900-simple.dcp\ FUJIFILM_FinePix_F7-simple.dcp\ FUJIFILM_FinePix_F8-simple.dcp\ FUJIFILM_FinePix_S100FS-simple.dcp\ FUJIFILM_FinePix_S20Pro-simple.dcp\ FUJIFILM_FinePix_S2Pro-simple.dcp\ FUJIFILM_FinePix_S3Pro-simple.dcp\ FUJIFILM_FinePix_S5000-simple.dcp\ FUJIFILM_FinePix_S5100-simple.dcp\ FUJIFILM_FinePix_S5200-simple.dcp\ FUJIFILM_FinePix_S5500-simple.dcp\ FUJIFILM_FinePix_S5600-simple.dcp\ FUJIFILM_FinePix_S5Pro-simple.dcp\ FUJIFILM_FinePix_S6-simple.dcp\ FUJIFILM_FinePix_S6000fd-simple.dcp\ FUJIFILM_FinePix_S7000-simple.dcp\ FUJIFILM_FinePix_S9000-simple.dcp\ FUJIFILM_FinePix_S9100-simple.dcp\ FUJIFILM_FinePix_S9500-simple.dcp\ FUJIFILM_FinePix_S9600-simple.dcp\ FUJIFILM_IS_Pro-simple.dcp\ FUJIFILM_IS-1-simple.dcp\ Fuji_HS10-simple.dcp\ Imacon_Ixpress-simple.dcp\ Kodak_DCS_Pro_14-simple.dcp\ Kodak_DCS_Pro_14nx-simple.dcp\ Kodak_DCS_Pro_SLR-simple.dcp\ Kodak_DCS315C-simple.dcp\ Kodak_DCS330C-simple.dcp\ KODAK_DCS420-simple.dcp\ KODAK_DCS460-simple.dcp\ Kodak_DCS520C-simple.dcp\ Kodak_DCS560C-simple.dcp\ Kodak_DCS620C-simple.dcp\ Kodak_DCS620X-simple.dcp\ Kodak_DCS660C-simple.dcp\ Kodak_DCS720X-simple.dcp\ Kodak_DCS760C-simple.dcp\ KODAK_EASYSHARE_Z1015-simple.dcp\ KODAK_EasyShare_Z980-simple.dcp\ KODAK_EOSDCS1-simple.dcp\ KODAK_EOSDCS3B-simple.dcp\ KODAK_NC2000-simple.dcp\ KODAK_P712-simple.dcp\ KODAK_P850-simple.dcp\ KODAK_P880-simple.dcp\ Kodak_ProBack-simple.dcp\ Kodak_ProBack645-simple.dcp\ Konica_Minolta_Maxxum_5D-simple.dcp\ Konica_Minolta_Maxxum_7D-simple.dcp\ Konica_Minolta_DiMAGE_A2-simple.dcp\ Konica_Minolta_DiMAGE_A200-simple.dcp\ Leaf_Aptus_54S-simple.dcp\ Leaf_Aptus_65-simple.dcp\ Leaf_Aptus_75-simple.dcp\ Leaf_CMost-simple.dcp\ Leaf_Valeo_6-simple.dcp\ Leaf-simple.dcp\ Leica-M8-simple.dcp\ Leica-X1-native.dcp\ Leica-S2-simple.dcp\ Mamiya_ZD-simple.dcp\ Micron_2010-simple.dcp\ Minolta_DiMAGE_5-simple.dcp\ Minolta_DiMAGE_7-simple.dcp\ Minolta_DiMAGE_7i-simple.dcp\ Minolta_DiMAGE_7Hi-simple.dcp\ Minolta_DiMAGE_A1-simple.dcp\ Minolta_DiMAGE_Z2-simple.dcp\ MINOLTA_DYNAX_5-simple.dcp\ MINOLTA_DYNAX_7-simple.dcp\ MOTOROLA_PIXL-simple.dcp\ NIKON_COOLPIX_P6000-simple.dcp\ NIKON_COOLPIX_P7000-simple.dcp\ NIKON_D1-simple.dcp\ NIKON_D100-simple.dcp\ NIKON_D1H-simple.dcp\ NIKON_D1X-simple.dcp\ NIKON_D200-simple.dcp\ NIKON_D2H-simple.dcp\ NIKON_D2X-simple.dcp\ NIKON_D3-simple.dcp\ NIKON_D300-simple.dcp\ NIKON_D3000-simple.dcp\ NIKON_D3100-simple.dcp\ NIKON_D3X-simple.dcp\ NIKON_D40-simple.dcp\ NIKON_D40X-simple.dcp\ NIKON_D50-simple.dcp\ NIKON_D5000-simple.dcp\ NIKON_D60-simple.dcp\ NIKON_D70-simple.dcp\ NIKON_D70s-simple.dcp\ NIKON_D700-simple.dcp\ NIKON_D7000-simple.dcp\ NIKON_D80-simple.dcp\ NIKON_D90-simple.dcp\ NIKON_E2100-simple.dcp\ NIKON_E2500-simple.dcp\ NIKON_E4300-simple.dcp\ NIKON_E4500-simple.dcp\ NIKON_E5000-simple.dcp\ NIKON_E5400-simple.dcp\ NIKON_E5700-simple.dcp\ NIKON_E8400-simple.dcp\ NIKON_E8700-simple.dcp\ NIKON_E8800-simple.dcp\ NIKON_E950-simple.dcp\ NIKON_E995-simple.dcp\ NIKON_D3S-simple.dcp\ OLYMPUS_C5050-simple.dcp\ OLYMPUS_C5060-simple.dcp\ OLYMPUS_C70-simple.dcp\ OLYMPUS_C7070-simple.dcp\ OLYMPUS_C80-simple.dcp\ OLYMPUS_E-1-simple.dcp\ OLYMPUS_E-10-simple.dcp\ OLYMPUS_E-20-simple.dcp\ OLYMPUS_E-3-simple.dcp\ OLYMPUS_E-30-simple.dcp\ OLYMPUS_E-300-simple.dcp\ OLYMPUS_E-330-simple.dcp\ OLYMPUS_E-400-simple.dcp\ OLYMPUS_E-410-simple.dcp\ OLYMPUS_E-420-simple.dcp\ OLYMPUS_E-450-simple.dcp\ OLYMPUS_E-5-simple.dcp\ OLYMPUS_E-500-simple.dcp\ OLYMPUS_E-510-simple.dcp\ OLYMPUS_E-520-simple.dcp\ OLYMPUS_E-620-simple.dcp\ OLYMPUS_E-P1-simple.dcp\ OLYMPUS_E-PL1-simple.dcp\ OLYMPUS_E-PL1s-simple.dcp\ OLYMPUS_E-PL2-simple.dcp\ OLYMPUS_SP3-simple.dcp\ OLYMPUS_SP350-simple.dcp\ OLYMPUS_SP500UZ-simple.dcp\ OLYMPUS_SP510UZ-simple.dcp\ OLYMPUS_SP550UZ-simple.dcp\ OLYMPUS_SP560UZ-simple.dcp\ OLYMPUS_SP570UZ-simple.dcp\ OLYMPUS_XZ-1-simple.dcp\ Panasonic_DMC-FX150-simple.dcp\ Panasonic_DMC-FZ18-simple.dcp\ Panasonic_DMC-FZ28-simple.dcp\ Panasonic_DMC-FZ30-simple.dcp\ Panasonic_DMC-FZ35-simple.dcp\ Panasonic_FZ100-simple.dcp\ Panasonic_FZ40-simple.dcp\ Panasonic_LX5-simple.dcp\ Panasonic_DMC-FZ50-simple.dcp\ Panasonic_DMC-FZ8-simple.dcp\ Panasonic_DMC-G1-simple.dcp\ Panasonic_DMC-G10-simple.dcp\ Panasonic_DMC-G2-simple.dcp\ Panasonic_DMC-GF1-simple.dcp\ Panasonic_DMC-GF2-simple.dcp\ Panasonic_DMC-GH1-simple.dcp\ Panasonic_DMC-GH2-simple.dcp\ Panasonic_DMC-L1-simple.dcp\ Panasonic_DMC-L10-simple.dcp\ Panasonic_DMC-LC1-simple.dcp\ Panasonic_DMC-LX1-simple.dcp\ Panasonic_DMC-LX2-simple.dcp\ Panasonic_DMC-LX3-simple.dcp\ PENTAX_K-5-simple.dcp\ PENTAX_K-7-simple.dcp\ PENTAX_K-m-simple.dcp\ PENTAX_K-r-simple.dcp\ PENTAX_K1-simple.dcp\ PENTAX_K10D-simple.dcp\ PENTAX_K2000-simple.dcp\ PENTAX_K200D-simple.dcp\ PENTAX_K20D-simple.dcp\ PENTAX_K-x-simple.dcp\ PENTAX_645D-simple.dcp\ Phase_One_H_20-simple.dcp\ Phase_One_P_2-simple.dcp\ Phase_One_P_30-simple.dcp\ Phase_One_P_45-simple.dcp\ Phase_One_P65-simple.dcp\ Ricoh_A12_28mm-simple.dcp\ Ricoh_A12_50mm-simple.dcp\ Ricoh_Digital_3-simple.dcp\ Ricoh_GX200-simple.dcp\ Ricoh_S10_24-72mm-simple.dcp\ SAMSUNG_GX-1-simple.dcp\ SAMSUNG_NX100-simple.dcp\ SAMSUNG_S85-simple.dcp\ SAMSUNG_WB2000-simple.dcp\ SAMSUNG_NX11-simple.dcp\ SAMSUNG_EX1-simple.dcp\ SAMSUNG_GX10-simple.dcp\ SAMSUNG_GX-1L-simple.dcp\ SAMSUNG_GX-1S-simple.dcp\ SAMSUNG_GX20-simple.dcp\ SAMSUNG_NX10-simple.dcp\ SAMSUNG_NX5-simple.dcp\ Sinar-simple.dcp\ SONY_DSC-F828-simple.dcp\ SONY_DSC-R1-simple.dcp\ SONY_DSC-V3-simple.dcp\ SONY_DSLR-A100-simple.dcp\ SONY_DSLR-A200-simple.dcp\ SONY_DSLR-A230-simple.dcp\ SONY_DSLR-A290-simple.dcp\ SONY_DSLR-A300-simple.dcp\ SONY_DSLR-A330-simple.dcp\ SONY_DSLR-A350-simple.dcp\ SONY_DSLR-A380-simple.dcp\ SONY_DSLR-A390-simple.dcp\ SONY_DSLR-A450-simple.dcp\ SONY_DSLR-A500-simple.dcp\ SONY_DSLR-A550-simple.dcp\ SONY_DSLR-A560-simple.dcp\ SONY_DSLR-A580-simple.dcp\ SONY_DSLR-A700-simple.dcp\ SONY_DSLR-A850-simple.dcp\ SONY_DSLR-A900-simple.dcp\ SONY_DSLR-A5-simple.dcp\ SONY_NEX-3-simple.dcp\ SONY_NEX-5-simple.dcp\ SONY_SLTA33-simple.dcp\ SONY_SLTA55V-simple.dcp EXTRA_DIST = $(rawstudio_DATA)\ simple-src/AGFAPHOTO_DC-833m-simple.xml\ simple-src/Apple_QuickTake-simple.xml\ simple-src/Canon_EOS_1000D-simple.xml\ simple-src/Canon_EOS_10D-simple.xml\ simple-src/Canon_EOS_1100D-simple.xml\ simple-src/Canon_EOS-1D_Mark_III-simple.xml\ simple-src/Canon_EOS-1D_Mark_II_N-simple.xml\ simple-src/Canon_EOS-1D_Mark_II-simple.xml\ simple-src/Canon_EOS-1D_Mark_IV-simple.xml\ simple-src/Canon_EOS-1D-simple.xml\ simple-src/Canon_EOS-1Ds_Mark_III-simple.xml\ simple-src/Canon_EOS-1Ds_Mark_II-simple.xml\ simple-src/Canon_EOS-1DS-simple.xml\ simple-src/Canon_EOS_20Da-simple.xml\ simple-src/Canon_EOS_20D-simple.xml\ simple-src/Canon_EOS_300D-simple.xml\ simple-src/Canon_EOS_30D-simple.xml\ simple-src/Canon_EOS_350D-simple.xml\ simple-src/Canon_EOS_400D-simple.xml\ simple-src/Canon_EOS_40D-simple.xml\ simple-src/Canon_EOS_450D-simple.xml\ simple-src/Canon_EOS_500D-simple.xml\ simple-src/Canon_EOS_50D-simple.xml\ simple-src/Canon_EOS_550D-simple.xml\ simple-src/Canon_EOS_5D_Mark_II-simple.xml\ simple-src/Canon_EOS_5D-simple.xml\ simple-src/Canon_EOS_600D-simple.xml\ simple-src/Canon_EOS_60D-simple.xml\ simple-src/Canon_EOS_7D-simple.xml\ simple-src/Canon_EOS_D2000-simple.xml\ simple-src/Canon_EOS_D30-simple.xml\ simple-src/Canon_EOS_D6000-simple.xml\ simple-src/Canon_EOS_D60-simple.xml\ simple-src/Canon_EOS-simple.xml\ simple-src/Canon_PowerShot_A470-simple.xml\ simple-src/Canon_PowerShot_A50-simple.xml\ simple-src/Canon_PowerShot_A530-simple.xml\ simple-src/Canon_PowerShot_A5-simple.xml\ simple-src/Canon_PowerShot_A610-simple.xml\ simple-src/Canon_PowerShot_A620-simple.xml\ simple-src/Canon_PowerShot_A630-simple.xml\ simple-src/Canon_PowerShot_A640-simple.xml\ simple-src/Canon_PowerShot_A650-simple.xml\ simple-src/Canon_PowerShot_A720-simple.xml\ simple-src/Canon_PowerShot_G10-simple.xml\ simple-src/Canon_PowerShot_G11-simple.xml\ simple-src/Canon_PowerShot_G12-simple.xml\ simple-src/Canon_PowerShot_G1-simple.xml\ simple-src/Canon_PowerShot_G2-simple.xml\ simple-src/Canon_PowerShot_G3-simple.xml\ simple-src/Canon_PowerShot_G5-simple.xml\ simple-src/Canon_PowerShot_G6-simple.xml\ simple-src/Canon_PowerShot_G9-simple.xml\ simple-src/Canon_PowerShot_Pro1-simple.xml\ simple-src/Canon_PowerShot_Pro70-simple.xml\ simple-src/Canon_PowerShot_Pro90-simple.xml\ simple-src/Canon_PowerShot_S30-simple.xml\ simple-src/Canon_PowerShot_S3_IS-simple.xml\ simple-src/Canon_PowerShot_S40-simple.xml\ simple-src/Canon_PowerShot_S45-simple.xml\ simple-src/Canon_PowerShot_S50-simple.xml\ simple-src/Canon_PowerShot_S60-simple.xml\ simple-src/Canon_PowerShot_S70-simple.xml\ simple-src/Canon_PowerShot_S90-simple.xml\ simple-src/Canon_PowerShot_S95-simple.xml\ simple-src/Canon_PowerShot_SX110_IS-simple.xml\ simple-src/Canon_PowerShot_SX1_IS-simple.xml\ simple-src/CASIO_EX-S20-simple.xml\ simple-src/CASIO_EX-Z750-simple.xml\ simple-src/CINE_650-simple.xml\ simple-src/CINE_660-simple.xml\ simple-src/CINE-simple.xml\ simple-src/Contax_N_Digital-simple.xml\ simple-src/EPSON_R-D1-simple.xml\ simple-src/FUJIFILM_FinePix_E550-simple.xml\ simple-src/FUJIFILM_FinePix_E900-simple.xml\ simple-src/FUJIFILM_FinePix_F7-simple.xml\ simple-src/FUJIFILM_FinePix_F8-simple.xml\ simple-src/FUJIFILM_FinePix_S100FS-simple.xml\ simple-src/FUJIFILM_FinePix_S20Pro-simple.xml\ simple-src/FUJIFILM_FinePix_S2Pro-simple.xml\ simple-src/FUJIFILM_FinePix_S3Pro-simple.xml\ simple-src/FUJIFILM_FinePix_S5000-simple.xml\ simple-src/FUJIFILM_FinePix_S5100-simple.xml\ simple-src/FUJIFILM_FinePix_S5200-simple.xml\ simple-src/FUJIFILM_FinePix_S5500-simple.xml\ simple-src/FUJIFILM_FinePix_S5600-simple.xml\ simple-src/FUJIFILM_FinePix_S5Pro-simple.xml\ simple-src/FUJIFILM_FinePix_S6000fd-simple.xml\ simple-src/FUJIFILM_FinePix_S6-simple.xml\ simple-src/FUJIFILM_FinePix_S7000-simple.xml\ simple-src/FUJIFILM_FinePix_S9000-simple.xml\ simple-src/FUJIFILM_FinePix_S9100-simple.xml\ simple-src/FUJIFILM_FinePix_S9500-simple.xml\ simple-src/FUJIFILM_FinePix_S9600-simple.xml\ simple-src/FUJIFILM_IS-1-simple.xml\ simple-src/FUJIFILM_IS_Pro-simple.xml\ simple-src/Fuji_HS10-simple.xml\ simple-src/Imacon_Ixpress-simple.xml\ simple-src/Kodak_DCS315C-simple.xml\ simple-src/Kodak_DCS330C-simple.xml\ simple-src/KODAK_DCS420-simple.xml\ simple-src/KODAK_DCS460-simple.xml\ simple-src/Kodak_DCS520C-simple.xml\ simple-src/Kodak_DCS560C-simple.xml\ simple-src/Kodak_DCS620C-simple.xml\ simple-src/Kodak_DCS620X-simple.xml\ simple-src/Kodak_DCS660C-simple.xml\ simple-src/Kodak_DCS720X-simple.xml\ simple-src/Kodak_DCS760C-simple.xml\ simple-src/Kodak_DCS_Pro_14nx-simple.xml\ simple-src/Kodak_DCS_Pro_14-simple.xml\ simple-src/Kodak_DCS_Pro_SLR-simple.xml\ simple-src/KODAK_EASYSHARE_Z1015-simple.xml\ simple-src/KODAK_EasyShare_Z980-simple.xml\ simple-src/KODAK_EOSDCS1-simple.xml\ simple-src/KODAK_EOSDCS3B-simple.xml\ simple-src/KODAK_NC2000-simple.xml\ simple-src/KODAK_P712-simple.xml\ simple-src/KODAK_P850-simple.xml\ simple-src/KODAK_P880-simple.xml\ simple-src/Kodak_ProBack645-simple.xml\ simple-src/Kodak_ProBack-simple.xml\ simple-src/Konica_Minolta_DiMAGE_A200-simple.xml\ simple-src/Konica_Minolta_DiMAGE_A2-simple.xml\ simple-src/Konica_Minolta_Maxxum_5D-simple.xml\ simple-src/Konica_Minolta_Maxxum_7D-simple.xml\ simple-src/Leaf_Aptus_54S-simple.xml\ simple-src/Leaf_Aptus_65-simple.xml\ simple-src/Leaf_Aptus_75-simple.xml\ simple-src/Leaf_CMost-simple.xml\ simple-src/Leaf-simple.xml\ simple-src/Leaf_Valeo_6-simple.xml\ simple-src/Leica-M8-simple.xml\ simple-src/Leica-S2-simple.xml\ simple-src/Leica-X1-native.xml\ simple-src/Mamiya_ZD-simple.xml\ simple-src/Micron_2010-simple.xml\ simple-src/Minolta_DiMAGE_5-simple.xml\ simple-src/Minolta_DiMAGE_7Hi-simple.xml\ simple-src/Minolta_DiMAGE_7i-simple.xml\ simple-src/Minolta_DiMAGE_7-simple.xml\ simple-src/Minolta_DiMAGE_A1-simple.xml\ simple-src/Minolta_DiMAGE_Z2-simple.xml\ simple-src/MINOLTA_DYNAX_5-simple.xml\ simple-src/MINOLTA_DYNAX_7-simple.xml\ simple-src/MOTOROLA_PIXL-simple.xml\ simple-src/Neutral-With-Tonecurve-AdobeRGB.xml\ simple-src/Neutral-With-Tonecurve-Prophoto.xml\ simple-src/Neutral-With-Tonecurve-sRGB.xml\ simple-src/NIKON_COOLPIX_P6000-simple.xml\ simple-src/NIKON_COOLPIX_P7000-simple.xml\ simple-src/NIKON_D100-simple.xml\ simple-src/NIKON_D1H-simple.xml\ simple-src/NIKON_D1-simple.xml\ simple-src/NIKON_D1X-simple.xml\ simple-src/NIKON_D200-simple.xml\ simple-src/NIKON_D2H-simple.xml\ simple-src/NIKON_D2X-simple.xml\ simple-src/NIKON_D3000-simple.xml\ simple-src/NIKON_D300-simple.xml\ simple-src/NIKON_D3100-simple.xml\ simple-src/NIKON_D3-simple.xml\ simple-src/NIKON_D3S-simple.xml\ simple-src/NIKON_D3X-simple.xml\ simple-src/NIKON_D40-simple.xml\ simple-src/NIKON_D40X-simple.xml\ simple-src/NIKON_D5000-simple.xml\ simple-src/NIKON_D50-simple.xml\ simple-src/NIKON_D60-simple.xml\ simple-src/NIKON_D7000-simple.xml\ simple-src/NIKON_D700-simple.xml\ simple-src/NIKON_D70-simple.xml\ simple-src/NIKON_D70s-simple.xml\ simple-src/NIKON_D80-simple.xml\ simple-src/NIKON_D90-simple.xml\ simple-src/NIKON_E2100-simple.xml\ simple-src/NIKON_E2500-simple.xml\ simple-src/NIKON_E4300-simple.xml\ simple-src/NIKON_E4500-simple.xml\ simple-src/NIKON_E5000-simple.xml\ simple-src/NIKON_E5400-simple.xml\ simple-src/NIKON_E5700-simple.xml\ simple-src/NIKON_E8400-simple.xml\ simple-src/NIKON_E8700-simple.xml\ simple-src/NIKON_E8800-simple.xml\ simple-src/NIKON_E950-simple.xml\ simple-src/NIKON_E995-simple.xml\ simple-src/OLYMPUS_C5050-simple.xml\ simple-src/OLYMPUS_C5060-simple.xml\ simple-src/OLYMPUS_C7070-simple.xml\ simple-src/OLYMPUS_C70-simple.xml\ simple-src/OLYMPUS_C80-simple.xml\ simple-src/OLYMPUS_E-10-simple.xml\ simple-src/OLYMPUS_E-1-simple.xml\ simple-src/OLYMPUS_E-20-simple.xml\ simple-src/OLYMPUS_E-300-simple.xml\ simple-src/OLYMPUS_E-30-simple.xml\ simple-src/OLYMPUS_E-330-simple.xml\ simple-src/OLYMPUS_E-3-simple.xml\ simple-src/OLYMPUS_E-400-simple.xml\ simple-src/OLYMPUS_E-410-simple.xml\ simple-src/OLYMPUS_E-420-simple.xml\ simple-src/OLYMPUS_E-450-simple.xml\ simple-src/OLYMPUS_E-500-simple.xml\ simple-src/OLYMPUS_E-510-simple.xml\ simple-src/OLYMPUS_E-520-simple.xml\ simple-src/OLYMPUS_E-5-simple.xml\ simple-src/OLYMPUS_E-620-simple.xml\ simple-src/OLYMPUS_E-P1-simple.xml\ simple-src/OLYMPUS_E-PL1-simple.xml\ simple-src/OLYMPUS_E-PL1s-simple.xml\ simple-src/OLYMPUS_E-PL2-simple.xml\ simple-src/OLYMPUS_SP350-simple.xml\ simple-src/OLYMPUS_SP3-simple.xml\ simple-src/OLYMPUS_SP500UZ-simple.xml\ simple-src/OLYMPUS_SP510UZ-simple.xml\ simple-src/OLYMPUS_SP550UZ-simple.xml\ simple-src/OLYMPUS_SP560UZ-simple.xml\ simple-src/OLYMPUS_SP570UZ-simple.xml\ simple-src/OLYMPUS_XZ-1-simple.xml\ simple-src/Panasonic_DMC-FX150-simple.xml\ simple-src/Panasonic_DMC-FZ18-simple.xml\ simple-src/Panasonic_DMC-FZ28-simple.xml\ simple-src/Panasonic_DMC-FZ30-simple.xml\ simple-src/Panasonic_DMC-FZ35-simple.xml\ simple-src/Panasonic_DMC-FZ50-simple.xml\ simple-src/Panasonic_DMC-FZ8-simple.xml\ simple-src/Panasonic_DMC-G10-simple.xml\ simple-src/Panasonic_DMC-G1-simple.xml\ simple-src/Panasonic_DMC-G2-simple.xml\ simple-src/Panasonic_DMC-GF1-simple.xml\ simple-src/Panasonic_DMC-GF2-simple.xml\ simple-src/Panasonic_DMC-GH1-simple.xml\ simple-src/Panasonic_DMC-GH2-simple.xml\ simple-src/Panasonic_DMC-L10-simple.xml\ simple-src/Panasonic_DMC-L1-simple.xml\ simple-src/Panasonic_DMC-LC1-simple.xml\ simple-src/Panasonic_DMC-LX1-simple.xml\ simple-src/Panasonic_DMC-LX2-simple.xml\ simple-src/Panasonic_DMC-LX3-simple.xml\ simple-src/Panasonic_FZ100-simple.xml\ simple-src/Panasonic_FZ40-simple.xml\ simple-src/Panasonic_LX5-simple.xml\ simple-src/PENTAX_645D-simple.xml\ simple-src/PENTAX_K10D-simple.xml\ simple-src/PENTAX_K1-simple.xml\ simple-src/PENTAX_K2000-simple.xml\ simple-src/PENTAX_K200D-simple.xml\ simple-src/PENTAX_K20D-simple.xml\ simple-src/PENTAX_K-5-simple.xml\ simple-src/PENTAX_K-7-simple.xml\ simple-src/PENTAX_K-m-simple.xml\ simple-src/PENTAX_K-r-simple.xml\ simple-src/PENTAX_K-x-simple.xml\ simple-src/Phase_One_H_20-simple.xml\ simple-src/Phase_One_P_2-simple.xml\ simple-src/Phase_One_P_30-simple.xml\ simple-src/Phase_One_P_45-simple.xml\ simple-src/Phase_One_P65-simple.xml\ simple-src/Ricoh_A12_28mm-simple.xml\ simple-src/Ricoh_A12_50mm-simple.xml\ simple-src/Ricoh_Digital_3-simple.xml\ simple-src/Ricoh_GX200-simple.xml\ simple-src/Ricoh_S10_24-72mm-simple.xml\ simple-src/SAMSUNG_EX1-simple.xml\ simple-src/SAMSUNG_GX10-simple.xml\ simple-src/SAMSUNG_GX-1L-simple.xml\ simple-src/SAMSUNG_GX-1-simple.xml\ simple-src/SAMSUNG_GX-1S-simple.xml\ simple-src/SAMSUNG_GX20-simple.xml\ simple-src/SAMSUNG_NX100-simple.xml\ simple-src/SAMSUNG_NX10-simple.xml\ simple-src/SAMSUNG_NX11-simple.xml\ simple-src/SAMSUNG_NX5-simple.xml\ simple-src/SAMSUNG_S85-simple.xml\ simple-src/SAMSUNG_WB2000-simple.xml\ simple-src/Sinar-simple.xml\ simple-src/SONY_DSC-F828-simple.xml\ simple-src/SONY_DSC-R1-simple.xml\ simple-src/SONY_DSC-V3-simple.xml\ simple-src/SONY_DSLR-A100-simple.xml\ simple-src/SONY_DSLR-A200-simple.xml\ simple-src/SONY_DSLR-A230-simple.xml\ simple-src/SONY_DSLR-A290-simple.xml\ simple-src/SONY_DSLR-A300-simple.xml\ simple-src/SONY_DSLR-A330-simple.xml\ simple-src/SONY_DSLR-A350-simple.xml\ simple-src/SONY_DSLR-A380-simple.xml\ simple-src/SONY_DSLR-A390-simple.xml\ simple-src/SONY_DSLR-A450-simple.xml\ simple-src/SONY_DSLR-A500-simple.xml\ simple-src/SONY_DSLR-A550-simple.xml\ simple-src/SONY_DSLR-A560-simple.xml\ simple-src/SONY_DSLR-A580-simple.xml\ simple-src/SONY_DSLR-A5-simple.xml\ simple-src/SONY_DSLR-A700-simple.xml\ simple-src/SONY_DSLR-A850-simple.xml\ simple-src/SONY_DSLR-A900-simple.xml\ simple-src/SONY_NEX-3-simple.xml\ simple-src/SONY_NEX-5-simple.xml\ simple-src/SONY_SLTA33-simple.xml\ simple-src/SONY_SLTA55V-simple.xml rawstudio-2.0/profiles/Konica_Minolta_Maxxum_5D-simple.dcp0000644000175000017500000000052411537130700020673 00000000000000IIRCn! " Z[ 8Konica Minolta Maxxum 5D1''''8' ''t'',('-'''=' ''r''Konica Minolta Maxxum 5D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D3X-simple.dcp0000755000175000017500000000032611537130700015454 00000000000000IIRC V! `ZNIKON D3X'>'x'k'<' '' '!'NIKON D3X SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS-1D_Mark_IV-simple.dcp0000755000175000017500000000035411537130700017477 00000000000000IIRCV! lZCanon EOS-1D Mark IV~'$'''.'9 '' ''Canon EOS-1D Mark IV SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_SX1_IS-simple.dcp0000755000175000017500000000036011537130700020254 00000000000000IIRCV! nZCanon PowerShot SX1 IS'' ''2' ''"'j'Canon PowerShot SX1 IS SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D2H-simple.dcp0000755000175000017500000000032611537130700015433 00000000000000IIRC V! `ZNIKON D2HN'{''n'@''a'''NIKON D2H SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Kodak_DCS720X-simple.dcp0000755000175000017500000000033611537130700016224 00000000000000IIRCV! dZKodak DCS720X-'''T%'6'''M' 'Kodak DCS720X SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S100FS-simple.dcp0000755000175000017500000000036211537130700017703 00000000000000IIRCV! nZFUJIFILM FinePix S100FS-''''5' 'F'''FUJIFILM FinePix S100FS SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_50D-simple.dcp0000755000175000017500000000033611537130700016275 00000000000000IIRCV! dZCanon EOS 50D8'h'''6' ''j ']'Canon EOS 50D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A560-simple.dcp0000755000175000017500000000050011537130700016137 00000000000000IIRCn! ~" Z[$Sony DSLR-A560''''+'* '%'''V''''0' ';'''Sony DSLR-A560 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A200-simple.dcp0000755000175000017500000000034011537130700016130 00000000000000IIRCV! fZSONY DSLR-A200w&''`''?''5'S''SONY DSLR-A200 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Minolta_DiMAGE_A1-simple.dcp0000755000175000017500000000034611537130700017114 00000000000000IIRCV! hZMinolta DiMAGE A1:$' 'q''?''' ' 'Minolta DiMAGE A1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SAMSUNG_GX-1S-simple.dcp0000644000175000017500000000047611537764506016140 00000000000000IIRCn! |" Z[ "Samsung GX-1SG/'C'''9' 'z''9.')'y'['e'P?' ''_'/'SAMSUNG GX-1S SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Contax_N_Digital-simple.dcp0000755000175000017500000000034411537130700017266 00000000000000IIRCV! hZContax N Digitala''''@'d ''/''Contax N Digital SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSC-V3-simple.dcp0000755000175000017500000000033211537130700015664 00000000000000IIRC V! bZSONY DSC-V3W''L'*':' 'L'W''SONY DSC-V3 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/AGFAPHOTO_DC-833m-simple.dcp0000755000175000017500000000034611537130700016470 00000000000000IIRCV! hZAGFAPHOTO DC-833mK.''}'@' (' ' 'J 's'AGFAPHOTO DC-833m SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Leaf_Valeo_6-simple.dcp0000755000175000017500000000033411537130700016341 00000000000000IIRC V! dZLeaf Valeo 6p''''8''H'''Leaf Valeo 6 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SAMSUNG_GX10-simple.dcp0000644000175000017500000000047411537764506016016 00000000000000IIRC n! |" Z[  Samsung GX10,'!'5'':' '''%'%'k''R'@''1's'A&'SAMSUNG GX10 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D70s-simple.dcp0000644000175000017500000000047011537130700015570 00000000000000IIRC n! z" Z[ NIKON D70s!%')'''6'V '''c'4'''' >' ''''NIKON D70s SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_E5400-simple.dcp0000755000175000017500000000033211537130700015550 00000000000000IIRC V! bZNIKON E5400$'U'''='''x ''NIKON E5400 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Kodak_DCS_Pro_14-simple.dcp0000755000175000017500000000034411537130700016766 00000000000000IIRCV! hZKodak DCS Pro 14o'8 ''t'J@''i''6'Kodak DCS Pro 14 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_A720-simple.dcp0000755000175000017500000000035411537130700017662 00000000000000IIRCV! lZCanon PowerShot A720&:' ''''''''4'Canon PowerShot A720 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_A5-simple.dcp0000755000175000017500000000040011537130700017506 00000000000000IIRCV! jZCanon PowerShot A5?'%''n 'K''u''';''*'#'Canon PowerShot A5 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-L1-simple.dcp0000755000175000017500000000034411537130700016770 00000000000000IIRCV! hZPanasonic DMC-L1v'''c'?'' ' ''Panasonic DMC-L1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S2Pro-simple.dcp0000755000175000017500000000036011537130700017772 00000000000000IIRCV! nZFUJIFILM FinePix S2Pro0''''?<'o''?''FUJIFILM FinePix S2Pro SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Ricoh_A12_50mm-simple.dcp0000644000175000017500000000051611537130700016423 00000000000000IIRCn! " Z[2RICOH GR A12 50mm F2.5 MACRO6''''-'d ''/'-'"''O''2' ''''Ricoh A12 50mm SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_A640-simple.dcp0000755000175000017500000000035411537130700017663 00000000000000IIRCV! lZCanon PowerShot A640_4''t''.'''m '~'Canon PowerShot A640 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/CASIO_EX-Z750-simple.dcp0000755000175000017500000000033611537130700016016 00000000000000IIRCV! dZCASIO EX-Z750C*''''5''%'''CASIO EX-Z750 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Konica_Minolta_DiMAGE_A200-simple.dcp0000644000175000017500000000037011537130700020533 00000000000000IIRCV! rZ"Konica Minolta DiMAGE A200p!'I'&'P'<' 'G','?'Konica Minolta DiMAGE A200 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS-1D_Mark_II_N-simple.dcp0000755000175000017500000000036011537130700017734 00000000000000IIRCV! nZCanon EOS-1D Mark II N`'.'' '=' '''j'Canon EOS-1D Mark II N SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Kodak_DCS760C-simple.dcp0000755000175000017500000000033611537130700016203 00000000000000IIRCV! dZKodak DCS760C@'['}''c6'C'''n 'Kodak DCS760C SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/sRGB.icc0000644000175000017500000001533411526533644013434 00000000000000lcms0mntrRGB XYZ acspAPPLlcms-lcms dmndjdescthdmddhwtptDrXYZXbXYZlgXYZrTRC gTRC  bTRC chrm$desc(lcms internal)descsRGB built-indescsRGB built-inXYZ =XYZ o8XYZ $XYZ bcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Kmcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)Kmcurv #(-27;@EJOTY^chmrw| %+28>ELRY`gnu| &/8AKT]gqz !-8COZfr~ -;HUcq~ +:IXgw'7HYj{+=Oat 2FZn  % : O d y  ' = T j " 9 Q i  * C \ u & @ Z t .Id %A^z &Ca~1Om&Ed#Cc'Ij4Vx&IlAe@e Ek*Qw;c*R{Gp@j>i  A l !!H!u!!!"'"U"""# #8#f###$$M$|$$% %8%h%%%&'&W&&&''I'z''( (?(q(())8)k))**5*h**++6+i++,,9,n,,- -A-v--..L.../$/Z///050l0011J1112*2c223 3F3334+4e4455M555676r667$7`7788P8899B999:6:t::;-;k;;<' >`>>?!?a??@#@d@@A)AjAAB0BrBBC:C}CDDGDDEEUEEF"FgFFG5G{GHHKHHIIcIIJ7J}JK KSKKL*LrLMMJMMN%NnNOOIOOP'PqPQQPQQR1R|RSS_SSTBTTU(UuUVV\VVWDWWX/X}XYYiYZZVZZ[E[[\5\\]']x]^^l^__a_``W``aOaabIbbcCccd@dde=eef=ffg=ggh?hhiCiijHjjkOkklWlmm`mnnknooxop+ppq:qqrKrss]sttptu(uuv>vvwVwxxnxy*yyzFz{{c{|!||}A}~~b~#G k͂0WGrׇ;iΉ3dʋ0cʍ1fΏ6n֑?zM _ɖ4 uL$h՛BdҞ@iءG&vVǥ8nRĩ7u\ЭD-u`ֲK³8%yhYѹJº;.! zpg_XQKFAǿ=ȼ:ɹ8ʷ6˶5̵5͵6ζ7ϸ9к<Ѿ?DINU\dlvۀ܊ݖޢ)߯6DScs 2F[p(@Xr4Pm8Ww)KmchrmT{L&f\rawstudio-2.0/profiles/Kodak_DCS330C-simple.dcp0000755000175000017500000000033611537130700016174 00000000000000IIRCV! dZKodak DCS330CP'l'''Y''t' '''Kodak DCS330C SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Kodak_ProBack-simple.dcp0000755000175000017500000000033611537130700016553 00000000000000IIRCV! dZKodak ProBackR'''m' +'[' 'L'r'Kodak ProBack SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-FZ30-simple.dcp0000755000175000017500000000035011537130700017173 00000000000000IIRCV! jZPanasonic DMC-FZ30*'C'''<'( 'z''6 'Panasonic DMC-FZ30 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D40-simple.dcp0000755000175000017500000000032611537130700015405 00000000000000IIRC V! `ZNIKON D40P'|''6'=' ''R''NIKON D40 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_7D-simple.dcp0000755000175000017500000000033411537130700016215 00000000000000IIRC V! dZCanon EOS 7D''''-'\ '''6'Canon EOS 7D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Minolta_DiMAGE_5-simple.dcp0000755000175000017500000000034411537130700017015 00000000000000IIRCV! hZMinolta DiMAGE 5#''='d'8'''G 'N'Minolta DiMAGE 5 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A100-simple.dcp0000755000175000017500000000034011537130700016127 00000000000000IIRCV! fZSONY DSLR-A100$'''+'W?'':'T' 'SONY DSLR-A100 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-5-simple.dcp0000755000175000017500000000047211537130700015700 00000000000000IIRC n! z" Z[ Olympus E-5,'''',' '''r'+'9'' '11''I''P'Olympus E-5 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_C5050-simple.dcp0000755000175000017500000000033611537130700016045 00000000000000IIRCV! dZOLYMPUS C5050 )'''A'7'm'' ']'OLYMPUS C5050 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_A470-simple.dcp0000755000175000017500000000035411537130700017664 00000000000000IIRCV! lZCanon PowerShot A4702'5''.'|)' 'u'''Canon PowerShot A470 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-PL2-simple.dcp0000644000175000017500000000047611537130700016132 00000000000000IIRCn! |" Z[ "Olympus E-PL2H<'B' 'H','''d'F':'P''m'c0''''o'OLYMPUS E-PL2 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_D6000-simple.dcp0000755000175000017500000000034211537130700016433 00000000000000IIRCV! fZCanon EOS D6000P''''('' ''@ 'Canon EOS D6000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Micron_2010-simple.dcp0000755000175000017500000000033211537130700016006 00000000000000IIRC V! bZMicron 2010='' ''#'' ''#'Micron 2010 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_G6-simple.dcp0000755000175000017500000000035011537130700017521 00000000000000IIRCV! jZCanon PowerShot G6&'A''C'9' 'X''='Canon PowerShot G6 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S5200-simple.dcp0000755000175000017500000000036011537130700017536 00000000000000IIRCV! nZFUJIFILM FinePix S5200%' '$'':' '' '!'FUJIFILM FinePix S5200 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SAMSUNG_S85-simple.dcp0000755000175000017500000000033211537130700015671 00000000000000IIRC V! bZSAMSUNG S85K/'6'#';'0'''''SAMSUNG S85 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Neutral-With-Tonecurve-sRGB.dcp0000755000175000017500000000036211537130700017717 00000000000000IIRCV! rZPassthrough Tonecurve sRGBkz''''J'O'''6'Neutral sRGB With TonecurveCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_G5-simple.dcp0000755000175000017500000000035011537130700017520 00000000000000IIRCV! jZCanon PowerShot G5&''[''%6''' ','Canon PowerShot G5 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_20Da-simple.dcp0000755000175000017500000000034011537130700016426 00000000000000IIRCV! fZCanon EOS 20DaK7'7''j')9''' ''Canon EOS 20Da SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A550-simple.dcp0000755000175000017500000000050011537130700016136 00000000000000IIRCn! ~" Z[$SONY DSLR-A550''''+'* '%'''V''''0' ';'''SONY DSLR-A550 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/CINE_650-simple.dcp0000755000175000017500000000032411537130700015226 00000000000000IIRC V! `ZCINE 650'''%''D*'''Z' 'CINE 650 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_D30-simple.dcp0000755000175000017500000000033611537130700016273 00000000000000IIRCV! dZCanon EOS D30M&'''U'3' 'z' 'G"'Canon EOS D30 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_XZ-1-simple.dcp0000644000175000017500000000047411537130700016050 00000000000000IIRC n! |" Z[  Olympus XZ-1,'J'''%!' ''8'('*''''#''''&'OLYMPUS XZ-1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Kodak_DCS620X-simple.dcp0000755000175000017500000000033611537130700016223 00000000000000IIRCV! dZKodak DCS620X'3'''/''''''Kodak DCS620X SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/PENTAX_K10D-simple.dcp0000755000175000017500000000033211537130700015633 00000000000000IIRC V! bZPENTAX K10D^%''''D;'@''#'%'PENTAX K10D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_E900-simple.dcp0000755000175000017500000000035611537130700017447 00000000000000IIRCV! lZFUJIFILM FinePix E900#'"''':' '' '!'FUJIFILM FinePix E900 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D3S-simple.dcp0000755000175000017500000000032611537130700015447 00000000000000IIRC V! `ZNIKON D3S|"''J'';1' 'l'''NIKON D3S SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-FZ18-simple.dcp0000755000175000017500000000035011537130700017201 00000000000000IIRCV! jZPanasonic DMC-FZ18&' 'Y'O'4' ' 'k''Panasonic DMC-FZ18 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_C70-simple.dcp0000755000175000017500000000033211537130700015676 00000000000000IIRC V! bZOLYMPUS C70)*'1'''I;' '')''OLYMPUS C70 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D5000-simple.dcp0000755000175000017500000000033211537130700015543 00000000000000IIRC V! bZNIKON D5000''''>'> '' ''NIKON D5000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D200-simple.dcp0000755000175000017500000000033011537130700015456 00000000000000IIRC V! bZNIKON D200 '8'''?@'v ' ''u'NIKON D200 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/PENTAX_K-r-simple.dcp0000755000175000017500000000033011537130700015623 00000000000000IIRC V! bZPENTAX K-r%'T'X''t.'{ ''Y'!'PENTAX K-r SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_S70-simple.dcp0000755000175000017500000000035211537130700017620 00000000000000IIRCV! jZCanon PowerShot S70&'''5'8'Z '{'''Canon PowerShot S70 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/KODAK_DCS460-simple.dcp0000755000175000017500000000033411537130700015673 00000000000000IIRC V! dZKODAK DCS460`)'b'9'h'-'''''KODAK DCS460 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A450-simple.dcp0000644000175000017500000000050011537130700016132 00000000000000IIRCn! ~" Z[$SONY DSLR-A450''''+'* '%'''V''''0' ';'''SONY DSLR-A450 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/prophoto-linear.icc0000644000175000017500000000165411526533645015762 00000000000000KCMSmntrRGB XYZ !*acspMSFTKODAROMM+KODA cprtHdesc\wtptrTRCgTRCbTRCrXYZgXYZbXYZ,dmnd@ndmddmmod(textCopyright (c) Eastman Kodak Company, 1999, all rights reserved.desc ProPhoto RGBProPhoto RGB ProPhoto RGBXYZ ,curvXYZ 4IXYZ ">XYZ -descKODAKKODAKKODAKdesc'Reference Output Medium Metric(ROMM) (Reference Output Medium Metric(ROMM) 'Reference Output Medium Metric(ROMM) mmod;rawstudio-2.0/profiles/Canon_PowerShot_Pro1-simple.dcp0000755000175000017500000000035411537130700020072 00000000000000IIRCV! lZCanon PowerShot Pro1N''>''%' ;' ''1''Canon PowerShot Pro1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_SLTA55V-simple.dcp0000755000175000017500000000047611537130700016041 00000000000000IIRCn! |" Z[ "Sony SLT-A55V' 'N''4,' ' 'm'',','e'3'/'( '''S'SONY SLT-A55V SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_A620-simple.dcp0000755000175000017500000000035411537130700017661 00000000000000IIRCV! lZCanon PowerShot A620<'O'''O0''v'''Canon PowerShot A620 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_1000D-simple.dcp0000755000175000017500000000034211537130700016426 00000000000000IIRCV! fZCanon EOS 1000Ds''/'v';'p '$''m'Canon EOS 1000D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_A610-simple.dcp0000755000175000017500000000035411537130700017660 00000000000000IIRCV! lZCanon PowerShot A610>''''4'''C'4'Canon PowerShot A610 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A500-simple.dcp0000755000175000017500000000050011537130700016131 00000000000000IIRCn! ~" Z[$SONY DSLR-A500L%''''-'- 'O'' '''':'3' 'M'''SONY DSLR-A500 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/KODAK_DCS420-simple.dcp0000755000175000017500000000033411537130700015667 00000000000000IIRC V! dZKODAK DCS420t*''|''K+''' 't''KODAK DCS420 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Minolta_DiMAGE_7-simple.dcp0000755000175000017500000000034411537130700017017 00000000000000IIRCV! hZMinolta DiMAGE 7#'''''8''Z' '@'Minolta DiMAGE 7 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Minolta_DiMAGE_Z2-simple.dcp0000755000175000017500000000034611537130700017146 00000000000000IIRCV! hZMinolta DiMAGE Z2-'''b'|1' 'O'''Minolta DiMAGE Z2 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Sinar-simple.dcp0000755000175000017500000000031611537130700015173 00000000000000IIRCV! \Z Sinar:'h'R''v+''''V'Sinar SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS-1DS-simple.dcp0000755000175000017500000000033611537130700016252 00000000000000IIRCV! dZCanon EOS-1DS'/'1''l;' ''0''Canon EOS-1DS SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S5500-simple.dcp0000755000175000017500000000036011537130700017541 00000000000000IIRCV! nZFUJIFILM FinePix S5500.''''\8' ''''FUJIFILM FinePix S5500 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Minolta_DiMAGE_7Hi-simple.dcp0000755000175000017500000000035011537130700017275 00000000000000IIRCV! jZMinolta DiMAGE 7Hih,''&''8'# 'U' 'u'Minolta DiMAGE 7Hi SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_A650-simple.dcp0000755000175000017500000000035411537130700017664 00000000000000IIRCV! lZCanon PowerShot A650%'')''*'''''Canon PowerShot A650 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Leaf_CMost-simple.dcp0000755000175000017500000000033011537130700016067 00000000000000IIRC V! bZLeaf CMostp''''8''H'''Leaf CMost SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/generic_camera_profile.icc0000644000175000017500000000136411526533645017302 00000000000000lcms0mntrRGB XYZ -acspAPPLlcms-lcms dmndjdesctsdmddgwtptPrXYZdbXYZxgXYZrTRCgTRCbTRCchrm$desc(lcms internal)desclcms RGB virtual profiledesc rgb built-inXYZ =XYZ C\{XYZ &uXYZ  curvcurvcurvchrmT{qu(1rawstudio-2.0/profiles/SONY_DSLR-A900-simple.dcp0000755000175000017500000000034011537130700016137 00000000000000IIRCV! fZSONY DSLR-A900Y''s's'>'g '' '!'SONY DSLR-A900 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_G2-simple.dcp0000755000175000017500000000035011537130700017515 00000000000000IIRCV! jZCanon PowerShot G2#'{'''.8' ' ' 'n'Canon PowerShot G2 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/KODAK_NC2000-simple.dcp0000755000175000017500000000033411537130700015632 00000000000000IIRC V! dZKODAK NC2000C6'Y''/'&''I'R' 'KODAK NC2000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_SP560UZ-simple.dcp0000755000175000017500000000034211537130700016402 00000000000000IIRCV! fZOLYMPUS SP560UZ*''*'-'2'_ 'p''O'OLYMPUS SP560UZ SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D3000-simple.dcp0000755000175000017500000000033211537130700015541 00000000000000IIRC V! bZNIKON D3000 "'f'Y''A''''G 'NIKON D3000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSC-R1-simple.dcp0000755000175000017500000000033211537130700015656 00000000000000IIRC V! bZSONY DSC-R1@!''J''6=' ''E''SONY DSC-R1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S7000-simple.dcp0000755000175000017500000000036011537130700017536 00000000000000IIRCV! nZFUJIFILM FinePix S7000''N''':''-'_ 'Q'FUJIFILM FinePix S7000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_450D-simple.dcp0000755000175000017500000000034011537130700016354 00000000000000IIRCV! fZCanon EOS 450D'''':'p 'B'y ''Canon EOS 450D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_E5000-simple.dcp0000755000175000017500000000036211537130700015547 00000000000000IIRC V! bZNIKON E5000U'-'''' ''p&'=''{#'`'NIKON E5000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS-1D_Mark_III-simple.dcp0000755000175000017500000000035611537130700017575 00000000000000IIRCV! lZCanon EOS-1D Mark III''0'b'?' 'N'B''Canon EOS-1D Mark III SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/PENTAX_645D-simple.dcp0000755000175000017500000000047211537130700015623 00000000000000IIRC n! z" Z[ PENTAX 645Du+''''p+''''')''z''-'''e': ''PENTAX 645D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Phase_One_P65-simple.dcp0000755000175000017500000000033611537130700016414 00000000000000IIRCV! dZPhase One P65J!''''?'N''';'Phase One P65 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/KODAK_P712-simple.dcp0000755000175000017500000000033011537130700015455 00000000000000IIRC V! bZKODAK P712%''''1' ''3''KODAK P712 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_S3_IS-simple.dcp0000755000175000017500000000035611537130700020133 00000000000000IIRCV! lZCanon PowerShot S3 IS/8':'9'-'1''''R'Canon PowerShot S3 IS SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A700-simple.dcp0000755000175000017500000000034011537130700016135 00000000000000IIRCV! fZSONY DSLR-A700''''?'W 'i'% 'Q'SONY DSLR-A700 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_A50-simple.dcp0000755000175000017500000000040211537130700017570 00000000000000IIRCV! jZCanon PowerShot A50L'v&''l ''c'\'&'8''+''Canon PowerShot A50 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-FX150-simple.dcp0000755000175000017500000000035211537130700017256 00000000000000IIRCV! jZPanasonic DMC-FX150z#''c''A4' ''Q ''Panasonic DMC-FX150 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_G9-simple.dcp0000755000175000017500000000035011537130700017524 00000000000000IIRCV! jZCanon PowerShot G9''' '3'A 'v''o'Canon PowerShot G9 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-420-simple.dcp0000755000175000017500000000033611537130700016040 00000000000000IIRCV! dZOLYMPUS E-420*"'''V'<'' ' ''OLYMPUS E-420 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/CASIO_EX-S20-simple.dcp0000755000175000017500000000033411537130700015713 00000000000000IIRC V! dZCASIO EX-S20@.'f''@'3''' ''CASIO EX-S20 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_S60-simple.dcp0000755000175000017500000000035211537130700017617 00000000000000IIRCV! jZCanon PowerShot S60["'N'''+<' 'r'''Canon PowerShot S60 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_E2100-simple.dcp0000755000175000017500000000033211537130700015542 00000000000000IIRC V! bZNIKON E21004'e''b'|1' '' ''NIKON E2100 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S5000-simple.dcp0000755000175000017500000000036011537130700017534 00000000000000IIRCV! nZFUJIFILM FinePix S50002"'T''':''Z' 'F'FUJIFILM FinePix S5000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/PENTAX_K2000-simple.dcp0000755000175000017500000000033411537130700015672 00000000000000IIRC V! dZPENTAX K20001+''}''2' ''w''PENTAX K2000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Phase_One_P_45-simple.dcp0000755000175000017500000000034011537130700016544 00000000000000IIRCV! fZPhase One P 45''''6'''''Phase One P 45 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-PL1-simple.dcp0000755000175000017500000000033611537130700016127 00000000000000IIRCV! dZOLYMPUS E-PL1 ''''Y='7''L '+ 'OLYMPUS E-PL1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/compatibleWithAdobeRGB1998-linear.icc0000644000175000017500000000110211526533645020670 00000000000000Bargl mntrRGB XYZ $-acspMSFTnone-argl desc{cprtx5wtptbkptrXYZgXYZbXYZrTRCgTRC$bTRC4desc!Compatible with Adobe RGB (1998)textPublic Domain. No Warranty, Use at own risk.XYZ QXYZ XYZ OXYZ 4,XYZ &1/curvcurvcurvrawstudio-2.0/profiles/NIKON_D3-simple.dcp0000755000175000017500000000032411537130700015322 00000000000000IIRC V! `ZNIKON D3''i''@''{'''NIKON D3 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-330-simple.dcp0000755000175000017500000000033611537130700016040 00000000000000IIRCV! dZOLYMPUS E-330#'W'''v>''' '9 'OLYMPUS E-330 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-P1-simple.dcp0000755000175000017500000000033411537130700016011 00000000000000IIRC V! dZOLYMPUS E-P1 ''''Y='7''L '+ 'OLYMPUS E-P1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SAMSUNG_EX1-simple.dcp0000644000175000017500000000047211537764506015732 00000000000000IIRC n! z" Z[ SAMSUNG EX1$'q'C''(' ''K''"'>'''@,'''e''SAMSUNG EX1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Kodak_DCS660C-simple.dcp0000755000175000017500000000033611537130700016202 00000000000000IIRCV! dZKodak DCS660CDG'1'M''+'''' 'Kodak DCS660C SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Ricoh_A12_28mm-simple.dcp0000644000175000017500000000051411537130700016426 00000000000000IIRCn! " Z[0RICOH GR LENS A12 28mm F2.52*'9''Q'.'x 'f''''''['H'f3'C 'Q'Q''Ricoh A12 28mm SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-FZ28-simple.dcp0000755000175000017500000000035011537130700017202 00000000000000IIRCV! jZPanasonic DMC-FZ28}''`''' 2'd ''\''Panasonic DMC-FZ28 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-3-simple.dcp0000755000175000017500000000033211537130700015671 00000000000000IIRC V! bZOLYMPUS E-3%''''<'''4''OLYMPUS E-3 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Leaf-simple.dcp0000755000175000017500000000031411537130700014764 00000000000000IIRCV! \Z Leaf, ''''Q>'| ''''Leaf SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D3100-simple.dcp0000755000175000017500000000047211537130700015547 00000000000000IIRC n! z" Z[ Nikon D3100r ''f':'.' ']''!''''1'^3'h '' ' 'Nikon D3100 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_E5700-simple.dcp0000755000175000017500000000036211537130700015556 00000000000000IIRC V! bZNIKON E5700','@ '''L ''%''' 'D#''NIKON E5700 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-FZ50-simple.dcp0000755000175000017500000000035011537130700017175 00000000000000IIRCV! jZPanasonic DMC-FZ50'k''''4' '~'G ''Panasonic DMC-FZ50 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Neutral-With-Tonecurve-Prophoto.dcp0000755000175000017500000000037611537130700020741 00000000000000IIRCV! vZ#Passthrough Tonecurve ProPhoto0''('Y'g9''''+'Neutral ProPhotoRGB With TonecurveCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Kodak_DCS_Pro_SLR-simple.dcp0000755000175000017500000000034611537130700017204 00000000000000IIRCV! hZKodak DCS Pro SLRv'Y '''6' '''E'Kodak DCS Pro SLR SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D1-simple.dcp0000755000175000017500000000032411537130700015320 00000000000000IIRC V! `ZNIKON D1A'''E'a=''' '1%'NIKON D1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-300-simple.dcp0000755000175000017500000000033611537130700016035 00000000000000IIRCV! dZOLYMPUS E-300'''d'6'&''''OLYMPUS E-300 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/KODAK_P880-simple.dcp0000755000175000017500000000033011537130700015463 00000000000000IIRC V! bZKODAK P8802'''';'8 ''''KODAK P880 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/PENTAX_K-m-simple.dcp0000755000175000017500000000033011537130700015616 00000000000000IIRC V! bZPENTAX K-m1+''}''2' ''w''PENTAX K-m SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_S30-simple.dcp0000755000175000017500000000035211537130700017614 00000000000000IIRCV! jZCanon PowerShot S30F)'''h'F9''k' ''Canon PowerShot S30 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Neutral-With-Tonecurve-AdobeRGB.dcp0000755000175000017500000000037211537130700020470 00000000000000IIRCV! vZ Passthrough Tonecurve AdobeRGBL'''''J'O'''4'Neutral AdobeRGB With TonecurveCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_FZ100-simple.dcp0000755000175000017500000000051211537130700016650 00000000000000IIRCn! " Z[.Panasonic DMC-FZ1001H'''}'"'O '''`'E?'''' *'M'n'''Panasonic DMC-FZ100 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS-1D-simple.dcp0000755000175000017500000000033411537130700016125 00000000000000IIRC V! dZCanon EOS-1D'M''_'@''='' 'Canon EOS-1D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A300-simple.dcp0000755000175000017500000000034011537130700016131 00000000000000IIRCV! fZSONY DSLR-A300w&''`''?''5'S''SONY DSLR-A300 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_E4300-simple.dcp0000755000175000017500000000033211537130700015546 00000000000000IIRC V! bZNIKON E4300-'''b'|1' 'O'''NIKON E4300 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D80-simple.dcp0000755000175000017500000000032611537130700015411 00000000000000IIRC V! `ZNIKON D80!'''',B'{'.'S'H!'NIKON D80 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_E2500-simple.dcp0000755000175000017500000000036211537130700015551 00000000000000IIRC V! bZNIKON E2500U'-'''' ''p&'=''{#'`'NIKON E2500 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S9000-simple.dcp0000755000175000017500000000036011537130700017540 00000000000000IIRCV! nZFUJIFILM FinePix S9000(''''':' '''!'FUJIFILM FinePix S9000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_Pro70-simple.dcp0000755000175000017500000000040611537130700020156 00000000000000IIRCV! lZCanon PowerShot Pro70'Z&''c'''o'&''B'y*'>'Canon PowerShot Pro70 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_A630-simple.dcp0000755000175000017500000000035411537130700017662 00000000000000IIRCV! lZCanon PowerShot A630y7'D'#'9'8'Q'q'! ''Canon PowerShot A630 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/MOTOROLA_PIXL-simple.dcp0000755000175000017500000000033611537130700016211 00000000000000IIRCV! dZMOTOROLA PIXL`#''''1.''_' ''MOTOROLA PIXL SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Kodak_DCS_Pro_14nx-simple.dcp0000755000175000017500000000035011537130700017331 00000000000000IIRCV! jZKodak DCS Pro 14nxv'Y '''6' '''E'Kodak DCS Pro 14nx SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Fuji_HS10-simple.dcp0000755000175000017500000000052611537130700015552 00000000000000IIRCn! " Z[ :Fujifilm FinePix HS10 HS11/'8''/''@ '''@'*'9'L''Z$'_ ''''Fujifilm FinePix HS10/11 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-10-simple.dcp0000755000175000017500000000033411537130700015751 00000000000000IIRC V! dZOLYMPUS E-101'l'x'R'8','r'''OLYMPUS E-10 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_S45-simple.dcp0000755000175000017500000000035211537130700017622 00000000000000IIRCV! jZCanon PowerShot S45''E''^7' ''% 'i'Canon PowerShot S45 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S9100-simple.dcp0000755000175000017500000000036011537130700017541 00000000000000IIRCV! nZFUJIFILM FinePix S910070']'''3:' '' '`"'FUJIFILM FinePix S9100 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SAMSUNG_WB2000-simple.dcp0000755000175000017500000000050011537130700016121 00000000000000IIRCn! ~" Z[$Samsung WB2000e0''''"''4'']'=/''}''>%'''''Samsung WB2000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D100-simple.dcp0000755000175000017500000000033011537130700015455 00000000000000IIRC V! bZNIKON D100'['''OA'2 '''@'NIKON D100 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/PENTAX_K20D-simple.dcp0000755000175000017500000000033211537130700015634 00000000000000IIRC V! bZPENTAX K20D$'f'''>']'i' ' 'PENTAX K20D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_SX110_IS-simple.dcp0000755000175000017500000000036411537130700020421 00000000000000IIRCV! pZ Canon PowerShot SX110 IS8''''*' 'h''4'Canon PowerShot SX110 IS SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Mamiya_ZD-simple.dcp0000755000175000017500000000032611537130700015732 00000000000000IIRC V! `ZMamiya ZD' '''MA'''5'I'Mamiya ZD SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_350D-simple.dcp0000755000175000017500000000034011537130700016353 00000000000000IIRCV! fZCanon EOS 350D'';';' >' ''''Canon EOS 350D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_SLTA33-simple.dcp0000755000175000017500000000047411537130700015705 00000000000000IIRC n! |" Z[  Sony SLT-A33d''''-' 't'''';'''1' ''''SONY SLT-A33 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Leaf_Aptus_75-simple.dcp0000755000175000017500000000033611537130700016457 00000000000000IIRCV! dZLeaf Aptus 75''Z''@'''''Leaf Aptus 75 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Leica-M8-simple.dcp0000644000175000017500000000046411537130700015417 00000000000000IIRC n! x" Z[Leica M8('='''/'s '' '''l''''7'@''''Leica M8 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS-simple.dcp0000755000175000017500000000032611537130700015664 00000000000000IIRC V! `ZCanon EOS '0'''7' ''j 'J 'Canon EOS SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_40D-simple.dcp0000755000175000017500000000033611537130700016274 00000000000000IIRCV! dZCanon EOS 40D''''<' '' ''Canon EOS 40D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Makefile.in0000644000175000017500000010055511547430041014212 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = profiles DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(rawstudiodir)" DATA = $(rawstudio_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ rawstudiodir = $(datadir)/rawstudio/profiles rawstudio_DATA = rawstudio-cameras.xml\ generic_camera_profile.icc\ sRGB.icc\ prophoto.icc\ compatibleWithAdobeRGB1998.icc\ sRGB-linear.icc\ prophoto-linear.icc\ compatibleWithAdobeRGB1998-linear.icc\ Neutral-With-Tonecurve-sRGB.dcp\ Neutral-With-Tonecurve-AdobeRGB.dcp\ Neutral-With-Tonecurve-Prophoto.dcp\ AGFAPHOTO_DC-833m-simple.dcp\ Apple_QuickTake-simple.dcp\ Canon_EOS_1000D-simple.dcp\ Canon_EOS_1100D-simple.dcp\ Canon_EOS_10D-simple.dcp\ Canon_EOS_20D-simple.dcp\ Canon_EOS_20Da-simple.dcp\ Canon_EOS_300D-simple.dcp\ Canon_EOS_30D-simple.dcp\ Canon_EOS_350D-simple.dcp\ Canon_EOS_400D-simple.dcp\ Canon_EOS_40D-simple.dcp\ Canon_EOS_450D-simple.dcp\ Canon_EOS_500D-simple.dcp\ Canon_EOS_550D-simple.dcp\ Canon_EOS_50D-simple.dcp\ Canon_EOS_5D_Mark_II-simple.dcp\ Canon_EOS_5D-simple.dcp\ Canon_EOS_600D-simple.dcp\ Canon_EOS_60D-simple.dcp\ Canon_EOS_7D-simple.dcp\ Canon_EOS_D2000-simple.dcp\ Canon_EOS_D30-simple.dcp\ Canon_EOS_D60-simple.dcp\ Canon_EOS_D6000-simple.dcp\ Canon_EOS-1D_Mark_II_N-simple.dcp\ Canon_EOS-1D_Mark_II-simple.dcp\ Canon_EOS-1D_Mark_III-simple.dcp\ Canon_EOS-1D_Mark_IV-simple.dcp\ Canon_EOS-1D-simple.dcp\ Canon_EOS-1Ds_Mark_II-simple.dcp\ Canon_EOS-1Ds_Mark_III-simple.dcp\ Canon_EOS-1DS-simple.dcp\ Canon_EOS-simple.dcp\ Canon_PowerShot_A470-simple.dcp\ Canon_PowerShot_A5-simple.dcp\ Canon_PowerShot_A50-simple.dcp\ Canon_PowerShot_A530-simple.dcp\ Canon_PowerShot_A610-simple.dcp\ Canon_PowerShot_A620-simple.dcp\ Canon_PowerShot_A630-simple.dcp\ Canon_PowerShot_A640-simple.dcp\ Canon_PowerShot_A650-simple.dcp\ Canon_PowerShot_A720-simple.dcp\ Canon_PowerShot_G1-simple.dcp\ Canon_PowerShot_G10-simple.dcp\ Canon_PowerShot_G11-simple.dcp\ Canon_PowerShot_G12-simple.dcp\ Canon_PowerShot_G2-simple.dcp\ Canon_PowerShot_G3-simple.dcp\ Canon_PowerShot_G5-simple.dcp\ Canon_PowerShot_G6-simple.dcp\ Canon_PowerShot_G9-simple.dcp\ Canon_PowerShot_Pro1-simple.dcp\ Canon_PowerShot_Pro70-simple.dcp\ Canon_PowerShot_Pro90-simple.dcp\ Canon_PowerShot_S3_IS-simple.dcp\ Canon_PowerShot_S30-simple.dcp\ Canon_PowerShot_S40-simple.dcp\ Canon_PowerShot_S45-simple.dcp\ Canon_PowerShot_S50-simple.dcp\ Canon_PowerShot_S60-simple.dcp\ Canon_PowerShot_S70-simple.dcp\ Canon_PowerShot_SX1_IS-simple.dcp\ Canon_PowerShot_SX110_IS-simple.dcp\ Canon_PowerShot_S90-simple.dcp\ Canon_PowerShot_S95-simple.dcp\ CASIO_EX-S20-simple.dcp\ CASIO_EX-Z750-simple.dcp\ CINE_650-simple.dcp\ CINE_660-simple.dcp\ CINE-simple.dcp\ Contax_N_Digital-simple.dcp\ EPSON_R-D1-simple.dcp\ FUJIFILM_FinePix_E550-simple.dcp\ FUJIFILM_FinePix_E900-simple.dcp\ FUJIFILM_FinePix_F7-simple.dcp\ FUJIFILM_FinePix_F8-simple.dcp\ FUJIFILM_FinePix_S100FS-simple.dcp\ FUJIFILM_FinePix_S20Pro-simple.dcp\ FUJIFILM_FinePix_S2Pro-simple.dcp\ FUJIFILM_FinePix_S3Pro-simple.dcp\ FUJIFILM_FinePix_S5000-simple.dcp\ FUJIFILM_FinePix_S5100-simple.dcp\ FUJIFILM_FinePix_S5200-simple.dcp\ FUJIFILM_FinePix_S5500-simple.dcp\ FUJIFILM_FinePix_S5600-simple.dcp\ FUJIFILM_FinePix_S5Pro-simple.dcp\ FUJIFILM_FinePix_S6-simple.dcp\ FUJIFILM_FinePix_S6000fd-simple.dcp\ FUJIFILM_FinePix_S7000-simple.dcp\ FUJIFILM_FinePix_S9000-simple.dcp\ FUJIFILM_FinePix_S9100-simple.dcp\ FUJIFILM_FinePix_S9500-simple.dcp\ FUJIFILM_FinePix_S9600-simple.dcp\ FUJIFILM_IS_Pro-simple.dcp\ FUJIFILM_IS-1-simple.dcp\ Fuji_HS10-simple.dcp\ Imacon_Ixpress-simple.dcp\ Kodak_DCS_Pro_14-simple.dcp\ Kodak_DCS_Pro_14nx-simple.dcp\ Kodak_DCS_Pro_SLR-simple.dcp\ Kodak_DCS315C-simple.dcp\ Kodak_DCS330C-simple.dcp\ KODAK_DCS420-simple.dcp\ KODAK_DCS460-simple.dcp\ Kodak_DCS520C-simple.dcp\ Kodak_DCS560C-simple.dcp\ Kodak_DCS620C-simple.dcp\ Kodak_DCS620X-simple.dcp\ Kodak_DCS660C-simple.dcp\ Kodak_DCS720X-simple.dcp\ Kodak_DCS760C-simple.dcp\ KODAK_EASYSHARE_Z1015-simple.dcp\ KODAK_EasyShare_Z980-simple.dcp\ KODAK_EOSDCS1-simple.dcp\ KODAK_EOSDCS3B-simple.dcp\ KODAK_NC2000-simple.dcp\ KODAK_P712-simple.dcp\ KODAK_P850-simple.dcp\ KODAK_P880-simple.dcp\ Kodak_ProBack-simple.dcp\ Kodak_ProBack645-simple.dcp\ Konica_Minolta_Maxxum_5D-simple.dcp\ Konica_Minolta_Maxxum_7D-simple.dcp\ Konica_Minolta_DiMAGE_A2-simple.dcp\ Konica_Minolta_DiMAGE_A200-simple.dcp\ Leaf_Aptus_54S-simple.dcp\ Leaf_Aptus_65-simple.dcp\ Leaf_Aptus_75-simple.dcp\ Leaf_CMost-simple.dcp\ Leaf_Valeo_6-simple.dcp\ Leaf-simple.dcp\ Leica-M8-simple.dcp\ Leica-X1-native.dcp\ Leica-S2-simple.dcp\ Mamiya_ZD-simple.dcp\ Micron_2010-simple.dcp\ Minolta_DiMAGE_5-simple.dcp\ Minolta_DiMAGE_7-simple.dcp\ Minolta_DiMAGE_7i-simple.dcp\ Minolta_DiMAGE_7Hi-simple.dcp\ Minolta_DiMAGE_A1-simple.dcp\ Minolta_DiMAGE_Z2-simple.dcp\ MINOLTA_DYNAX_5-simple.dcp\ MINOLTA_DYNAX_7-simple.dcp\ MOTOROLA_PIXL-simple.dcp\ NIKON_COOLPIX_P6000-simple.dcp\ NIKON_COOLPIX_P7000-simple.dcp\ NIKON_D1-simple.dcp\ NIKON_D100-simple.dcp\ NIKON_D1H-simple.dcp\ NIKON_D1X-simple.dcp\ NIKON_D200-simple.dcp\ NIKON_D2H-simple.dcp\ NIKON_D2X-simple.dcp\ NIKON_D3-simple.dcp\ NIKON_D300-simple.dcp\ NIKON_D3000-simple.dcp\ NIKON_D3100-simple.dcp\ NIKON_D3X-simple.dcp\ NIKON_D40-simple.dcp\ NIKON_D40X-simple.dcp\ NIKON_D50-simple.dcp\ NIKON_D5000-simple.dcp\ NIKON_D60-simple.dcp\ NIKON_D70-simple.dcp\ NIKON_D70s-simple.dcp\ NIKON_D700-simple.dcp\ NIKON_D7000-simple.dcp\ NIKON_D80-simple.dcp\ NIKON_D90-simple.dcp\ NIKON_E2100-simple.dcp\ NIKON_E2500-simple.dcp\ NIKON_E4300-simple.dcp\ NIKON_E4500-simple.dcp\ NIKON_E5000-simple.dcp\ NIKON_E5400-simple.dcp\ NIKON_E5700-simple.dcp\ NIKON_E8400-simple.dcp\ NIKON_E8700-simple.dcp\ NIKON_E8800-simple.dcp\ NIKON_E950-simple.dcp\ NIKON_E995-simple.dcp\ NIKON_D3S-simple.dcp\ OLYMPUS_C5050-simple.dcp\ OLYMPUS_C5060-simple.dcp\ OLYMPUS_C70-simple.dcp\ OLYMPUS_C7070-simple.dcp\ OLYMPUS_C80-simple.dcp\ OLYMPUS_E-1-simple.dcp\ OLYMPUS_E-10-simple.dcp\ OLYMPUS_E-20-simple.dcp\ OLYMPUS_E-3-simple.dcp\ OLYMPUS_E-30-simple.dcp\ OLYMPUS_E-300-simple.dcp\ OLYMPUS_E-330-simple.dcp\ OLYMPUS_E-400-simple.dcp\ OLYMPUS_E-410-simple.dcp\ OLYMPUS_E-420-simple.dcp\ OLYMPUS_E-450-simple.dcp\ OLYMPUS_E-5-simple.dcp\ OLYMPUS_E-500-simple.dcp\ OLYMPUS_E-510-simple.dcp\ OLYMPUS_E-520-simple.dcp\ OLYMPUS_E-620-simple.dcp\ OLYMPUS_E-P1-simple.dcp\ OLYMPUS_E-PL1-simple.dcp\ OLYMPUS_E-PL1s-simple.dcp\ OLYMPUS_E-PL2-simple.dcp\ OLYMPUS_SP3-simple.dcp\ OLYMPUS_SP350-simple.dcp\ OLYMPUS_SP500UZ-simple.dcp\ OLYMPUS_SP510UZ-simple.dcp\ OLYMPUS_SP550UZ-simple.dcp\ OLYMPUS_SP560UZ-simple.dcp\ OLYMPUS_SP570UZ-simple.dcp\ OLYMPUS_XZ-1-simple.dcp\ Panasonic_DMC-FX150-simple.dcp\ Panasonic_DMC-FZ18-simple.dcp\ Panasonic_DMC-FZ28-simple.dcp\ Panasonic_DMC-FZ30-simple.dcp\ Panasonic_DMC-FZ35-simple.dcp\ Panasonic_FZ100-simple.dcp\ Panasonic_FZ40-simple.dcp\ Panasonic_LX5-simple.dcp\ Panasonic_DMC-FZ50-simple.dcp\ Panasonic_DMC-FZ8-simple.dcp\ Panasonic_DMC-G1-simple.dcp\ Panasonic_DMC-G10-simple.dcp\ Panasonic_DMC-G2-simple.dcp\ Panasonic_DMC-GF1-simple.dcp\ Panasonic_DMC-GF2-simple.dcp\ Panasonic_DMC-GH1-simple.dcp\ Panasonic_DMC-GH2-simple.dcp\ Panasonic_DMC-L1-simple.dcp\ Panasonic_DMC-L10-simple.dcp\ Panasonic_DMC-LC1-simple.dcp\ Panasonic_DMC-LX1-simple.dcp\ Panasonic_DMC-LX2-simple.dcp\ Panasonic_DMC-LX3-simple.dcp\ PENTAX_K-5-simple.dcp\ PENTAX_K-7-simple.dcp\ PENTAX_K-m-simple.dcp\ PENTAX_K-r-simple.dcp\ PENTAX_K1-simple.dcp\ PENTAX_K10D-simple.dcp\ PENTAX_K2000-simple.dcp\ PENTAX_K200D-simple.dcp\ PENTAX_K20D-simple.dcp\ PENTAX_K-x-simple.dcp\ PENTAX_645D-simple.dcp\ Phase_One_H_20-simple.dcp\ Phase_One_P_2-simple.dcp\ Phase_One_P_30-simple.dcp\ Phase_One_P_45-simple.dcp\ Phase_One_P65-simple.dcp\ Ricoh_A12_28mm-simple.dcp\ Ricoh_A12_50mm-simple.dcp\ Ricoh_Digital_3-simple.dcp\ Ricoh_GX200-simple.dcp\ Ricoh_S10_24-72mm-simple.dcp\ SAMSUNG_GX-1-simple.dcp\ SAMSUNG_NX100-simple.dcp\ SAMSUNG_S85-simple.dcp\ SAMSUNG_WB2000-simple.dcp\ SAMSUNG_NX11-simple.dcp\ SAMSUNG_EX1-simple.dcp\ SAMSUNG_GX10-simple.dcp\ SAMSUNG_GX-1L-simple.dcp\ SAMSUNG_GX-1S-simple.dcp\ SAMSUNG_GX20-simple.dcp\ SAMSUNG_NX10-simple.dcp\ SAMSUNG_NX5-simple.dcp\ Sinar-simple.dcp\ SONY_DSC-F828-simple.dcp\ SONY_DSC-R1-simple.dcp\ SONY_DSC-V3-simple.dcp\ SONY_DSLR-A100-simple.dcp\ SONY_DSLR-A200-simple.dcp\ SONY_DSLR-A230-simple.dcp\ SONY_DSLR-A290-simple.dcp\ SONY_DSLR-A300-simple.dcp\ SONY_DSLR-A330-simple.dcp\ SONY_DSLR-A350-simple.dcp\ SONY_DSLR-A380-simple.dcp\ SONY_DSLR-A390-simple.dcp\ SONY_DSLR-A450-simple.dcp\ SONY_DSLR-A500-simple.dcp\ SONY_DSLR-A550-simple.dcp\ SONY_DSLR-A560-simple.dcp\ SONY_DSLR-A580-simple.dcp\ SONY_DSLR-A700-simple.dcp\ SONY_DSLR-A850-simple.dcp\ SONY_DSLR-A900-simple.dcp\ SONY_DSLR-A5-simple.dcp\ SONY_NEX-3-simple.dcp\ SONY_NEX-5-simple.dcp\ SONY_SLTA33-simple.dcp\ SONY_SLTA55V-simple.dcp EXTRA_DIST = $(rawstudio_DATA)\ simple-src/AGFAPHOTO_DC-833m-simple.xml\ simple-src/Apple_QuickTake-simple.xml\ simple-src/Canon_EOS_1000D-simple.xml\ simple-src/Canon_EOS_10D-simple.xml\ simple-src/Canon_EOS_1100D-simple.xml\ simple-src/Canon_EOS-1D_Mark_III-simple.xml\ simple-src/Canon_EOS-1D_Mark_II_N-simple.xml\ simple-src/Canon_EOS-1D_Mark_II-simple.xml\ simple-src/Canon_EOS-1D_Mark_IV-simple.xml\ simple-src/Canon_EOS-1D-simple.xml\ simple-src/Canon_EOS-1Ds_Mark_III-simple.xml\ simple-src/Canon_EOS-1Ds_Mark_II-simple.xml\ simple-src/Canon_EOS-1DS-simple.xml\ simple-src/Canon_EOS_20Da-simple.xml\ simple-src/Canon_EOS_20D-simple.xml\ simple-src/Canon_EOS_300D-simple.xml\ simple-src/Canon_EOS_30D-simple.xml\ simple-src/Canon_EOS_350D-simple.xml\ simple-src/Canon_EOS_400D-simple.xml\ simple-src/Canon_EOS_40D-simple.xml\ simple-src/Canon_EOS_450D-simple.xml\ simple-src/Canon_EOS_500D-simple.xml\ simple-src/Canon_EOS_50D-simple.xml\ simple-src/Canon_EOS_550D-simple.xml\ simple-src/Canon_EOS_5D_Mark_II-simple.xml\ simple-src/Canon_EOS_5D-simple.xml\ simple-src/Canon_EOS_600D-simple.xml\ simple-src/Canon_EOS_60D-simple.xml\ simple-src/Canon_EOS_7D-simple.xml\ simple-src/Canon_EOS_D2000-simple.xml\ simple-src/Canon_EOS_D30-simple.xml\ simple-src/Canon_EOS_D6000-simple.xml\ simple-src/Canon_EOS_D60-simple.xml\ simple-src/Canon_EOS-simple.xml\ simple-src/Canon_PowerShot_A470-simple.xml\ simple-src/Canon_PowerShot_A50-simple.xml\ simple-src/Canon_PowerShot_A530-simple.xml\ simple-src/Canon_PowerShot_A5-simple.xml\ simple-src/Canon_PowerShot_A610-simple.xml\ simple-src/Canon_PowerShot_A620-simple.xml\ simple-src/Canon_PowerShot_A630-simple.xml\ simple-src/Canon_PowerShot_A640-simple.xml\ simple-src/Canon_PowerShot_A650-simple.xml\ simple-src/Canon_PowerShot_A720-simple.xml\ simple-src/Canon_PowerShot_G10-simple.xml\ simple-src/Canon_PowerShot_G11-simple.xml\ simple-src/Canon_PowerShot_G12-simple.xml\ simple-src/Canon_PowerShot_G1-simple.xml\ simple-src/Canon_PowerShot_G2-simple.xml\ simple-src/Canon_PowerShot_G3-simple.xml\ simple-src/Canon_PowerShot_G5-simple.xml\ simple-src/Canon_PowerShot_G6-simple.xml\ simple-src/Canon_PowerShot_G9-simple.xml\ simple-src/Canon_PowerShot_Pro1-simple.xml\ simple-src/Canon_PowerShot_Pro70-simple.xml\ simple-src/Canon_PowerShot_Pro90-simple.xml\ simple-src/Canon_PowerShot_S30-simple.xml\ simple-src/Canon_PowerShot_S3_IS-simple.xml\ simple-src/Canon_PowerShot_S40-simple.xml\ simple-src/Canon_PowerShot_S45-simple.xml\ simple-src/Canon_PowerShot_S50-simple.xml\ simple-src/Canon_PowerShot_S60-simple.xml\ simple-src/Canon_PowerShot_S70-simple.xml\ simple-src/Canon_PowerShot_S90-simple.xml\ simple-src/Canon_PowerShot_S95-simple.xml\ simple-src/Canon_PowerShot_SX110_IS-simple.xml\ simple-src/Canon_PowerShot_SX1_IS-simple.xml\ simple-src/CASIO_EX-S20-simple.xml\ simple-src/CASIO_EX-Z750-simple.xml\ simple-src/CINE_650-simple.xml\ simple-src/CINE_660-simple.xml\ simple-src/CINE-simple.xml\ simple-src/Contax_N_Digital-simple.xml\ simple-src/EPSON_R-D1-simple.xml\ simple-src/FUJIFILM_FinePix_E550-simple.xml\ simple-src/FUJIFILM_FinePix_E900-simple.xml\ simple-src/FUJIFILM_FinePix_F7-simple.xml\ simple-src/FUJIFILM_FinePix_F8-simple.xml\ simple-src/FUJIFILM_FinePix_S100FS-simple.xml\ simple-src/FUJIFILM_FinePix_S20Pro-simple.xml\ simple-src/FUJIFILM_FinePix_S2Pro-simple.xml\ simple-src/FUJIFILM_FinePix_S3Pro-simple.xml\ simple-src/FUJIFILM_FinePix_S5000-simple.xml\ simple-src/FUJIFILM_FinePix_S5100-simple.xml\ simple-src/FUJIFILM_FinePix_S5200-simple.xml\ simple-src/FUJIFILM_FinePix_S5500-simple.xml\ simple-src/FUJIFILM_FinePix_S5600-simple.xml\ simple-src/FUJIFILM_FinePix_S5Pro-simple.xml\ simple-src/FUJIFILM_FinePix_S6000fd-simple.xml\ simple-src/FUJIFILM_FinePix_S6-simple.xml\ simple-src/FUJIFILM_FinePix_S7000-simple.xml\ simple-src/FUJIFILM_FinePix_S9000-simple.xml\ simple-src/FUJIFILM_FinePix_S9100-simple.xml\ simple-src/FUJIFILM_FinePix_S9500-simple.xml\ simple-src/FUJIFILM_FinePix_S9600-simple.xml\ simple-src/FUJIFILM_IS-1-simple.xml\ simple-src/FUJIFILM_IS_Pro-simple.xml\ simple-src/Fuji_HS10-simple.xml\ simple-src/Imacon_Ixpress-simple.xml\ simple-src/Kodak_DCS315C-simple.xml\ simple-src/Kodak_DCS330C-simple.xml\ simple-src/KODAK_DCS420-simple.xml\ simple-src/KODAK_DCS460-simple.xml\ simple-src/Kodak_DCS520C-simple.xml\ simple-src/Kodak_DCS560C-simple.xml\ simple-src/Kodak_DCS620C-simple.xml\ simple-src/Kodak_DCS620X-simple.xml\ simple-src/Kodak_DCS660C-simple.xml\ simple-src/Kodak_DCS720X-simple.xml\ simple-src/Kodak_DCS760C-simple.xml\ simple-src/Kodak_DCS_Pro_14nx-simple.xml\ simple-src/Kodak_DCS_Pro_14-simple.xml\ simple-src/Kodak_DCS_Pro_SLR-simple.xml\ simple-src/KODAK_EASYSHARE_Z1015-simple.xml\ simple-src/KODAK_EasyShare_Z980-simple.xml\ simple-src/KODAK_EOSDCS1-simple.xml\ simple-src/KODAK_EOSDCS3B-simple.xml\ simple-src/KODAK_NC2000-simple.xml\ simple-src/KODAK_P712-simple.xml\ simple-src/KODAK_P850-simple.xml\ simple-src/KODAK_P880-simple.xml\ simple-src/Kodak_ProBack645-simple.xml\ simple-src/Kodak_ProBack-simple.xml\ simple-src/Konica_Minolta_DiMAGE_A200-simple.xml\ simple-src/Konica_Minolta_DiMAGE_A2-simple.xml\ simple-src/Konica_Minolta_Maxxum_5D-simple.xml\ simple-src/Konica_Minolta_Maxxum_7D-simple.xml\ simple-src/Leaf_Aptus_54S-simple.xml\ simple-src/Leaf_Aptus_65-simple.xml\ simple-src/Leaf_Aptus_75-simple.xml\ simple-src/Leaf_CMost-simple.xml\ simple-src/Leaf-simple.xml\ simple-src/Leaf_Valeo_6-simple.xml\ simple-src/Leica-M8-simple.xml\ simple-src/Leica-S2-simple.xml\ simple-src/Leica-X1-native.xml\ simple-src/Mamiya_ZD-simple.xml\ simple-src/Micron_2010-simple.xml\ simple-src/Minolta_DiMAGE_5-simple.xml\ simple-src/Minolta_DiMAGE_7Hi-simple.xml\ simple-src/Minolta_DiMAGE_7i-simple.xml\ simple-src/Minolta_DiMAGE_7-simple.xml\ simple-src/Minolta_DiMAGE_A1-simple.xml\ simple-src/Minolta_DiMAGE_Z2-simple.xml\ simple-src/MINOLTA_DYNAX_5-simple.xml\ simple-src/MINOLTA_DYNAX_7-simple.xml\ simple-src/MOTOROLA_PIXL-simple.xml\ simple-src/Neutral-With-Tonecurve-AdobeRGB.xml\ simple-src/Neutral-With-Tonecurve-Prophoto.xml\ simple-src/Neutral-With-Tonecurve-sRGB.xml\ simple-src/NIKON_COOLPIX_P6000-simple.xml\ simple-src/NIKON_COOLPIX_P7000-simple.xml\ simple-src/NIKON_D100-simple.xml\ simple-src/NIKON_D1H-simple.xml\ simple-src/NIKON_D1-simple.xml\ simple-src/NIKON_D1X-simple.xml\ simple-src/NIKON_D200-simple.xml\ simple-src/NIKON_D2H-simple.xml\ simple-src/NIKON_D2X-simple.xml\ simple-src/NIKON_D3000-simple.xml\ simple-src/NIKON_D300-simple.xml\ simple-src/NIKON_D3100-simple.xml\ simple-src/NIKON_D3-simple.xml\ simple-src/NIKON_D3S-simple.xml\ simple-src/NIKON_D3X-simple.xml\ simple-src/NIKON_D40-simple.xml\ simple-src/NIKON_D40X-simple.xml\ simple-src/NIKON_D5000-simple.xml\ simple-src/NIKON_D50-simple.xml\ simple-src/NIKON_D60-simple.xml\ simple-src/NIKON_D7000-simple.xml\ simple-src/NIKON_D700-simple.xml\ simple-src/NIKON_D70-simple.xml\ simple-src/NIKON_D70s-simple.xml\ simple-src/NIKON_D80-simple.xml\ simple-src/NIKON_D90-simple.xml\ simple-src/NIKON_E2100-simple.xml\ simple-src/NIKON_E2500-simple.xml\ simple-src/NIKON_E4300-simple.xml\ simple-src/NIKON_E4500-simple.xml\ simple-src/NIKON_E5000-simple.xml\ simple-src/NIKON_E5400-simple.xml\ simple-src/NIKON_E5700-simple.xml\ simple-src/NIKON_E8400-simple.xml\ simple-src/NIKON_E8700-simple.xml\ simple-src/NIKON_E8800-simple.xml\ simple-src/NIKON_E950-simple.xml\ simple-src/NIKON_E995-simple.xml\ simple-src/OLYMPUS_C5050-simple.xml\ simple-src/OLYMPUS_C5060-simple.xml\ simple-src/OLYMPUS_C7070-simple.xml\ simple-src/OLYMPUS_C70-simple.xml\ simple-src/OLYMPUS_C80-simple.xml\ simple-src/OLYMPUS_E-10-simple.xml\ simple-src/OLYMPUS_E-1-simple.xml\ simple-src/OLYMPUS_E-20-simple.xml\ simple-src/OLYMPUS_E-300-simple.xml\ simple-src/OLYMPUS_E-30-simple.xml\ simple-src/OLYMPUS_E-330-simple.xml\ simple-src/OLYMPUS_E-3-simple.xml\ simple-src/OLYMPUS_E-400-simple.xml\ simple-src/OLYMPUS_E-410-simple.xml\ simple-src/OLYMPUS_E-420-simple.xml\ simple-src/OLYMPUS_E-450-simple.xml\ simple-src/OLYMPUS_E-500-simple.xml\ simple-src/OLYMPUS_E-510-simple.xml\ simple-src/OLYMPUS_E-520-simple.xml\ simple-src/OLYMPUS_E-5-simple.xml\ simple-src/OLYMPUS_E-620-simple.xml\ simple-src/OLYMPUS_E-P1-simple.xml\ simple-src/OLYMPUS_E-PL1-simple.xml\ simple-src/OLYMPUS_E-PL1s-simple.xml\ simple-src/OLYMPUS_E-PL2-simple.xml\ simple-src/OLYMPUS_SP350-simple.xml\ simple-src/OLYMPUS_SP3-simple.xml\ simple-src/OLYMPUS_SP500UZ-simple.xml\ simple-src/OLYMPUS_SP510UZ-simple.xml\ simple-src/OLYMPUS_SP550UZ-simple.xml\ simple-src/OLYMPUS_SP560UZ-simple.xml\ simple-src/OLYMPUS_SP570UZ-simple.xml\ simple-src/OLYMPUS_XZ-1-simple.xml\ simple-src/Panasonic_DMC-FX150-simple.xml\ simple-src/Panasonic_DMC-FZ18-simple.xml\ simple-src/Panasonic_DMC-FZ28-simple.xml\ simple-src/Panasonic_DMC-FZ30-simple.xml\ simple-src/Panasonic_DMC-FZ35-simple.xml\ simple-src/Panasonic_DMC-FZ50-simple.xml\ simple-src/Panasonic_DMC-FZ8-simple.xml\ simple-src/Panasonic_DMC-G10-simple.xml\ simple-src/Panasonic_DMC-G1-simple.xml\ simple-src/Panasonic_DMC-G2-simple.xml\ simple-src/Panasonic_DMC-GF1-simple.xml\ simple-src/Panasonic_DMC-GF2-simple.xml\ simple-src/Panasonic_DMC-GH1-simple.xml\ simple-src/Panasonic_DMC-GH2-simple.xml\ simple-src/Panasonic_DMC-L10-simple.xml\ simple-src/Panasonic_DMC-L1-simple.xml\ simple-src/Panasonic_DMC-LC1-simple.xml\ simple-src/Panasonic_DMC-LX1-simple.xml\ simple-src/Panasonic_DMC-LX2-simple.xml\ simple-src/Panasonic_DMC-LX3-simple.xml\ simple-src/Panasonic_FZ100-simple.xml\ simple-src/Panasonic_FZ40-simple.xml\ simple-src/Panasonic_LX5-simple.xml\ simple-src/PENTAX_645D-simple.xml\ simple-src/PENTAX_K10D-simple.xml\ simple-src/PENTAX_K1-simple.xml\ simple-src/PENTAX_K2000-simple.xml\ simple-src/PENTAX_K200D-simple.xml\ simple-src/PENTAX_K20D-simple.xml\ simple-src/PENTAX_K-5-simple.xml\ simple-src/PENTAX_K-7-simple.xml\ simple-src/PENTAX_K-m-simple.xml\ simple-src/PENTAX_K-r-simple.xml\ simple-src/PENTAX_K-x-simple.xml\ simple-src/Phase_One_H_20-simple.xml\ simple-src/Phase_One_P_2-simple.xml\ simple-src/Phase_One_P_30-simple.xml\ simple-src/Phase_One_P_45-simple.xml\ simple-src/Phase_One_P65-simple.xml\ simple-src/Ricoh_A12_28mm-simple.xml\ simple-src/Ricoh_A12_50mm-simple.xml\ simple-src/Ricoh_Digital_3-simple.xml\ simple-src/Ricoh_GX200-simple.xml\ simple-src/Ricoh_S10_24-72mm-simple.xml\ simple-src/SAMSUNG_EX1-simple.xml\ simple-src/SAMSUNG_GX10-simple.xml\ simple-src/SAMSUNG_GX-1L-simple.xml\ simple-src/SAMSUNG_GX-1-simple.xml\ simple-src/SAMSUNG_GX-1S-simple.xml\ simple-src/SAMSUNG_GX20-simple.xml\ simple-src/SAMSUNG_NX100-simple.xml\ simple-src/SAMSUNG_NX10-simple.xml\ simple-src/SAMSUNG_NX11-simple.xml\ simple-src/SAMSUNG_NX5-simple.xml\ simple-src/SAMSUNG_S85-simple.xml\ simple-src/SAMSUNG_WB2000-simple.xml\ simple-src/Sinar-simple.xml\ simple-src/SONY_DSC-F828-simple.xml\ simple-src/SONY_DSC-R1-simple.xml\ simple-src/SONY_DSC-V3-simple.xml\ simple-src/SONY_DSLR-A100-simple.xml\ simple-src/SONY_DSLR-A200-simple.xml\ simple-src/SONY_DSLR-A230-simple.xml\ simple-src/SONY_DSLR-A290-simple.xml\ simple-src/SONY_DSLR-A300-simple.xml\ simple-src/SONY_DSLR-A330-simple.xml\ simple-src/SONY_DSLR-A350-simple.xml\ simple-src/SONY_DSLR-A380-simple.xml\ simple-src/SONY_DSLR-A390-simple.xml\ simple-src/SONY_DSLR-A450-simple.xml\ simple-src/SONY_DSLR-A500-simple.xml\ simple-src/SONY_DSLR-A550-simple.xml\ simple-src/SONY_DSLR-A560-simple.xml\ simple-src/SONY_DSLR-A580-simple.xml\ simple-src/SONY_DSLR-A5-simple.xml\ simple-src/SONY_DSLR-A700-simple.xml\ simple-src/SONY_DSLR-A850-simple.xml\ simple-src/SONY_DSLR-A900-simple.xml\ simple-src/SONY_NEX-3-simple.xml\ simple-src/SONY_NEX-5-simple.xml\ simple-src/SONY_SLTA33-simple.xml\ simple-src/SONY_SLTA55V-simple.xml all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu profiles/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu profiles/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-rawstudioDATA: $(rawstudio_DATA) @$(NORMAL_INSTALL) test -z "$(rawstudiodir)" || $(MKDIR_P) "$(DESTDIR)$(rawstudiodir)" @list='$(rawstudio_DATA)'; test -n "$(rawstudiodir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(rawstudiodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(rawstudiodir)" || exit $$?; \ done uninstall-rawstudioDATA: @$(NORMAL_UNINSTALL) @list='$(rawstudio_DATA)'; test -n "$(rawstudiodir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(rawstudiodir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(rawstudiodir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(rawstudiodir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-rawstudioDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-rawstudioDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-rawstudioDATA \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-rawstudioDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/profiles/Konica_Minolta_Maxxum_7D-simple.dcp0000644000175000017500000000052411537130700020675 00000000000000IIRCn! " Z[ 8Konica Minolta Maxxum 7D/''''q8' ''|'''''''o=' '`'''Konica Minolta Maxxum 7D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_SP550UZ-simple.dcp0000755000175000017500000000034211537130700016401 00000000000000IIRCV! fZOLYMPUS SP550UZM-'Z'''1' '''t'OLYMPUS SP550UZ SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A330-simple.dcp0000755000175000017500000000034011537130700016134 00000000000000IIRCV! fZSONY DSLR-A330w&''_''?''6'S''SONY DSLR-A330 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SAMSUNG_GX-1-simple.dcp0000755000175000017500000000033411537130700015770 00000000000000IIRC V! dZSAMSUNG GX-1)'z'['e'O?' ''_'/'SAMSUNG GX-1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_E550-simple.dcp0000755000175000017500000000035611537130700017450 00000000000000IIRCV! lZFUJIFILM FinePix E550$+''''@;'''''FUJIFILM FinePix E550 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Phase_One_P_30-simple.dcp0000755000175000017500000000034011537130700016536 00000000000000IIRCV! fZPhase One P 30' ''':'}'z'?''Phase One P 30 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_C5060-simple.dcp0000755000175000017500000000033611537130700016046 00000000000000IIRCV! dZOLYMPUS C5060(''''J=' ''''OLYMPUS C5060 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/MINOLTA_DYNAX_7-simple.dcp0000755000175000017500000000034211537130700016412 00000000000000IIRCV! fZMINOLTA DYNAX 7'''''o=' 'a'''MINOLTA DYNAX 7 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_E8400-simple.dcp0000755000175000017500000000033211537130700015553 00000000000000IIRC V! bZNIKON E8400'' '&'f='' ''>''NIKON E8400 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SAMSUNG_NX100-simple.dcp0000755000175000017500000000047611537130700016071 00000000000000IIRCn! |" Z[ "Samsung NX100-''x'k'3'c'D'N'#'\('^'p'!'/9'''W ' 'Samsung NX100 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D7000-simple.dcp0000755000175000017500000000047211537130700015552 00000000000000IIRC n! z" Z[ Nikon D7000!'' 'a'+'^ ';'K'' 'A',''e0' ''' 'Nikon D7000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-GF1-simple.dcp0000755000175000017500000000034611537130700017073 00000000000000IIRCV! hZPanasonic DMC-GF1'' 'V'>'3''2 ''Panasonic DMC-GF1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D700-simple.dcp0000755000175000017500000000033011537130700015463 00000000000000IIRC V! bZNIKON D700''i''@''{'''NIKON D700 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_SP510UZ-simple.dcp0000755000175000017500000000034211537130700016375 00000000000000IIRCV! fZOLYMPUS SP510UZa)''''G3' 'P' 'A'OLYMPUS SP510UZ SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-G1-simple.dcp0000755000175000017500000000034411537130700016763 00000000000000IIRCV! hZPanasonic DMC-G1 '''D'?''f' '4'Panasonic DMC-G1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-500-simple.dcp0000755000175000017500000000033611537130700016037 00000000000000IIRCV! dZOLYMPUS E-500'P'''5'O''m''OLYMPUS E-500 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_Pro90-simple.dcp0000755000175000017500000000040611537130700020160 00000000000000IIRCV! lZCanon PowerShot Pro90'&''"'%'''''''+'A'Canon PowerShot Pro90 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-GF2-simple.dcp0000755000175000017500000000050611537130700017072 00000000000000IIRCn! " Z[*Panasonic DMC-GF2 ' '(''8' '6'w'''' 'V'>'3''2 ''Panasonic DMC-GF2 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_G1-simple.dcp0000755000175000017500000000040011537130700017510 00000000000000IIRCV! jZCanon PowerShot G1V'$'|'''''&'''++'-'Canon PowerShot G1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-FZ8-simple.dcp0000755000175000017500000000034611537130700017125 00000000000000IIRCV! hZPanasonic DMC-FZ8#'='';'5' '<'`''Panasonic DMC-FZ8 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Imacon_Ixpress-simple.dcp0000755000175000017500000000034011537130700017037 00000000000000IIRCV! fZImacon Ixpressq'y'@''5'' ' ''Imacon Ixpress SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-GH1-simple.dcp0000755000175000017500000000034611537130700017075 00000000000000IIRCV! hZPanasonic DMC-GH1'F''y'6' ''( '`'Panasonic DMC-GH1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_SP500UZ-simple.dcp0000755000175000017500000000034211537130700016374 00000000000000IIRCV! fZOLYMPUS SP500UZ%''f''.0' '''R'OLYMPUS SP500UZ SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Ricoh_S10_24-72mm-simple.dcp0000644000175000017500000000052211537130700016667 00000000000000IIRCn! " Z[6RICOH S10 24-72mm F2.5-4.4 VC;D'4'S'' ''n'''#)'5'' ' ('''''Ricoh S10 24-70mm SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_20D-simple.dcp0000755000175000017500000000033611537130700016272 00000000000000IIRCV! dZCanon EOS 20D'''y'='x 'A''&'Canon EOS 20D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-GH2-simple.dcp0000755000175000017500000000050611537130700017074 00000000000000IIRCn! " Z[*Panasonic DMC-GH2"''g'/'|)' ' '''d''''-' ''V ''Panasonic DMC-GH2 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SAMSUNG_GX-1L-simple.dcp0000644000175000017500000000047611537764506016131 00000000000000IIRCn! |" Z[ "Samsung GX-1LG/'C'''9' 'z''9.')'y'['e'P?' ''_'/'SAMSUNG GX-1L SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_SP350-simple.dcp0000755000175000017500000000033611537130700016123 00000000000000IIRCV! dZOLYMPUS SP350./''''7' ''''OLYMPUS SP350 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D50-simple.dcp0000755000175000017500000000032611537130700015406 00000000000000IIRC V! `ZNIKON D504'''' >' ''''NIKON D50 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SAMSUNG_NX5-simple.dcp0000644000175000017500000000047211546160032015727 00000000000000IIRC n! z" Z[ Samsung NX5-''x'k'3'c'D'N'#'\('^'p'!'/9'''W ' 'SAMSUNG NX5 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_C80-simple.dcp0000755000175000017500000000033211537130700015677 00000000000000IIRC V! bZOLYMPUS C80!'3' ''b=' 'R''P'OLYMPUS C80 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_E4500-simple.dcp0000755000175000017500000000036211537130700015553 00000000000000IIRC V! bZNIKON E4500U'-'''' ''p&'=''{#'`'NIKON E4500 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS-1D_Mark_II-simple.dcp0000755000175000017500000000035411537130700017462 00000000000000IIRCV! lZCanon EOS-1D Mark IIx'',''L>' '0''!'Canon EOS-1D Mark II SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/PENTAX_K200D-simple.dcp0000755000175000017500000000033411537130700015716 00000000000000IIRC V! dZPENTAX K200D#''u' '@'''F'L!'PENTAX K200D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_COOLPIX_P6000-simple.dcp0000755000175000017500000000035211537130700016757 00000000000000IIRCV! jZNIKON COOLPIX P6000%''n''(1'@ ''''NIKON COOLPIX P6000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/KODAK_EOSDCS1-simple.dcp0000755000175000017500000000033611537130700016073 00000000000000IIRCV! dZKODAK EOSDCS1`)'b'9'h'-'''''KODAK EOSDCS1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SAMSUNG_NX11-simple.dcp0000644000175000017500000000047411537130700016005 00000000000000IIRC n! |" Z[  Samsung NX11-''x'k'3'c'D'N'#'\('^'p'!'/9'''W ' 'SAMSUNG NX11 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-LX2-simple.dcp0000755000175000017500000000034611537130700017123 00000000000000IIRCV! hZPanasonic DMC-LX2p''''4' '\'b''Panasonic DMC-LX2 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-20-simple.dcp0000755000175000017500000000033411537130700015752 00000000000000IIRC V! dZOLYMPUS E-20u3''%'Q'6'g'' ''OLYMPUS E-20 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/KODAK_P850-simple.dcp0000755000175000017500000000033011537130700015460 00000000000000IIRC V! bZKODAK P850)''''8' '7''f'KODAK P850 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_550D-simple.dcp0000755000175000017500000000050011537130700016353 00000000000000IIRCn! ~" Z[$Canon EOS 550DK'o'''''" 'd'' ''t'''M-' '`'''Canon EOS 550D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-400-simple.dcp0000755000175000017500000000033611537130700016036 00000000000000IIRCV! dZOLYMPUS E-400'5''='9' '' 'x!'OLYMPUS E-400 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A850-simple.dcp0000755000175000017500000000034011537130700016143 00000000000000IIRCV! fZSONY DSLR-A850%'v'''*3'2 ''' 'SONY DSLR-A850 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/SONY_DSLR-A5-simple.dcp0000755000175000017500000000033411537130700015776 00000000000000IIRC V! dZSONY DSLR-A5V''''0' ';'''SONY DSLR-A5 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-L10-simple.dcp0000755000175000017500000000034611537130700017052 00000000000000IIRCV! hZPanasonic DMC-L10Y'j''' >'4'h' ''Panasonic DMC-L10 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_300D-simple.dcp0000755000175000017500000000034011537130700016346 00000000000000IIRCV! fZCanon EOS 300D '0'''7' ''j 'J 'Canon EOS 300D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_5D_Mark_II-simple.dcp0000755000175000017500000000035411537130700017550 00000000000000IIRCV! lZCanon EOS 5D Mark IIl'['''r<' '('''Canon EOS 5D Mark II SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/OLYMPUS_E-450-simple.dcp0000755000175000017500000000033611537130700016043 00000000000000IIRCV! dZOLYMPUS E-450)"'''V'<'' ' ''OLYMPUS E-450 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS_5D-simple.dcp0000755000175000017500000000033411537130700016213 00000000000000IIRC V! dZCanon EOS 5D'!'4''R>' 'P'S''Canon EOS 5D SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_F7-simple.dcp0000755000175000017500000000035211537130700017302 00000000000000IIRCV! jZFUJIFILM FinePix F7''m'O'':';'' '8'FUJIFILM FinePix F7 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-LC1-simple.dcp0000755000175000017500000000034611537130700017075 00000000000000IIRCV! hZPanasonic DMC-LC1L,'''}';' 'p'b ''Panasonic DMC-LC1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-G10-simple.dcp0000644000175000017500000000050611537130700017040 00000000000000IIRCn! " Z[*Panasonic DMC-G10(':'''c+'L ''I''''''c'1' '''6'Panasonic DMC-G10 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/KODAK_EasyShare_Z980-simple.dcp0000755000175000017500000000035411537130700017450 00000000000000IIRCV! lZKODAK EasyShare Z9801,''''s.''B'^ ','KODAK EasyShare Z980 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S5600-simple.dcp0000755000175000017500000000036011537130700017542 00000000000000IIRCV! nZFUJIFILM FinePix S5600%' '$'':' '' '!'FUJIFILM FinePix S5600 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/CINE-simple.dcp0000755000175000017500000000031411537130700014633 00000000000000IIRCV! \Z CINE45''''i(' 'C' ''CINE SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-G2-simple.dcp0000644000175000017500000000050411537130700016757 00000000000000IIRCn! " Z[(Panasonic DMC-G2(':'''c+'L ''I''''''c'1' '''6'Panasonic DMC-G2 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/KODAK_EOSDCS3B-simple.dcp0000755000175000017500000000034011537130700016172 00000000000000IIRCV! fZKODAK EOSDCS3B&'t'T'R'/'''z''KODAK EOSDCS3B SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Leica-X1-native.dcp0000644000175000017500000000046211537130700015416 00000000000000IIRC n! x" Z[ LEICA X1'''n'#-'X'&'''''''S';2' ''' &'Leica X1 DNGCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/compatibleWithAdobeRGB1998.icc0000755000175000017500000000110411526533644017424 00000000000000Dargl mntrRGB XYZ /acspMSFTnone-argl desc{cprtx5wtptbkptrXYZgXYZbXYZrTRCgTRC$bTRC4desc!Compatible with Adobe RGB (1998)textPublic Domain. No Warranty, Use at own risk.XYZ QXYZ XYZ OXYZ 4,XYZ &1/curv3curv3curv3rawstudio-2.0/profiles/SONY_DSLR-A390-simple.dcp0000755000175000017500000000050011537130700016140 00000000000000IIRCn! ~" Z[$SONY DSLR-A390;'9'-''`:' 'h''8''4''G'jA' '''2'SONY DSLR-A390 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_E950-simple.dcp0000755000175000017500000000036011537130700015476 00000000000000IIRC V! bZNIKON E950?',''w(''''' 'S'''NIKON E950 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S5Pro-simple.dcp0000755000175000017500000000036011537130700017775 00000000000000IIRCV! nZFUJIFILM FinePix S5Pro 0' ''c'B''e' ''FUJIFILM FinePix S5Pro SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/PENTAX_K-7-simple.dcp0000755000175000017500000000033011537130700015530 00000000000000IIRC V! bZPENTAX K-7#'}'Z'8'GB''P'R '!'PENTAX K-7 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_E8800-simple.dcp0000755000175000017500000000033211537130700015557 00000000000000IIRC V! bZNIKON E8800#''o''='N '^'''NIKON E8800 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_COOLPIX_P7000-simple.dcp0000755000175000017500000000051211537130700016756 00000000000000IIRCn! " Z[.Nikon Coolpix P70001'''R''' 'D''O',''''+'''d'g'Nikon Coolpix P7000 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_S90-simple.dcp0000755000175000017500000000035211537130700017622 00000000000000IIRCV! jZCanon PowerShot S90V0'h''s'&'''T'K'Canon PowerShot S90 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/prophoto.icc0000644000175000017500000000165411526533644014511 00000000000000KCMSmntrRGB XYZ "acspMSFTKODAROMM+KODA cprtHdesc\wtptrTRCgTRCbTRCrXYZgXYZbXYZ,dmnd@ndmddmmod(textCopyright (c) Eastman Kodak Company, 1999, all rights reserved.desc ProPhoto RGBProPhoto RGB ProPhoto RGBXYZ ,curvXYZ 4IXYZ ">XYZ -descKODAKKODAKKODAKdesc'Reference Output Medium Metric(ROMM) (Reference Output Medium Metric(ROMM) 'Reference Output Medium Metric(ROMM) mmod;rawstudio-2.0/profiles/OLYMPUS_E-1-simple.dcp0000755000175000017500000000033211537130700015667 00000000000000IIRC V! bZOLYMPUS E-1F.'a'O''>'A'u''w 'OLYMPUS E-1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D90-simple.dcp0000755000175000017500000000032611537130700015412 00000000000000IIRC V! `ZNIKON D90''''>'> '~' ''NIKON D90 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S9500-simple.dcp0000755000175000017500000000036011537130700017545 00000000000000IIRCV! nZFUJIFILM FinePix S9500(''''':' '''!'FUJIFILM FinePix S9500 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/CINE_660-simple.dcp0000755000175000017500000000032411537130700015227 00000000000000IIRC V! `ZCINE 660'''%''D*'''Z' 'CINE 660 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_S95-simple.dcp0000755000175000017500000000051211537130700017625 00000000000000IIRCn! " Z[.Canon PowerShot S95;<'''p'!' '''4'4''','~%''L''+'Canon PowerShot S95 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/NIKON_D1H-simple.dcp0000755000175000017500000000032611537130700015432 00000000000000IIRC V! `ZNIKON D1H''b''<''' '!'NIKON D1H SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Panasonic_DMC-LX3-simple.dcp0000755000175000017500000000034611537130700017124 00000000000000IIRCV! hZPanasonic DMC-LX3''q' '3'Y ' ' ''Panasonic DMC-LX3 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_EOS-1Ds_Mark_III-simple.dcp0000755000175000017500000000036011537130700017753 00000000000000IIRCV! nZCanon EOS-1Ds Mark III'-'^''>'1 '<'_''Canon EOS-1Ds Mark III SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_IS_Pro-simple.dcp0000755000175000017500000000034211537130700016536 00000000000000IIRCV! fZFUJIFILM IS Pro 0' ''c'B''e' ''FUJIFILM IS Pro SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/Canon_PowerShot_G11-simple.dcp0000755000175000017500000000035211537130700017577 00000000000000IIRCV! jZCanon PowerShot G11/'/'''&'''R'w'Canon PowerShot G11 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_FinePix_S9600-simple.dcp0000755000175000017500000000036011537130700017546 00000000000000IIRCV! nZFUJIFILM FinePix S960070']'''3:' '' '`"'FUJIFILM FinePix S9600 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/profiles/FUJIFILM_IS-1-simple.dcp0000755000175000017500000000033611537130700016057 00000000000000IIRCV! dZFUJIFILM IS-1S''_''g)''!'k''FUJIFILM IS-1 SimpleCC-BY-SA 3.0, rawstudio.orgrawstudio-2.0/autogen.sh0000755000175000017500000001072611526533646012337 00000000000000#!/bin/sh # Run this to generate all the initial makefiles, etc. srcdir=`dirname $0` test -z "$srcdir" && srcdir=. DIE=0 if [ -n "$GNOME2_DIR" ]; then ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS" LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH" PATH="$GNOME2_DIR/bin:$PATH" export PATH export LD_LIBRARY_PATH fi (test -f $srcdir/configure.in) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level package directory" exit 1 } (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`autoconf' installed." echo "Download the appropriate package for your distribution," echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" DIE=1 } (grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && { (intltoolize --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`intltool' installed." echo "You can get it from:" echo " ftp://ftp.gnome.org/pub/GNOME/" DIE=1 } } (grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.in >/dev/null) && { (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`xml-i18n-toolize' installed." echo "You can get it from:" echo " ftp://ftp.gnome.org/pub/GNOME/" DIE=1 } } (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { (libtool --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`libtool' installed." echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" DIE=1 } } (grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null) && { (grep "sed.*POTFILES" $srcdir/configure.in) > /dev/null || \ (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`glib' installed." echo "You can get it from: ftp://ftp.gtk.org/pub/gtk" DIE=1 } } (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`automake' installed." echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" DIE=1 NO_AUTOMAKE=yes } # if no automake, don't bother testing for aclocal test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: Missing \`aclocal'. The version of \`automake'" echo "installed doesn't appear recent enough." echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" DIE=1 } if test "$DIE" -eq 1; then exit 1 fi if test -z "$*"; then echo "**Warning**: I am going to run \`configure' with no arguments." echo "If you wish to pass any to it, please specify them on the" echo \`$0\'" command line." echo fi case $CC in xlc ) am_opt=--include-deps;; esac for coin in `find $srcdir -name configure.in -print` do dr=`dirname $coin` if test -f $dr/NO-AUTO-GEN; then echo skipping $dr -- flagged as no auto-gen else echo processing $dr ( cd $dr aclocalinclude="$ACLOCAL_FLAGS" if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then echo "Creating $dr/aclocal.m4 ..." test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 echo "Running glib-gettextize... Ignore non-fatal messages." echo "no" | glib-gettextize --force --copy echo "Making $dr/aclocal.m4 writable ..." test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 fi if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then echo "Running intltoolize..." intltoolize --copy --force --automake fi if grep "^AM_PROG_XML_I18N_TOOLS" configure.in >/dev/null; then echo "Running xml-i18n-toolize..." xml-i18n-toolize --copy --force --automake fi if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then if test -z "$NO_LIBTOOLIZE" ; then echo "Running libtoolize..." libtoolize --force --copy fi fi echo "Running aclocal $aclocalinclude ..." aclocal $aclocalinclude if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then echo "Running autoheader..." autoheader fi echo "Running automake --gnu $am_opt ..." automake --add-missing --gnu $am_opt echo "Running autoconf ..." autoconf ) fi done if [ -d .svn ] && svn --version >/dev/null 2>&1 ; then LC_ALL=C svn info > .svninfo fi conf_flags="--enable-maintainer-mode" if test x$NOCONFIGURE = x; then echo Running $srcdir/configure $conf_flags "$@" ... $srcdir/configure $conf_flags "$@" \ && echo Now type \`make\' to compile. || exit 1 else echo Skipping configure process. fi rawstudio-2.0/rawstudio.desktop0000644000175000017500000000213711526533646013747 00000000000000[Desktop Entry] Version=1.0 Type=Application Categories=Graphics;Photography;GTK; Name=Rawstudio Name[de]=Rawstudio Name[es]=Rawstudio Name[it]=Rawstudio Name[pl]=Rawstudio Name[ru]=Rawstudio Name[sv]=Rawstudio GenericName=Raw image converter GenericName[de]=Ein RAW Bildkonverter GenericName[es]=Un convertidor de imágenes raw GenericName[it]=Convertitore Raw GenericName[pl]=Konwerter plików RAW GenericName[ru]=Проявка цифровых негативов GenericName[sv]=Bildkonverterare Comment=Read, manipulate and convert digital camera raw-images Comment[de]=Lesen, manipulieren und konvertieren die Bilder der Digitalkamera Comment[es]=Leído, manipule y convierta las raw imágenes digitales de la cámara fotográfica Comment[it]=Converte e manipola immagini raw Comment[pl]=Program Open Source do konwersji plików RAW i manipulacji na nich Comment[ru]=Свободная программа для проявки цифровых негативов Comment[sv]=Läs, bearbeta och konvertera råbilder från digitalkameror Exec=rawstudio %F StartupNotify=true Icon=rawstudio MimeType=image/x-dcraw; rawstudio-2.0/install-sh0000755000175000017500000003253711331674343012340 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2009-04-28.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then trap '(exit $?); exit' 1 2 13 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names starting with `-'. case $src in -*) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # Protect names starting with `-'. case $dst in -*) dst=./$dst;; esac # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; -*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test -z "$d" && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: rawstudio-2.0/plugins/0000755000175000017500000000000011547430073012062 500000000000000rawstudio-2.0/plugins/meta-x3f/0000755000175000017500000000000011547430075013510 500000000000000rawstudio-2.0/plugins/meta-x3f/Makefile.am0000644000175000017500000000072411526533642015470 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = meta_x3f.la libdir = $(datadir)/rawstudio/plugins/ meta_x3f_la_LIBADD = @PACKAGE_LIBS@ meta_x3f_la_LDFLAGS = -module -avoid-version meta_x3f_la_SOURCES = x3f-meta.c rawstudio-2.0/plugins/meta-x3f/Makefile.in0000644000175000017500000004206011547430040015467 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/meta-x3f DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) meta_x3f_la_DEPENDENCIES = am_meta_x3f_la_OBJECTS = x3f-meta.lo meta_x3f_la_OBJECTS = $(am_meta_x3f_la_OBJECTS) meta_x3f_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(meta_x3f_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(meta_x3f_la_SOURCES) DIST_SOURCES = $(meta_x3f_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = meta_x3f.la meta_x3f_la_LIBADD = @PACKAGE_LIBS@ meta_x3f_la_LDFLAGS = -module -avoid-version meta_x3f_la_SOURCES = x3f-meta.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/meta-x3f/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/meta-x3f/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done meta_x3f.la: $(meta_x3f_la_OBJECTS) $(meta_x3f_la_DEPENDENCIES) $(meta_x3f_la_LINK) -rpath $(libdir) $(meta_x3f_la_OBJECTS) $(meta_x3f_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/x3f-meta.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/meta-x3f/x3f-meta.c0000644000175000017500000002447311531305646015230 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include /* atoi() */ /* http://www.x3f.info/technotes/FileDocs/X3F_Format.pdf */ typedef enum x3f_extended_data_types { X3F_EXTENDED_DATA_UNUSED = 0, X3F_EXTENDED_DATA_EXPOSURE_ADJUST = 1, X3F_EXTENDED_DATA_CONTRAST_ADJUST = 2, X3F_EXTENDED_DATA_SHADOW_ADJUST = 3, X3F_EXTENDED_DATA_HIGHLIGHT_ADJUST = 4, X3F_EXTENDED_DATA_SATURATION_ADJUST = 5, X3F_EXTENDED_DATA_SHARPNESS_ADJUST = 6, X3F_EXTENDED_DATA_COLOR_ADJUST_RED = 7, X3F_EXTENDED_DATA_COLOR_ADJUST_GREEN = 8, X3F_EXTENDED_DATA_COLOR_ADJUST_BLUE = 9, X3F_EXTENDED_DATA_FILL_LIGHT_ADJUST = 10, } X3F_EXTENDED_DATA_TYPES; typedef enum x3f_data_format { X3F_DATA_FORMAT_UNCOMPRESSED = 3, X3F_DATA_FORMAT_HUFFMAN = 11, X3F_DATA_FORMAT_JPEG = 18, } X3F_DATA_FORMAT; /* * These structs is mostly used to define the file format - they can not * be directly mapped to file because of endian differences on some platforms */ typedef struct x3f_file { gchar identifier[4]; /* Contains FOVb */ gushort version_major; gushort version_minor; guchar unique_identifier[16]; guint mark_bits; guint image_columns; guint image_rows; guint rotation; /* The following was added in version 2.1 */ gchar wb_label[32]; X3F_EXTENDED_DATA_TYPES extended_data_types[32]; gfloat extended_data[32]; guint directory_start; /* Last 4 bytes of file */ } __attribute__ ((packed)) X3F_FILE; typedef struct x3f_directory_section { gchar section_identifier[4]; /* Contains SECd */ gushort section_version_major; gushort section_version_minor; guint number_of_entries; } __attribute__ ((packed)) X3F_DIRECTORY_SECTION; typedef struct x3f_directory_entry { guint offset; guint length; guchar type[4]; } __attribute__ ((packed)) X3F_DIRECTORY_ENTRY; typedef struct x3f_image_data { gchar section_identifier[4]; /* Contains SECi */ gushort version_major; gushort version_minor; guint type_of_image_data; X3F_DATA_FORMAT data_format; guint columns; guint rows; guint rowstride; /* row size in bytes, a value of zero means variable */ void *image_data; /* Followed by image-data */ } __attribute__ ((packed)) X3F_IMAGE_DATA; typedef struct x3f_property_list { gchar section_identifier[4]; /* Contains SECp */ gushort version_major; gushort version_minor; guint number_of_entries; guint character_format; /* 0 = unicode16 */ guint __RESERVED1; guint total_length; /* followed by number_of_entries * X3F_PROPERTY_ENTRY */ } __attribute__ ((packed)) X3F_PROPERTY_LIST; typedef struct x3f_property { guint name_offset; /* offset from start of CHARACTER data */ guint value_offset; /* offset from start of CHARACTER data */ } __attribute__ ((packed)) X3F_PROPERTY_ENTRY; static gboolean x3f_load_meta(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta) { gint i; X3F_FILE file; X3F_DIRECTORY_SECTION directory; X3F_DIRECTORY_ENTRY directory_entry; X3F_IMAGE_DATA image_data; guint start=0, width=0, height=0, rowstride=0; GdkPixbuf *pixbuf = NULL, *pixbuf2 = NULL; gdouble ratio=1.0; /* Check if this is infact a Sigma-file */ if (!raw_strcmp(rawfile, G_STRUCT_OFFSET(X3F_FILE, identifier), "FOVb", 4)) { return FALSE; } raw_set_byteorder(rawfile, 0x4949); /* x3f is always little endian */ /* Fill X3F_FILE with needed values */ raw_get_ushort(rawfile, G_STRUCT_OFFSET(X3F_FILE, version_major), &file.version_major); raw_get_ushort(rawfile, G_STRUCT_OFFSET(X3F_FILE, version_minor), &file.version_minor); raw_get_uint(rawfile, G_STRUCT_OFFSET(X3F_FILE, rotation), &file.rotation); raw_get_uint(rawfile, raw_get_filesize(rawfile)-4, &file.directory_start); meta->orientation=file.rotation; if ((file.version_major == 2) && (file.version_minor == 2)) { /* Copy all data types in one go */ raw_strcpy(rawfile, G_STRUCT_OFFSET(X3F_FILE, extended_data_types), file.extended_data_types, 32); for(i=0;i<32;i++) { /* This could have endianness problems! */ raw_get_float(rawfile, G_STRUCT_OFFSET(X3F_FILE, extended_data)+i*4, &file.extended_data[i]); switch (file.extended_data_types[i]) { case X3F_EXTENDED_DATA_COLOR_ADJUST_RED: meta->cam_mul[0] = file.extended_data[i]; break; case X3F_EXTENDED_DATA_COLOR_ADJUST_GREEN: meta->cam_mul[1] = file.extended_data[i]; meta->cam_mul[3] = file.extended_data[i]; break; case X3F_EXTENDED_DATA_COLOR_ADJUST_BLUE: meta->cam_mul[2] = file.extended_data[i]; break; default: break; } } } if (file.directory_start < raw_get_filesize(rawfile)) { if (raw_strcmp(rawfile, file.directory_start, "SECd", 4)) { /* Fill X3F_DIRECTORY_SECTION with needed values */ raw_get_ushort(rawfile, file.directory_start+G_STRUCT_OFFSET(X3F_DIRECTORY_SECTION, section_version_major), &directory.section_version_major); raw_get_ushort(rawfile, file.directory_start+G_STRUCT_OFFSET(X3F_DIRECTORY_SECTION, section_version_minor), &directory.section_version_minor); raw_get_uint(rawfile, file.directory_start+G_STRUCT_OFFSET(X3F_DIRECTORY_SECTION, number_of_entries), &directory.number_of_entries); for(i=0;iiso = atoi(value); else if (g_str_equal(name, "CAMMANUF")) { meta->make_ascii = g_strdup(value); if (g_str_equal(meta->make_ascii, "SIGMA")) meta->make = MAKE_SIGMA; else if (g_str_equal(meta->make_ascii, "Polaroid")) meta->make = MAKE_POLAROID; } else if (g_str_equal(name, "CAMMODEL")) meta->model_ascii = g_strdup(value); else if (g_str_equal(name, "APERTURE")) /* Example: 8.000 */ meta->aperture = rs_atof(value); else if (g_str_equal(name, "SH_DESC")) /* Example: 1/60 */ { gchar *ptr = value; while (*ptr++ != '/'); meta->shutterspeed = atoi(ptr); } else if (g_str_equal(name, "FLENGTH")) meta->focallength = rs_atof(value); else if (g_str_equal(name, "TIME")) { meta->timestamp = (GTime) atoi(value); meta->time_ascii = rs_unixtime_to_exiftime(meta->timestamp); } if (name) g_free(name); if (value) g_free(value); } } } } } if (width > 0) pixbuf = gdk_pixbuf_new_from_data(raw_get_map(rawfile)+start, GDK_COLORSPACE_RGB, FALSE, 8, width, height, rowstride, NULL, NULL); if (pixbuf) { if (file.rotation > 0) { pixbuf2 = gdk_pixbuf_rotate_simple(pixbuf,360-file.rotation); g_object_unref(pixbuf); pixbuf = pixbuf2; } ratio = ((gdouble) gdk_pixbuf_get_width(pixbuf))/((gdouble) gdk_pixbuf_get_height(pixbuf)); if (ratio>1.0) pixbuf2 = gdk_pixbuf_scale_simple(pixbuf, 128, (gint) (128.0/ratio), GDK_INTERP_BILINEAR); else pixbuf2 = gdk_pixbuf_scale_simple(pixbuf, (gint) (128.0*ratio), 128, GDK_INTERP_BILINEAR); g_object_unref(pixbuf); meta->thumbnail = pixbuf2; } return TRUE; } G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_filetype_register_meta_loader(".x3f", "Sigma", x3f_load_meta, 10, RS_LOADER_FLAGS_RAW); } rawstudio-2.0/plugins/colorspace-prophoto/0000755000175000017500000000000011547430074016065 500000000000000rawstudio-2.0/plugins/colorspace-prophoto/Makefile.am0000644000175000017500000000100211526533643020035 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = -Wall AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = colorspace_prophoto.la libdir = $(datadir)/rawstudio/plugins/ colorspace_prophoto_la_LIBADD = @PACKAGE_LIBS@ colorspace_prophoto_la_LDFLAGS = -module -avoid-version colorspace_prophoto_la_SOURCES = colorspace-prophoto.c rawstudio-2.0/plugins/colorspace-prophoto/colorspace-prophoto.c0000644000175000017500000001156011541464221022151 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 4 */ #include #include "config.h" #include "gettext.h" #include /* pow() */ #define RS_TYPE_PROPHOTO (rs_prophoto_type) #define RS_PROPHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_PROPHOTO, RSProphoto)) #define RS_PROPHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_PROPHOTO, RSProphotoClass)) #define RS_IS_PROPHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_PROPHOTO)) #define RS_PROPHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_PROPHOTO, RSProphotoClass)) typedef struct { RSColorSpace parent; } RSProphoto; typedef struct { RSColorSpaceClass parent_class; const RSIccProfile *icc_profile; const RSIccProfile *icc_profile_linear; } RSProphotoClass; RS_DEFINE_COLOR_SPACE(rs_prophoto, RSProphoto) static const RSIccProfile *get_icc_profile(const RSColorSpace *color_space, gboolean linear_profile); static const RS1dFunction *get_gamma_function(const RSColorSpace *color_space); G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_prophoto_get_type(G_TYPE_MODULE(plugin)); } static void rs_prophoto_class_init(RSProphotoClass *klass) { RSColorSpaceClass *colorclass = RS_COLOR_SPACE_CLASS(klass); colorclass->get_icc_profile = get_icc_profile; colorclass->name = "ProPhoto RGB"; colorclass->description = _("Large gamut color space"); colorclass->get_gamma_function = get_gamma_function; klass->icc_profile = rs_icc_profile_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "profiles" G_DIR_SEPARATOR_S "prophoto.icc"); klass->icc_profile_linear = rs_icc_profile_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "profiles" G_DIR_SEPARATOR_S "prophoto-linear.icc"); } static void rs_prophoto_init(RSProphoto *prophoto) { /* Source: http://brucelindbloom.com/Eqn_RGB_XYZ_Matrix.html */ const static RS_MATRIX3 to_pcs = {{ { 0.7976749, 0.1351917, 0.0313534 }, { 0.2880402, 0.7118741, 0.0000857 }, { 0.0000000, 0.0000000, 0.8252100 } }}; rs_color_space_set_matrix_to_pcs(RS_COLOR_SPACE(prophoto), &to_pcs); } static const RSIccProfile * get_icc_profile(const RSColorSpace *color_space, gboolean linear_profile) { RSProphoto *prophoto = RS_PROPHOTO(color_space); if (linear_profile) return RS_PROPHOTO_GET_CLASS(prophoto)->icc_profile_linear; else return RS_PROPHOTO_GET_CLASS(prophoto)->icc_profile; } /* Gamma */ static gdouble evaluate(const RS1dFunction *func, const gdouble x); static gdouble evaluate_inverse(const RS1dFunction *func, const gdouble y); #define RS_TYPE_PROPHOTO_GAMMA rs_prophoto_gamma_get_type() #define RS_PROPHOTO_GAMMA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_PROPHOTO_GAMMA, RSProphotoGamma)) #define RS_PROPHOTO_GAMMA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_PROPHOTO_GAMMA, RSProphotoGammaClass)) #define RS_IS_PROPHOTO_GAMMA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_PROPHOTO_GAMMA)) typedef struct { RS1dFunction parent; } RSProphotoGamma; typedef struct { RS1dFunctionClass parent_class; } RSProphotoGammaClass; GType rs_prophoto_gamma_get_type(void); RS1dFunction *rs_prophoto_gamma_new(void); G_DEFINE_TYPE (RSProphotoGamma, rs_prophoto_gamma, RS_TYPE_1D_FUNCTION) static void rs_prophoto_gamma_class_init(RSProphotoGammaClass *klass) { RS1dFunctionClass *fclass = RS_1D_FUNCTION_CLASS(klass); fclass->evaluate = evaluate; fclass->evaluate_inverse = evaluate_inverse; } static void rs_prophoto_gamma_init(RSProphotoGamma *gamma) { } RS1dFunction * rs_prophoto_gamma_new(void) { return RS_1D_FUNCTION(g_object_new(RS_TYPE_PROPHOTO_GAMMA, NULL)); } static const RS1dFunction * get_gamma_function(const RSColorSpace *color_space) { static GStaticMutex lock = G_STATIC_MUTEX_INIT; static RS1dFunction *func = NULL; g_static_mutex_lock(&lock); if (!func) func = rs_prophoto_gamma_new(); g_static_mutex_unlock(&lock); return func; } static gdouble evaluate(const RS1dFunction *func, const gdouble x) { return pow(x, 1.0/1.8); } static gdouble evaluate_inverse(const RS1dFunction *func, const gdouble y) { return pow(y, 1.8); } rawstudio-2.0/plugins/colorspace-prophoto/Makefile.in0000644000175000017500000004245611547430035020062 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/colorspace-prophoto DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) colorspace_prophoto_la_DEPENDENCIES = am_colorspace_prophoto_la_OBJECTS = colorspace-prophoto.lo colorspace_prophoto_la_OBJECTS = $(am_colorspace_prophoto_la_OBJECTS) colorspace_prophoto_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(colorspace_prophoto_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(colorspace_prophoto_la_SOURCES) DIST_SOURCES = $(colorspace_prophoto_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = -Wall AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = colorspace_prophoto.la colorspace_prophoto_la_LIBADD = @PACKAGE_LIBS@ colorspace_prophoto_la_LDFLAGS = -module -avoid-version colorspace_prophoto_la_SOURCES = colorspace-prophoto.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/colorspace-prophoto/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/colorspace-prophoto/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done colorspace_prophoto.la: $(colorspace_prophoto_la_OBJECTS) $(colorspace_prophoto_la_DEPENDENCIES) $(colorspace_prophoto_la_LINK) -rpath $(libdir) $(colorspace_prophoto_la_OBJECTS) $(colorspace_prophoto_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colorspace-prophoto.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/meta-raf/0000755000175000017500000000000011547430075013560 500000000000000rawstudio-2.0/plugins/meta-raf/Makefile.am0000644000175000017500000000072411526533643015541 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = meta_raf.la libdir = $(datadir)/rawstudio/plugins/ meta_raf_la_LIBADD = @PACKAGE_LIBS@ meta_raf_la_LDFLAGS = -module -avoid-version meta_raf_la_SOURCES = raf-meta.c rawstudio-2.0/plugins/meta-raf/raf-meta.c0000644000175000017500000000626411531305647015347 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include gboolean rs_raf_load_meta(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta); GdkPixbuf *rs_raf_load_thumb(RAWFILE *rawfile); gboolean rs_raf_load_meta(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta) { guint directory; guint directory_entries; guint entry; gushort tag, length; gushort temp; if (raw_strcmp(rawfile, 0, "FUJIFILM", 8)) { raw_get_uint(rawfile, 84, &meta->preview_start); raw_get_uint(rawfile, 88, &meta->preview_length); raw_get_uint(rawfile, 92, &directory); raw_get_uint(rawfile, directory, &directory_entries); offset = directory+4; meta->make = MAKE_FUJIFILM; if (directory_entries < 256) { for(entry=0;entrycam_mul[G] = temp; raw_get_ushort(rawfile, offset+6, &temp); meta->cam_mul[R] = temp; raw_get_ushort(rawfile, offset+8, &temp); meta->cam_mul[G2] = temp; raw_get_ushort(rawfile, offset+10, &temp); meta->cam_mul[B] = temp; rs_metadata_normalize_wb(meta); break; } offset = offset + 4 + length; } } meta->thumbnail = rs_raf_load_thumb(rawfile); rs_filetype_meta_load(".tiff", meta, rawfile, meta->preview_start+12); return TRUE; } return FALSE; } GdkPixbuf * rs_raf_load_thumb(RAWFILE *rawfile) { GdkPixbuf *pixbuf = NULL; guint start; guint length; if (raw_strcmp(rawfile, 0, "FUJIFILM", 8)) { raw_get_uint(rawfile, 84, &start); raw_get_uint(rawfile, 88, &length); pixbuf = raw_get_pixbuf(rawfile, start, length); } if (pixbuf) { GdkPixbuf *pixbuf2; gint width = gdk_pixbuf_get_width(pixbuf); gint height = gdk_pixbuf_get_height(pixbuf); rs_constrain_to_bounding_box(128, 128, &width, &height); pixbuf2 = gdk_pixbuf_scale_simple(pixbuf, width, height, GDK_INTERP_BILINEAR); g_object_unref(pixbuf); pixbuf = pixbuf2; /* Apparently raf-files does not contain any information about rotation ?! */ } return pixbuf; } G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_filetype_register_meta_loader(".raf", "Fujifilm", rs_raf_load_meta, 10, RS_LOADER_FLAGS_RAW); } rawstudio-2.0/plugins/meta-raf/Makefile.in0000644000175000017500000004206011547430040015537 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/meta-raf DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) meta_raf_la_DEPENDENCIES = am_meta_raf_la_OBJECTS = raf-meta.lo meta_raf_la_OBJECTS = $(am_meta_raf_la_OBJECTS) meta_raf_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(meta_raf_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(meta_raf_la_SOURCES) DIST_SOURCES = $(meta_raf_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = meta_raf.la meta_raf_la_LIBADD = @PACKAGE_LIBS@ meta_raf_la_LDFLAGS = -module -avoid-version meta_raf_la_SOURCES = raf-meta.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/meta-raf/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/meta-raf/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done meta_raf.la: $(meta_raf_la_OBJECTS) $(meta_raf_la_DEPENDENCIES) $(meta_raf_la_LINK) -rpath $(libdir) $(meta_raf_la_OBJECTS) $(meta_raf_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/raf-meta.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/rotate/0000755000175000017500000000000011547430076013363 500000000000000rawstudio-2.0/plugins/rotate/Makefile.am0000644000175000017500000000071111526533643015337 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = rotate.la libdir = $(datadir)/rawstudio/plugins/ rotate_la_LIBADD = @PACKAGE_LIBS@ rotate_la_LDFLAGS = -module -avoid-version rotate_la_SOURCES = rotate.c rawstudio-2.0/plugins/rotate/Makefile.in0000644000175000017500000004200011547430041015334 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/rotate DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) rotate_la_DEPENDENCIES = am_rotate_la_OBJECTS = rotate.lo rotate_la_OBJECTS = $(am_rotate_la_OBJECTS) rotate_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(rotate_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(rotate_la_SOURCES) DIST_SOURCES = $(rotate_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = rotate.la rotate_la_LIBADD = @PACKAGE_LIBS@ rotate_la_LDFLAGS = -module -avoid-version rotate_la_SOURCES = rotate.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/rotate/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/rotate/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done rotate.la: $(rotate_la_OBJECTS) $(rotate_la_DEPENDENCIES) $(rotate_la_LINK) -rpath $(libdir) $(rotate_la_OBJECTS) $(rotate_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rotate.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/rotate/rotate.c0000644000175000017500000003617211535504061014747 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 4 */ #include #include #define RS_TYPE_ROTATE (rs_rotate_type) #define RS_ROTATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_ROTATE, RSRotate)) #define RS_ROTATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_ROTATE, RSRotateClass)) #define RS_IS_ROTATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_ROTATE)) typedef struct _RSRotate RSRotate; typedef struct _RSRotateClass RSRotateClass; struct _RSRotate { RSFilter parent; RS_MATRIX3 affine; gboolean dirty; gfloat angle; gint orientation; gint new_width; gint new_height; gint translate_x; gint translate_y; }; struct _RSRotateClass { RSFilterClass parent_class; }; RS_DEFINE_FILTER(rs_rotate, RSRotate) enum { PROP_0, PROP_ANGLE, PROP_ORIENTATION }; typedef struct { RS_IMAGE16 *input; /* Input Image */ RS_IMAGE16 *output; /* Output Image*/ gint start_y; gint end_y; GThread *threadid; gboolean use_straight; RSRotate* rotate; gboolean use_fast; /* Use nearest neighbour resampler */ } ThreadInfo; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static void previous_changed(RSFilter *filter, RSFilter *parent, RSFilterChangedMask mask); static RSFilterResponse *get_image(RSFilter *filter, const RSFilterRequest *request); static void turn_right_angle(RS_IMAGE16 *in, RS_IMAGE16 *out, gint start_y, gint end_y, const int direction); static RSFilterResponse *get_size(RSFilter *filter, const RSFilterRequest *request); static void inline bilinear(RS_IMAGE16 *in, gushort *out, gint x, gint y); static void inline nearest(RS_IMAGE16 *in, gushort *out, gint x, gint y); static void recalculate(RSRotate *rotate, const RSFilterRequest *request); static void recalculate_dims(RSRotate *rotate, gint previous_width, gint previous_height); gpointer start_rotate_thread(gpointer _thread_info); static RSFilterClass *rs_rotate_parent_class = NULL; G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_rotate_get_type(G_TYPE_MODULE(plugin)); } static void rs_rotate_class_init(RSRotateClass *klass) { RSFilterClass *filter_class = RS_FILTER_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); rs_rotate_parent_class = g_type_class_peek_parent (klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_ANGLE, g_param_spec_float( "angle", "Angle", "Rotation angle in degrees", -G_MAXFLOAT, G_MAXFLOAT, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_ORIENTATION, g_param_spec_uint ( "orientation", "orientation", "Orientation", 0, 65536, 0, G_PARAM_READWRITE) ); filter_class->name = "Bilinear rotate filter"; filter_class->previous_changed = previous_changed; filter_class->get_image = get_image; filter_class->get_size = get_size; } static void rs_rotate_init(RSRotate *rotate) { rotate->angle = 0.0; rotate->dirty = TRUE; ORIENTATION_RESET(rotate->orientation); } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSRotate *rotate = RS_ROTATE(object); switch (property_id) { case PROP_ANGLE: g_value_set_float(value, rotate->angle); break; case PROP_ORIENTATION: g_value_set_uint(value, rotate->orientation); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSRotate *rotate = RS_ROTATE(object); float new_angle = 0.0f; switch (property_id) { case PROP_ANGLE: new_angle = g_value_get_float(value); while(new_angle < 0.0) new_angle += 360.0; if (rotate->angle != new_angle) { rotate->angle = new_angle; /* We only support positive */ rotate->dirty = TRUE; rs_filter_changed(RS_FILTER(object), RS_FILTER_CHANGED_DIMENSION); } break; case PROP_ORIENTATION: if (rotate->orientation != g_value_get_uint(value)) { rotate->orientation = g_value_get_uint(value); rotate->dirty = TRUE; rs_filter_changed(RS_FILTER(object), RS_FILTER_CHANGED_DIMENSION); } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void previous_changed(RSFilter *filter, RSFilter *parent, RSFilterChangedMask mask) { RSRotate *rotate = RS_ROTATE(filter); if (mask & RS_FILTER_CHANGED_DIMENSION) rotate->dirty = TRUE; rs_filter_changed(filter, mask); } static RSFilterResponse * get_image(RSFilter *filter, const RSFilterRequest *request) { RSRotate *rotate = RS_ROTATE(filter); RSFilterResponse *previous_response; RSFilterResponse *response; RS_IMAGE16 *input; RS_IMAGE16 *output = NULL; gboolean use_fast = FALSE; GdkRectangle *old_roi; GdkRectangle *roi; if ((ABS(rotate->angle) < 0.001) && (rotate->orientation==0)) return rs_filter_get_image(filter->previous, request); /* FIXME: Handle ROI across rotation */ if (rs_filter_request_get_roi(request)) { /* Calculate rotated ROI */ old_roi = rs_filter_request_get_roi(request); RSFilterRequest *new_request = rs_filter_request_clone(request); recalculate(rotate, request); gdouble minx, miny; gdouble maxx, maxy; matrix3_affine_get_minmax(&rotate->affine, &minx, &miny, &maxx, &maxy, old_roi->x-1.0, old_roi->y-1.0, (gdouble) ( old_roi->x+old_roi->width+1), (gdouble) ( old_roi->y + old_roi->height+1)); matrix3_affine_translate(&rotate->affine, -minx, -miny); /* Create new ROI */ gint prev_w; gint prev_h; rs_filter_get_size_simple(filter->previous, request, &prev_w, &prev_h); roi = g_new(GdkRectangle, 1); roi->x = MAX(0, (gint)minx); roi->y = MAX(0, (gint)miny); roi->width = MIN((gint)maxx - roi->x, prev_w - roi->x); roi->height = MIN((gint)maxy - roi->y, prev_h - roi->y); /* A few basic checks */ g_assert(roi->x >= 0); g_assert(roi->y >= 0); g_assert(roi->width > 0); g_assert(roi->height > 0); /* Request image */ rs_filter_request_set_roi(new_request, roi); previous_response = rs_filter_get_image(filter->previous, new_request); g_free(roi); g_object_unref(new_request); } else previous_response = rs_filter_get_image(filter->previous, request); input = rs_filter_response_get_image(previous_response); if (!RS_IS_IMAGE16(input)) return previous_response; response = rs_filter_response_clone(previous_response); g_object_unref(previous_response); gboolean straight = FALSE; if ((rotate->angle < 0.001) && (rotate->orientation < 4)) { if (rotate->orientation == 2) output = rs_image16_new(input->w, input->h, 3, input->pixelsize); else output = rs_image16_new(input->h, input->w, 3, input->pixelsize); straight = TRUE; } else { recalculate_dims(rotate, input->w, input->h); output = rs_image16_new(rotate->new_width, rotate->new_height, 3, 4); } if (rs_filter_request_get_quick(request)) { use_fast = TRUE; rs_filter_response_set_quick(response); } /* Prepare threads */ guint i, y_offset, y_per_thread, threaded_h; const guint threads = rs_get_number_of_processor_cores(); ThreadInfo *t = g_new(ThreadInfo, threads); threaded_h = output->h; y_per_thread = (threaded_h + threads-1)/threads; y_offset = 0; for (i = 0; i < threads; i++) { t[i].use_straight = straight; t[i].input = input; t[i].output = output; t[i].start_y = y_offset; y_offset += y_per_thread; y_offset = MIN(threaded_h, y_offset); t[i].end_y = y_offset; t[i].rotate = rotate; t[i].use_fast = use_fast; t[i].threadid = g_thread_create(start_rotate_thread, &t[i], TRUE, NULL); } /* Wait for threads to finish */ for(i = 0; i < threads; i++) g_thread_join(t[i].threadid); g_free(t); g_object_unref(input); rs_filter_response_set_image(response, output); g_object_unref(output); return response; } gpointer start_rotate_thread(gpointer _thread_info) { ThreadInfo* t = _thread_info; RS_IMAGE16 *input = t->input; RS_IMAGE16 *output = t->output; RSRotate *rotate = t->rotate; if (t->use_straight) { turn_right_angle(input, output, t->start_y, t->end_y, rotate->orientation); g_thread_exit(NULL); return NULL; } gint x, y; gint row, col; gint destoffset; gint crapx = (gint) (rotate->affine.coeff[0][0]*65536.0); gint crapy = (gint) (rotate->affine.coeff[0][1]*65536.0); for(row=t->start_y;rowend_y;row++) { gint foox = (gint) ((((gdouble)row) * rotate->affine.coeff[1][0] + rotate->affine.coeff[2][0])*65536.0); gint fooy = (gint) ((((gdouble)row) * rotate->affine.coeff[1][1] + rotate->affine.coeff[2][1])*65536.0); destoffset = row * output->rowstride; for(col=0;colw;col++,destoffset += output->pixelsize) { x = col * crapx + foox + 32768; y = col * crapy + fooy + 32768; if (t->use_fast) nearest(input, &output->pixels[destoffset], x>>16, y>>16); else bilinear(input, &output->pixels[destoffset], x>>8, y>>8); } } g_thread_exit(NULL); return NULL; /* Make the compiler shut up - we'll never return */ } static RSFilterResponse * get_size(RSFilter *filter, const RSFilterRequest *request) { RSRotate *rotate = RS_ROTATE(filter); RSFilterResponse *previous_response = rs_filter_get_size(filter->previous, request); recalculate(rotate, request); RSFilterResponse *response = rs_filter_response_clone(previous_response); g_object_unref(previous_response); rs_filter_response_set_width(response, rotate->new_width); rs_filter_response_set_height(response, rotate->new_height); return response; } static void inline nearest(RS_IMAGE16 *in, gushort *out, gint x, gint y) { /* Try to interpolate borders against black */ if ((x < 0) || (y < 0) || (x >= (in->w-1)) || (y >= (in->h-1))) { out[R] = out[G] = out[B] = 0; return; } gushort* p = GET_PIXEL(in, x, y); out[R] = p[R]; out[G] = p[G]; out[B] = p[B]; } static void inline bilinear(RS_IMAGE16 *in, gushort *out, gint x, gint y) { const static gushort black[4] = {0, 0, 0, 0}; const gint fx = x>>8; const gint fy = y>>8; const gushort *a, *b, *c, *d; /* pointers to four "corner" pixels */ /* Calculate distances */ const gint diffx = x & 0xff; /* x distance from a */ const gint diffy = y & 0xff; /* y distance fromy a */ const gint inv_diffx = 256 - diffx; /* inverse x distance from a */ const gint inv_diffy = 256 - diffy; /* inverse y distance from a */ /* Calculate weightings */ const gint aw = (inv_diffx * inv_diffy) >> 1; /* Weight is now 0.15 fp */ const gint bw = (diffx * inv_diffy) >> 1; const gint cw = (inv_diffx * diffy) >> 1; const gint dw = (diffx * diffy) >> 1; /* find four cornerpixels */ a = GET_PIXEL(in, fx, fy); b = GET_PIXEL(in, fx+1, fy); c = GET_PIXEL(in, fx, fy+1); d = GET_PIXEL(in, fx+1, fy+1); /* Try to interpolate borders against black */ if (unlikely(fx < 0)) { a = black; c = black; if (fx < -1) return; } if (unlikely(fy < 0)) { a = black; b = black; if (fy < -1) return; } if (unlikely(fx >= (in->w-1))) { c = black; d = black; if (fx >= in->w) return; } if (unlikely(fy >= (in->h-1))) { c = black; d = black; if (fy >= in->h) return; } out[R] = (gushort) ((a[R]*aw + b[R]*bw + c[R]*cw + d[R]*dw + 16384) >> 15 ); out[G] = (gushort) ((a[G]*aw + b[G]*bw + c[G]*cw + d[G]*dw + 16384) >> 15 ); out[B] = (gushort) ((a[B]*aw + b[B]*bw + c[B]*cw + d[B]*dw + 16384) >> 15 ); } static void recalculate_dims(RSRotate *rotate, gint previous_width, gint previous_height) { /* Bail out, if parent returns negative dimensions */ if ((previous_width < 0) || (previous_height < 0)) { rotate->new_width = -1; rotate->new_height = -1; return; } gdouble minx, miny; gdouble maxx, maxy; /* Start clean */ matrix3_identity(&rotate->affine); /* Rotate + orientation-angle */ matrix3_affine_rotate(&rotate->affine, rotate->angle+(rotate->orientation&3)*90.0); /* Flip if needed */ if (rotate->orientation&4) matrix3_affine_scale(&rotate->affine, 1.0, -1.0); /* Translate into positive x,y */ matrix3_affine_get_minmax(&rotate->affine, &minx, &miny, &maxx, &maxy, 0.0, 0.0, (gdouble) (previous_width-1), (gdouble) (previous_height-1)); minx -= 0.5; /* This SHOULD be the correct rounding :) */ miny -= 0.5; matrix3_affine_translate(&rotate->affine, -minx, -miny); /* Get width and height used for calculating scale */ rotate->new_width = (gint) (maxx - minx + 1.0); rotate->new_height = (gint) (maxy - miny + 1.0); /* We use the inverse matrix for our transform */ matrix3_affine_invert(&rotate->affine); rotate->dirty = FALSE; } static void recalculate(RSRotate *rotate, const RSFilterRequest *request) { RSFilter *previous = RS_FILTER(rotate)->previous; RSFilterResponse *response = rs_filter_get_size(previous, request); gint previous_width = rs_filter_response_get_width(response); gint previous_height = rs_filter_response_get_height(response); g_object_unref(response); recalculate_dims(rotate, previous_width, previous_height); } static void turn_right_angle(RS_IMAGE16 *in, RS_IMAGE16 *out, gint start_y, gint end_y, const int direction) { int srcp_offset, x, y, p; if (direction == 1) /* Rotate Left */ { p = in->pitch * in->pixelsize; for (y = start_y; y < end_y; y++) { gushort *srcp = GET_PIXEL(in, y, 0); gushort *dstp = GET_PIXEL(out, 0, y); srcp_offset = (in->h - 1) * p; for (x = 0; x < in->h * in->pixelsize; x += in->pixelsize) { dstp[x] = srcp[srcp_offset]; dstp[x + 1] = srcp[srcp_offset + 1]; dstp[x + 2] = srcp[srcp_offset + 2]; srcp_offset -= p; } } } if (direction == 3) /* Rotate Right */ { p = in->pitch * in->pixelsize; for (y = start_y; y < end_y; y++) { gushort *srcp = GET_PIXEL(in, in->w-y-1, 0); gushort *dstp = GET_PIXEL(out, 0, y); srcp_offset = 0; for (x = 0; x < in->h * in->pixelsize; x += in->pixelsize) { dstp[x] = srcp[srcp_offset]; dstp[x + 1] = srcp[srcp_offset + 1]; dstp[x + 2] = srcp[srcp_offset + 2]; srcp_offset += p; } } } if (direction == 2) /* Rotate 180 */ { for (y = start_y; y < end_y; y++) { gushort *srcp = GET_PIXEL(in, in->w - 1, in->h - 1 - y); gushort *dstp = GET_PIXEL(out, 0, y); srcp_offset = 0; for (x = 0; x < in->w * in->pixelsize; x += in->pixelsize) { dstp[x] = srcp[srcp_offset]; dstp[x + 1] = srcp[srcp_offset + 1]; dstp[x + 2] = srcp[srcp_offset + 2]; srcp_offset -= in->pixelsize; } } } return; } rawstudio-2.0/plugins/colorspace-srgb/0000755000175000017500000000000011547430074015150 500000000000000rawstudio-2.0/plugins/colorspace-srgb/Makefile.am0000644000175000017500000000067711526533642017140 00000000000000plugindir = $(libdir)/rawstudio/plugins INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = colorspace_srgb.la libdir = $(datadir)/rawstudio/plugins/ colorspace_srgb_la_LIBADD = @PACKAGE_LIBS@ colorspace_srgb_la_LDFLAGS = -module -avoid-version colorspace_srgb_la_SOURCES = colorspace-srgb.c rawstudio-2.0/plugins/colorspace-srgb/colorspace-srgb.c0000644000175000017500000001145611541464312020324 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Color space tmpl version 1 */ #include /* pow() */ #include #include "config.h" #include "gettext.h" #define RS_TYPE_SRGB (rs_srgb_type) #define RS_SRGB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_SRGB, RSSrgb)) #define RS_SRGB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_SRGB, RSSrgbClass)) #define RS_IS_SRGB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_SRGB)) #define RS_SRGB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_SRGB, RSSrgbClass)) typedef struct { RSColorSpace parent; } RSSrgb; typedef struct { RSColorSpaceClass parent_class; RSIccProfile *icc_profile; RSIccProfile *icc_profile_linear; } RSSrgbClass; RS_DEFINE_COLOR_SPACE(rs_srgb, RSSrgb) static const RSIccProfile *get_icc_profile(const RSColorSpace *color_space, gboolean linear_profile); static const RS1dFunction *get_gamma_function(const RSColorSpace *color_space); G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_srgb_get_type(G_TYPE_MODULE(plugin)); } static void rs_srgb_class_init(RSSrgbClass *klass) { RSColorSpaceClass *colorclass = RS_COLOR_SPACE_CLASS(klass); colorclass->name = "sRGB"; colorclass->description = ""; colorclass->get_icc_profile = get_icc_profile; colorclass->get_gamma_function = get_gamma_function; klass->icc_profile = rs_icc_profile_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "profiles" G_DIR_SEPARATOR_S "sRGB.icc"); klass->icc_profile_linear = rs_icc_profile_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "profiles" G_DIR_SEPARATOR_S "sRGB-linear.icc"); } static void rs_srgb_init(RSSrgb *srgb) { /* Source: http://brucelindbloom.com/Eqn_RGB_XYZ_Matrix.html */ const static RS_MATRIX3 to_pcs = {{ { 0.4360747, 0.3850649, 0.1430804 }, { 0.2225045, 0.7168786, 0.0606169 }, { 0.0139322, 0.0971045, 0.7141733 }, }}; rs_color_space_set_matrix_to_pcs(RS_COLOR_SPACE(srgb), &to_pcs); } static const RSIccProfile * get_icc_profile(const RSColorSpace *color_space, gboolean linear_profile) { RSSrgb *srgb = RS_SRGB(color_space); if (linear_profile) return RS_SRGB_GET_CLASS(srgb)->icc_profile_linear; else return RS_SRGB_GET_CLASS(srgb)->icc_profile; } /* Gamma */ static gdouble evaluate(const RS1dFunction *func, const gdouble x); static gdouble evaluate_inverse(const RS1dFunction *func, const gdouble y); #define RS_TYPE_SRGB_GAMMA rs_srgb_gamma_get_type() #define RS_SRGB_GAMMA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_SRGB_GAMMA, RSSrgbGamma)) #define RS_SRGB_GAMMA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_SRGB_GAMMA, RSSrgbGammaClass)) #define RS_IS_SRGB_GAMMA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_SRGB_GAMMA)) typedef struct { RS1dFunction parent; } RSSrgbGamma; typedef struct { RS1dFunctionClass parent_class; } RSSrgbGammaClass; GType rs_srgb_gamma_get_type(void); RS1dFunction *rs_srgb_gamma_new(void); G_DEFINE_TYPE (RSSrgbGamma, rs_srgb_gamma, RS_TYPE_1D_FUNCTION) static void rs_srgb_gamma_class_init(RSSrgbGammaClass *klass) { RS1dFunctionClass *fclass = RS_1D_FUNCTION_CLASS(klass); fclass->evaluate = evaluate; fclass->evaluate_inverse = evaluate_inverse; } static void rs_srgb_gamma_init(RSSrgbGamma *gamma) { } RS1dFunction * rs_srgb_gamma_new(void) { return RS_1D_FUNCTION(g_object_new(RS_TYPE_SRGB_GAMMA, NULL)); } static const RS1dFunction * get_gamma_function(const RSColorSpace *color_space) { static GStaticMutex lock = G_STATIC_MUTEX_INIT; static RS1dFunction *func = NULL; g_static_mutex_lock(&lock); if (!func) func = rs_srgb_gamma_new(); g_static_mutex_unlock(&lock); return func; } static gdouble evaluate(const RS1dFunction *func, const gdouble x) { const gdouble junction = 0.0031308; if (x <= junction) return x * 12.92; else return 1.055 * pow(x, 1.0/2.4) - 0.055; } static gdouble evaluate_inverse(const RS1dFunction *func, const gdouble y) { const gdouble junction = 0.04045; if (y <= junction) return y / 12.92; else return pow((y+0.055)/1.055, 2.4); } rawstudio-2.0/plugins/colorspace-srgb/Makefile.in0000644000175000017500000004224111547430035017135 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/colorspace-srgb DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) colorspace_srgb_la_DEPENDENCIES = am_colorspace_srgb_la_OBJECTS = colorspace-srgb.lo colorspace_srgb_la_OBJECTS = $(am_colorspace_srgb_la_OBJECTS) colorspace_srgb_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(colorspace_srgb_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(colorspace_srgb_la_SOURCES) DIST_SOURCES = $(colorspace_srgb_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = colorspace_srgb.la colorspace_srgb_la_LIBADD = @PACKAGE_LIBS@ colorspace_srgb_la_LDFLAGS = -module -avoid-version colorspace_srgb_la_SOURCES = colorspace-srgb.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/colorspace-srgb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/colorspace-srgb/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done colorspace_srgb.la: $(colorspace_srgb_la_OBJECTS) $(colorspace_srgb_la_DEPENDENCIES) $(colorspace_srgb_la_LINK) -rpath $(libdir) $(colorspace_srgb_la_OBJECTS) $(colorspace_srgb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colorspace-srgb.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/load-dcraw/0000755000175000017500000000000011547430075014101 500000000000000rawstudio-2.0/plugins/load-dcraw/mmap-hack.h0000644000175000017500000000436411526533643016041 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 MMAP_HACK_H #define MMAP_HACK_H #ifdef __cplusplus extern "C" { #endif typedef struct RS_FILE { int fd; unsigned char *map; unsigned int offset; unsigned int size; } RS_FILE; #define RS_FILE(stream) ((RS_FILE *)(stream)) extern RS_FILE *rs_fopen(const char *path, const char *mode); extern int rs_fclose(RS_FILE *fp); extern int rs_fseek(RS_FILE *stream, long offset, int whence); extern long rs_ftell(RS_FILE *stream); extern void rs_rewind(RS_FILE *stream); extern int rs_fscanf(RS_FILE *stream, const char *format, void* dst); extern int rs_fgetc(RS_FILE *stream); extern size_t rs_fread(void *ptr, size_t size, size_t nmemb, RS_FILE *stream); extern char *rs_fgets(char *s, int size, RS_FILE *stream); #ifdef __cplusplus } #endif #define fopen(a,b) (FILE *) rs_fopen(a,b) #define fclose(a) rs_fclose(RS_FILE(a)) #define fseek(a, b, c) rs_fseek(RS_FILE(a),b,c) #define fread(a,b,c,d) rs_fread(a,b,c,RS_FILE(d)) #define fgets(a,b,c) rs_fgets(a,b,RS_FILE(c)) #define fscanf(a,b,c) rs_fscanf(RS_FILE(a),b,c) #define fgetc(stream) (int) (RS_FILE(stream)->map[RS_FILE(stream)->offset++]) #define ftell(stream) (long) (RS_FILE(stream)->offset) #define rewind(stream) do {RS_FILE(stream)->offset = 0; } while(0) #ifdef feof #undef feof #endif #define feof(stream) (RS_FILE(stream)->offset >= RS_FILE(stream)->size) #ifdef getc #undef getc #endif #define getc(stream) fgetc(stream) #endif /* MMAP_HACK_H */ rawstudio-2.0/plugins/load-dcraw/dcrawloader.c0000644000175000017500000001710311537764506016466 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include "dcraw_api.h" /* In order to inline this calculation, I make the risky assumption that all filter patterns can be described by a repeating pattern of eight rows and two columns Return values are either 0/1/2/3 = G/M/C/Y or 0/1/2/3 = R/G1/B/G2 */ #define FC(row,col) \ (int)(filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3) static int fc_INDI (const unsigned int filters, const int row, const int col) { static const char filter[16][16] = { { 2,1,1,3,2,3,2,0,3,2,3,0,1,2,1,0 }, { 0,3,0,2,0,1,3,1,0,1,1,2,0,3,3,2 }, { 2,3,3,2,3,1,1,3,3,1,2,1,2,0,0,3 }, { 0,1,0,1,0,2,0,2,2,0,3,0,1,3,2,1 }, { 3,1,1,2,0,1,0,2,1,3,1,3,0,1,3,0 }, { 2,0,0,3,3,2,3,1,2,0,2,0,3,2,2,1 }, { 2,3,3,1,2,1,2,1,2,1,1,2,3,0,0,1 }, { 1,0,0,2,3,0,0,3,0,3,0,3,2,1,2,3 }, { 2,3,3,1,1,2,1,0,3,2,3,0,2,3,1,3 }, { 1,0,2,0,3,0,3,2,0,1,1,2,0,1,0,2 }, { 0,1,1,3,3,2,2,1,1,3,3,0,2,1,3,2 }, { 2,3,2,0,0,1,3,0,2,0,1,2,3,0,1,0 }, { 1,3,1,2,3,2,3,2,0,2,0,1,1,0,3,0 }, { 0,2,0,3,1,0,0,1,1,3,3,2,3,2,2,1 }, { 2,1,3,2,3,1,2,1,0,3,0,2,0,2,0,2 }, { 0,3,1,0,0,2,0,3,2,1,3,1,1,3,1,3 } }; if (filters != 1) return FC(row,col); /* Assume that we are handling the Leaf CatchLight with * top_margin = 8; left_margin = 18; */ // return filter[(row+top_margin) & 15][(col+left_margin) & 15]; return filter[(row+8) & 15][(col+18) & 15]; } static RS_IMAGE16 * convert(dcraw_data *raw) { RS_IMAGE16 *image = NULL; gint row, col; gushort *output; gint shift; gint temp; g_assert(raw != NULL); shift = (gint64) (16.0-log((gdouble) raw->rgbMax)/log(2.0)+0.5); /* Allocate a 1-channel RS_IMAGE16 */ if (raw->filters != 0) { image = rs_image16_new(raw->raw.width*2, raw->raw.height*2, 1, 1); g_assert(raw->filters != 0); g_assert(raw->fourColorFilters != 0); g_assert(image->pixelsize == 1); image->filters = raw->filters; for(row=0 ; row < image->h ; row++) { output = GET_PIXEL(image, 0, row); for(col=0 ; col < image->w ; col++) { /* Extract the correct color from the raw image */ temp = raw->raw.image[(row>>1) * raw->raw.width + (col>>1)][fc_INDI(raw->fourColorFilters, row, col)]; /* Subtract black as calculated by dcraw */ temp -= raw->black; /* Clamp */ temp = MAX(0, temp); /* Shift our data to fit 16 bits */ *output = temp<raw.colors == 3) { /* For foveon sensors, no demosaic is needed */ gint i; gint max = 0; gint rawsize = raw->raw.width * raw->raw.height * 3; dcraw_image_type *input; g_assert(raw->black == 0); /* raw->black is always zero for foveon - I think :) */ image = rs_image16_new(raw->raw.width, raw->raw.height, 3, 4); /* dcraw calculates 'wrong' rgbMax for Sigma's, let's calculate our own */ for(i=0;iraw.image)[i], max); shift = (gint) (16.0-log((gdouble) max)/log(2.0)); for(row=0 ; row < image->h ; row++) { output = GET_PIXEL(image, 0, row); input = raw->raw.image+row*raw->raw.width; for(col=0 ; col < image->w ; col++) { /* Copy and shift our data to fill 16 bits */ output[R] = (*input)[R] << shift; output[G] = (*input)[G] << shift; output[B] = (*input)[B] << shift; /* Advance input by one dcraw_image_type */ input++; /* Advance output by one pixel */ output += image->pixelsize; } } } else if (raw->raw.colors == 1) { dcraw_image_type *input; image = rs_image16_new(raw->raw.width, raw->raw.height, 3, 4); for(row=0 ; row < image->h ; row++) { output = GET_PIXEL(image, 0, row); input = raw->raw.image+row*raw->raw.width; for(col=0 ; col < image->w ; col++) { /* Copy and shift our data to fill 16 bits */ output[R] = *(*input) << shift; output[G] = *(*input) << shift; output[B] = *(*input) << shift; /* Advance input by one dcraw_image_type */ input++; /* Advance output by one pixel */ output += image->pixelsize; } } } return image; } static RSFilterResponse * open_dcraw(const gchar *filename) { dcraw_data *raw = g_new0(dcraw_data, 1); RS_IMAGE16 *image = NULL; RSFilterResponse* response = rs_filter_response_new(); rs_io_lock(); if (!dcraw_open(raw, (char *) filename)) { dcraw_load_raw(raw); rs_io_unlock(); rs_filter_param_set_integer(RS_FILTER_PARAM(response), "fuji-width", raw->fuji_width); image = convert(raw); dcraw_close(raw); } else rs_io_unlock(); g_free(raw); if (image) { rs_filter_response_set_image(response, image); rs_filter_response_set_width(response, image->w); rs_filter_response_set_height(response, image->h); g_object_unref(image); } return response; } G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_filetype_register_loader(".cr2", "Canon CR2", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".crw", "Canon CIFF", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".nef", "Nikon NEF", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".nrw", "Nikon NEF 2", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".mrw", "Minolta raw", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".tif", "Canon TIFF", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".rwl", "Leica", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".arw", "Sony", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".sr2", "Sony", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".srf", "Sony", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".kdc", "Kodak", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".dcr", "Kodak", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".x3f", "Sigma", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".orf", "Olympus", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".raw", "Panasonic raw", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".rw2", "Panasonic raw v.2", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".pef", "Pentax raw", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".dng", "Adobe Digital negative", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".mef", "Mamiya", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".3fr", "Hasselblad", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".erf", "Epson", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".raf", "Fujifilm", open_dcraw, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".srw", "Samsung", open_dcraw, 10, RS_LOADER_FLAGS_RAW); } rawstudio-2.0/plugins/load-dcraw/dcraw.h0000644000175000017500000002244511526533643015303 00000000000000/* dcraw.h - Dave Coffin's raw photo decoder - header for C++ adaptation Copyright 1997-2009 by Dave Coffin, dcoffin a cybercom o net Copyright 2004-2010 by Udi Fuchs, udifuchs a gmail o com 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 is a adaptation of Dave Coffin's original dcraw.c to C++. It can work as either a command-line tool or called by other programs. */ #define ushort UshORt typedef unsigned char uchar; typedef unsigned short ushort; /* * The following is somewhat ugly because of various requirements: * 1. The stand-alone dcraw binary should not depend on glib * 2. The amount of changes to dcraw source code should be minimal * 3. On win32 fopen needs to be replaced by g_fopen * 4. On other systems g_fopen is defined as a macro * 5. g_fopen only exists since glib 2.6 */ #if !defined(DCRAW_NOMAIN) && defined(WIN32) #include #if GLIB_CHECK_VERSION(2,6,0) extern "C" { #include } #define fopen g_fopen #endif #endif class DCRaw { public: /* All dcraw's global variables are members of this class. */ FILE *ifp, *ofp; short order; /*const*/ char *ifname, *ifname_display; char *meta_data; char cdesc[5], desc[512], make[64], model[64], model2[64], artist[64]; float flash_used, canon_ev, iso_speed, shutter, aperture, focal_len; time_t timestamp; unsigned shot_order, kodak_cbpp, filters, exif_cfa, unique_id; off_t strip_offset, data_offset; off_t thumb_offset, meta_offset, profile_offset; unsigned thumb_length, meta_length, profile_length; unsigned thumb_misc, *oprof, fuji_layout, shot_select, multi_out; unsigned tiff_nifds, tiff_samples, tiff_bps, tiff_compress; unsigned black, cblack[8], maximum, mix_green, raw_color, zero_is_bad; unsigned zero_after_ff, is_raw, dng_version, is_foveon, data_error; unsigned tile_width, tile_length, gpsdata[32], load_flags; ushort raw_height, raw_width, height, width, top_margin, left_margin; ushort shrink, iheight, iwidth, fuji_width, thumb_width, thumb_height; int flip, tiff_flip, colors; double pixel_aspect, aber[4], gamm[6]; ushort (*image)[4], white[8][8], curve[0x10000], cr2_slice[3], sraw_mul[4]; float bright, user_mul[4], threshold; int half_size, four_color_rgb, document_mode, highlight; int verbose, use_auto_wb, use_camera_wb, use_camera_matrix; int output_color, output_bps, output_tiff, med_passes; int no_auto_bright; unsigned greybox[4]; float cam_mul[4], pre_mul[4], cmatrix[3][4], rgb_cam[3][4]; int histogram[4][0x2000]; void (DCRaw::*write_thumb)(), (DCRaw::*write_fun)(); void (DCRaw::*load_raw)(), (DCRaw::*thumb_load_raw)(); jmp_buf failure; struct decode { struct decode *branch[2]; int leaf; } first_decode[2048], *second_decode, *free_decode; struct tiff_ifd { int width, height, bps, comp, phint, offset, flip, samples, bytes; } tiff_ifd[10]; struct ph1 { int format, key_off, black, black_off, split_col, tag_21a; float tag_210; } ph1; int tone_curve_size, tone_curve_offset; /* Nikon Tone Curves UF*/ int tone_mode_offset, tone_mode_size; /* Nikon ToneComp UF*/ /* Used by dcraw_message() */ char *messageBuffer; int lastStatus; unsigned ifpReadCount; unsigned ifpSize; unsigned ifpStepProgress; #define STEPS 50 void ifpProgress(unsigned readCount); #ifndef WITH_MMAP_HACK // Override standard io function for integrity checks and progress report size_t fread(void *ptr, size_t size, size_t nmemb, FILE *stream); size_t fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream); char *fgets(char *s, int size, FILE *stream); int fgetc(FILE *stream); // dcraw only calls fscanf for single variables int fscanf(FILE *stream, const char *format, void *ptr); // calling with more variables would triger a link error int fscanf(FILE *stream, const char *format, void *ptr1, void *ptr2, ...); #endif /* WITH_MMAP_HACK */ /* Initialization of the variables is done here */ DCRaw(); ~DCRaw(); void dcraw_message(int code, const char *format, ...); /* All dcraw functions with the CLASS prefix are members of this class. */ int fc (int row, int col); void merror (void *ptr, const char *where); void derror(); ushort sget2 (uchar *s); ushort get2(); unsigned sget4 (uchar *s); unsigned get4(); unsigned getint (int type); float int_to_float (int i); double getreal (int type); void read_shorts (ushort *pixel, unsigned count); void canon_600_fixed_wb (int temp); int canon_600_color (int ratio[2], int mar); void canon_600_auto_wb(); void canon_600_coeff(); void canon_600_load_raw(); void remove_zeroes(); int canon_s2is(); unsigned bitbuf; int vbits, reset; unsigned getbithuff (int nbits, ushort *huff); ushort * make_decoder_ref (const uchar **source); ushort * make_decoder (const uchar *source); void crw_init_tables (unsigned table, ushort *huff[2]); int canon_has_lowbits(); void canon_compressed_load_raw(); int ljpeg_start (struct jhead *jh, int info_only); void ljpeg_end (struct jhead *jh); int ljpeg_diff (ushort *huff); ushort * ljpeg_row (int jrow, struct jhead *jh); void lossless_jpeg_load_raw(); void canon_sraw_load_raw(); void adobe_copy_pixel (int row, int col, ushort **rp); void adobe_dng_load_raw_lj(); void adobe_dng_load_raw_nc(); void pentax_load_raw(); void nikon_compressed_load_raw(); int nikon_is_compressed(); int nikon_e995(); int nikon_e2100(); void nikon_3700(); int minolta_z2(); void fuji_load_raw(); void ppm_thumb (); void layer_thumb (); void rollei_thumb (); void rollei_load_raw(); int bayer (unsigned row, unsigned col); void phase_one_flat_field (int is_float, int nc); void phase_one_correct(); void phase_one_load_raw(); unsigned ph1_bithuff (int nbits, ushort *huff); void phase_one_load_raw_c(); void hasselblad_load_raw(); void leaf_hdr_load_raw(); void sinar_4shot_load_raw(); void imacon_full_load_raw(); void packed_load_raw(); void unpacked_load_raw(); void nokia_load_raw(); unsigned pana_bits (int nbits); void panasonic_load_raw(); void olympus_load_raw(); void minolta_rd175_load_raw(); void quicktake_100_load_raw(); void kodak_radc_load_raw(); void kodak_jpeg_load_raw(); void kodak_dc120_load_raw(); void eight_bit_load_raw(); void kodak_yrgb_load_raw(); void kodak_262_load_raw(); int kodak_65000_decode (short *out, int bsize); void kodak_65000_load_raw(); void kodak_ycbcr_load_raw(); void kodak_rgb_load_raw(); void kodak_thumb_load_raw(); void sony_decrypt (unsigned *data, int len, int start, int key); void sony_load_raw(); void sony_arw_load_raw(); void sony_arw2_load_raw(); void smal_decode_segment (unsigned seg[2][2], int holes); void smal_v6_load_raw(); int median4 (int *p); void fill_holes (int holes); void smal_v9_load_raw(); void foveon_decoder (unsigned size, unsigned code); void foveon_thumb (); void foveon_load_camf(); void foveon_load_raw(); const char * foveon_camf_param (const char *block, const char *param); void * foveon_camf_matrix (unsigned dim[3], const char *name); int foveon_fixed (void *ptr, int size, const char *name); float foveon_avg (short *pix, int range[2], float cfilt); short * foveon_make_curve (double max, double mul, double filt); void foveon_make_curves (short **curvep, float dq[3], float div[3], float filt); int foveon_apply_curve (short *curve, int i); void foveon_interpolate(); void bad_pixels(const char *fname); void subtract(const char *fname); void gamma_curve (double pwr, double ts, int mode, int imax); void pseudoinverse (double (*in)[3], double (*out)[3], int size); void cam_xyz_coeff (double cam_xyz[4][3]); void colorcheck(); void hat_transform (float *temp, float *base, int st, int size, int sc); void wavelet_denoise(); void scale_colors(); void pre_interpolate(); void border_interpolate (int border); void lin_interpolate(); void vng_interpolate(); void ppg_interpolate(); void ahd_interpolate(); void median_filter(); void blend_highlights(); void recover_highlights(); void tiff_get (unsigned base, unsigned *tag, unsigned *type, unsigned *len, unsigned *save); void parse_thumb_note (int base, unsigned toff, unsigned tlen); void parse_makernote (int base, int uptag); void get_timestamp (int reversed); void parse_exif (int base); void parse_gps (int base); void romm_coeff (float romm_cam[3][3]); void parse_mos (int offset); void linear_table (unsigned len); void parse_kodak_ifd (int base); int parse_tiff_ifd (int base); int parse_tiff (int base); void apply_tiff(); void parse_minolta (int base); void parse_external_jpeg(); void ciff_block_1030(); void parse_ciff (int offset, int length); void parse_rollei(); void parse_sinar_ia(); void parse_phase_one (int base); void parse_fuji (int offset); int parse_jpeg (int offset); void parse_riff(); void parse_smal (int offset, unsigned fsize); void parse_cine(); char * foveon_gets (int offset, char *str, int len); void parse_foveon(); void adobe_coeff (const char *make, const char *model); void simple_coeff (int index); short guess_byte_order (int words); float find_green (int bps, int bite, int off0, int off1); void identify(); #ifndef NO_LCMS void apply_profile (const char *input, const char *output); #endif void convert_to_rgb(); void fuji_rotate(); void stretch(); int flip_index (int row, int col); void tiff_set (ushort *ntag, ushort tag, ushort type, int count, int val); void tiff_head (struct tiff_hdr *th, int full); void jpeg_thumb (); void write_ppm_tiff (); int main (int argc, const char **argv); }; rawstudio-2.0/plugins/load-dcraw/Makefile.am0000644000175000017500000000112611526533643016057 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4\ -DDCRAW_NOMAIN\ -DDCRAW_NOLCMS\ -DWITH_MMAP_HACK AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = load_dcraw.la libdir = $(datadir)/rawstudio/plugins/ load_dcraw_la_LIBADD = @PACKAGE_LIBS@ load_dcraw_la_LDFLAGS = -module -avoid-version load_dcraw_la_SOURCES = dcrawloader.c dcraw.cc dcraw.h dcraw_api.cc dcraw_api.h mmap-hack.c mmap-hack.h rawstudio-2.0/plugins/load-dcraw/dcraw.cc0000644000175000017500000105337311526533643015446 00000000000000/* dcraw.cc - Dave Coffin's raw photo decoder - C++ adaptation Copyright 1997-2010 by Dave Coffin, dcoffin a cybercom o net Copyright 2004-2010 by Udi Fuchs, udifuchs a gmail o com 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 is a adaptation of Dave Coffin's original dcraw.c to C++. It can work as either a command-line tool or called by other programs. $Revision: 1.439 $ $Date: 2010/11/11 12:43:11 $ */ /* Note for Rawstudio developers: dcraw is copied from UFRaw CVS at: pserver:anonymous@ufraw.cvs.sourceforge.net:/cvsroot/ufraw Current revisions: dcraw.cc [1.235] dcraw.h [1.65] dcraw_api.cc [1.72] dcraw_api.h [1.42] - Thanks Dave and Udi, you rock! */ #ifdef HAVE_CONFIG_H /*For UFRaw config system - NKBJ*/ #include "config.h" #endif #define DCRAW_VERSION "9.05" //#ifndef _GNU_SOURCE //#define _GNU_SOURCE //#endif #define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #ifdef WITH_MMAP_HACK #include "mmap-hack.h" #endif #ifdef HAVE_SYS_TYPES_H #include /*For off_t */ #endif /* NO_LCMS disables the "-p" option. */ #ifndef NO_LCMS #include #endif #ifdef HAVE_LIBJPEG extern "C" { #include } #endif //#ifdef LOCALEDIR //#include //#define _(String) gettext(String) //#else //#define _(String) (String) //#endif #include /*For _(String) definition - NKBJ*/ //#define fgetc getc_unlocked //#ifdef DJGPP //#define fseeko fseek //#define ftello ftell //#else //#define fgetc getc_unlocked //#endif #ifdef __CYGWIN__ #include #endif #ifdef WIN32 #include #include #ifndef __MINGW32__ /* causes warnings in cygwin's gcc -mno-cygwin UF*/ #pragma comment(lib, "ws2_32.lib") #endif /* __MINGW32__ UF*/ #define snprintf _snprintf #define strcasecmp stricmp #define strncasecmp strnicmp typedef __int64 INT64; typedef unsigned __int64 UINT64; #else #include #include #include typedef long long INT64; typedef unsigned long long UINT64; #endif #ifdef LJPEG_DECODE #error Please compile dcraw.c by itself. #error Do not link it with ljpeg_decode. #endif #ifndef LONG_BIT #define LONG_BIT (8 * sizeof (long)) #endif /* All definitions of global variables are defined inside a class in dcraw.h */ #include "dcraw.h" #ifdef DCRAW_NOMAIN extern #endif const double xyz_rgb[3][3] = { /* XYZ from RGB */ { 0.412453, 0.357580, 0.180423 }, { 0.212671, 0.715160, 0.072169 }, { 0.019334, 0.119193, 0.950227 } }; #ifdef DCRAW_NOMAIN extern #endif const float d65_white[3] = { 0.950456, 1, 1.088754 }; #define DCRAW_SUCCESS 0 /* Centralize the error handling - UF*/ #define DCRAW_ERROR 1 #define DCRAW_UNSUPPORTED 2 #define DCRAW_NO_CAMERA_WB 3 #define DCRAW_VERBOSE 4 #define DCRAW_WARNING 5 #define CLASS DCRaw:: CLASS DCRaw() { order=0; /* Suppress valgrind error. */ shot_select=0, multi_out=0, aber[0] = aber[1] = aber[2] = aber[3] = 1; gamm[0] = 0.45, gamm[1] = 4.5, gamm[2] = gamm[3] = gamm[4] = gamm[5] = 0; bright=1, user_mul[0] = user_mul[1] = user_mul[2] = user_mul[3] = 0; threshold=0, half_size=0, four_color_rgb=0, document_mode=0, highlight=0; verbose=0, use_auto_wb=0, use_camera_wb=0, use_camera_matrix=-1; output_color=1, output_bps=8, output_tiff=0, med_passes=0, no_auto_bright=0; greybox[0] = greybox[1] = 0, greybox[2] = greybox[3] = UINT_MAX; tone_curve_size = 0, tone_curve_offset = 0; /* Nikon Tone Curves UF*/ tone_mode_offset = 0, tone_mode_size = 0; /* Nikon ToneComp UF*/ messageBuffer = NULL; lastStatus = DCRAW_SUCCESS; ifname = NULL; ifname_display = NULL; ifpReadCount = 0; ifpSize = 0; ifpStepProgress = 0; } CLASS ~DCRaw() { free(ifname); free(ifname_display); } void CLASS ifpProgress(unsigned readCount) { /* We don't use this in Rawstudio */ #if 0 ifpReadCount += readCount; if (ifpSize==0) return; unsigned newStepProgress = STEPS * ifpReadCount / ifpSize; if (newStepProgress > ifpStepProgress) { #ifdef DCRAW_NOMAIN if (ifpStepProgress) progress(PROGRESS_LOAD, newStepProgress - ifpStepProgress); else progress(PROGRESS_LOAD, -STEPS); #endif } ifpStepProgress = newStepProgress; #endif } #ifndef WITH_MMAP_HACK size_t CLASS fread(void *ptr, size_t size, size_t nmemb, FILE *stream) { size_t num = ::fread(ptr, size, nmemb, stream); if ( num != nmemb ) // Maybe this should be a DCRAW_WARNING dcraw_message(DCRAW_VERBOSE, "%s: fread %d != %d\n", ifname_display, num, nmemb); if (stream==ifp) ifpProgress(size*nmemb); return num; } size_t CLASS fwrite(const void *ptr, size_t size, size_t nmemb, FILE *stream) { size_t num = ::fwrite(ptr, size, nmemb, stream); if ( num != nmemb ) dcraw_message(DCRAW_WARNING, "%s: fwrite %d != %d\n", ifname_display, num, nmemb); return num; } char *CLASS fgets(char *s, int size, FILE *stream) { char *str = ::fgets(s, size, stream); if ( str==NULL ) // Maybe this should be a DCRAW_WARNING dcraw_message(DCRAW_VERBOSE, "%s: fgets returned NULL\n", ifname_display); if (stream==ifp) ifpProgress(strlen(s)); return str; } int CLASS fgetc(FILE *stream) { int chr = ::fgetc(stream); if (stream==ifp) ifpProgress(1); return chr; } int CLASS fscanf(FILE *stream, const char *format, void *ptr) { int count = ::fscanf(stream, format, ptr); if ( count != 1 ) dcraw_message(DCRAW_WARNING, "%s: fscanf %d != 1\n", ifname_display, count); return 1; } #endif /* #ifndef WITH_MMAP_HACK */ #define FORC(cnt) for (c=0; c < cnt; c++) #define FORC3 FORC(3) #define FORC4 FORC(4) #define FORCC FORC(colors) #define SQR(x) ((x)*(x)) #ifndef DCRAW_NOMAIN #define ABS(x) (((int)(x) ^ ((int)(x) >> 31)) - ((int)(x) >> 31)) #define MIN(a,b) ((a) < (b) ? (a) : (b)) #define MAX(a,b) ((a) > (b) ? (a) : (b)) #endif #define LIM(x,min,max) MAX(min,MIN(x,max)) #define ULIM(x,y,z) ((y) < (z) ? LIM(x,y,z) : LIM(x,z,y)) #define CLIP(x) LIM(x,0,65535) #define SWAP(a,b) { a=a+b; b=a-b; a=a-b; } /* In order to inline this calculation, I make the risky assumption that all filter patterns can be described by a repeating pattern of eight rows and two columns Do not use the FC or BAYER macros with the Leaf CatchLight, because its pattern is 16x16, not 2x8. Return values are either 0/1/2/3 = G/M/C/Y or 0/1/2/3 = R/G1/B/G2 PowerShot 600 PowerShot A50 PowerShot Pro70 Pro90 & G1 0xe1e4e1e4: 0x1b4e4b1e: 0x1e4b4e1b: 0xb4b4b4b4: 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 G M G M G M 0 C Y C Y C Y 0 Y C Y C Y C 0 G M G M G M 1 C Y C Y C Y 1 M G M G M G 1 M G M G M G 1 Y C Y C Y C 2 M G M G M G 2 Y C Y C Y C 2 C Y C Y C Y 3 C Y C Y C Y 3 G M G M G M 3 G M G M G M 4 C Y C Y C Y 4 Y C Y C Y C PowerShot A5 5 G M G M G M 5 G M G M G M 0x1e4e1e4e: 6 Y C Y C Y C 6 C Y C Y C Y 7 M G M G M G 7 M G M G M G 0 1 2 3 4 5 0 C Y C Y C Y 1 G M G M G M 2 C Y C Y C Y 3 M G M G M G All RGB cameras use one of these Bayer grids: 0x16161616: 0x61616161: 0x49494949: 0x94949494: 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 1 2 3 4 5 0 B G B G B G 0 G R G R G R 0 G B G B G B 0 R G R G R G 1 G R G R G R 1 B G B G B G 1 R G R G R G 1 G B G B G B 2 B G B G B G 2 G R G R G R 2 G B G B G B 2 R G R G R G 3 G R G R G R 3 B G B G B G 3 R G R G R G 3 G B G B G B */ #define FC(row,col) \ (filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3) #define BAYER(row,col) \ image[((row) >> shrink)*iwidth + ((col) >> shrink)][FC(row,col)] #define BAYER2(row,col) \ image[((row) >> shrink)*iwidth + ((col) >> shrink)][fc(row,col)] int CLASS fc (int row, int col) { static const char filter[16][16] = { { 2,1,1,3,2,3,2,0,3,2,3,0,1,2,1,0 }, { 0,3,0,2,0,1,3,1,0,1,1,2,0,3,3,2 }, { 2,3,3,2,3,1,1,3,3,1,2,1,2,0,0,3 }, { 0,1,0,1,0,2,0,2,2,0,3,0,1,3,2,1 }, { 3,1,1,2,0,1,0,2,1,3,1,3,0,1,3,0 }, { 2,0,0,3,3,2,3,1,2,0,2,0,3,2,2,1 }, { 2,3,3,1,2,1,2,1,2,1,1,2,3,0,0,1 }, { 1,0,0,2,3,0,0,3,0,3,0,3,2,1,2,3 }, { 2,3,3,1,1,2,1,0,3,2,3,0,2,3,1,3 }, { 1,0,2,0,3,0,3,2,0,1,1,2,0,1,0,2 }, { 0,1,1,3,3,2,2,1,1,3,3,0,2,1,3,2 }, { 2,3,2,0,0,1,3,0,2,0,1,2,3,0,1,0 }, { 1,3,1,2,3,2,3,2,0,2,0,1,1,0,3,0 }, { 0,2,0,3,1,0,0,1,1,3,3,2,3,2,2,1 }, { 2,1,3,2,3,1,2,1,0,3,0,2,0,2,0,2 }, { 0,3,1,0,0,2,0,3,2,1,3,1,1,3,1,3 } }; if (filters != 1) return FC(row,col); return filter[(row+top_margin) & 15][(col+left_margin) & 15]; } #ifndef HAVE_MEMMEM const char *memmem (const char *haystack, size_t haystacklen, const char *needle, size_t needlelen) { const char *c; for (c = haystack; c <= haystack + haystacklen - needlelen; c++) if (!memcmp (c, needle, needlelen)) return c; return 0; } #endif #ifndef DCRAW_NOMAIN #include void CLASS dcraw_message(int code, const char *format, ...) { if (verbose || code!=DCRAW_VERBOSE) { va_list ap; va_start(ap, format); vfprintf(stderr, format, ap); va_end(ap); } } #endif /*DCRAW_NOMAIN*/ void CLASS merror (void *ptr, const char *where) { if (ptr) return; dcraw_message (DCRAW_ERROR,_("%s: Out of memory in %s\n"), ifname_display, where); longjmp (failure, 1); } void CLASS derror() { if (!data_error) { dcraw_message (DCRAW_WARNING, "%s: ", ifname_display); if (feof(ifp)) dcraw_message (DCRAW_WARNING,_("Unexpected end of file\n")); else #ifdef HAVE_FSEEKO dcraw_message (DCRAW_WARNING,_("Corrupt data near 0x%llx\n"), (INT64) ftello(ifp)); #else dcraw_message (DCRAW_WARNING,_("Corrupt data near 0x%lx\n"), ftell(ifp)); #endif } data_error++; } ushort CLASS sget2 (uchar *s) { if (order == 0x4949) /* "II" means little-endian */ return s[0] | s[1] << 8; else /* "MM" means big-endian */ return s[0] << 8 | s[1]; } ushort CLASS get2() { uchar str[2] = { 0xff,0xff }; fread (str, 1, 2, ifp); return sget2(str); } unsigned CLASS sget4 (uchar *s) { if (order == 0x4949) return s[0] | s[1] << 8 | s[2] << 16 | s[3] << 24; else return s[0] << 24 | s[1] << 16 | s[2] << 8 | s[3]; } #define sget4(s) sget4((uchar *)s) unsigned CLASS get4() { uchar str[4] = { 0xff,0xff,0xff,0xff }; fread (str, 1, 4, ifp); return sget4(str); } unsigned CLASS getint (int type) { return type == 3 ? get2() : get4(); } float CLASS int_to_float (int i) { union { int i; float f; } u; u.i = i; return u.f; } double CLASS getreal (int type) { union { char c[8]; double d; } u; int i, rev; switch (type) { case 3: return (unsigned short) get2(); case 4: return (unsigned int) get4(); case 5: u.d = (unsigned int) get4(); return u.d / (unsigned int) get4(); case 8: return (signed short) get2(); case 9: return (signed int) get4(); case 10: u.d = (signed int) get4(); return u.d / (signed int) get4(); case 11: return int_to_float (get4()); case 12: rev = 7 * ((order == 0x4949) == (ntohs(0x1234) == 0x1234)); for (i=0; i < 8; i++) u.c[i ^ rev] = fgetc(ifp); return u.d; default: return fgetc(ifp); } } void CLASS read_shorts (ushort *pixel, unsigned count) { if (fread (pixel, 2, count, ifp) < count) derror(); if ((order == 0x4949) == (ntohs(0x1234) == 0x1234)) swab ((const char *)pixel, (char *)pixel, count*2); /*mingw support UF*/ } void CLASS canon_600_fixed_wb (int temp) { static const short mul[4][5] = { { 667, 358,397,565,452 }, { 731, 390,367,499,517 }, { 1119, 396,348,448,537 }, { 1399, 485,431,508,688 } }; int lo, hi, i; float frac=0; for (lo=4; --lo; ) if (*mul[lo] <= temp) break; for (hi=0; hi < 3; hi++) if (*mul[hi] >= temp) break; if (lo != hi) frac = (float) (temp - *mul[lo]) / (*mul[hi] - *mul[lo]); for (i=1; i < 5; i++) pre_mul[i-1] = 1 / (frac * mul[hi][i] + (1-frac) * mul[lo][i]); } /* Return values: 0 = white 1 = near white 2 = not white */ int CLASS canon_600_color (int ratio[2], int mar) { int clipped=0, target, miss; if (flash_used) { if (ratio[1] < -104) { ratio[1] = -104; clipped = 1; } if (ratio[1] > 12) { ratio[1] = 12; clipped = 1; } } else { if (ratio[1] < -264 || ratio[1] > 461) return 2; if (ratio[1] < -50) { ratio[1] = -50; clipped = 1; } if (ratio[1] > 307) { ratio[1] = 307; clipped = 1; } } target = flash_used || ratio[1] < 197 ? -38 - (398 * ratio[1] >> 10) : -123 + (48 * ratio[1] >> 10); if (target - mar <= ratio[0] && target + 20 >= ratio[0] && !clipped) return 0; miss = target - ratio[0]; if (abs(miss) >= mar*4) return 2; if (miss < -20) miss = -20; if (miss > mar) miss = mar; ratio[0] = target - miss; return 1; } void CLASS canon_600_auto_wb() { int mar, row, col, i, j, st, count[] = { 0,0 }; int test[8], total[2][8], ratio[2][2], stat[2]; memset (&total, 0, sizeof total); i = canon_ev + 0.5; if (i < 10) mar = 150; else if (i > 12) mar = 20; else mar = 280 - 20 * i; if (flash_used) mar = 80; for (row=14; row < height-14; row+=4) for (col=10; col < width; col+=2) { for (i=0; i < 8; i++) test[(i & 4) + FC(row+(i >> 1),col+(i & 1))] = BAYER(row+(i >> 1),col+(i & 1)); for (i=0; i < 8; i++) if (test[i] < 150 || test[i] > 1500) goto next; for (i=0; i < 4; i++) if (abs(test[i] - test[i+4]) > 50) goto next; for (i=0; i < 2; i++) { for (j=0; j < 4; j+=2) ratio[i][j >> 1] = ((test[i*4+j+1]-test[i*4+j]) << 10) / test[i*4+j]; stat[i] = canon_600_color (ratio[i], mar); } if ((st = stat[0] | stat[1]) > 1) goto next; for (i=0; i < 2; i++) if (stat[i]) for (j=0; j < 2; j++) test[i*4+j*2+1] = test[i*4+j*2] * (0x400 + ratio[i][j]) >> 10; for (i=0; i < 8; i++) total[st][i] += test[i]; count[st]++; next: ; } if (count[0] | count[1]) { st = count[0]*200 < count[1]; for (i=0; i < 4; i++) pre_mul[i] = 1.0 / (total[st][i] + total[st][i+4]); } } void CLASS canon_600_coeff() { static const short table[6][12] = { { -190,702,-1878,2390, 1861,-1349,905,-393, -432,944,2617,-2105 }, { -1203,1715,-1136,1648, 1388,-876,267,245, -1641,2153,3921,-3409 }, { -615,1127,-1563,2075, 1437,-925,509,3, -756,1268,2519,-2007 }, { -190,702,-1886,2398, 2153,-1641,763,-251, -452,964,3040,-2528 }, { -190,702,-1878,2390, 1861,-1349,905,-393, -432,944,2617,-2105 }, { -807,1319,-1785,2297, 1388,-876,769,-257, -230,742,2067,-1555 } }; int t=0, i, c; float mc, yc; mc = pre_mul[1] / pre_mul[2]; yc = pre_mul[3] / pre_mul[2]; if (mc > 1 && mc <= 1.28 && yc < 0.8789) t=1; if (mc > 1.28 && mc <= 2) { if (yc < 0.8789) t=3; else if (yc <= 2) t=4; } if (flash_used) t=5; for (raw_color = i=0; i < 3; i++) FORCC rgb_cam[i][c] = table[t][i*4 + c] / 1024.0; } void CLASS canon_600_load_raw() { uchar data[1120], *dp; ushort pixel[896], *pix; int irow, row, col, val; static const short mul[4][2] = { { 1141,1145 }, { 1128,1109 }, { 1178,1149 }, { 1128,1109 } }; for (irow=row=0; irow < height; irow++) { if ((int)fread (data, 1, raw_width*5/4, ifp) < raw_width*5/4) derror(); for (dp=data, pix=pixel; dp < data+1120; dp+=10, pix+=8) { pix[0] = (dp[0] << 2) + (dp[1] >> 6 ); pix[1] = (dp[2] << 2) + (dp[1] >> 4 & 3); pix[2] = (dp[3] << 2) + (dp[1] >> 2 & 3); pix[3] = (dp[4] << 2) + (dp[1] & 3); pix[4] = (dp[5] << 2) + (dp[9] & 3); pix[5] = (dp[6] << 2) + (dp[9] >> 2 & 3); pix[6] = (dp[7] << 2) + (dp[9] >> 4 & 3); pix[7] = (dp[8] << 2) + (dp[9] >> 6 ); } for (col=0; col < width; col++) BAYER(row,col) = pixel[col]; for (col=width; col < raw_width; col++) black += pixel[col]; if ((row+=2) > height) row = 1; } if (raw_width > width) black = black / ((raw_width - width) * height) - 4; for (row=0; row < height; row++) for (col=0; col < width; col++) { if ((val = BAYER(row,col) - black) < 0) val = 0; val = val * mul[row & 3][col & 1] >> 9; BAYER(row,col) = val; } canon_600_fixed_wb(1311); canon_600_auto_wb(); canon_600_coeff(); maximum = (0x3ff - black) * 1109 >> 9; black = 0; } void CLASS remove_zeroes() { unsigned row, col, tot, n, r, c; for (row=0; row < height; row++) for (col=0; col < width; col++) if (BAYER(row,col) == 0) { tot = n = 0; for (r = row-2; r <= row+2; r++) for (c = col-2; c <= col+2; c++) if (r < height && c < width && FC(r,c) == FC(row,col) && BAYER(r,c)) tot += (n++,BAYER(r,c)); if (n) BAYER(row,col) = tot/n; } } int CLASS canon_s2is() { unsigned row; for (row=0; row < 100; row++) { fseek (ifp, row*3340 + 3284, SEEK_SET); if (getc(ifp) > 15) return 1; } return 0; } /* getbits(-1) initializes the buffer getbits(n) where 0 <= n <= 25 returns an n-bit integer */ unsigned CLASS getbithuff (int nbits, ushort *huff) { int c; if (nbits == -1) return bitbuf = vbits = reset = 0; if (nbits == 0 || vbits < 0) return 0; while (!reset && vbits < nbits && (c = fgetc(ifp)) != EOF && !(reset = zero_after_ff && c == 0xff && fgetc(ifp))) { bitbuf = (bitbuf << 8) + (uchar) c; vbits += 8; } c = bitbuf << (32-vbits) >> (32-nbits); if (huff) { vbits -= huff[c] >> 8; c = (uchar) huff[c]; } else vbits -= nbits; if (vbits < 0) derror(); return c; } #define getbits(n) getbithuff(n,0) #define gethuff(h) getbithuff(*h,h+1) /* Construct a decode tree according the specification in *source. The first 16 bytes specify how many codes should be 1-bit, 2-bit 3-bit, etc. Bytes after that are the leaf values. For example, if the source is { 0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0, 0x04,0x03,0x05,0x06,0x02,0x07,0x01,0x08,0x09,0x00,0x0a,0x0b,0xff }, then the code is 00 0x04 010 0x03 011 0x05 100 0x06 101 0x02 1100 0x07 1101 0x01 11100 0x08 11101 0x09 11110 0x00 111110 0x0a 1111110 0x0b 1111111 0xff */ ushort * CLASS make_decoder_ref (const uchar **source) { int max, len, h, i, j; const uchar *count; ushort *huff; count = (*source += 16) - 17; for (max=16; max && !count[max]; max--); huff = (ushort *) calloc (1 + (1 << max), sizeof *huff); merror (huff, "make_decoder()"); huff[0] = max; for (h=len=1; len <= max; len++) for (i=0; i < count[len]; i++, ++*source) for (j=0; j < 1 << (max-len); j++) if (h <= 1 << max) huff[h++] = len << 8 | **source; return huff; } ushort * CLASS make_decoder (const uchar *source) { return make_decoder_ref (&source); } void CLASS crw_init_tables (unsigned table, ushort *huff[2]) { static const uchar first_tree[3][29] = { { 0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0, 0x04,0x03,0x05,0x06,0x02,0x07,0x01,0x08,0x09,0x00,0x0a,0x0b,0xff }, { 0,2,2,3,1,1,1,1,2,0,0,0,0,0,0,0, 0x03,0x02,0x04,0x01,0x05,0x00,0x06,0x07,0x09,0x08,0x0a,0x0b,0xff }, { 0,0,6,3,1,1,2,0,0,0,0,0,0,0,0,0, 0x06,0x05,0x07,0x04,0x08,0x03,0x09,0x02,0x00,0x0a,0x01,0x0b,0xff }, }; static const uchar second_tree[3][180] = { { 0,2,2,2,1,4,2,1,2,5,1,1,0,0,0,139, 0x03,0x04,0x02,0x05,0x01,0x06,0x07,0x08, 0x12,0x13,0x11,0x14,0x09,0x15,0x22,0x00,0x21,0x16,0x0a,0xf0, 0x23,0x17,0x24,0x31,0x32,0x18,0x19,0x33,0x25,0x41,0x34,0x42, 0x35,0x51,0x36,0x37,0x38,0x29,0x79,0x26,0x1a,0x39,0x56,0x57, 0x28,0x27,0x52,0x55,0x58,0x43,0x76,0x59,0x77,0x54,0x61,0xf9, 0x71,0x78,0x75,0x96,0x97,0x49,0xb7,0x53,0xd7,0x74,0xb6,0x98, 0x47,0x48,0x95,0x69,0x99,0x91,0xfa,0xb8,0x68,0xb5,0xb9,0xd6, 0xf7,0xd8,0x67,0x46,0x45,0x94,0x89,0xf8,0x81,0xd5,0xf6,0xb4, 0x88,0xb1,0x2a,0x44,0x72,0xd9,0x87,0x66,0xd4,0xf5,0x3a,0xa7, 0x73,0xa9,0xa8,0x86,0x62,0xc7,0x65,0xc8,0xc9,0xa1,0xf4,0xd1, 0xe9,0x5a,0x92,0x85,0xa6,0xe7,0x93,0xe8,0xc1,0xc6,0x7a,0x64, 0xe1,0x4a,0x6a,0xe6,0xb3,0xf1,0xd3,0xa5,0x8a,0xb2,0x9a,0xba, 0x84,0xa4,0x63,0xe5,0xc5,0xf3,0xd2,0xc4,0x82,0xaa,0xda,0xe4, 0xf2,0xca,0x83,0xa3,0xa2,0xc3,0xea,0xc2,0xe2,0xe3,0xff,0xff }, { 0,2,2,1,4,1,4,1,3,3,1,0,0,0,0,140, 0x02,0x03,0x01,0x04,0x05,0x12,0x11,0x06, 0x13,0x07,0x08,0x14,0x22,0x09,0x21,0x00,0x23,0x15,0x31,0x32, 0x0a,0x16,0xf0,0x24,0x33,0x41,0x42,0x19,0x17,0x25,0x18,0x51, 0x34,0x43,0x52,0x29,0x35,0x61,0x39,0x71,0x62,0x36,0x53,0x26, 0x38,0x1a,0x37,0x81,0x27,0x91,0x79,0x55,0x45,0x28,0x72,0x59, 0xa1,0xb1,0x44,0x69,0x54,0x58,0xd1,0xfa,0x57,0xe1,0xf1,0xb9, 0x49,0x47,0x63,0x6a,0xf9,0x56,0x46,0xa8,0x2a,0x4a,0x78,0x99, 0x3a,0x75,0x74,0x86,0x65,0xc1,0x76,0xb6,0x96,0xd6,0x89,0x85, 0xc9,0xf5,0x95,0xb4,0xc7,0xf7,0x8a,0x97,0xb8,0x73,0xb7,0xd8, 0xd9,0x87,0xa7,0x7a,0x48,0x82,0x84,0xea,0xf4,0xa6,0xc5,0x5a, 0x94,0xa4,0xc6,0x92,0xc3,0x68,0xb5,0xc8,0xe4,0xe5,0xe6,0xe9, 0xa2,0xa3,0xe3,0xc2,0x66,0x67,0x93,0xaa,0xd4,0xd5,0xe7,0xf8, 0x88,0x9a,0xd7,0x77,0xc4,0x64,0xe2,0x98,0xa5,0xca,0xda,0xe8, 0xf3,0xf6,0xa9,0xb2,0xb3,0xf2,0xd2,0x83,0xba,0xd3,0xff,0xff }, { 0,0,6,2,1,3,3,2,5,1,2,2,8,10,0,117, 0x04,0x05,0x03,0x06,0x02,0x07,0x01,0x08, 0x09,0x12,0x13,0x14,0x11,0x15,0x0a,0x16,0x17,0xf0,0x00,0x22, 0x21,0x18,0x23,0x19,0x24,0x32,0x31,0x25,0x33,0x38,0x37,0x34, 0x35,0x36,0x39,0x79,0x57,0x58,0x59,0x28,0x56,0x78,0x27,0x41, 0x29,0x77,0x26,0x42,0x76,0x99,0x1a,0x55,0x98,0x97,0xf9,0x48, 0x54,0x96,0x89,0x47,0xb7,0x49,0xfa,0x75,0x68,0xb6,0x67,0x69, 0xb9,0xb8,0xd8,0x52,0xd7,0x88,0xb5,0x74,0x51,0x46,0xd9,0xf8, 0x3a,0xd6,0x87,0x45,0x7a,0x95,0xd5,0xf6,0x86,0xb4,0xa9,0x94, 0x53,0x2a,0xa8,0x43,0xf5,0xf7,0xd4,0x66,0xa7,0x5a,0x44,0x8a, 0xc9,0xe8,0xc8,0xe7,0x9a,0x6a,0x73,0x4a,0x61,0xc7,0xf4,0xc6, 0x65,0xe9,0x72,0xe6,0x71,0x91,0x93,0xa6,0xda,0x92,0x85,0x62, 0xf3,0xc5,0xb2,0xa4,0x84,0xba,0x64,0xa5,0xb3,0xd2,0x81,0xe5, 0xd3,0xaa,0xc4,0xca,0xf2,0xb1,0xe4,0xd1,0x83,0x63,0xea,0xc3, 0xe2,0x82,0xf1,0xa3,0xc2,0xa1,0xc1,0xe3,0xa2,0xe1,0xff,0xff } }; if (table > 2) table = 2; huff[0] = make_decoder ( first_tree[table]); huff[1] = make_decoder (second_tree[table]); } /* Return 0 if the image starts with compressed data, 1 if it starts with uncompressed low-order bits. In Canon compressed data, 0xff is always followed by 0x00. */ int CLASS canon_has_lowbits() { uchar test[0x4000]; int ret=1, i; fseek (ifp, 0, SEEK_SET); fread (test, 1, sizeof test, ifp); for (i=540; i < (int) sizeof test - 1; i++) if (test[i] == 0xff) { if (test[i+1]) return 1; ret=0; } return ret; } void CLASS canon_compressed_load_raw() { ushort *pixel, *prow, *huff[2]; int nblocks, lowbits, i, c, row, r, col, save, val; unsigned irow, icol; int block, diffbuf[64], leaf, len, diff, carry=0, pnum=0, base[2]; crw_init_tables (tiff_compress, huff); pixel = (ushort *) calloc (raw_width*8, sizeof *pixel); merror (pixel, "canon_compressed_load_raw()"); lowbits = canon_has_lowbits(); if (!lowbits) maximum = 0x3ff; fseek (ifp, 540 + lowbits*raw_height*raw_width/4, SEEK_SET); zero_after_ff = 1; getbits(-1); for (row=0; row < raw_height; row+=8) { nblocks = MIN (8, raw_height-row) * raw_width >> 6; for (block=0; block < nblocks; block++) { memset (diffbuf, 0, sizeof diffbuf); for (i=0; i < 64; i++ ) { leaf = gethuff(huff[i > 0]); if (leaf == 0 && i) break; if (leaf == 0xff) continue; i += leaf >> 4; len = leaf & 15; if (len == 0) continue; diff = getbits(len); if ((diff & (1 << (len-1))) == 0) diff -= (1 << len) - 1; if (i < 64) diffbuf[i] = diff; } diffbuf[0] += carry; carry = diffbuf[0]; for (i=0; i < 64; i++ ) { if (pnum++ % raw_width == 0) base[0] = base[1] = 512; if ((pixel[(block << 6) + i] = base[i & 1] += diffbuf[i]) >> 10) derror(); } } if (lowbits) { save = ftell(ifp); fseek (ifp, 26 + row*raw_width/4, SEEK_SET); for (prow=pixel, i=0; i < raw_width*2; i++) { c = fgetc(ifp); for (r=0; r < 8; r+=2, prow++) { val = (*prow << 2) + ((c >> r) & 3); if (raw_width == 2672 && val < 512) val += 2; *prow = val; } } fseek (ifp, save, SEEK_SET); } for (r=0; r < 8; r++) { irow = row - top_margin + r; if (irow >= height) continue; for (col=0; col < raw_width; col++) { icol = col - left_margin; c = FC(irow,icol); if (icol < width) BAYER(irow,icol) = pixel[r*raw_width+col]; else if (col > 1 && (unsigned) (col-left_margin+2) > (unsigned) (width+3)) cblack[c] += (cblack[4+c]++,pixel[r*raw_width+col]); } } } free (pixel); FORC(2) free (huff[c]); FORC4 if (cblack[4+c]) cblack[c] /= cblack[4+c]; } /* Not a full implementation of Lossless JPEG, just enough to decode Canon, Kodak and Adobe DNG images. */ struct jhead { int bits, high, wide, clrs, sraw, psv, restart, vpred[6]; ushort *huff[6], *free[4], *row; }; int CLASS ljpeg_start (struct jhead *jh, int info_only) { int c, tag, len; uchar data[0x10000]; const uchar *dp; memset (jh, 0, sizeof *jh); jh->restart = INT_MAX; fread (data, 2, 1, ifp); if (data[1] != 0xd8) return 0; do { fread (data, 2, 2, ifp); tag = data[0] << 8 | data[1]; len = (data[2] << 8 | data[3]) - 2; if (tag <= 0xff00) return 0; fread (data, 1, len, ifp); switch (tag) { case 0xffc3: jh->sraw = ((data[7] >> 4) * (data[7] & 15) - 1) & 3; case 0xffc0: jh->bits = data[0]; jh->high = data[1] << 8 | data[2]; jh->wide = data[3] << 8 | data[4]; jh->clrs = data[5] + jh->sraw; if (len == 9 && !dng_version) getc(ifp); break; case 0xffc4: if (info_only) break; for (dp = data; dp < data+len && (c = *dp++) < 4; ) jh->free[c] = jh->huff[c] = make_decoder_ref (&dp); break; case 0xffda: jh->psv = data[1+data[0]*2]; jh->bits -= data[3+data[0]*2] & 15; break; case 0xffdd: jh->restart = data[0] << 8 | data[1]; } } while (tag != 0xffda); if (info_only) return 1; FORC(5) if (!jh->huff[c+1]) jh->huff[c+1] = jh->huff[c]; if (jh->sraw) { FORC(4) jh->huff[2+c] = jh->huff[1]; FORC(jh->sraw) jh->huff[1+c] = jh->huff[0]; } jh->row = (ushort *) calloc (jh->wide*jh->clrs, 4); merror (jh->row, "ljpeg_start()"); return zero_after_ff = 1; } void CLASS ljpeg_end (struct jhead *jh) { int c; FORC4 if (jh->free[c]) free (jh->free[c]); free (jh->row); } int CLASS ljpeg_diff (ushort *huff) { int len, diff; len = gethuff(huff); if (len == 16 && (!dng_version || dng_version >= 0x1010000)) return -32768; diff = getbits(len); if ((diff & (1 << (len-1))) == 0) diff -= (1 << len) - 1; return diff; } ushort * CLASS ljpeg_row (int jrow, struct jhead *jh) { int col, c, diff, pred, spred=0; ushort mark=0, *row[3]; if (jrow * jh->wide % jh->restart == 0) { FORC(6) jh->vpred[c] = 1 << (jh->bits-1); if (jrow) { fseek (ifp, -2, SEEK_CUR); do mark = (mark << 8) + (c = fgetc(ifp)); while (c != EOF && mark >> 4 != 0xffd); } getbits(-1); } FORC3 row[c] = jh->row + jh->wide*jh->clrs*((jrow+c) & 1); for (col=0; col < jh->wide; col++) FORC(jh->clrs) { diff = ljpeg_diff (jh->huff[c]); if (jh->sraw && c <= jh->sraw && (col | c)) pred = spred; else if (col) pred = row[0][-jh->clrs]; else pred = (jh->vpred[c] += diff) - diff; if (jrow && col) switch (jh->psv) { case 1: break; case 2: pred = row[1][0]; break; case 3: pred = row[1][-jh->clrs]; break; case 4: pred = pred + row[1][0] - row[1][-jh->clrs]; break; case 5: pred = pred + ((row[1][0] - row[1][-jh->clrs]) >> 1); break; case 6: pred = row[1][0] + ((pred - row[1][-jh->clrs]) >> 1); break; case 7: pred = (pred + row[1][0]) >> 1; break; default: pred = 0; } if ((**row = pred + diff) >> jh->bits) derror(); if (c <= jh->sraw) spred = **row; row[0]++; row[1]++; } return row[2]; } void CLASS lossless_jpeg_load_raw() { int jwide, jrow, jcol, val, jidx, c, i, j, row=0, col=0; struct jhead jh; int min=INT_MAX; ushort *rp; if (!ljpeg_start (&jh, 0)) return; jwide = jh.wide * jh.clrs; for (jrow=0; jrow < jh.high; jrow++) { rp = ljpeg_row (jrow, &jh); for (jcol=0; jcol < jwide; jcol++) { val = *rp++; if (jh.bits <= 12) val = curve[val & 0xfff]; if (cr2_slice[0]) { jidx = jrow*jwide + jcol; i = jidx / (cr2_slice[1]*jh.high); if ((j = i >= cr2_slice[0])) i = cr2_slice[0]; jidx -= i * (cr2_slice[1]*jh.high); row = jidx / cr2_slice[1+j]; col = jidx % cr2_slice[1+j] + i*cr2_slice[1]; } if (raw_width == 3984 && (col -= 2) < 0) col += (row--,raw_width); if ((unsigned) (row-top_margin) < height) { c = FC(row-top_margin,col-left_margin); if ((unsigned) (col-left_margin) < width) { BAYER(row-top_margin,col-left_margin) = val; if (min > val) min = val; } else if (col > 1 && (unsigned) (col-left_margin+2) > (unsigned) (width+3)) cblack[c] += (cblack[4+c]++,val); } if (++col >= raw_width) col = (row++,0); } } ljpeg_end (&jh); FORC4 if (cblack[4+c]) cblack[c] /= cblack[4+c]; if (!strcasecmp(make,"KODAK")) black = min; } void CLASS canon_sraw_load_raw() { struct jhead jh; short *rp=0, (*ip)[4]; int jwide, slice, scol, ecol, row, col, jrow=0, jcol=0, pix[3], c; int v[3]={0,0,0}, ver, hue; char *cp; if (!ljpeg_start (&jh, 0)) return; jwide = (jh.wide >>= 1) * jh.clrs; for (ecol=slice=0; slice <= cr2_slice[0]; slice++) { scol = ecol; ecol += cr2_slice[1] * 2 / jh.clrs; if (!cr2_slice[0] || ecol > raw_width-1) ecol = raw_width & -2; for (row=0; row < height; row += (jh.clrs >> 1) - 1) { ip = (short (*)[4]) image + row*width; for (col=scol; col < ecol; col+=2, jcol+=jh.clrs) { if ((jcol %= jwide) == 0) rp = (short *) ljpeg_row (jrow++, &jh); if (col >= width) continue; FORC (jh.clrs-2) ip[col + (c >> 1)*width + (c & 1)][0] = rp[jcol+c]; ip[col][1] = rp[jcol+jh.clrs-2] - 16384; ip[col][2] = rp[jcol+jh.clrs-1] - 16384; } } } for (cp=model2; *cp && !isdigit(*cp); cp++); sscanf (cp, "%d.%d.%d", v, v+1, v+2); ver = (v[0]*1000 + v[1])*1000 + v[2]; hue = (jh.sraw+1) << 2; if (unique_id == 0x80000218 && ver > 1000006 && ver < 3000000) hue = jh.sraw << 1; ip = (short (*)[4]) image; rp = ip[0]; for (row=0; row < height; row++, ip+=width) { if (row & (jh.sraw >> 1)) for (col=0; col < width; col+=2) for (c=1; c < 3; c++) if (row == height-1) ip[col][c] = ip[col-width][c]; else ip[col][c] = (ip[col-width][c] + ip[col+width][c] + 1) >> 1; for (col=1; col < width; col+=2) for (c=1; c < 3; c++) if (col == width-1) ip[col][c] = ip[col-1][c]; else ip[col][c] = (ip[col-1][c] + ip[col+1][c] + 1) >> 1; } for ( ; rp < ip[0]; rp+=4) { if (unique_id < 0x80000218) { pix[0] = rp[0] + rp[2] - 512; pix[2] = rp[0] + rp[1] - 512; pix[1] = rp[0] + ((-778*rp[1] - (rp[2] << 11)) >> 12) - 512; } else { rp[1] = (rp[1] << 2) + hue; rp[2] = (rp[2] << 2) + hue; pix[0] = rp[0] + (( 200*rp[1] + 22929*rp[2]) >> 14); pix[1] = rp[0] + ((-5640*rp[1] - 11751*rp[2]) >> 14); pix[2] = rp[0] + ((29040*rp[1] - 101*rp[2]) >> 14); } FORC3 rp[c] = CLIP(pix[c] * sraw_mul[c] >> 10); } ljpeg_end (&jh); maximum = 0x3fff; } void CLASS adobe_copy_pixel (int row, int col, ushort **rp) { unsigned r, c; r = row -= top_margin; c = col -= left_margin; if (is_raw == 2 && shot_select) (*rp)++; if (filters) { if (fuji_width) { r = row + fuji_width - 1 - (col >> 1); c = row + ((col+1) >> 1); } if (r < height && c < width) BAYER(r,c) = **rp < 0x1000 ? curve[**rp] : **rp; *rp += is_raw; } else { if (r < height && c < width) FORC(tiff_samples) image[row*width+col][c] = (*rp)[c] < 0x1000 ? curve[(*rp)[c]]:(*rp)[c]; *rp += tiff_samples; } if (is_raw == 2 && shot_select) (*rp)--; } void CLASS adobe_dng_load_raw_lj() { unsigned save, trow=0, tcol=0, jwide, jrow, jcol, row, col; struct jhead jh; ushort *rp; while (trow < raw_height) { save = ftell(ifp); if (tile_length < INT_MAX) fseek (ifp, get4(), SEEK_SET); if (!ljpeg_start (&jh, 0)) break; jwide = jh.wide; if (filters) jwide *= jh.clrs; jwide /= is_raw; for (row=col=jrow=0; (int) jrow < jh.high; jrow++) { rp = ljpeg_row (jrow, &jh); for (jcol=0; jcol < jwide; jcol++) { adobe_copy_pixel (trow+row, tcol+col, &rp); if (++col >= tile_width || col >= raw_width) row += 1 + (col = 0); } } fseek (ifp, save+4, SEEK_SET); if ((tcol += tile_width) >= raw_width) trow += tile_length + (tcol = 0); ljpeg_end (&jh); } } void CLASS adobe_dng_load_raw_nc() { ushort *pixel, *rp; unsigned row, col; pixel = (ushort *) calloc (raw_width * tiff_samples, sizeof *pixel); merror (pixel, "adobe_dng_load_raw_nc()"); for (row=0; row < raw_height; row++) { if (tiff_bps == 16) read_shorts (pixel, raw_width * tiff_samples); else { getbits(-1); for (col=0; col < raw_width * tiff_samples; col++) pixel[col] = getbits(tiff_bps); } for (rp=pixel, col=0; col < raw_width; col++) adobe_copy_pixel (row, col, &rp); } free (pixel); } void CLASS pentax_load_raw() { ushort bit[2][15], huff[4097]; int dep, row, col, diff, c, i; ushort vpred[2][2] = {{0,0},{0,0}}, hpred[2]; fseek (ifp, meta_offset, SEEK_SET); dep = (get2() + 12) & 15; fseek (ifp, 12, SEEK_CUR); FORC(dep) bit[0][c] = get2(); FORC(dep) bit[1][c] = fgetc(ifp); FORC(dep) for (i=bit[0][c]; i <= ((bit[0][c]+(4096 >> bit[1][c])-1) & 4095); ) huff[++i] = bit[1][c] << 8 | c; huff[0] = 12; fseek (ifp, data_offset, SEEK_SET); getbits(-1); for (row=0; row < raw_height; row++) for (col=0; col < raw_width; col++) { diff = ljpeg_diff (huff); if (col < 2) hpred[col] = vpred[row & 1][col] += diff; else hpred[col & 1] += diff; if ((unsigned) (row-top_margin) < height && (unsigned) (col-left_margin) < width) BAYER(row-top_margin,col-left_margin) = hpred[col & 1]; if (hpred[col & 1] >> tiff_bps) derror(); } } void CLASS nikon_compressed_load_raw() { static const uchar nikon_tree[][32] = { { 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0, /* 12-bit lossy */ 5,4,3,6,2,7,1,0,8,9,11,10,12 }, { 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0, /* 12-bit lossy after split */ 0x39,0x5a,0x38,0x27,0x16,5,4,3,2,1,0,11,12,12 }, { 0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0, /* 12-bit lossless */ 5,4,6,3,7,2,8,1,9,0,10,11,12 }, { 0,1,4,3,1,1,1,1,1,2,0,0,0,0,0,0, /* 14-bit lossy */ 5,6,4,7,8,3,9,2,1,0,10,11,12,13,14 }, { 0,1,5,1,1,1,1,1,1,1,2,0,0,0,0,0, /* 14-bit lossy after split */ 8,0x5c,0x4b,0x3a,0x29,7,6,5,4,3,2,1,0,13,14 }, { 0,1,4,2,2,3,1,2,0,0,0,0,0,0,0,0, /* 14-bit lossless */ 7,6,8,5,9,4,10,3,11,12,2,0,1,13,14 } }; ushort *huff, ver0, ver1, vpred[2][2], hpred[2], csize; int i, min, max, step=0, tree=0, split=0, row, col, len, shl, diff; fseek (ifp, meta_offset, SEEK_SET); ver0 = fgetc(ifp); ver1 = fgetc(ifp); if (ver0 == 0x49 || ver1 == 0x58) fseek (ifp, 2110, SEEK_CUR); if (ver0 == 0x46) tree = 2; if (tiff_bps == 14) tree += 3; read_shorts (vpred[0], 4); max = 1 << tiff_bps & 0x7fff; if ((csize = get2()) > 1) step = max / (csize-1); if (ver0 == 0x44 && ver1 == 0x20 && step > 0) { for (i=0; i < csize; i++) curve[i*step] = get2(); for (i=0; i < max; i++) curve[i] = ( curve[i-i%step]*(step-i%step) + curve[i-i%step+step]*(i%step) ) / step; fseek (ifp, meta_offset+562, SEEK_SET); split = get2(); } else if (ver0 != 0x46 && csize <= 0x4001) read_shorts (curve, max=csize); while (curve[max-2] == curve[max-1]) max--; huff = make_decoder (nikon_tree[tree]); fseek (ifp, data_offset, SEEK_SET); getbits(-1); for (min=row=0; row < height; row++) { if (split && row == split) { free (huff); huff = make_decoder (nikon_tree[tree+1]); max += (min = 16) << 1; } for (col=0; col < raw_width; col++) { i = gethuff(huff); len = i & 15; shl = i >> 4; diff = ((getbits(len-shl) << 1) + 1) << shl >> 1; if ((diff & (1 << (len-1))) == 0) diff -= (1 << len) - !shl; if (col < 2) hpred[col] = vpred[row & 1][col] += diff; else hpred[col & 1] += diff; if ((ushort)(hpred[col & 1] + min) >= max) derror(); if ((unsigned) (col-left_margin) < width) BAYER(row,col-left_margin) = curve[LIM((short)hpred[col & 1],0,0x3fff)]; } } free (huff); } /* Figure out if a NEF file is compressed. These fancy heuristics are only needed for the D100, thanks to a bug in some cameras that tags all images as "compressed". */ int CLASS nikon_is_compressed() { uchar test[256]; int i; fseek (ifp, data_offset, SEEK_SET); fread (test, 1, 256, ifp); for (i=15; i < 256; i+=16) if (test[i]) return 1; return 0; } /* Returns 1 for a Coolpix 995, 0 for anything else. */ int CLASS nikon_e995() { int i, histo[256]; const uchar often[] = { 0x00, 0x55, 0xaa, 0xff }; memset (histo, 0, sizeof histo); fseek (ifp, -2000, SEEK_END); for (i=0; i < 2000; i++) histo[fgetc(ifp)]++; for (i=0; i < 4; i++) if (histo[often[i]] < 200) return 0; return 1; } /* Returns 1 for a Coolpix 2100, 0 for anything else. */ int CLASS nikon_e2100() { uchar t[12]; int i; fseek (ifp, 0, SEEK_SET); for (i=0; i < 1024; i++) { fread (t, 1, 12, ifp); if (((t[2] & t[4] & t[7] & t[9]) >> 4 & t[1] & t[6] & t[8] & t[11] & 3) != 3) return 0; } return 1; } void CLASS nikon_3700() { int bits, i; uchar dp[24]; static const struct { int bits; char make[12], model[15]; } table[] = { { 0x00, "PENTAX", "Optio 33WR" }, { 0x03, "NIKON", "E3200" }, { 0x32, "NIKON", "E3700" }, { 0x33, "OLYMPUS", "C740UZ" } }; fseek (ifp, 3072, SEEK_SET); fread (dp, 1, 24, ifp); bits = (dp[8] & 3) << 4 | (dp[20] & 3); for (i=0; i < (int) sizeof table / (int) sizeof *table; i++) if (bits == table[i].bits) { strcpy (make, table[i].make ); strcpy (model, table[i].model); } } /* Separates a Minolta DiMAGE Z2 from a Nikon E4300. */ int CLASS minolta_z2() { int i, nz; char tail[424]; fseek (ifp, -sizeof tail, SEEK_END); fread (tail, 1, sizeof tail, ifp); for (nz=i=0; i < (int) sizeof tail; i++) if (tail[i]) nz++; return nz > 20; } /* The Fuji Super CCD is just a Bayer grid rotated 45 degrees. */ void CLASS fuji_load_raw() { ushort *pixel; int wide, row, col, r, c; fseek (ifp, (top_margin*raw_width + left_margin) * 2, SEEK_CUR); wide = fuji_width << !fuji_layout; pixel = (ushort *) calloc (wide, sizeof *pixel); merror (pixel, "fuji_load_raw()"); for (row=0; row < raw_height; row++) { read_shorts (pixel, wide); fseek (ifp, 2*(raw_width - wide), SEEK_CUR); for (col=0; col < wide; col++) { if (fuji_layout) { r = fuji_width - 1 - col + (row >> 1); c = col + ((row+1) >> 1); } else { r = fuji_width - 1 + row - (col >> 1); c = row + ((col+1) >> 1); } BAYER(r,c) = pixel[col]; } } free (pixel); } //void CLASS jpeg_thumb(); void CLASS ppm_thumb() { char *thumb; thumb_length = thumb_width*thumb_height*3; thumb = (char *) malloc (thumb_length); merror (thumb, "ppm_thumb()"); fprintf (ofp, "P6\n%d %d\n255\n", thumb_width, thumb_height); fread (thumb, 1, thumb_length, ifp); fwrite (thumb, 1, thumb_length, ofp); free (thumb); } void CLASS layer_thumb() { unsigned i; int c; char *thumb, map[][4] = { "012","102" }; colors = thumb_misc >> 5 & 7; thumb_length = thumb_width*thumb_height; thumb = (char *) calloc (colors, thumb_length); merror (thumb, "layer_thumb()"); fprintf (ofp, "P%d\n%d %d\n255\n", 5 + (colors >> 1), thumb_width, thumb_height); fread (thumb, thumb_length, colors, ifp); for (i=0; i < thumb_length; i++) FORCC putc (thumb[i+thumb_length*(map[thumb_misc >> 8][c]-'0')], ofp); free (thumb); } void CLASS rollei_thumb() { unsigned i; ushort *thumb; thumb_length = thumb_width * thumb_height; thumb = (ushort *) calloc (thumb_length, 2); merror (thumb, "rollei_thumb()"); fprintf (ofp, "P6\n%d %d\n255\n", thumb_width, thumb_height); read_shorts (thumb, thumb_length); for (i=0; i < thumb_length; i++) { putc (thumb[i] << 3, ofp); putc (thumb[i] >> 5 << 2, ofp); putc (thumb[i] >> 11 << 3, ofp); } free (thumb); } void CLASS rollei_load_raw() { uchar pixel[10]; unsigned iten=0, isix, i, buffer=0, row, col, todo[16]; isix = raw_width * raw_height * 5 / 8; while (fread (pixel, 1, 10, ifp) == 10) { for (i=0; i < 10; i+=2) { todo[i] = iten++; todo[i+1] = pixel[i] << 8 | pixel[i+1]; buffer = pixel[i] >> 2 | buffer << 6; } for ( ; i < 16; i+=2) { todo[i] = isix++; todo[i+1] = buffer >> (14-i)*5; } for (i=0; i < 16; i+=2) { row = todo[i] / raw_width - top_margin; col = todo[i] % raw_width - left_margin; if (row < height && col < width) BAYER(row,col) = (todo[i+1] & 0x3ff); } } maximum = 0x3ff; } int CLASS bayer (unsigned row, unsigned col) { return (row < height && col < width) ? BAYER(row,col) : 0; } void CLASS phase_one_flat_field (int is_float, int nc) { ushort head[8]; unsigned wide, y, x, rend, cend, row, col; int c; float *mrow, num, mult[4]; read_shorts (head, 8); wide = head[2] / head[4]; mrow = (float *) calloc (nc*wide, sizeof *mrow); merror (mrow, "phase_one_flat_field()"); for (y=0; y < head[3] / head[5]; y++) { for (x=0; x < wide; x++) for (c=0; c < nc; c+=2) { num = is_float ? getreal(11) : get2()/32768.0; if (y==0) mrow[c*wide+x] = num; else mrow[(c+1)*wide+x] = (num - mrow[c*wide+x]) / head[5]; } if (y==0) continue; rend = head[1]-top_margin + y*head[5]; for (row = rend-head[5]; row < height && row < rend; row++) { for (x=1; x < wide; x++) { for (c=0; c < nc; c+=2) { mult[c] = mrow[c*wide+x-1]; mult[c+1] = (mrow[c*wide+x] - mult[c]) / head[4]; } cend = head[0]-left_margin + x*head[4]; for (col = cend-head[4]; col < width && col < cend; col++) { c = nc > 2 ? FC(row,col) : 0; if (!(c & 1)) { c = BAYER(row,col) * mult[c]; BAYER(row,col) = LIM(c,0,65535); } for (c=0; c < nc; c+=2) mult[c] += mult[c+1]; } } for (x=0; x < wide; x++) for (c=0; c < nc; c+=2) mrow[c*wide+x] += mrow[(c+1)*wide+x]; } } free (mrow); } void CLASS phase_one_correct() { unsigned entries, tag, data, save, col, row, type; int len, i, j, k, cip, val[4], dev[4], sum, max; int head[9], diff, mindiff=INT_MAX, off_412=0; static const signed char dir[12][2] = { {-1,-1}, {-1,1}, {1,-1}, {1,1}, {-2,0}, {0,-2}, {0,2}, {2,0}, {-2,-2}, {-2,2}, {2,-2}, {2,2} }; float poly[8], num, cfrac, frac, mult[2], *yval[2]; ushort *xval[2]; if (half_size || !meta_length) return; dcraw_message (DCRAW_VERBOSE,_("Phase One correction...\n")); fseek (ifp, meta_offset, SEEK_SET); order = get2(); fseek (ifp, 6, SEEK_CUR); fseek (ifp, meta_offset+get4(), SEEK_SET); entries = get4(); get4(); while (entries--) { tag = get4(); len = get4(); data = get4(); save = ftell(ifp); fseek (ifp, meta_offset+data, SEEK_SET); if (tag == 0x419) { /* Polynomial curve */ for (get4(), i=0; i < 8; i++) poly[i] = getreal(11); poly[3] += (ph1.tag_210 - poly[7]) * poly[6] + 1; for (i=0; i < 0x10000; i++) { num = (poly[5]*i + poly[3])*i + poly[1]; curve[i] = LIM(num,0,65535); } goto apply; /* apply to right half */ } else if (tag == 0x41a) { /* Polynomial curve */ for (i=0; i < 4; i++) poly[i] = getreal(11); for (i=0; i < 0x10000; i++) { for (num=0, j=4; j--; ) num = num * i + poly[j]; curve[i] = LIM(num+i,0,65535); } apply: /* apply to whole image */ for (row=0; row < height; row++) for (col = (tag & 1)*ph1.split_col; col < width; col++) BAYER(row,col) = curve[BAYER(row,col)]; } else if (tag == 0x400) { /* Sensor defects */ while ((len -= 8) >= 0) { col = get2() - left_margin; row = get2() - top_margin; type = get2(); get2(); if (col >= width) continue; if (type == 131) /* Bad column */ for (row=0; row < height; row++) if (FC(row,col) == 1) { for (sum=i=0; i < 4; i++) sum += val[i] = bayer (row+dir[i][0], col+dir[i][1]); for (max=i=0; i < 4; i++) { dev[i] = abs((val[i] << 2) - sum); if (dev[max] < dev[i]) max = i; } BAYER(row,col) = (sum - val[max])/3.0 + 0.5; } else { for (sum=0, i=8; i < 12; i++) sum += bayer (row+dir[i][0], col+dir[i][1]); BAYER(row,col) = 0.5 + sum * 0.0732233 + (bayer(row,col-2) + bayer(row,col+2)) * 0.3535534; } else if (type == 129) { /* Bad pixel */ if (row >= height) continue; j = (FC(row,col) != 1) * 4; for (sum=0, i=j; i < j+8; i++) sum += bayer (row+dir[i][0], col+dir[i][1]); BAYER(row,col) = (sum + 4) >> 3; } } } else if (tag == 0x401) { /* All-color flat fields */ phase_one_flat_field (1, 2); } else if (tag == 0x416 || tag == 0x410) { phase_one_flat_field (0, 2); } else if (tag == 0x40b) { /* Red+blue flat field */ phase_one_flat_field (0, 4); } else if (tag == 0x412) { fseek (ifp, 36, SEEK_CUR); diff = abs (get2() - ph1.tag_21a); if (mindiff > diff) { mindiff = diff; off_412 = ftell(ifp) - 38; } } fseek (ifp, save, SEEK_SET); } if (off_412) { fseek (ifp, off_412, SEEK_SET); for (i=0; i < 9; i++) head[i] = get4() & 0x7fff; yval[0] = (float *) calloc (head[1]*head[3] + head[2]*head[4], 6); merror (yval[0], "phase_one_correct()"); yval[1] = (float *) (yval[0] + head[1]*head[3]); xval[0] = (ushort *) (yval[1] + head[2]*head[4]); xval[1] = (ushort *) (xval[0] + head[1]*head[3]); get2(); for (i=0; i < 2; i++) for (j=0; j < head[i+1]*head[i+3]; j++) yval[i][j] = getreal(11); for (i=0; i < 2; i++) for (j=0; j < head[i+1]*head[i+3]; j++) xval[i][j] = get2(); for (row=0; row < height; row++) for (col=0; col < width; col++) { cfrac = (float) col * head[3] / raw_width; cfrac -= cip = cfrac; num = BAYER(row,col) * 0.5; for (i=cip; i < cip+2; i++) { for (k=j=0; j < head[1]; j++) if (num < xval[0][k = head[1]*i+j]) break; frac = (j == 0 || j == head[1]) ? 0 : (xval[0][k] - num) / (xval[0][k] - xval[0][k-1]); mult[i-cip] = yval[0][k-1] * frac + yval[0][k] * (1-frac); } i = ((mult[0] * (1-cfrac) + mult[1] * cfrac) * (row + top_margin) + num) * 2; BAYER(row,col) = LIM(i,0,65535); } free (yval[0]); } } void CLASS phase_one_load_raw() { int row, col, a, b; ushort *pixel, akey, bkey, mask; fseek (ifp, ph1.key_off, SEEK_SET); akey = get2(); bkey = get2(); mask = ph1.format == 1 ? 0x5555:0x1354; fseek (ifp, data_offset + top_margin*raw_width*2, SEEK_SET); pixel = (ushort *) calloc (raw_width, sizeof *pixel); merror (pixel, "phase_one_load_raw()"); for (row=0; row < height; row++) { read_shorts (pixel, raw_width); for (col=0; col < raw_width; col+=2) { a = pixel[col+0] ^ akey; b = pixel[col+1] ^ bkey; pixel[col+0] = (a & mask) | (b & ~mask); pixel[col+1] = (b & mask) | (a & ~mask); } for (col=0; col < width; col++) BAYER(row,col) = pixel[col+left_margin]; } free (pixel); phase_one_correct(); } unsigned CLASS ph1_bithuff (int nbits, ushort *huff) { // TODO: The following static variables are not thread-safe static UINT64 bitbuf=0; static int vbits=0; unsigned c; if (nbits == -1) return bitbuf = vbits = 0; if (nbits == 0) return 0; if (vbits < nbits) { bitbuf = bitbuf << 32 | get4(); vbits += 32; } c = bitbuf << (64-vbits) >> (64-nbits); if (huff) { vbits -= huff[c] >> 8; return (uchar) huff[c]; } vbits -= nbits; return c; } #define ph1_bits(n) ph1_bithuff(n,0) #define ph1_huff(h) ph1_bithuff(*h,h+1) void CLASS phase_one_load_raw_c() { static const int length[] = { 8,7,6,9,11,10,5,12,14,13 }; int *offset, len[2], pred[2], row, col, i, j; ushort *pixel; short (*black)[2]; pixel = (ushort *) calloc (raw_width + raw_height*4, 2); merror (pixel, "phase_one_load_raw_c()"); offset = (int *) (pixel + raw_width); fseek (ifp, strip_offset, SEEK_SET); for (row=0; row < raw_height; row++) offset[row] = get4(); black = (short (*)[2]) offset + raw_height; fseek (ifp, ph1.black_off, SEEK_SET); if (ph1.black_off) read_shorts ((ushort *) black[0], raw_height*2); for (i=0; i < 256; i++) curve[i] = i*i / 3.969 + 0.5; for (row=0; row < raw_height; row++) { fseek (ifp, data_offset + offset[row], SEEK_SET); ph1_bits(-1); pred[0] = pred[1] = 0; for (col=0; col < raw_width; col++) { if (col >= (raw_width & -8)) len[0] = len[1] = 14; else if ((col & 7) == 0) for (i=0; i < 2; i++) { for (j=0; j < 5 && !ph1_bits(1); j++); if (j--) len[i] = length[j*2 + ph1_bits(1)]; } if ((i = len[col & 1]) == 14) pixel[col] = pred[col & 1] = ph1_bits(16); else pixel[col] = pred[col & 1] += ph1_bits(i) + 1 - (1 << (i - 1)); if (pred[col & 1] >> 16) derror(); if (ph1.format == 5 && pixel[col] < 256) pixel[col] = curve[pixel[col]]; } if ((unsigned) (row-top_margin) < height) for (col=0; col < width; col++) { i = (pixel[col+left_margin] << 2) - ph1.black + black[row][col >= ph1.split_col]; if (i > 0) BAYER(row-top_margin,col) = i; } } free (pixel); phase_one_correct(); maximum = 0xfffc - ph1.black; } void CLASS hasselblad_load_raw() { struct jhead jh; int row, col, pred[2], len[2], diff, c; if (!ljpeg_start (&jh, 0)) return; order = 0x4949; ph1_bits(-1); for (row=-top_margin; row < height; row++) { pred[0] = pred[1] = 0x8000; for (col=-left_margin; col < raw_width-left_margin; col+=2) { FORC(2) len[c] = ph1_huff(jh.huff[0]); FORC(2) { diff = ph1_bits(len[c]); if ((diff & (1 << (len[c]-1))) == 0) diff -= (1 << len[c]) - 1; if (diff == 65535) diff = -32768; pred[c] += diff; if (row >= 0 && (unsigned)(col+c) < width) BAYER(row,col+c) = pred[c]; } } } ljpeg_end (&jh); maximum = 0xffff; } void CLASS leaf_hdr_load_raw() { ushort *pixel; unsigned tile=0, r, c, row, col; pixel = (ushort *) calloc (raw_width, sizeof *pixel); merror (pixel, "leaf_hdr_load_raw()"); FORC(tiff_samples) for (r=0; r < raw_height; r++) { if (r % tile_length == 0) { fseek (ifp, data_offset + 4*tile++, SEEK_SET); fseek (ifp, get4() + 2*left_margin, SEEK_SET); } if (filters && c != shot_select) continue; read_shorts (pixel, raw_width); if ((row = r - top_margin) >= height) continue; for (col=0; col < width; col++) if (filters) BAYER(row,col) = pixel[col]; else image[row*width+col][c] = pixel[col]; } free (pixel); if (!filters) { maximum = 0xffff; raw_color = 1; } } //void CLASS unpacked_load_raw(); void CLASS sinar_4shot_load_raw() { ushort *pixel; unsigned shot, row, col, r, c; if ((shot = shot_select) || half_size) { if (shot) shot--; if (shot > 3) shot = 3; fseek (ifp, data_offset + shot*4, SEEK_SET); fseek (ifp, get4(), SEEK_SET); unpacked_load_raw(); return; } free (image); image = (ushort (*)[4]) calloc ((iheight=height)*(iwidth=width), sizeof *image); merror (image, "sinar_4shot_load_raw()"); pixel = (ushort *) calloc (raw_width, sizeof *pixel); merror (pixel, "sinar_4shot_load_raw()"); for (shot=0; shot < 4; shot++) { fseek (ifp, data_offset + shot*4, SEEK_SET); fseek (ifp, get4(), SEEK_SET); for (row=0; row < raw_height; row++) { read_shorts (pixel, raw_width); if ((r = row-top_margin - (shot >> 1 & 1)) >= height) continue; for (col=0; col < raw_width; col++) { if ((c = col-left_margin - (shot & 1)) >= width) continue; image[r*width+c][FC(row,col)] = pixel[col]; } } } free (pixel); shrink = filters = 0; } void CLASS imacon_full_load_raw() { int row, col; for (row=0; row < height; row++) for (col=0; col < width; col++) read_shorts (image[row*width+col], 3); } void CLASS packed_load_raw() { int vbits=0, bwide, pwide, rbits, bite, half, irow, row, col, val, i; UINT64 bitbuf=0; if ((ushort)(raw_width * 8) >= width * tiff_bps) /* Is raw_width in bytes? */ pwide = (bwide = raw_width) * 8 / tiff_bps; else bwide = (pwide = raw_width) * tiff_bps / 8; rbits = bwide * 8 - pwide * tiff_bps; if (load_flags & 1) bwide = bwide * 16 / 15; fseek (ifp, top_margin*bwide, SEEK_CUR); bite = 8 + (load_flags & 24); half = (height+1) >> 1; for (irow=0; irow < height; irow++) { row = irow; if (load_flags & 2 && (row = irow % half * 2 + irow / half) == 1 && load_flags & 4) { if (vbits=0, tiff_compress) fseek (ifp, data_offset - (-half*bwide & -2048), SEEK_SET); else { fseek (ifp, 0, SEEK_END); fseek (ifp, ftell(ifp) >> 3 << 2, SEEK_SET); } } for (col=0; col < pwide; col++) { for (vbits -= tiff_bps; vbits < 0; vbits += bite) { bitbuf <<= bite; for (i=0; i < bite; i+=8) bitbuf |= (unsigned) (fgetc(ifp) << i); } val = bitbuf << (64-tiff_bps-vbits) >> (64-tiff_bps); i = (col ^ (bite == 24)) - left_margin; if ((unsigned) i < width) BAYER(row,i) = val; else if (load_flags & 32) black += val; if (load_flags & 1 && (col % 10) == 9 && fgetc(ifp) && col < width+left_margin) derror(); } vbits -= rbits; } if (load_flags & 32 && pwide > width) black /= (pwide - width) * height; } void CLASS unpacked_load_raw() { ushort *pixel; int row, col, bits=0; while (1 << ++bits < (int) maximum); fseek (ifp, (top_margin*raw_width + left_margin) * 2, SEEK_CUR); pixel = (ushort *) calloc (width, sizeof *pixel); merror (pixel, "unpacked_load_raw()"); for (row=0; row < height; row++) { read_shorts (pixel, width); fseek (ifp, 2*(raw_width - width), SEEK_CUR); for (col=0; col < width; col++) if ((BAYER2(row,col) = pixel[col] >> load_flags) >> bits) derror(); } free (pixel); } void CLASS nokia_load_raw() { uchar *data, *dp; ushort *pixel, *pix; int rev, dwide, row, c; rev = 3 * (order == 0x4949); dwide = raw_width * 5 / 4; data = (uchar *) malloc (dwide + raw_width*2); merror (data, "nokia_load_raw()"); pixel = (ushort *) (data + dwide); for (row=0; row < raw_height; row++) { if ((int) fread (data+dwide, 1, dwide, ifp) < dwide) derror(); FORC(dwide) data[c] = data[dwide+(c ^ rev)]; for (dp=data, pix=pixel; pix < pixel+raw_width; dp+=5, pix+=4) FORC4 pix[c] = (dp[c] << 2) | (dp[4] >> (c << 1) & 3); if (row < top_margin) FORC(width) black += pixel[c]; else FORC(width) BAYER(row-top_margin,c) = pixel[c]; } free (data); if (top_margin) black /= top_margin * width; maximum = 0x3ff; } unsigned CLASS pana_bits (int nbits) { static uchar buf[0x4000]; static int vbits; int byte; if (!nbits) return vbits=0; if (!vbits) { fread (buf+load_flags, 1, 0x4000-load_flags, ifp); fread (buf, 1, load_flags, ifp); } vbits = (vbits - nbits) & 0x1ffff; byte = vbits >> 3 ^ 0x3ff0; return (buf[byte] | buf[byte+1] << 8) >> (vbits & 7) & ~(-1 << nbits); } void CLASS panasonic_load_raw() { int row, col, i, j, sh=0, pred[2], nonz[2]; pana_bits(0); for (row=0; row < height; row++) for (col=0; col < raw_width; col++) { if ((i = col % 14) == 0) pred[0] = pred[1] = nonz[0] = nonz[1] = 0; if (i % 3 == 2) sh = 4 >> (3 - pana_bits(2)); if (nonz[i & 1]) { if ((j = pana_bits(8))) { if ((pred[i & 1] -= 0x80 << sh) < 0 || sh == 4) pred[i & 1] &= ~(-1 << sh); pred[i & 1] += j << sh; } } else if ((nonz[i & 1] = pana_bits(8)) || i > 11) pred[i & 1] = nonz[i & 1] << 4 | pana_bits(4); if (col < width) if ((BAYER(row,col) = pred[col & 1]) > 4098) derror(); } } void CLASS olympus_load_raw() { ushort huff[4096]; int row, col, nbits, sign, low, high, i, c, w, n, nw; int acarry[2][3], *carry, pred, diff; huff[n=0] = 0xc0c; for (i=12; i--; ) FORC(2048 >> i) huff[++n] = (i+1) << 8 | i; fseek (ifp, 7, SEEK_CUR); getbits(-1); for (row=0; row < height; row++) { memset (acarry, 0, sizeof acarry); for (col=0; col < raw_width; col++) { carry = acarry[col & 1]; i = 2 * (carry[2] < 3); for (nbits=2+i; (ushort) carry[0] >> (nbits+i); nbits++); low = (sign = getbits(3)) & 3; sign = sign << 29 >> 31; if ((high = getbithuff(12,huff)) == 12) high = getbits(16-nbits) >> 1; carry[0] = (high << nbits) | getbits(nbits); diff = (carry[0] ^ sign) + carry[1]; carry[1] = (diff*3 + carry[1]) >> 5; carry[2] = carry[0] > 16 ? 0 : carry[2]+1; if (col >= width) continue; if (row < 2 && col < 2) pred = 0; else if (row < 2) pred = BAYER(row,col-2); else if (col < 2) pred = BAYER(row-2,col); else { w = BAYER(row,col-2); n = BAYER(row-2,col); nw = BAYER(row-2,col-2); if ((w < nw && nw < n) || (n < nw && nw < w)) { if (ABS(w-nw) > 32 || ABS(n-nw) > 32) pred = w + n - nw; else pred = (w + n) >> 1; } else pred = ABS(w-nw) > ABS(n-nw) ? w : n; } if ((BAYER(row,col) = pred + ((diff << 2) | low)) >> 12) derror(); } } } void CLASS minolta_rd175_load_raw() { uchar pixel[768]; unsigned irow, box, row, col; for (irow=0; irow < 1481; irow++) { if (fread (pixel, 1, 768, ifp) < 768) derror(); box = irow / 82; row = irow % 82 * 12 + ((box < 12) ? box | 1 : (box-12)*2); switch (irow) { case 1477: case 1479: continue; case 1476: row = 984; break; case 1480: row = 985; break; case 1478: row = 985; box = 1; } if ((box < 12) && (box & 1)) { for (col=0; col < 1533; col++, row ^= 1) if (col != 1) BAYER(row,col) = (col+1) & 2 ? pixel[col/2-1] + pixel[col/2+1] : pixel[col/2] << 1; BAYER(row,1) = pixel[1] << 1; BAYER(row,1533) = pixel[765] << 1; } else for (col=row & 1; col < 1534; col+=2) BAYER(row,col) = pixel[col/2] << 1; } maximum = 0xff << 1; } void CLASS quicktake_100_load_raw() { uchar pixel[484][644]; static const short gstep[16] = { -89,-60,-44,-32,-22,-15,-8,-2,2,8,15,22,32,44,60,89 }; static const short rstep[6][4] = { { -3,-1,1,3 }, { -5,-1,1,5 }, { -8,-2,2,8 }, { -13,-3,3,13 }, { -19,-4,4,19 }, { -28,-6,6,28 } }; static const short curve[256] = { 0,1,2,3,4,5,6,7,8,9,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27, 28,29,30,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,53, 54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,74,75,76,77,78, 79,80,81,82,83,84,86,88,90,92,94,97,99,101,103,105,107,110,112,114,116, 118,120,123,125,127,129,131,134,136,138,140,142,144,147,149,151,153,155, 158,160,162,164,166,168,171,173,175,177,179,181,184,186,188,190,192,195, 197,199,201,203,205,208,210,212,214,216,218,221,223,226,230,235,239,244, 248,252,257,261,265,270,274,278,283,287,291,296,300,305,309,313,318,322, 326,331,335,339,344,348,352,357,361,365,370,374,379,383,387,392,396,400, 405,409,413,418,422,426,431,435,440,444,448,453,457,461,466,470,474,479, 483,487,492,496,500,508,519,531,542,553,564,575,587,598,609,620,631,643, 654,665,676,687,698,710,721,732,743,754,766,777,788,799,810,822,833,844, 855,866,878,889,900,911,922,933,945,956,967,978,989,1001,1012,1023 }; int rb, row, col, sharp, val=0; getbits(-1); memset (pixel, 0x80, sizeof pixel); for (row=2; row < height+2; row++) { for (col=2+(row & 1); col < width+2; col+=2) { val = ((pixel[row-1][col-1] + 2*pixel[row-1][col+1] + pixel[row][col-2]) >> 2) + gstep[getbits(4)]; pixel[row][col] = val = LIM(val,0,255); if (col < 4) pixel[row][col-2] = pixel[row+1][~row & 1] = val; if (row == 2) pixel[row-1][col+1] = pixel[row-1][col+3] = val; } pixel[row][col] = val; } for (rb=0; rb < 2; rb++) for (row=2+rb; row < height+2; row+=2) for (col=3-(row & 1); col < width+2; col+=2) { if (row < 4 || col < 4) sharp = 2; else { val = ABS(pixel[row-2][col] - pixel[row][col-2]) + ABS(pixel[row-2][col] - pixel[row-2][col-2]) + ABS(pixel[row][col-2] - pixel[row-2][col-2]); sharp = val < 4 ? 0 : val < 8 ? 1 : val < 16 ? 2 : val < 32 ? 3 : val < 48 ? 4 : 5; } val = ((pixel[row-2][col] + pixel[row][col-2]) >> 1) + rstep[sharp][getbits(2)]; pixel[row][col] = val = LIM(val,0,255); if (row < 4) pixel[row-2][col+2] = val; if (col < 4) pixel[row+2][col-2] = val; } for (row=2; row < height+2; row++) for (col=3-(row & 1); col < width+2; col+=2) { val = ((pixel[row][col-1] + (pixel[row][col] << 2) + pixel[row][col+1]) >> 1) - 0x100; pixel[row][col] = LIM(val,0,255); } for (row=0; row < height; row++) for (col=0; col < width; col++) BAYER(row,col) = curve[pixel[row+2][col+2]]; maximum = 0x3ff; } #define radc_token(tree) ((signed char) getbithuff(8,huff[tree])) #define FORYX for (y=1; y < 3; y++) for (x=col+1; x >= col; x--) #define PREDICTOR (c ? (buf[c][y-1][x] + buf[c][y][x+1]) / 2 \ : (buf[c][y-1][x+1] + 2*buf[c][y-1][x] + buf[c][y][x+1]) / 4) void CLASS kodak_radc_load_raw() { static const char src[] = { 1,1, 2,3, 3,4, 4,2, 5,7, 6,5, 7,6, 7,8, 1,0, 2,1, 3,3, 4,4, 5,2, 6,7, 7,6, 8,5, 8,8, 2,1, 2,3, 3,0, 3,2, 3,4, 4,6, 5,5, 6,7, 6,8, 2,0, 2,1, 2,3, 3,2, 4,4, 5,6, 6,7, 7,5, 7,8, 2,1, 2,4, 3,0, 3,2, 3,3, 4,7, 5,5, 6,6, 6,8, 2,3, 3,1, 3,2, 3,4, 3,5, 3,6, 4,7, 5,0, 5,8, 2,3, 2,6, 3,0, 3,1, 4,4, 4,5, 4,7, 5,2, 5,8, 2,4, 2,7, 3,3, 3,6, 4,1, 4,2, 4,5, 5,0, 5,8, 2,6, 3,1, 3,3, 3,5, 3,7, 3,8, 4,0, 5,2, 5,4, 2,0, 2,1, 3,2, 3,3, 4,4, 4,5, 5,6, 5,7, 4,8, 1,0, 2,2, 2,-2, 1,-3, 1,3, 2,-17, 2,-5, 2,5, 2,17, 2,-7, 2,2, 2,9, 2,18, 2,-18, 2,-9, 2,-2, 2,7, 2,-28, 2,28, 3,-49, 3,-9, 3,9, 4,49, 5,-79, 5,79, 2,-1, 2,13, 2,26, 3,39, 4,-16, 5,55, 6,-37, 6,76, 2,-26, 2,-13, 2,1, 3,-39, 4,16, 5,-55, 6,-76, 6,37 }; ushort huff[19][256]; int row, col, tree, nreps, rep, step, i, c, s, r, x, y, val; short last[3] = { 16,16,16 }, mul[3], buf[3][3][386]; static const ushort pt[] = { 0,0, 1280,1344, 2320,3616, 3328,8000, 4095,16383, 65535,16383 }; for (i=2; i < 12; i+=2) for (c=pt[i-2]; c <= pt[i]; c++) curve[c] = (float) (c-pt[i-2]) / (pt[i]-pt[i-2]) * (pt[i+1]-pt[i-1]) + pt[i-1] + 0.5; for (s=i=0; i < (int) sizeof src; i+=2) FORC(256 >> src[i]) huff[0][s++] = src[i] << 8 | (uchar) src[i+1]; s = kodak_cbpp == 243 ? 2 : 3; FORC(256) huff[18][c] = (8-s) << 8 | c >> s << s | 1 << (s-1); getbits(-1); for (i=0; i < (int) sizeof(buf)/(int) sizeof(short); i++) buf[0][0][i] = 2048; for (row=0; row < height; row+=4) { FORC3 mul[c] = getbits(6); FORC3 { val = ((0x1000000/last[c] + 0x7ff) >> 12) * mul[c]; s = val > 65564 ? 10:12; x = ~(-1 << (s-1)); val <<= 12-s; for (i=0; i < (int) sizeof(buf[0])/(int) sizeof(short); i++) buf[c][0][i] = (buf[c][0][i] * val + x) >> s; last[c] = mul[c]; for (r=0; r <= !c; r++) { buf[c][1][width/2] = buf[c][2][width/2] = mul[c] << 7; for (tree=1, col=width/2; col > 0; ) { if ((tree = radc_token(tree))) { col -= 2; if (tree == 8) FORYX buf[c][y][x] = (uchar) radc_token(18) * mul[c]; else FORYX buf[c][y][x] = radc_token(tree+10) * 16 + PREDICTOR; } else do { nreps = (col > 2) ? radc_token(9) + 1 : 1; for (rep=0; rep < 8 && rep < nreps && col > 0; rep++) { col -= 2; FORYX buf[c][y][x] = PREDICTOR; if (rep & 1) { step = radc_token(10) << 4; FORYX buf[c][y][x] += step; } } } while (nreps == 9); } for (y=0; y < 2; y++) for (x=0; x < width/2; x++) { val = (buf[c][y+1][x] << 4) / mul[c]; if (val < 0) val = 0; if (c) BAYER(row+y*2+c-1,x*2+2-c) = val; else BAYER(row+r*2+y,x*2+y) = val; } memcpy (buf[c][0]+!c, buf[c][2], sizeof buf[c][0]-2*!c); } } for (y=row; y < row+4; y++) for (x=0; x < width; x++) if ((x+y) & 1) { r = x ? x-1 : x+1; s = x+1 < width ? x+1 : x-1; val = (BAYER(y,x)-2048)*2 + (BAYER(y,r)+BAYER(y,s))/2; if (val < 0) val = 0; BAYER(y,x) = val; } } for (i=0; i < iheight*iwidth*4; i++) image[0][i] = curve[image[0][i]]; maximum = 0x3fff; } #undef FORYX #undef PREDICTOR #ifndef HAVE_LIBJPEG void CLASS kodak_jpeg_load_raw() {} #else METHODDEF(boolean) fill_input_buffer (j_decompress_ptr cinfo) { // TODO: The following static variable is not thread-safe static uchar jpeg_buffer[4096]; size_t nbytes; DCRaw *d = (DCRaw*)cinfo->client_data; nbytes = fread (jpeg_buffer, 1, 4096, d->ifp); swab ((const char *)jpeg_buffer, (char *)jpeg_buffer, nbytes); /*mingw UF*/ cinfo->src->next_input_byte = jpeg_buffer; cinfo->src->bytes_in_buffer = nbytes; return TRUE; } void CLASS kodak_jpeg_load_raw() { struct jpeg_decompress_struct cinfo; struct jpeg_error_mgr jerr; JSAMPARRAY buf; JSAMPLE (*pixel)[3]; int row, col; cinfo.err = jpeg_std_error (&jerr); cinfo.client_data = this; jpeg_create_decompress (&cinfo); jpeg_stdio_src (&cinfo, ifp); cinfo.src->fill_input_buffer = fill_input_buffer; jpeg_read_header (&cinfo, TRUE); jpeg_start_decompress (&cinfo); if ((cinfo.output_width != width ) || (cinfo.output_height*2 != height ) || (cinfo.output_components != 3 )) { dcraw_message (DCRAW_ERROR,_("%s: incorrect JPEG dimensions\n"), ifname_display); jpeg_destroy_decompress (&cinfo); longjmp (failure, 3); } buf = (*cinfo.mem->alloc_sarray) ((j_common_ptr) &cinfo, JPOOL_IMAGE, width*3, 1); while (cinfo.output_scanline < cinfo.output_height) { row = cinfo.output_scanline * 2; jpeg_read_scanlines (&cinfo, buf, 1); pixel = (JSAMPLE (*)[3]) buf[0]; for (col=0; col < width; col+=2) { BAYER(row+0,col+0) = pixel[col+0][1] << 1; BAYER(row+1,col+1) = pixel[col+1][1] << 1; BAYER(row+0,col+1) = pixel[col][0] + pixel[col+1][0]; BAYER(row+1,col+0) = pixel[col][2] + pixel[col+1][2]; } } jpeg_finish_decompress (&cinfo); jpeg_destroy_decompress (&cinfo); maximum = 0xff << 1; } #endif void CLASS kodak_dc120_load_raw() { static const int mul[4] = { 162, 192, 187, 92 }; static const int add[4] = { 0, 636, 424, 212 }; uchar pixel[848]; int row, shift, col; for (row=0; row < height; row++) { if (fread (pixel, 1, 848, ifp) < 848) derror(); shift = row * mul[row & 3] + add[row & 3]; for (col=0; col < width; col++) BAYER(row,col) = (ushort) pixel[(col + shift) % 848]; } maximum = 0xff; } void CLASS eight_bit_load_raw() { uchar *pixel; unsigned row, col, val, lblack=0; pixel = (uchar *) calloc (raw_width, sizeof *pixel); merror (pixel, "eight_bit_load_raw()"); fseek (ifp, top_margin*raw_width, SEEK_CUR); for (row=0; row < height; row++) { if (fread (pixel, 1, raw_width, ifp) < raw_width) derror(); for (col=0; col < raw_width; col++) { val = curve[pixel[col]]; if ((unsigned) (col-left_margin) < width) BAYER(row,col-left_margin) = val; else lblack += val; } } free (pixel); if (raw_width > width+1) black = lblack / ((raw_width - width) * height); if (!strncmp(model,"DC2",3)) black = 0; maximum = curve[0xff]; } void CLASS kodak_yrgb_load_raw() { uchar *pixel; int row, col, y, cb, cr, rgb[3], c; pixel = (uchar *) calloc (raw_width, 3*sizeof *pixel); merror (pixel, "kodak_yrgb_load_raw()"); for (row=0; row < height; row++) { if (~row & 1) if (fread (pixel, raw_width, 3, ifp) < 3) derror(); for (col=0; col < raw_width; col++) { y = pixel[width*2*(row & 1) + col]; cb = pixel[width + (col & -2)] - 128; cr = pixel[width + (col & -2)+1] - 128; rgb[1] = y-((cb + cr + 2) >> 2); rgb[2] = rgb[1] + cb; rgb[0] = rgb[1] + cr; FORC3 image[row*width+col][c] = curve[LIM(rgb[c],0,255)]; } } free (pixel); maximum = curve[0xff]; } void CLASS kodak_262_load_raw() { static const uchar kodak_tree[2][26] = { { 0,1,5,1,1,2,0,0,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9 }, { 0,3,1,1,1,1,1,2,0,0,0,0,0,0,0,0, 0,1,2,3,4,5,6,7,8,9 } }; ushort *huff[2]; uchar *pixel; int *strip, ns, c, row, col, chess, pi=0, pi1, pi2, pred, val; FORC(2) huff[c] = make_decoder (kodak_tree[c]); ns = (raw_height+63) >> 5; pixel = (uchar *) malloc (raw_width*32 + ns*4); merror (pixel, "kodak_262_load_raw()"); strip = (int *) (pixel + raw_width*32); order = 0x4d4d; FORC(ns) strip[c] = get4(); for (row=0; row < raw_height; row++) { if ((row & 31) == 0) { fseek (ifp, strip[row >> 5], SEEK_SET); getbits(-1); pi = 0; } for (col=0; col < raw_width; col++) { chess = (row + col) & 1; pi1 = chess ? pi-2 : pi-raw_width-1; pi2 = chess ? pi-2*raw_width : pi-raw_width+1; if (col <= chess) pi1 = -1; if (pi1 < 0) pi1 = pi2; if (pi2 < 0) pi2 = pi1; if (pi1 < 0 && col > 1) pi1 = pi2 = pi-2; pred = (pi1 < 0) ? 0 : (pixel[pi1] + pixel[pi2]) >> 1; pixel[pi] = val = pred + ljpeg_diff (huff[chess]); if (val >> 8) derror(); val = curve[pixel[pi++]]; if ((unsigned) (col-left_margin) < width) BAYER(row,col-left_margin) = val; else black += val; } } free (pixel); FORC(2) free (huff[c]); if (raw_width > width) black /= (raw_width - width) * height; } int CLASS kodak_65000_decode (short *out, int bsize) { uchar c, blen[768]; ushort raw[6]; INT64 bitbuf=0; int save, bits=0, i, j, len, diff; save = ftell(ifp); bsize = (bsize + 3) & -4; for (i=0; i < bsize; i+=2) { c = fgetc(ifp); if ((blen[i ] = c & 15) > 12 || (blen[i+1] = c >> 4) > 12 ) { fseek (ifp, save, SEEK_SET); for (i=0; i < bsize; i+=8) { read_shorts (raw, 6); out[i ] = raw[0] >> 12 << 8 | raw[2] >> 12 << 4 | raw[4] >> 12; out[i+1] = raw[1] >> 12 << 8 | raw[3] >> 12 << 4 | raw[5] >> 12; for (j=0; j < 6; j++) out[i+2+j] = raw[j] & 0xfff; } return 1; } } if ((bsize & 7) == 4) { bitbuf = fgetc(ifp) << 8; bitbuf += fgetc(ifp); bits = 16; } for (i=0; i < bsize; i++) { len = blen[i]; if (bits < len) { for (j=0; j < 32; j+=8) bitbuf += (INT64) fgetc(ifp) << (bits+(j^8)); bits += 32; } diff = bitbuf & (0xffff >> (16-len)); bitbuf >>= len; bits -= len; if ((diff & (1 << (len-1))) == 0) diff -= (1 << len) - 1; out[i] = diff; } return 0; } void CLASS kodak_65000_load_raw() { short buf[256]; int row, col, len, pred[2], ret, i; for (row=0; row < height; row++) for (col=0; col < width; col+=256) { pred[0] = pred[1] = 0; len = MIN (256, width-col); ret = kodak_65000_decode (buf, len); for (i=0; i < len; i++) if ((BAYER(row,col+i) = curve[ret ? buf[i] : (pred[i & 1] += buf[i])]) >> 12) derror(); } } void CLASS kodak_ycbcr_load_raw() { short buf[384], *bp; int row, col, len, c, i, j, k, y[2][2], cb, cr, rgb[3]; ushort *ip; for (row=0; row < height; row+=2) for (col=0; col < width; col+=128) { len = MIN (128, width-col); kodak_65000_decode (buf, len*3); y[0][1] = y[1][1] = cb = cr = 0; for (bp=buf, i=0; i < len; i+=2, bp+=2) { cb += bp[4]; cr += bp[5]; rgb[1] = -((cb + cr + 2) >> 2); rgb[2] = rgb[1] + cb; rgb[0] = rgb[1] + cr; for (j=0; j < 2; j++) for (k=0; k < 2; k++) { if ((y[j][k] = y[j][k^1] + *bp++) >> 10) derror(); ip = image[(row+j)*width + col+i+k]; FORC3 ip[c] = curve[LIM(y[j][k]+rgb[c], 0, 0xfff)]; } } } } void CLASS kodak_rgb_load_raw() { short buf[768], *bp; int row, col, len, c, i, rgb[3]; ushort *ip=image[0]; for (row=0; row < height; row++) for (col=0; col < width; col+=256) { len = MIN (256, width-col); kodak_65000_decode (buf, len*3); memset (rgb, 0, sizeof rgb); for (bp=buf, i=0; i < len; i++, ip+=4) FORC3 if ((ip[c] = rgb[c] += *bp++) >> 12) derror(); } } void CLASS kodak_thumb_load_raw() { int row, col; colors = thumb_misc >> 5; for (row=0; row < height; row++) for (col=0; col < width; col++) read_shorts (image[row*width+col], colors); maximum = (1 << (thumb_misc & 31)) - 1; } void CLASS sony_decrypt (unsigned *data, int len, int start, int key) { // TODO: The following static variables are not thread-safe static unsigned pad[128], p; if (start) { for (p=0; p < 4; p++) pad[p] = key = key * 48828125 + 1; pad[3] = pad[3] << 1 | (pad[0]^pad[2]) >> 31; for (p=4; p < 127; p++) pad[p] = (pad[p-4]^pad[p-2]) << 1 | (pad[p-3]^pad[p-1]) >> 31; for (p=0; p < 127; p++) pad[p] = htonl(pad[p]); } while (len--) *data++ ^= pad[p++ & 127] = pad[(p+1) & 127] ^ pad[(p+65) & 127]; } void CLASS sony_load_raw() { uchar head[40]; ushort *pixel; unsigned i, key, row, col; fseek (ifp, 200896, SEEK_SET); fseek (ifp, (unsigned) fgetc(ifp)*4 - 1, SEEK_CUR); order = 0x4d4d; key = get4(); fseek (ifp, 164600, SEEK_SET); fread (head, 1, 40, ifp); sony_decrypt ((unsigned int *) head, 10, 1, key); for (i=26; i-- > 22; ) key = key << 8 | head[i]; fseek (ifp, data_offset, SEEK_SET); pixel = (ushort *) calloc (raw_width, sizeof *pixel); merror (pixel, "sony_load_raw()"); for (row=0; row < height; row++) { if (fread (pixel, 2, raw_width, ifp) < raw_width) derror(); sony_decrypt ((unsigned int *) pixel, raw_width/2, !row, key); for (col=9; col < left_margin; col++) black += ntohs(pixel[col]); for (col=0; col < width; col++) if ((BAYER(row,col) = ntohs(pixel[col+left_margin])) >> 14) derror(); } free (pixel); if (left_margin > 9) black /= (left_margin-9) * height; maximum = 0x3ff0; } void CLASS sony_arw_load_raw() { ushort huff[32768]; static const ushort tab[18] = { 0xf11,0xf10,0xe0f,0xd0e,0xc0d,0xb0c,0xa0b,0x90a,0x809, 0x708,0x607,0x506,0x405,0x304,0x303,0x300,0x202,0x201 }; int i, c, n, col, row, len, diff, sum=0; for (n=i=0; i < 18; i++) FORC(32768 >> (tab[i] >> 8)) huff[n++] = tab[i]; getbits(-1); for (col = raw_width; col--; ) for (row=0; row < raw_height+1; row+=2) { if (row == raw_height) row = 1; len = getbithuff(15,huff); diff = getbits(len); if ((diff & (1 << (len-1))) == 0) diff -= (1 << len) - 1; if ((sum += diff) >> 12) derror(); if (row < height) BAYER(row,col) = sum; } } void CLASS sony_arw2_load_raw() { uchar *data, *dp; ushort pix[16]; int row, col, val, max, min, imax, imin, sh, bit, i; data = (uchar *) malloc (raw_width); merror (data, "sony_arw2_load_raw()"); for (row=0; row < height; row++) { fread (data, 1, raw_width, ifp); for (dp=data, col=0; col < width-30; dp+=16) { max = 0x7ff & (val = sget4(dp)); min = 0x7ff & val >> 11; imax = 0x0f & val >> 22; imin = 0x0f & val >> 26; for (sh=0; sh < 4 && 0x80 << sh <= max-min; sh++); for (bit=30, i=0; i < 16; i++) if (i == imax) pix[i] = max; else if (i == imin) pix[i] = min; else { pix[i] = ((sget2(dp+(bit >> 3)) >> (bit & 7) & 0x7f) << sh) + min; if (pix[i] > 0x7ff) pix[i] = 0x7ff; bit += 7; } for (i=0; i < 16; i++, col+=2) BAYER(row,col) = curve[pix[i] << 1] >> 2; col -= col & 1 ? 1:31; } } free (data); } #define HOLE(row) ((holes >> (((row) - raw_height) & 7)) & 1) /* Kudos to Rich Taylor for figuring out SMaL's compression algorithm. */ void CLASS smal_decode_segment (unsigned seg[2][2], int holes) { uchar hist[3][13] = { { 7, 7, 0, 0, 63, 55, 47, 39, 31, 23, 15, 7, 0 }, { 7, 7, 0, 0, 63, 55, 47, 39, 31, 23, 15, 7, 0 }, { 3, 3, 0, 0, 63, 47, 31, 15, 0 } }; int low, high=0xff, carry=0, nbits=8; int s, count, bin, next, i, sym[3]; uchar diff, pred[]={0,0}; ushort data=0, range=0; unsigned pix, row, col; fseek (ifp, seg[0][1]+1, SEEK_SET); getbits(-1); for (pix=seg[0][0]; pix < seg[1][0]; pix++) { for (s=0; s < 3; s++) { data = data << nbits | getbits(nbits); if (carry < 0) carry = (nbits += carry+1) < 1 ? nbits-1 : 0; while (--nbits >= 0) if ((data >> nbits & 0xff) == 0xff) break; if (nbits > 0) data = ((data & ((1 << (nbits-1)) - 1)) << 1) | ((data + (((data & (1 << (nbits-1)))) << 1)) & (-1 << nbits)); if (nbits >= 0) { data += getbits(1); carry = nbits - 8; } count = ((((data-range+1) & 0xffff) << 2) - 1) / (high >> 4); for (bin=0; hist[s][bin+5] > count; bin++); low = hist[s][bin+5] * (high >> 4) >> 2; if (bin) high = hist[s][bin+4] * (high >> 4) >> 2; high -= low; for (nbits=0; high << nbits < 128; nbits++); range = (range+low) << nbits; high <<= nbits; next = hist[s][1]; if (++hist[s][2] > hist[s][3]) { next = (next+1) & hist[s][0]; hist[s][3] = (hist[s][next+4] - hist[s][next+5]) >> 2; hist[s][2] = 1; } if (hist[s][hist[s][1]+4] - hist[s][hist[s][1]+5] > 1) { if (bin < hist[s][1]) for (i=bin; i < hist[s][1]; i++) hist[s][i+5]--; else if (next <= bin) for (i=hist[s][1]; i < bin; i++) hist[s][i+5]++; } hist[s][1] = next; sym[s] = bin; } diff = sym[2] << 5 | sym[1] << 2 | (sym[0] & 3); if (sym[0] & 4) diff = diff ? -diff : 0x80; if ((unsigned) ftell(ifp) + 12 >= seg[1][1]) diff = 0; pred[pix & 1] += diff; row = pix / raw_width - top_margin; col = pix % raw_width - left_margin; if (row < height && col < width) BAYER(row,col) = pred[pix & 1]; if (!(pix & 1) && HOLE(row)) pix += 2; } maximum = 0xff; } void CLASS smal_v6_load_raw() { unsigned seg[2][2]; fseek (ifp, 16, SEEK_SET); seg[0][0] = 0; seg[0][1] = get2(); seg[1][0] = raw_width * raw_height; seg[1][1] = INT_MAX; smal_decode_segment (seg, 0); } int CLASS median4 (int *p) { int min, max, sum, i; min = max = sum = p[0]; for (i=1; i < 4; i++) { sum += p[i]; if (min > p[i]) min = p[i]; if (max < p[i]) max = p[i]; } return (sum - min - max) >> 1; } void CLASS fill_holes (int holes) { int row, col, val[4]; for (row=2; row < height-2; row++) { if (!HOLE(row)) continue; for (col=1; col < width-1; col+=4) { val[0] = BAYER(row-1,col-1); val[1] = BAYER(row-1,col+1); val[2] = BAYER(row+1,col-1); val[3] = BAYER(row+1,col+1); BAYER(row,col) = median4(val); } for (col=2; col < width-2; col+=4) if (HOLE(row-2) || HOLE(row+2)) BAYER(row,col) = (BAYER(row,col-2) + BAYER(row,col+2)) >> 1; else { val[0] = BAYER(row,col-2); val[1] = BAYER(row,col+2); val[2] = BAYER(row-2,col); val[3] = BAYER(row+2,col); BAYER(row,col) = median4(val); } } } void CLASS smal_v9_load_raw() { unsigned seg[256][2], offset, nseg, holes, i; fseek (ifp, 67, SEEK_SET); offset = get4(); nseg = fgetc(ifp); fseek (ifp, offset, SEEK_SET); for (i=0; i < nseg*2; i++) seg[0][i] = get4() + data_offset*(i & 1); fseek (ifp, 78, SEEK_SET); holes = fgetc(ifp); fseek (ifp, 88, SEEK_SET); seg[nseg][0] = raw_height * raw_width; seg[nseg][1] = get4() + data_offset; for (i=0; i < nseg; i++) smal_decode_segment (seg+i, holes); if (holes) fill_holes (holes); } /* RESTRICTED code starts here */ void CLASS foveon_decoder (unsigned size, unsigned code) { // TODO: The following static variable is not thread-safe static unsigned huff[1024]; struct decode *cur; unsigned i, len; if (!code) { for (i=0; i < size; i++) huff[i] = get4(); memset (first_decode, 0, sizeof first_decode); free_decode = first_decode; } cur = free_decode++; if (free_decode > first_decode+2048) { dcraw_message (DCRAW_ERROR,_("%s: decoder table overflow\n"), ifname_display); longjmp (failure, 2); } if (code) for (i=0; i < size; i++) if (huff[i] == code) { cur->leaf = i; return; } if ((len = code >> 27) > 26) return; code = (len+1) << 27 | (code & 0x3ffffff) << 1; cur->branch[0] = free_decode; foveon_decoder (size, code); cur->branch[1] = free_decode; foveon_decoder (size, code+1); } void CLASS foveon_thumb() { int bwide; unsigned row, col, bitbuf=0, bit=1, c, i; char *buf; struct decode *dindex; short pred[3]; bwide = get4(); fprintf (ofp, "P6\n%d %d\n255\n", thumb_width, thumb_height); if (bwide > 0) { if (bwide < thumb_width*3) return; buf = (char *) malloc (bwide); merror (buf, "foveon_thumb()"); for (row=0; row < thumb_height; row++) { fread (buf, 1, bwide, ifp); fwrite (buf, 3, thumb_width, ofp); } free (buf); return; } foveon_decoder (256, 0); for (row=0; row < thumb_height; row++) { memset (pred, 0, sizeof pred); if (!bit) get4(); for (bit=col=0; col < thumb_width; col++) FORC3 { for (dindex=first_decode; dindex->branch[0]; ) { if ((bit = (bit-1) & 31) == 31) for (i=0; i < 4; i++) bitbuf = (bitbuf << 8) + fgetc(ifp); dindex = dindex->branch[bitbuf >> bit & 1]; } pred[c] += dindex->leaf; fputc (pred[c], ofp); } } } void CLASS foveon_load_camf() { unsigned key, i, val; fseek (ifp, meta_offset, SEEK_SET); key = get4(); fread (meta_data, 1, meta_length, ifp); for (i=0; i < meta_length; i++) { key = (key * 1597 + 51749) % 244944; val = key * (INT64) 301593171 >> 24; meta_data[i] ^= ((((key << 8) - val) >> 1) + val) >> 17; } } void CLASS foveon_load_raw() { struct decode *dindex; short diff[1024]; unsigned bitbuf=0; int pred[3], fixed, row, col, bit=-1, c, i; fixed = get4(); read_shorts ((ushort *) diff, 1024); if (!fixed) foveon_decoder (1024, 0); for (row=0; row < height; row++) { memset (pred, 0, sizeof pred); if (!bit && !fixed && atoi(model+2) < 14) get4(); for (col=bit=0; col < width; col++) { if (fixed) { bitbuf = get4(); FORC3 pred[2-c] += diff[bitbuf >> c*10 & 0x3ff]; } else FORC3 { for (dindex=first_decode; dindex->branch[0]; ) { if ((bit = (bit-1) & 31) == 31) for (i=0; i < 4; i++) bitbuf = (bitbuf << 8) + fgetc(ifp); dindex = dindex->branch[bitbuf >> bit & 1]; } pred[c] += diff[dindex->leaf]; if (pred[c] >> 16 && ~pred[c] >> 16) derror(); } FORC3 image[row*width+col][c] = pred[c]; } } if (document_mode) for (i=0; i < height*width*4; i++) if ((short) image[0][i] < 0) image[0][i] = 0; foveon_load_camf(); } const char * CLASS foveon_camf_param (const char *block, const char *param) { unsigned idx, num; char *pos, *cp, *dp; for (idx=0; idx < meta_length; idx += sget4(pos+8)) { pos = meta_data + idx; if (strncmp (pos, "CMb", 3)) break; if (pos[3] != 'P') continue; if (strcmp (block, pos+sget4(pos+12))) continue; cp = pos + sget4(pos+16); num = sget4(cp); dp = pos + sget4(cp+4); while (num--) { cp += 8; if (!strcmp (param, dp+sget4(cp))) return dp+sget4(cp+4); } } return 0; } void * CLASS foveon_camf_matrix (unsigned dim[3], const char *name) { unsigned i, idx, type, ndim, size, *mat; char *pos, *cp, *dp; double dsize; for (idx=0; idx < meta_length; idx += sget4(pos+8)) { pos = meta_data + idx; if (strncmp (pos, "CMb", 3)) break; if (pos[3] != 'M') continue; if (strcmp (name, pos+sget4(pos+12))) continue; dim[0] = dim[1] = dim[2] = 1; cp = pos + sget4(pos+16); type = sget4(cp); if ((ndim = sget4(cp+4)) > 3) break; dp = pos + sget4(cp+8); for (i=ndim; i--; ) { cp += 12; dim[i] = sget4(cp); } if ((dsize = (double) dim[0]*dim[1]*dim[2]) > meta_length/4) break; mat = (unsigned *) malloc ((size = dsize) * 4); merror (mat, "foveon_camf_matrix()"); for (i=0; i < size; i++) if (type && type != 6) mat[i] = sget4(dp + i*4); else mat[i] = sget4(dp + i*2) & 0xffff; return mat; } dcraw_message (DCRAW_WARNING,_("%s: \"%s\" matrix not found!\n"), ifname_display, name); return 0; } int CLASS foveon_fixed (void *ptr, int size, const char *name) { void *dp; unsigned dim[3]; dp = foveon_camf_matrix (dim, name); if (!dp) return 0; memcpy (ptr, dp, size*4); free (dp); return 1; } float CLASS foveon_avg (short *pix, int range[2], float cfilt) { int i; float val, min=FLT_MAX, max=-FLT_MAX, sum=0; for (i=range[0]; i <= range[1]; i++) { sum += val = pix[i*4] + (pix[i*4]-pix[(i-1)*4]) * cfilt; if (min > val) min = val; if (max < val) max = val; } if (range[1] - range[0] == 1) return sum/2; return (sum - min - max) / (range[1] - range[0] - 1); } short * CLASS foveon_make_curve (double max, double mul, double filt) { short *curve; unsigned i, size; double x; if (!filt) filt = 0.8; size = 4*M_PI*max / filt; if (size == UINT_MAX) size--; curve = (short *) calloc (size+1, sizeof *curve); merror (curve, "foveon_make_curve()"); curve[0] = size; for (i=0; i < size; i++) { x = i*filt/max/4; curve[i+1] = (cos(x)+1)/2 * tanh(i*filt/mul) * mul + 0.5; } return curve; } void CLASS foveon_make_curves (short **curvep, float dq[3], float div[3], float filt) { double mul[3], max=0; int c; FORC3 mul[c] = dq[c]/div[c]; FORC3 if (max < mul[c]) max = mul[c]; FORC3 curvep[c] = foveon_make_curve (max, mul[c], filt); } int CLASS foveon_apply_curve (short *curve, int i) { if (abs(i) >= curve[0]) return 0; return i < 0 ? -curve[1-i] : curve[1+i]; } #define image ((short (*)[4]) image) void CLASS foveon_interpolate() { static const short hood[] = { -1,-1, -1,0, -1,1, 0,-1, 0,1, 1,-1, 1,0, 1,1 }; short *pix, prev[3], *curve[8], (*shrink)[3]; float cfilt=0, ddft[3][3][2], ppm[3][3][3]; float cam_xyz[3][3], correct[3][3], last[3][3], trans[3][3]; float chroma_dq[3], color_dq[3], diag[3][3], div[3]; float (*black)[3], (*sgain)[3], (*sgrow)[3]; float fsum[3], val, frow, num; int row, col, c, i, j, diff, sgx, irow, sum, min, max, limit; int dscr[2][2], dstb[4], (*smrow[7])[3], total[4], ipix[3]; int work[3][3], smlast, smred, smred_p=0, dev[3]; int satlev[3], keep[4], active[4]; unsigned dim[3], *badpix; double dsum=0, trsum[3]; char str[128]; const char* cp; dcraw_message (DCRAW_VERBOSE,_("Foveon interpolation...\n")); foveon_fixed (dscr, 4, "DarkShieldColRange"); foveon_fixed (ppm[0][0], 27, "PostPolyMatrix"); foveon_fixed (satlev, 3, "SaturationLevel"); foveon_fixed (keep, 4, "KeepImageArea"); foveon_fixed (active, 4, "ActiveImageArea"); foveon_fixed (chroma_dq, 3, "ChromaDQ"); foveon_fixed (color_dq, 3, foveon_camf_param ("IncludeBlocks", "ColorDQ") ? "ColorDQ" : "ColorDQCamRGB"); if (foveon_camf_param ("IncludeBlocks", "ColumnFilter")) foveon_fixed (&cfilt, 1, "ColumnFilter"); memset (ddft, 0, sizeof ddft); if (!foveon_camf_param ("IncludeBlocks", "DarkDrift") || !foveon_fixed (ddft[1][0], 12, "DarkDrift")) for (i=0; i < 2; i++) { foveon_fixed (dstb, 4, i ? "DarkShieldBottom":"DarkShieldTop"); for (row = dstb[1]; row <= dstb[3]; row++) for (col = dstb[0]; col <= dstb[2]; col++) FORC3 ddft[i+1][c][1] += (short) image[row*width+col][c]; FORC3 ddft[i+1][c][1] /= (dstb[3]-dstb[1]+1) * (dstb[2]-dstb[0]+1); } if (!(cp = foveon_camf_param ("WhiteBalanceIlluminants", model2))) { dcraw_message (DCRAW_ERROR,_("%s: Invalid white balance \"%s\"\n"), ifname_display, model2); return; } foveon_fixed (cam_xyz, 9, cp); foveon_fixed (correct, 9, foveon_camf_param ("WhiteBalanceCorrections", model2)); memset (last, 0, sizeof last); for (i=0; i < 3; i++) for (j=0; j < 3; j++) FORC3 last[i][j] += correct[i][c] * cam_xyz[c][j]; #define LAST(x,y) last[(i+x)%3][(c+y)%3] for (i=0; i < 3; i++) FORC3 diag[c][i] = LAST(1,1)*LAST(2,2) - LAST(1,2)*LAST(2,1); #undef LAST FORC3 div[c] = diag[c][0]*0.3127 + diag[c][1]*0.329 + diag[c][2]*0.3583; sprintf (str, "%sRGBNeutral", model2); if (foveon_camf_param ("IncludeBlocks", str)) foveon_fixed (div, 3, str); num = 0; FORC3 if (num < div[c]) num = div[c]; FORC3 div[c] /= num; memset (trans, 0, sizeof trans); for (i=0; i < 3; i++) for (j=0; j < 3; j++) FORC3 trans[i][j] += rgb_cam[i][c] * last[c][j] * div[j]; FORC3 trsum[c] = trans[c][0] + trans[c][1] + trans[c][2]; dsum = (6*trsum[0] + 11*trsum[1] + 3*trsum[2]) / 20; for (i=0; i < 3; i++) FORC3 last[i][c] = trans[i][c] * dsum / trsum[i]; memset (trans, 0, sizeof trans); for (i=0; i < 3; i++) for (j=0; j < 3; j++) FORC3 trans[i][j] += (i==c ? 32 : -1) * last[c][j] / 30; foveon_make_curves (curve, color_dq, div, cfilt); FORC3 chroma_dq[c] /= 3; foveon_make_curves (curve+3, chroma_dq, div, cfilt); FORC3 dsum += chroma_dq[c] / div[c]; curve[6] = foveon_make_curve (dsum, dsum, cfilt); curve[7] = foveon_make_curve (dsum*2, dsum*2, cfilt); sgain = (float (*)[3]) foveon_camf_matrix (dim, "SpatialGain"); if (!sgain) return; sgrow = (float (*)[3]) calloc (dim[1], sizeof *sgrow); sgx = (width + dim[1]-2) / (dim[1]-1); black = (float (*)[3]) calloc (height, sizeof *black); for (row=0; row < height; row++) { for (i=0; i < 6; i++) ddft[0][0][i] = ddft[1][0][i] + row / (height-1.0) * (ddft[2][0][i] - ddft[1][0][i]); FORC3 black[row][c] = ( foveon_avg (image[row*width]+c, dscr[0], cfilt) + foveon_avg (image[row*width]+c, dscr[1], cfilt) * 3 - ddft[0][c][0] ) / 4 - ddft[0][c][1]; } memcpy (black, black+8, sizeof *black*8); memcpy (black+height-11, black+height-22, 11*sizeof *black); memcpy (last, black, sizeof last); for (row=1; row < height-1; row++) { FORC3 if (last[1][c] > last[0][c]) { if (last[1][c] > last[2][c]) black[row][c] = (last[0][c] > last[2][c]) ? last[0][c]:last[2][c]; } else if (last[1][c] < last[2][c]) black[row][c] = (last[0][c] < last[2][c]) ? last[0][c]:last[2][c]; memmove (last, last+1, 2*sizeof last[0]); memcpy (last[2], black[row+1], sizeof last[2]); } FORC3 black[row][c] = (last[0][c] + last[1][c])/2; FORC3 black[0][c] = (black[1][c] + black[3][c])/2; val = 1 - exp(-1/24.0); memcpy (fsum, black, sizeof fsum); for (row=1; row < height; row++) FORC3 fsum[c] += black[row][c] = (black[row][c] - black[row-1][c])*val + black[row-1][c]; memcpy (last[0], black[height-1], sizeof last[0]); FORC3 fsum[c] /= height; for (row = height; row--; ) FORC3 last[0][c] = black[row][c] = (black[row][c] - fsum[c] - last[0][c])*val + last[0][c]; memset (total, 0, sizeof total); for (row=2; row < height; row+=4) for (col=2; col < width; col+=4) { FORC3 total[c] += (short) image[row*width+col][c]; total[3]++; } for (row=0; row < height; row++) FORC3 black[row][c] += fsum[c]/2 + total[c]/(total[3]*100.0); for (row=0; row < height; row++) { for (i=0; i < 6; i++) ddft[0][0][i] = ddft[1][0][i] + row / (height-1.0) * (ddft[2][0][i] - ddft[1][0][i]); pix = image[row*width]; memcpy (prev, pix, sizeof prev); frow = row / (height-1.0) * (dim[2]-1); if ((irow = frow) == (int) dim[2]-1) irow--; frow -= irow; for (i=0; i < (int) dim[1]; i++) FORC3 sgrow[i][c] = sgain[ irow *dim[1]+i][c] * (1-frow) + sgain[(irow+1)*dim[1]+i][c] * frow; for (col=0; col < width; col++) { FORC3 { diff = pix[c] - prev[c]; prev[c] = pix[c]; ipix[c] = pix[c] + floor ((diff + (diff*diff >> 14)) * cfilt - ddft[0][c][1] - ddft[0][c][0] * ((float) col/width - 0.5) - black[row][c] ); } FORC3 { work[0][c] = ipix[c] * ipix[c] >> 14; work[2][c] = ipix[c] * work[0][c] >> 14; work[1][2-c] = ipix[(c+1) % 3] * ipix[(c+2) % 3] >> 14; } FORC3 { for (val=i=0; i < 3; i++) for ( j=0; j < 3; j++) val += ppm[c][i][j] * work[i][j]; ipix[c] = floor ((ipix[c] + floor(val)) * ( sgrow[col/sgx ][c] * (sgx - col%sgx) + sgrow[col/sgx+1][c] * (col%sgx) ) / sgx / div[c]); if (ipix[c] > 32000) ipix[c] = 32000; pix[c] = ipix[c]; } pix += 4; } } free (black); free (sgrow); free (sgain); if ((badpix = (unsigned int *) foveon_camf_matrix (dim, "BadPixels"))) { for (i=0; i < (int) dim[0]; i++) { col = (badpix[i] >> 8 & 0xfff) - keep[0]; row = (badpix[i] >> 20 ) - keep[1]; if (row-1 < 0 || row-1 > height-3 || col-1 < 0 || col-1 > width-3) continue; memset (fsum, 0, sizeof fsum); for (sum=j=0; j < 8; j++) if (badpix[i] & (1 << j)) { FORC3 fsum[c] += (short) image[(row+hood[j*2])*width+col+hood[j*2+1]][c]; sum++; } if (sum) FORC3 image[row*width+col][c] = fsum[c]/sum; } free (badpix); } /* Array for 5x5 Gaussian averaging of red values */ smrow[6] = (int (*)[3]) calloc (width*5, sizeof **smrow); merror (smrow[6], "foveon_interpolate()"); for (i=0; i < 5; i++) smrow[i] = smrow[6] + i*width; /* Sharpen the reds against these Gaussian averages */ for (smlast=-1, row=2; row < height-2; row++) { while (smlast < row+2) { for (i=0; i < 6; i++) smrow[(i+5) % 6] = smrow[i]; pix = image[++smlast*width+2]; for (col=2; col < width-2; col++) { smrow[4][col][0] = (pix[0]*6 + (pix[-4]+pix[4])*4 + pix[-8]+pix[8] + 8) >> 4; pix += 4; } } pix = image[row*width+2]; for (col=2; col < width-2; col++) { smred = ( 6 * smrow[2][col][0] + 4 * (smrow[1][col][0] + smrow[3][col][0]) + smrow[0][col][0] + smrow[4][col][0] + 8 ) >> 4; if (col == 2) smred_p = smred; i = pix[0] + ((pix[0] - ((smred*7 + smred_p) >> 3)) >> 3); if (i > 32000) i = 32000; pix[0] = i; smred_p = smred; pix += 4; } } /* Adjust the brighter pixels for better linearity */ min = 0xffff; FORC3 { i = satlev[c] / div[c]; if (min > i) min = i; } limit = min * 9 >> 4; for (pix=image[0]; pix < image[height*width]; pix+=4) { if (pix[0] <= limit || pix[1] <= limit || pix[2] <= limit) continue; min = max = pix[0]; for (c=1; c < 3; c++) { if (min > pix[c]) min = pix[c]; if (max < pix[c]) max = pix[c]; } if (min >= limit*2) { pix[0] = pix[1] = pix[2] = max; } else { i = 0x4000 - ((min - limit) << 14) / limit; i = 0x4000 - (i*i >> 14); i = i*i >> 14; FORC3 pix[c] += (max - pix[c]) * i >> 14; } } /* Because photons that miss one detector often hit another, the sum R+G+B is much less noisy than the individual colors. So smooth the hues without smoothing the total. */ for (smlast=-1, row=2; row < height-2; row++) { while (smlast < row+2) { for (i=0; i < 6; i++) smrow[(i+5) % 6] = smrow[i]; pix = image[++smlast*width+2]; for (col=2; col < width-2; col++) { FORC3 smrow[4][col][c] = (pix[c-4]+2*pix[c]+pix[c+4]+2) >> 2; pix += 4; } } pix = image[row*width+2]; for (col=2; col < width-2; col++) { FORC3 dev[c] = -foveon_apply_curve (curve[7], pix[c] - ((smrow[1][col][c] + 2*smrow[2][col][c] + smrow[3][col][c]) >> 2)); sum = (dev[0] + dev[1] + dev[2]) >> 3; FORC3 pix[c] += dev[c] - sum; pix += 4; } } for (smlast=-1, row=2; row < height-2; row++) { while (smlast < row+2) { for (i=0; i < 6; i++) smrow[(i+5) % 6] = smrow[i]; pix = image[++smlast*width+2]; for (col=2; col < width-2; col++) { FORC3 smrow[4][col][c] = (pix[c-8]+pix[c-4]+pix[c]+pix[c+4]+pix[c+8]+2) >> 2; pix += 4; } } pix = image[row*width+2]; for (col=2; col < width-2; col++) { for (total[3]=375, sum=60, c=0; c < 3; c++) { for (total[c]=i=0; i < 5; i++) total[c] += smrow[i][col][c]; total[3] += total[c]; sum += pix[c]; } if (sum < 0) sum = 0; j = total[3] > 375 ? (sum << 16) / total[3] : sum * 174; FORC3 pix[c] += foveon_apply_curve (curve[6], ((j*total[c] + 0x8000) >> 16) - pix[c]); pix += 4; } } /* Transform the image to a different colorspace */ for (pix=image[0]; pix < image[height*width]; pix+=4) { FORC3 pix[c] -= foveon_apply_curve (curve[c], pix[c]); sum = (pix[0]+pix[1]+pix[1]+pix[2]) >> 2; FORC3 pix[c] -= foveon_apply_curve (curve[c], pix[c]-sum); FORC3 { for (dsum=i=0; i < 3; i++) dsum += trans[c][i] * pix[i]; if (dsum < 0) dsum = 0; if (dsum > 24000) dsum = 24000; ipix[c] = dsum + 0.5; } FORC3 pix[c] = ipix[c]; } /* Smooth the image bottom-to-top and save at 1/4 scale */ shrink = (short (*)[3]) calloc ((width/4) * (height/4), sizeof *shrink); merror (shrink, "foveon_interpolate()"); for (row = height/4; row--; ) for (col=0; col < width/4; col++) { ipix[0] = ipix[1] = ipix[2] = 0; for (i=0; i < 4; i++) for (j=0; j < 4; j++) FORC3 ipix[c] += image[(row*4+i)*width+col*4+j][c]; FORC3 if (row+2 > height/4) shrink[row*(width/4)+col][c] = ipix[c] >> 4; else shrink[row*(width/4)+col][c] = (shrink[(row+1)*(width/4)+col][c]*1840 + ipix[c]*141 + 2048) >> 12; } /* From the 1/4-scale image, smooth right-to-left */ for (row=0; row < (height & ~3); row++) { ipix[0] = ipix[1] = ipix[2] = 0; if ((row & 3) == 0) for (col = width & ~3 ; col--; ) FORC3 smrow[0][col][c] = ipix[c] = (shrink[(row/4)*(width/4)+col/4][c]*1485 + ipix[c]*6707 + 4096) >> 13; /* Then smooth left-to-right */ ipix[0] = ipix[1] = ipix[2] = 0; for (col=0; col < (width & ~3); col++) FORC3 smrow[1][col][c] = ipix[c] = (smrow[0][col][c]*1485 + ipix[c]*6707 + 4096) >> 13; /* Smooth top-to-bottom */ if (row == 0) memcpy (smrow[2], smrow[1], sizeof **smrow * width); else for (col=0; col < (width & ~3); col++) FORC3 smrow[2][col][c] = (smrow[2][col][c]*6707 + smrow[1][col][c]*1485 + 4096) >> 13; /* Adjust the chroma toward the smooth values */ for (col=0; col < (width & ~3); col++) { for (i=j=30, c=0; c < 3; c++) { i += smrow[2][col][c]; j += image[row*width+col][c]; } j = (j << 16) / i; for (sum=c=0; c < 3; c++) { ipix[c] = foveon_apply_curve (curve[c+3], ((smrow[2][col][c] * j + 0x8000) >> 16) - image[row*width+col][c]); sum += ipix[c]; } sum >>= 3; FORC3 { i = image[row*width+col][c] + ipix[c] - sum; if (i < 0) i = 0; image[row*width+col][c] = i; } } } free (shrink); free (smrow[6]); for (i=0; i < 8; i++) free (curve[i]); /* Trim off the black border */ active[1] -= keep[1]; active[3] -= 2; i = active[2] - active[0]; for (row=0; row < active[3]-active[1]; row++) memcpy (image[row*i], image[(row+active[1])*width+active[0]], i * sizeof *image); width = i; height = row; } #undef image /* RESTRICTED code ends here */ /* Seach from the current directory up to the root looking for a ".badpixels" file, and fix those pixels now. */ void CLASS bad_pixels (const char *cfname) { FILE *fp=0; char *fname, *cp, line[128]; int len, time, row, col, r, c, rad, tot, n, fixed=0; if (!filters) return; if (cfname) fp = fopen (cfname, "r"); else { for (len=32 ; ; len *= 2) { fname = (char *) malloc (len); if (!fname) return; if (getcwd (fname, len-16)) break; free (fname); if (errno != ERANGE) return; } #if defined(WIN32) || defined(DJGPP) if (fname[1] == ':') memmove (fname, fname+2, len-2); for (cp=fname; *cp; cp++) if (*cp == '\\') *cp = '/'; #endif cp = fname + strlen(fname); if (cp[-1] == '/') cp--; while (*fname == '/') { strcpy (cp, "/.badpixels"); if ((fp = fopen (fname, "r"))) break; if (cp == fname) break; while (*--cp != '/'); } free (fname); } if (!fp) return; while (::fgets (line, 128, fp)) { cp = strchr (line, '#'); if (cp) *cp = 0; if (sscanf (line, "%d %d %d", &col, &row, &time) != 3) continue; if ((unsigned) col >= width || (unsigned) row >= height) continue; if (time > timestamp) continue; for (tot=n=0, rad=1; rad < 3 && n==0; rad++) for (r = row-rad; r <= row+rad; r++) for (c = col-rad; c <= col+rad; c++) if ((unsigned) r < height && (unsigned) c < width && (r != row || c != col) && fc(r,c) == fc(row,col)) { tot += BAYER2(r,c); n++; } BAYER2(row,col) = tot/n; if (!fixed++) dcraw_message(DCRAW_VERBOSE,_("Fixed dead pixels at:")); dcraw_message(DCRAW_VERBOSE, " %d,%d", col, row); } if (fixed) dcraw_message(DCRAW_VERBOSE, "\n"); fclose (fp); } void CLASS subtract (const char *fname) { FILE *fp; int dim[3]={0,0,0}, comment=0, number=0, error=0, nd=0, c, row, col; ushort *pixel; if (!(fp = fopen (fname, "rb"))) { perror (fname); return; } if (fgetc(fp) != 'P' || fgetc(fp) != '5') error = 1; while (!error && nd < 3 && (c = fgetc(fp)) != EOF) { if (c == '#') comment = 1; if (c == '\n') comment = 0; if (comment) continue; if (isdigit(c)) number = 1; if (number) { if (isdigit(c)) dim[nd] = dim[nd]*10 + c -'0'; else if (isspace(c)) { number = 0; nd++; } else error = 1; } } if (error || nd < 3) { dcraw_message (DCRAW_ERROR,_("%s is not a valid PGM file!\n"), fname); fclose (fp); return; } else if (dim[0] != width || dim[1] != height || dim[2] != 65535) { dcraw_message (DCRAW_ERROR,_("%s has the wrong dimensions!\n"), fname); fclose (fp); return; } pixel = (ushort *) calloc (width, sizeof *pixel); merror (pixel, "subtract()"); for (row=0; row < height; row++) { fread (pixel, 2, width, fp); for (col=0; col < width; col++) BAYER(row,col) = MAX (BAYER(row,col) - ntohs(pixel[col]), 0); } free (pixel); fclose (fp); memset (cblack, 0, sizeof cblack); black = 0; } void CLASS gamma_curve (double pwr, double ts, int mode, int imax) { int i; double g[6], bnd[2]={0,0}, r; g[0] = pwr; g[1] = ts; g[2] = g[3] = g[4] = 0; bnd[g[1] >= 1] = 1; if (g[1] && (g[1]-1)*(g[0]-1) <= 0) { for (i=0; i < 48; i++) { g[2] = (bnd[0] + bnd[1])/2; if (g[0]) bnd[(pow(g[2]/g[1],-g[0]) - 1)/g[0] - 1/g[2] > -1] = g[2]; else bnd[g[2]/exp(1-1/g[2]) < g[1]] = g[2]; } g[3] = g[2] / g[1]; if (g[0]) g[4] = g[2] * (1/g[0] - 1); } if (g[0]) g[5] = 1 / (g[1]*SQR(g[3])/2 - g[4]*(1 - g[3]) + (1 - pow(g[3],1+g[0]))*(1 + g[4])/(1 + g[0])) - 1; else g[5] = 1 / (g[1]*SQR(g[3])/2 + 1 - g[2] - g[3] - g[2]*g[3]*(log(g[3]) - 1)) - 1; if (!mode--) { memcpy (gamm, g, sizeof gamm); return; } for (i=0; i < 0x10000; i++) { curve[i] = 0xffff; if ((r = (double) i / imax) < 1) curve[i] = 0x10000 * ( mode ? (r < g[3] ? r*g[1] : (g[0] ? pow( r,g[0])*(1+g[4])-g[4] : log(r)*g[2]+1)) : (r < g[2] ? r/g[1] : (g[0] ? pow((r+g[4])/(1+g[4]),1/g[0]) : exp((r-1)/g[2])))); } } void CLASS pseudoinverse (double (*in)[3], double (*out)[3], int size) { double work[3][6], num; int i, j, k; for (i=0; i < 3; i++) { for (j=0; j < 6; j++) work[i][j] = j == i+3; for (j=0; j < 3; j++) for (k=0; k < size; k++) work[i][j] += in[k][i] * in[k][j]; } for (i=0; i < 3; i++) { num = work[i][i]; for (j=0; j < 6; j++) work[i][j] /= num; for (k=0; k < 3; k++) { if (k==i) continue; num = work[k][i]; for (j=0; j < 6; j++) work[k][j] -= work[i][j] * num; } } for (i=0; i < size; i++) for (j=0; j < 3; j++) for (out[i][j]=k=0; k < 3; k++) out[i][j] += work[j][k+3] * in[i][k]; } void CLASS cam_xyz_coeff (double cam_xyz[4][3]) { double cam_rgb[4][3], inverse[4][3], num; int i, j, k; for (i=0; i < colors; i++) /* Multiply out XYZ colorspace */ for (j=0; j < 3; j++) for (cam_rgb[i][j] = k=0; k < 3; k++) cam_rgb[i][j] += cam_xyz[i][k] * xyz_rgb[k][j]; for (i=0; i < colors; i++) { /* Normalize cam_rgb so that */ for (num=j=0; j < 3; j++) /* cam_rgb * (1,1,1) is (1,1,1,1) */ num += cam_rgb[i][j]; for (j=0; j < 3; j++) cam_rgb[i][j] /= num; pre_mul[i] = 1 / num; } pseudoinverse (cam_rgb, inverse, colors); for (raw_color = i=0; i < 3; i++) for (j=0; j < colors; j++) rgb_cam[i][j] = inverse[j][i]; } #ifdef COLORCHECK void CLASS colorcheck() { #define NSQ 24 // Coordinates of the GretagMacbeth ColorChecker squares // width, height, 1st_column, 1st_row int cut[NSQ][4]; // you must set these // ColorChecker Chart under 6500-kelvin illumination static const double gmb_xyY[NSQ][3] = { { 0.400, 0.350, 10.1 }, // Dark Skin { 0.377, 0.345, 35.8 }, // Light Skin { 0.247, 0.251, 19.3 }, // Blue Sky { 0.337, 0.422, 13.3 }, // Foliage { 0.265, 0.240, 24.3 }, // Blue Flower { 0.261, 0.343, 43.1 }, // Bluish Green { 0.506, 0.407, 30.1 }, // Orange { 0.211, 0.175, 12.0 }, // Purplish Blue { 0.453, 0.306, 19.8 }, // Moderate Red { 0.285, 0.202, 6.6 }, // Purple { 0.380, 0.489, 44.3 }, // Yellow Green { 0.473, 0.438, 43.1 }, // Orange Yellow { 0.187, 0.129, 6.1 }, // Blue { 0.305, 0.478, 23.4 }, // Green { 0.539, 0.313, 12.0 }, // Red { 0.448, 0.470, 59.1 }, // Yellow { 0.364, 0.233, 19.8 }, // Magenta { 0.196, 0.252, 19.8 }, // Cyan { 0.310, 0.316, 90.0 }, // White { 0.310, 0.316, 59.1 }, // Neutral 8 { 0.310, 0.316, 36.2 }, // Neutral 6.5 { 0.310, 0.316, 19.8 }, // Neutral 5 { 0.310, 0.316, 9.0 }, // Neutral 3.5 { 0.310, 0.316, 3.1 } }; // Black double gmb_cam[NSQ][4], gmb_xyz[NSQ][3]; double inverse[NSQ][3], cam_xyz[4][3], num; int c, i, j, k, sq, row, col, count[4]; memset (gmb_cam, 0, sizeof gmb_cam); for (sq=0; sq < NSQ; sq++) { FORCC count[c] = 0; for (row=cut[sq][3]; row < cut[sq][3]+cut[sq][1]; row++) for (col=cut[sq][2]; col < cut[sq][2]+cut[sq][0]; col++) { c = FC(row,col); if (c >= colors) c -= 2; gmb_cam[sq][c] += BAYER(row,col); count[c]++; } FORCC gmb_cam[sq][c] = gmb_cam[sq][c]/count[c] - black; gmb_xyz[sq][0] = gmb_xyY[sq][2] * gmb_xyY[sq][0] / gmb_xyY[sq][1]; gmb_xyz[sq][1] = gmb_xyY[sq][2]; gmb_xyz[sq][2] = gmb_xyY[sq][2] * (1 - gmb_xyY[sq][0] - gmb_xyY[sq][1]) / gmb_xyY[sq][1]; } pseudoinverse (gmb_xyz, inverse, NSQ); for (i=0; i < colors; i++) for (j=0; j < 3; j++) for (cam_xyz[i][j] = k=0; k < NSQ; k++) cam_xyz[i][j] += gmb_cam[k][i] * inverse[k][j]; cam_xyz_coeff (cam_xyz); if (verbose) { dcraw_message (DCRAW_VERBOSE, " { \"%s %s\", %d,\n\t{", make, model, black); num = 10000 / (cam_xyz[1][0] + cam_xyz[1][1] + cam_xyz[1][2]); FORCC for (j=0; j < 3; j++) dcraw_message (DCRAW_VERBOSE, "%c%d", (c | j) ? ',':' ', (int) (cam_xyz[c][j] * num + 0.5)); dcraw_message (DCRAW_VERBOSE, " } },\n"); } #undef NSQ } #endif /* Start of functions copied to dcraw_indi.c (UF) */ void CLASS hat_transform (float *temp, float *base, int st, int size, int sc) { int i; for (i=0; i < sc; i++) temp[i] = 2*base[st*i] + base[st*(sc-i)] + base[st*(i+sc)]; for (; i+sc < size; i++) temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(i+sc)]; for (; i < size; i++) temp[i] = 2*base[st*i] + base[st*(i-sc)] + base[st*(2*size-2-(i+sc))]; } void CLASS wavelet_denoise() { float *fimg=0, *temp, thold, mul[2], avg, diff; int scale=1, size, lev, hpass, lpass, row, col, nc, c, i, wlast, blk[2]; ushort *window[4]; static const float noise[] = { 0.8002,0.2735,0.1202,0.0585,0.0291,0.0152,0.0080,0.0044 }; dcraw_message (DCRAW_VERBOSE,_("Wavelet denoising...\n")); while (maximum << scale < 0x10000) scale++; maximum <<= --scale; black <<= scale; FORC4 cblack[c] <<= scale; if ((size = iheight*iwidth) < 0x15550000) fimg = (float *) malloc ((size*3 + iheight + iwidth) * sizeof *fimg); merror (fimg, "wavelet_denoise()"); temp = fimg + size*3; if ((nc = colors) == 3 && filters) nc++; FORC(nc) { /* denoise R,G1,B,G3 individually */ for (i=0; i < size; i++) fimg[i] = 256 * sqrt((float) (image[i][c] << scale)); for (hpass=lev=0; lev < 5; lev++) { lpass = size*((lev & 1)+1); for (row=0; row < iheight; row++) { hat_transform (temp, fimg+hpass+row*iwidth, 1, iwidth, 1 << lev); for (col=0; col < iwidth; col++) fimg[lpass + row*iwidth + col] = temp[col] * 0.25; } for (col=0; col < iwidth; col++) { hat_transform (temp, fimg+lpass+col, iwidth, iheight, 1 << lev); for (row=0; row < iheight; row++) fimg[lpass + row*iwidth + col] = temp[row] * 0.25; } thold = threshold * noise[lev]; for (i=0; i < size; i++) { fimg[hpass+i] -= fimg[lpass+i]; if (fimg[hpass+i] < -thold) fimg[hpass+i] += thold; else if (fimg[hpass+i] > thold) fimg[hpass+i] -= thold; else fimg[hpass+i] = 0; if (hpass) fimg[i] += fimg[hpass+i]; } hpass = lpass; } for (i=0; i < size; i++) image[i][c] = CLIP(SQR(fimg[i]+fimg[lpass+i])/0x10000); } if (filters && colors == 3) { /* pull G1 and G3 closer together */ for (row=0; row < 2; row++) { mul[row] = 0.125 * pre_mul[FC(row+1,0) | 1] / pre_mul[FC(row,0) | 1]; blk[row] = cblack[FC(row,0) | 1]; } for (i=0; i < 4; i++) window[i] = (ushort *) fimg + width*i; for (wlast=-1, row=1; row < height-1; row++) { while (wlast < row+1) { for (wlast++, i=0; i < 4; i++) window[(i+3) & 3] = window[i]; for (col = FC(wlast,1) & 1; col < width; col+=2) window[2][col] = BAYER(wlast,col); } thold = threshold/512; for (col = (FC(row,0) & 1)+1; col < width-1; col+=2) { avg = ( window[0][col-1] + window[0][col+1] + window[2][col-1] + window[2][col+1] - blk[~row & 1]*4 ) * mul[row & 1] + (window[1][col] + blk[row & 1]) * 0.5; avg = avg < 0 ? 0 : sqrt(avg); diff = sqrt((float) BAYER(row,col)) - avg; if (diff < -thold) diff += thold; else if (diff > thold) diff -= thold; else diff = 0; BAYER(row,col) = CLIP(SQR(avg+diff) + 0.5); } } } free (fimg); } void CLASS scale_colors() { unsigned bottom, right, size, row, col, ur, uc, i, x, y, c, sum[8]; int val, dark, sat; double dsum[8], dmin, dmax; float scale_mul[4], fr, fc; ushort *img=0, *pix; FORC4 cblack[c] += black; if (user_mul[0]) memcpy (pre_mul, user_mul, sizeof pre_mul); if (use_auto_wb || (use_camera_wb && cam_mul[0] == -1)) { memset (dsum, 0, sizeof dsum); bottom = MIN (greybox[1]+greybox[3], height); right = MIN (greybox[0]+greybox[2], width); for (row=greybox[1]; row < bottom; row += 8) for (col=greybox[0]; col < right; col += 8) { memset (sum, 0, sizeof sum); for (y=row; y < row+8 && y < bottom; y++) for (x=col; x < col+8 && x < right; x++) FORC4 { if (filters) { c = FC(y,x); val = BAYER(y,x); } else val = image[y*width+x][c]; if (val > (int)(maximum-25)) goto skip_block; if ((val -= cblack[c]) < 0) val = 0; sum[c] += val; sum[c+4]++; if (filters) break; } FORC(8) dsum[c] += sum[c]; skip_block: ; } FORC4 if (dsum[c]) pre_mul[c] = dsum[c+4] / dsum[c]; } if (use_camera_wb && cam_mul[0] != -1) { memset (sum, 0, sizeof sum); for (row=0; row < 8; row++) for (col=0; col < 8; col++) { c = FC(row,col); if ((val = white[row][col] - cblack[c]) > 0) sum[c] += val; sum[c+4]++; } if (sum[0] && sum[1] && sum[2] && sum[3]) FORC4 pre_mul[c] = (float) sum[c+4] / sum[c]; else if (cam_mul[0] && cam_mul[2]) memcpy (pre_mul, cam_mul, sizeof pre_mul); else dcraw_message (DCRAW_NO_CAMERA_WB,_("%s: Cannot use camera white balance.\n"), ifname_display); } if (pre_mul[3] == 0) pre_mul[3] = colors < 4 ? pre_mul[1] : 1; dark = black; sat = maximum; if (threshold) wavelet_denoise(); maximum -= black; for (dmin=DBL_MAX, dmax=c=0; c < 4; c++) { if (dmin > pre_mul[c]) dmin = pre_mul[c]; if (dmax < pre_mul[c]) dmax = pre_mul[c]; } if (!highlight) dmax = dmin; FORC4 scale_mul[c] = (pre_mul[c] /= dmax) * 65535.0 / maximum; dcraw_message(DCRAW_VERBOSE, _("Scaling with darkness %d, saturation %d, and\nmultipliers"), dark, sat); FORC4 dcraw_message(DCRAW_VERBOSE, " %f", pre_mul[c]); dcraw_message(DCRAW_VERBOSE, "\n"); size = iheight*iwidth; for (i=0; i < size*4; i++) { val = image[0][i]; if (!val) continue; val -= cblack[i & 3]; val *= scale_mul[i & 3]; image[0][i] = CLIP(val); } if ((aber[0] != 1 || aber[2] != 1) && colors == 3) { dcraw_message (DCRAW_VERBOSE,_("Correcting chromatic aberration...\n")); for (c=0; c < 4; c+=2) { if (aber[c] == 1) continue; img = (ushort *) malloc (size * sizeof *img); merror (img, "scale_colors()"); for (i=0; i < size; i++) img[i] = image[i][c]; for (row=0; row < iheight; row++) { ur = fr = (row - iheight*0.5) * aber[c] + iheight*0.5; if (ur > (unsigned)(iheight-2)) continue; fr -= ur; for (col=0; col < iwidth; col++) { uc = fc = (col - iwidth*0.5) * aber[c] + iwidth*0.5; if (uc > (unsigned)(iwidth-2)) continue; fc -= uc; pix = img + ur*iwidth + uc; image[row*iwidth+col][c] = (pix[ 0]*(1-fc) + pix[ 1]*fc) * (1-fr) + (pix[iwidth]*(1-fc) + pix[iwidth+1]*fc) * fr; } } free(img); } } } /* End of functions copied to dcraw_indi.c (UF) */ void CLASS pre_interpolate() { ushort (*img)[4]; int row, col, c; if (shrink) { if (half_size) { height = iheight; width = iwidth; } else { img = (ushort (*)[4]) calloc (height*width, sizeof *img); merror (img, "pre_interpolate()"); for (row=0; row < height; row++) for (col=0; col < width; col++) { c = fc(row,col); img[row*width+col][c] = image[(row >> 1)*iwidth+(col >> 1)][c]; } free (image); image = img; shrink = 0; } } if (filters && colors == 3) { if ((mix_green = four_color_rgb)) colors++; else { for (row = FC(1,0) >> 1; row < height; row+=2) for (col = FC(row,1) & 1; col < width; col+=2) image[row*width+col][1] = image[row*width+col][3]; filters &= ~((filters & 0x55555555) << 1); } } if (half_size) filters = 0; } /* Start of functions copied to dcraw_indi.c (UF) */ void CLASS border_interpolate (int border) { int row, col, y, x, f, c, sum[8]; for (row=0; row < height; row++) for (col=0; col < width; col++) { if (col==border && row >= border && row < height-border) col = width-border; memset (sum, 0, sizeof sum); for (y=row-1; y != row+2; y++) for (x=col-1; x != col+2; x++) if (y >= 0 && y < height && x >= 0 && x < width) { f = fc(y,x); sum[f] += image[y*width+x][f]; sum[f+4]++; } f = fc(row,col); FORCC if (c != f && sum[c+4]) image[row*width+col][c] = sum[c] / sum[c+4]; } } void CLASS lin_interpolate() { int code[16][16][32], *ip, sum[4]; int c, i, x, y, row, col, shift, color; ushort *pix; dcraw_message (DCRAW_VERBOSE,_("Bilinear interpolation...\n")); border_interpolate(1); for (row=0; row < 16; row++) for (col=0; col < 16; col++) { ip = code[row][col]; memset (sum, 0, sizeof sum); for (y=-1; y <= 1; y++) for (x=-1; x <= 1; x++) { shift = (y==0) + (x==0); if (shift == 2) continue; color = fc(row+y,col+x); *ip++ = (width*y + x)*4 + color; *ip++ = shift; *ip++ = color; sum[color] += 1 << shift; } FORCC if (c != fc(row,col)) { *ip++ = c; *ip++ = 256 / sum[c]; } } for (row=1; row < height-1; row++) for (col=1; col < width-1; col++) { pix = image[row*width+col]; ip = code[row & 15][col & 15]; memset (sum, 0, sizeof sum); for (i=8; i--; ip+=3) sum[ip[2]] += pix[ip[0]] << ip[1]; for (i=colors; --i; ip+=2) pix[ip[0]] = sum[ip[0]] * ip[1] >> 8; } } /* This algorithm is officially called: "Interpolation using a Threshold-based variable number of gradients" described in http://scien.stanford.edu/pages/labsite/1999/psych221/projects/99/tingchen/algodep/vargra.html I've extended the basic idea to work with non-Bayer filter arrays. Gradients are numbered clockwise from NW=0 to W=7. */ void CLASS vng_interpolate() { static const signed char *cp, terms[] = { -2,-2,+0,-1,0,0x01, -2,-2,+0,+0,1,0x01, -2,-1,-1,+0,0,0x01, -2,-1,+0,-1,0,0x02, -2,-1,+0,+0,0,0x03, -2,-1,+0,+1,1,0x01, -2,+0,+0,-1,0,0x06, -2,+0,+0,+0,1,0x02, -2,+0,+0,+1,0,0x03, -2,+1,-1,+0,0,0x04, -2,+1,+0,-1,1,0x04, -2,+1,+0,+0,0,0x06, -2,+1,+0,+1,0,0x02, -2,+2,+0,+0,1,0x04, -2,+2,+0,+1,0,0x04, -1,-2,-1,+0,0,0x80, -1,-2,+0,-1,0,0x01, -1,-2,+1,-1,0,0x01, -1,-2,+1,+0,1,0x01, -1,-1,-1,+1,0,0x88, -1,-1,+1,-2,0,0x40, -1,-1,+1,-1,0,0x22, -1,-1,+1,+0,0,0x33, -1,-1,+1,+1,1,0x11, -1,+0,-1,+2,0,0x08, -1,+0,+0,-1,0,0x44, -1,+0,+0,+1,0,0x11, -1,+0,+1,-2,1,0x40, -1,+0,+1,-1,0,0x66, -1,+0,+1,+0,1,0x22, -1,+0,+1,+1,0,0x33, -1,+0,+1,+2,1,0x10, -1,+1,+1,-1,1,0x44, -1,+1,+1,+0,0,0x66, -1,+1,+1,+1,0,0x22, -1,+1,+1,+2,0,0x10, -1,+2,+0,+1,0,0x04, -1,+2,+1,+0,1,0x04, -1,+2,+1,+1,0,0x04, +0,-2,+0,+0,1,0x80, +0,-1,+0,+1,1,0x88, +0,-1,+1,-2,0,0x40, +0,-1,+1,+0,0,0x11, +0,-1,+2,-2,0,0x40, +0,-1,+2,-1,0,0x20, +0,-1,+2,+0,0,0x30, +0,-1,+2,+1,1,0x10, +0,+0,+0,+2,1,0x08, +0,+0,+2,-2,1,0x40, +0,+0,+2,-1,0,0x60, +0,+0,+2,+0,1,0x20, +0,+0,+2,+1,0,0x30, +0,+0,+2,+2,1,0x10, +0,+1,+1,+0,0,0x44, +0,+1,+1,+2,0,0x10, +0,+1,+2,-1,1,0x40, +0,+1,+2,+0,0,0x60, +0,+1,+2,+1,0,0x20, +0,+1,+2,+2,0,0x10, +1,-2,+1,+0,0,0x80, +1,-1,+1,+1,0,0x88, +1,+0,+1,+2,0,0x08, +1,+0,+2,-1,0,0x40, +1,+0,+2,+1,0,0x10 }, chood[] = { -1,-1, -1,0, -1,+1, 0,+1, +1,+1, +1,0, +1,-1, 0,-1 }; ushort (*brow[5])[4], *pix; int prow=7, pcol=1, *ip, *code[16][16], gval[8], gmin, gmax, sum[4]; int row, col, x, y, x1, x2, y1, y2, t, weight, grads, color, diag; int g, diff, thold, num, c; lin_interpolate(); dcraw_message (DCRAW_VERBOSE,_("VNG interpolation...\n")); if (filters == 1) prow = pcol = 15; ip = (int *) calloc ((prow+1)*(pcol+1), 1280); merror (ip, "vng_interpolate()"); for (row=0; row <= prow; row++) /* Precalculate for VNG */ for (col=0; col <= pcol; col++) { code[row][col] = ip; for (cp=terms, t=0; t < 64; t++) { y1 = *cp++; x1 = *cp++; y2 = *cp++; x2 = *cp++; weight = *cp++; grads = *cp++; color = fc(row+y1,col+x1); if (fc(row+y2,col+x2) != color) continue; diag = (fc(row,col+1) == color && fc(row+1,col) == color) ? 2:1; if (abs(y1-y2) == diag && abs(x1-x2) == diag) continue; *ip++ = (y1*width + x1)*4 + color; *ip++ = (y2*width + x2)*4 + color; *ip++ = weight; for (g=0; g < 8; g++) if (grads & 1< gval[g]) gmin = gval[g]; if (gmax < gval[g]) gmax = gval[g]; } if (gmax == 0) { memcpy (brow[2][col], pix, sizeof *image); continue; } thold = gmin + (gmax >> 1); memset (sum, 0, sizeof sum); color = fc(row,col); for (num=g=0; g < 8; g++,ip+=2) { /* Average the neighbors */ if (gval[g] <= thold) { FORCC if (c == color && ip[1]) sum[c] += (pix[c] + pix[ip[1]]) >> 1; else sum[c] += pix[ip[0] + c]; num++; } } FORCC { /* Save to buffer */ t = pix[color]; if (c != color) t += (sum[c] - sum[color]) / num; brow[2][col][c] = CLIP(t); } } if (row > 3) /* Write buffer to image */ memcpy (image[(row-2)*width+2], brow[0]+2, (width-4)*sizeof *image); for (g=0; g < 4; g++) brow[(g-1) & 3] = brow[g]; } memcpy (image[(row-2)*width+2], brow[0]+2, (width-4)*sizeof *image); memcpy (image[(row-1)*width+2], brow[1]+2, (width-4)*sizeof *image); free (brow[4]); free (code[0][0]); } /* Patterned Pixel Grouping Interpolation by Alain Desbiolles */ void CLASS ppg_interpolate() { int dir[5] = { 1, width, -1, -width, 1 }; int row, col, diff[2], guess[2], c, d, i; ushort (*pix)[4]; border_interpolate(3); dcraw_message (DCRAW_VERBOSE,_("PPG interpolation...\n")); /* Fill in the green layer with gradients and pattern recognition: */ for (row=3; row < height-3; row++) for (col=3+(FC(row,3) & 1), c=FC(row,col); col < width-3; col+=2) { pix = image + row*width+col; for (i=0; (d=dir[i]) > 0; i++) { guess[i] = (pix[-d][1] + pix[0][c] + pix[d][1]) * 2 - pix[-2*d][c] - pix[2*d][c]; diff[i] = ( ABS(pix[-2*d][c] - pix[ 0][c]) + ABS(pix[ 2*d][c] - pix[ 0][c]) + ABS(pix[ -d][1] - pix[ d][1]) ) * 3 + ( ABS(pix[ 3*d][1] - pix[ d][1]) + ABS(pix[-3*d][1] - pix[-d][1]) ) * 2; } d = dir[i = diff[0] > diff[1]]; pix[0][1] = ULIM(guess[i] >> 2, pix[d][1], pix[-d][1]); } /* Calculate red and blue for each green pixel: */ for (row=1; row < height-1; row++) for (col=1+(FC(row,2) & 1), c=FC(row,col+1); col < width-1; col+=2) { pix = image + row*width+col; for (i=0; (d=dir[i]) > 0; c=2-c, i++) pix[0][c] = CLIP((pix[-d][c] + pix[d][c] + 2*pix[0][1] - pix[-d][1] - pix[d][1]) >> 1); } /* Calculate blue for red pixels and vice versa: */ for (row=1; row < height-1; row++) for (col=1+(FC(row,1) & 1), c=2-FC(row,col); col < width-1; col+=2) { pix = image + row*width+col; for (i=0; (d=dir[i]+dir[i+1]) > 0; i++) { diff[i] = ABS(pix[-d][c] - pix[d][c]) + ABS(pix[-d][1] - pix[0][1]) + ABS(pix[ d][1] - pix[0][1]); guess[i] = pix[-d][c] + pix[d][c] + 2*pix[0][1] - pix[-d][1] - pix[d][1]; } if (diff[0] != diff[1]) pix[0][c] = CLIP(guess[diff[0] > diff[1]] >> 1); else pix[0][c] = CLIP((guess[0]+guess[1]) >> 2); } } /* Adaptive Homogeneity-Directed interpolation is based on the work of Keigo Hirakawa, Thomas Parks, and Paul Lee. */ #define TS 256 /* Tile Size */ void CLASS ahd_interpolate() { int i, j, k, top, left, row, col, tr, tc, c, d, val, hm[2]; ushort (*pix)[4], (*rix)[3]; static const int dir[4] = { -1, 1, -TS, TS }; unsigned ldiff[2][4], abdiff[2][4], leps, abeps; float r, cbrt[0x10000], xyz[3], xyz_cam[3][4]; ushort (*rgb)[TS][TS][3]; short (*lab)[TS][TS][3], (*lix)[3]; char (*homo)[TS][TS], *buffer; dcraw_message (DCRAW_VERBOSE,_("AHD interpolation...\n")); for (i=0; i < 0x10000; i++) { r = i / 65535.0; cbrt[i] = r > 0.008856 ? pow(r, (float) (1/3.0)) : 7.787*r + 16/116.0; } for (i=0; i < 3; i++) for (j=0; j < colors; j++) for (xyz_cam[i][j] = k=0; k < 3; k++) xyz_cam[i][j] += xyz_rgb[i][k] * rgb_cam[k][j] / d65_white[i]; border_interpolate(5); buffer = (char *) malloc (26*TS*TS); /* 1664 kB */ merror (buffer, "ahd_interpolate()"); rgb = (ushort(*)[TS][TS][3]) buffer; lab = (short (*)[TS][TS][3])(buffer + 12*TS*TS); homo = (char (*)[TS][TS]) (buffer + 24*TS*TS); for (top=2; top < height-5; top += TS-6) for (left=2; left < width-5; left += TS-6) { /* Interpolate green horizontally and vertically: */ for (row = top; row < top+TS && row < height-2; row++) { col = left + (FC(row,left) & 1); for (c = FC(row,col); col < left+TS && col < width-2; col+=2) { pix = image + row*width+col; val = ((pix[-1][1] + pix[0][c] + pix[1][1]) * 2 - pix[-2][c] - pix[2][c]) >> 2; rgb[0][row-top][col-left][1] = ULIM(val,pix[-1][1],pix[1][1]); val = ((pix[-width][1] + pix[0][c] + pix[width][1]) * 2 - pix[-2*width][c] - pix[2*width][c]) >> 2; rgb[1][row-top][col-left][1] = ULIM(val,pix[-width][1],pix[width][1]); } } /* Interpolate red and blue, and convert to CIELab: */ for (d=0; d < 2; d++) for (row=top+1; row < top+TS-1 && row < height-3; row++) for (col=left+1; col < left+TS-1 && col < width-3; col++) { pix = image + row*width+col; rix = &rgb[d][row-top][col-left]; lix = &lab[d][row-top][col-left]; if ((c = 2 - FC(row,col)) == 1) { c = FC(row+1,col); val = pix[0][1] + (( pix[-1][2-c] + pix[1][2-c] - rix[-1][1] - rix[1][1] ) >> 1); rix[0][2-c] = CLIP(val); val = pix[0][1] + (( pix[-width][c] + pix[width][c] - rix[-TS][1] - rix[TS][1] ) >> 1); } else val = rix[0][1] + (( pix[-width-1][c] + pix[-width+1][c] + pix[+width-1][c] + pix[+width+1][c] - rix[-TS-1][1] - rix[-TS+1][1] - rix[+TS-1][1] - rix[+TS+1][1] + 1) >> 2); rix[0][c] = CLIP(val); c = FC(row,col); rix[0][c] = pix[0][c]; xyz[0] = xyz[1] = xyz[2] = 0.5; FORCC { xyz[0] += xyz_cam[0][c] * rix[0][c]; xyz[1] += xyz_cam[1][c] * rix[0][c]; xyz[2] += xyz_cam[2][c] * rix[0][c]; } xyz[0] = cbrt[CLIP((int) xyz[0])]; xyz[1] = cbrt[CLIP((int) xyz[1])]; xyz[2] = cbrt[CLIP((int) xyz[2])]; lix[0][0] = 64 * (116 * xyz[1] - 16); lix[0][1] = 64 * 500 * (xyz[0] - xyz[1]); lix[0][2] = 64 * 200 * (xyz[1] - xyz[2]); } /* Build homogeneity maps from the CIELab images: */ memset (homo, 0, 2*TS*TS); for (row=top+2; row < top+TS-2 && row < height-4; row++) { tr = row-top; for (col=left+2; col < left+TS-2 && col < width-4; col++) { tc = col-left; for (d=0; d < 2; d++) { lix = &lab[d][tr][tc]; for (i=0; i < 4; i++) { ldiff[d][i] = ABS(lix[0][0]-lix[dir[i]][0]); abdiff[d][i] = SQR(lix[0][1]-lix[dir[i]][1]) + SQR(lix[0][2]-lix[dir[i]][2]); } } leps = MIN(MAX(ldiff[0][0],ldiff[0][1]), MAX(ldiff[1][2],ldiff[1][3])); abeps = MIN(MAX(abdiff[0][0],abdiff[0][1]), MAX(abdiff[1][2],abdiff[1][3])); for (d=0; d < 2; d++) for (i=0; i < 4; i++) if (ldiff[d][i] <= leps && abdiff[d][i] <= abeps) homo[d][tr][tc]++; } } /* Combine the most homogenous pixels for the final result: */ for (row=top+3; row < top+TS-3 && row < height-5; row++) { tr = row-top; for (col=left+3; col < left+TS-3 && col < width-5; col++) { tc = col-left; for (d=0; d < 2; d++) for (hm[d]=0, i=tr-1; i <= tr+1; i++) for (j=tc-1; j <= tc+1; j++) hm[d] += homo[d][i][j]; if (hm[0] != hm[1]) FORC3 image[row*width+col][c] = rgb[hm[1] > hm[0]][tr][tc][c]; else FORC3 image[row*width+col][c] = (rgb[0][tr][tc][c] + rgb[1][tr][tc][c]) >> 1; } } } free (buffer); } #undef TS /* End of functions copied to dcraw_indi.c (UF) */ void CLASS median_filter() { ushort (*pix)[4]; int pass, c, i, j, k, med[9]; static const uchar opt[] = /* Optimal 9-element median search */ { 1,2, 4,5, 7,8, 0,1, 3,4, 6,7, 1,2, 4,5, 7,8, 0,3, 5,8, 4,7, 3,6, 1,4, 2,5, 4,7, 4,2, 6,4, 4,2 }; for (pass=1; pass <= med_passes; pass++) { dcraw_message (DCRAW_VERBOSE,_("Median filter pass %d...\n"), pass); for (c=0; c < 3; c+=2) { for (pix = image; pix < image+width*height; pix++) pix[0][3] = pix[0][c]; for (pix = image+width; pix < image+width*(height-1); pix++) { if ((pix-image+1) % width < 2) continue; for (k=0, i = -width; i <= width; i += width) for (j = i-1; j <= i+1; j++) med[k++] = pix[j][3] - pix[j][1]; for (i=0; i < (int) sizeof opt; i+=2) if (med[opt[i]] > med[opt[i+1]]) SWAP (med[opt[i]] , med[opt[i+1]]); pix[0][c] = CLIP(med[4] + pix[0][1]); } } } } void CLASS blend_highlights() { int clip=INT_MAX, row, col, c, i, j; static const float trans[2][4][4] = { { { 1,1,1 }, { 1.7320508,-1.7320508,0 }, { -1,-1,2 } }, { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; static const float itrans[2][4][4] = { { { 1,0.8660254,-0.5 }, { 1,-0.8660254,-0.5 }, { 1,0,1 } }, { { 1,1,1,1 }, { 1,-1,1,-1 }, { 1,1,-1,-1 }, { 1,-1,-1,1 } } }; float cam[2][4], lab[2][4], sum[2], chratio; if ((unsigned) (colors-3) > 1) return; dcraw_message (DCRAW_VERBOSE,_("Blending highlights...\n")); FORCC if (clip > (i = 65535*pre_mul[c])) clip = i; for (row=0; row < height; row++) for (col=0; col < width; col++) { FORCC if (image[row*width+col][c] > clip) break; if (c == colors) continue; FORCC { cam[0][c] = image[row*width+col][c]; cam[1][c] = MIN(cam[0][c],clip); } for (i=0; i < 2; i++) { FORCC for (lab[i][c]=j=0; j < colors; j++) lab[i][c] += trans[colors-3][c][j] * cam[i][j]; for (sum[i]=0,c=1; c < colors; c++) sum[i] += SQR(lab[i][c]); } chratio = sqrt(sum[1]/sum[0]); for (c=1; c < colors; c++) lab[0][c] *= chratio; FORCC for (cam[0][c]=j=0; j < colors; j++) cam[0][c] += itrans[colors-3][c][j] * lab[0][j]; FORCC image[row*width+col][c] = cam[0][c] / colors; } } #define SCALE (4 >> shrink) void CLASS recover_highlights() { float *map, sum, wgt, grow; int hsat[4], count, spread, change, val, kc, c; unsigned high, wide, mrow, mcol, row, col, d, y, x, i; ushort *pixel; static const signed char dir[8][2] = { {-1,-1}, {-1,0}, {-1,1}, {0,1}, {1,1}, {1,0}, {1,-1}, {0,-1} }; dcraw_message (DCRAW_VERBOSE,_("Rebuilding highlights...\n")); grow = pow (2.0, 4-highlight); FORCC hsat[c] = 32000 * pre_mul[c]; for (kc=0, c=1; c < colors; c++) if (pre_mul[kc] < pre_mul[c]) kc = c; high = height / SCALE; wide = width / SCALE; map = (float *) calloc (high*wide, sizeof *map); merror (map, "recover_highlights()"); FORCC if (c != kc) { memset (map, 0, high*wide*sizeof *map); for (mrow=0; mrow < high; mrow++) for (mcol=0; mcol < wide; mcol++) { sum = wgt = count = 0; for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { pixel = image[row*width+col]; if (pixel[c] / hsat[c] == 1 && pixel[kc] > 24000) { sum += pixel[c]; wgt += pixel[kc]; count++; } } if (count == SCALE*SCALE) map[mrow*wide+mcol] = sum / wgt; } for (spread = 32/grow; spread--; ) { for (mrow=0; mrow < high; mrow++) for (mcol=0; mcol < wide; mcol++) { if (map[mrow*wide+mcol]) continue; sum = count = 0; for (d=0; d < 8; d++) { y = mrow + dir[d][0]; x = mcol + dir[d][1]; if (y < high && x < wide && map[y*wide+x] > 0) { sum += (1 + (d & 1)) * map[y*wide+x]; count += 1 + (d & 1); } } if (count > 3) map[mrow*wide+mcol] = - (sum+grow) / (count+grow); } for (change=i=0; i < high*wide; i++) if (map[i] < 0) { map[i] = -map[i]; change = 1; } if (!change) break; } for (i=0; i < high*wide; i++) if (map[i] == 0) map[i] = 1; for (mrow=0; mrow < high; mrow++) for (mcol=0; mcol < wide; mcol++) { for (row = mrow*SCALE; row < (mrow+1)*SCALE; row++) for (col = mcol*SCALE; col < (mcol+1)*SCALE; col++) { pixel = image[row*width+col]; if (pixel[c] / hsat[c] > 1) { val = pixel[kc] * map[mrow*wide+mcol]; if (pixel[c] < val) pixel[c] = CLIP(val); } } } } free (map); } #undef SCALE void CLASS tiff_get (unsigned base, unsigned *tag, unsigned *type, unsigned *len, unsigned *save) { *tag = get2(); *type = get2(); *len = get4(); *save = ftell(ifp) + 4; if (*len * ("11124811248488"[*type < 14 ? *type:0]-'0') > 4) fseek (ifp, get4()+base, SEEK_SET); } void CLASS parse_thumb_note (int base, unsigned toff, unsigned tlen) { unsigned entries, tag, type, len, save; entries = get2(); while (entries--) { tiff_get (base, &tag, &type, &len, &save); if (tag == toff) thumb_offset = get4()+base; if (tag == tlen) thumb_length = get4(); fseek (ifp, save, SEEK_SET); } } //int CLASS parse_tiff_ifd (int base); void CLASS parse_makernote (int base, int uptag) { static const uchar xlat[2][256] = { { 0xc1,0xbf,0x6d,0x0d,0x59,0xc5,0x13,0x9d,0x83,0x61,0x6b,0x4f,0xc7,0x7f,0x3d,0x3d, 0x53,0x59,0xe3,0xc7,0xe9,0x2f,0x95,0xa7,0x95,0x1f,0xdf,0x7f,0x2b,0x29,0xc7,0x0d, 0xdf,0x07,0xef,0x71,0x89,0x3d,0x13,0x3d,0x3b,0x13,0xfb,0x0d,0x89,0xc1,0x65,0x1f, 0xb3,0x0d,0x6b,0x29,0xe3,0xfb,0xef,0xa3,0x6b,0x47,0x7f,0x95,0x35,0xa7,0x47,0x4f, 0xc7,0xf1,0x59,0x95,0x35,0x11,0x29,0x61,0xf1,0x3d,0xb3,0x2b,0x0d,0x43,0x89,0xc1, 0x9d,0x9d,0x89,0x65,0xf1,0xe9,0xdf,0xbf,0x3d,0x7f,0x53,0x97,0xe5,0xe9,0x95,0x17, 0x1d,0x3d,0x8b,0xfb,0xc7,0xe3,0x67,0xa7,0x07,0xf1,0x71,0xa7,0x53,0xb5,0x29,0x89, 0xe5,0x2b,0xa7,0x17,0x29,0xe9,0x4f,0xc5,0x65,0x6d,0x6b,0xef,0x0d,0x89,0x49,0x2f, 0xb3,0x43,0x53,0x65,0x1d,0x49,0xa3,0x13,0x89,0x59,0xef,0x6b,0xef,0x65,0x1d,0x0b, 0x59,0x13,0xe3,0x4f,0x9d,0xb3,0x29,0x43,0x2b,0x07,0x1d,0x95,0x59,0x59,0x47,0xfb, 0xe5,0xe9,0x61,0x47,0x2f,0x35,0x7f,0x17,0x7f,0xef,0x7f,0x95,0x95,0x71,0xd3,0xa3, 0x0b,0x71,0xa3,0xad,0x0b,0x3b,0xb5,0xfb,0xa3,0xbf,0x4f,0x83,0x1d,0xad,0xe9,0x2f, 0x71,0x65,0xa3,0xe5,0x07,0x35,0x3d,0x0d,0xb5,0xe9,0xe5,0x47,0x3b,0x9d,0xef,0x35, 0xa3,0xbf,0xb3,0xdf,0x53,0xd3,0x97,0x53,0x49,0x71,0x07,0x35,0x61,0x71,0x2f,0x43, 0x2f,0x11,0xdf,0x17,0x97,0xfb,0x95,0x3b,0x7f,0x6b,0xd3,0x25,0xbf,0xad,0xc7,0xc5, 0xc5,0xb5,0x8b,0xef,0x2f,0xd3,0x07,0x6b,0x25,0x49,0x95,0x25,0x49,0x6d,0x71,0xc7 }, { 0xa7,0xbc,0xc9,0xad,0x91,0xdf,0x85,0xe5,0xd4,0x78,0xd5,0x17,0x46,0x7c,0x29,0x4c, 0x4d,0x03,0xe9,0x25,0x68,0x11,0x86,0xb3,0xbd,0xf7,0x6f,0x61,0x22,0xa2,0x26,0x34, 0x2a,0xbe,0x1e,0x46,0x14,0x68,0x9d,0x44,0x18,0xc2,0x40,0xf4,0x7e,0x5f,0x1b,0xad, 0x0b,0x94,0xb6,0x67,0xb4,0x0b,0xe1,0xea,0x95,0x9c,0x66,0xdc,0xe7,0x5d,0x6c,0x05, 0xda,0xd5,0xdf,0x7a,0xef,0xf6,0xdb,0x1f,0x82,0x4c,0xc0,0x68,0x47,0xa1,0xbd,0xee, 0x39,0x50,0x56,0x4a,0xdd,0xdf,0xa5,0xf8,0xc6,0xda,0xca,0x90,0xca,0x01,0x42,0x9d, 0x8b,0x0c,0x73,0x43,0x75,0x05,0x94,0xde,0x24,0xb3,0x80,0x34,0xe5,0x2c,0xdc,0x9b, 0x3f,0xca,0x33,0x45,0xd0,0xdb,0x5f,0xf5,0x52,0xc3,0x21,0xda,0xe2,0x22,0x72,0x6b, 0x3e,0xd0,0x5b,0xa8,0x87,0x8c,0x06,0x5d,0x0f,0xdd,0x09,0x19,0x93,0xd0,0xb9,0xfc, 0x8b,0x0f,0x84,0x60,0x33,0x1c,0x9b,0x45,0xf1,0xf0,0xa3,0x94,0x3a,0x12,0x77,0x33, 0x4d,0x44,0x78,0x28,0x3c,0x9e,0xfd,0x65,0x57,0x16,0x94,0x6b,0xfb,0x59,0xd0,0xc8, 0x22,0x36,0xdb,0xd2,0x63,0x98,0x43,0xa1,0x04,0x87,0x86,0xf7,0xa6,0x26,0xbb,0xd6, 0x59,0x4d,0xbf,0x6a,0x2e,0xaa,0x2b,0xef,0xe6,0x78,0xb6,0x4e,0xe0,0x2f,0xdc,0x7c, 0xbe,0x57,0x19,0x32,0x7e,0x2a,0xd0,0xb8,0xba,0x29,0x00,0x3c,0x52,0x7d,0xa8,0x49, 0x3b,0x2d,0xeb,0x25,0x49,0xfa,0xa3,0xaa,0x39,0xa7,0xc5,0xa7,0x50,0x11,0x36,0xfb, 0xc6,0x67,0x4a,0xf5,0xa5,0x12,0x65,0x7e,0xb0,0xdf,0xaf,0x4e,0xb3,0x61,0x7f,0x2f } }; int c, i; unsigned offset=0, entries, tag, type, len, save; unsigned ver97=0, serial=0, wbi=0, wb[4]={0,0,0,0}; uchar buf97[324], ci, cj, ck; short sorder=order; char buf[10]; /* The MakerNote might have its own TIFF header (possibly with its own byte-order!), or it might just be a table. */ fread (buf, 1, 10, ifp); if (!strncmp (buf,"KDK" ,3) || /* these aren't TIFF tables */ !strncmp (buf,"VER" ,3) || !strncmp (buf,"IIII",4) || !strncmp (buf,"MMMM",4)) return; if (!strncmp (buf,"KC" ,2) || /* Konica KD-400Z, KD-510Z */ !strncmp (buf,"MLY" ,3)) { /* Minolta DiMAGE G series */ order = 0x4d4d; while ((i=ftell(ifp)) < data_offset && i < 16384) { wb[0] = wb[2]; wb[2] = wb[1]; wb[1] = wb[3]; wb[3] = get2(); if (wb[1] == 256 && wb[3] == 256 && wb[0] > 256 && wb[0] < 640 && wb[2] > 256 && wb[2] < 640) FORC4 cam_mul[c] = wb[c]; } goto quit; } if (!strcmp (buf,"Nikon")) { base = ftell(ifp); order = get2(); if (get2() != 42) goto quit; offset = get4(); fseek (ifp, offset-8, SEEK_CUR); } else if (!strcmp (buf,"OLYMPUS")) { base = ftell(ifp)-10; fseek (ifp, -2, SEEK_CUR); order = get2(); get2(); } else if (!strncmp (buf,"FUJIFILM",8) || !strncmp (buf,"SONY",4) || !strcmp (buf,"Panasonic")) { order = 0x4949; fseek (ifp, 2, SEEK_CUR); } else if (!strcmp (buf,"OLYMP") || !strcmp (buf,"LEICA") || !strcmp (buf,"Ricoh") || !strcmp (buf,"EPSON")) fseek (ifp, -2, SEEK_CUR); else if (!strcmp (buf,"AOC") || !strcmp (buf,"QVC")) fseek (ifp, -4, SEEK_CUR); else fseek (ifp, -10, SEEK_CUR); entries = get2(); if (entries > 1000) return; while (entries--) { tiff_get (base, &tag, &type, &len, &save); tag |= uptag << 16; if (tag == 2 && strstr(make,"NIKON")) iso_speed = (get2(),get2()); if (tag == 4 && len > 26 && len < 35) { if ((i=(get4(),get2())) != 0x7fff && !iso_speed) iso_speed = 50 * pow (2, i/32.0 - 4); if ((i=(get2(),get2())) != 0x7fff && !aperture) aperture = pow (2, i/64.0); if ((i=get2()) != 0xffff && !shutter) shutter = pow (2, (short) i/-32.0); wbi = (get2(),get2()); shot_order = (get2(),get2()); } if ((tag == 4 || tag == 0x114) && !strncmp(make,"KONICA",6)) { fseek (ifp, tag == 4 ? 140:160, SEEK_CUR); switch (get2()) { case 72: flip = 0; break; case 76: flip = 6; break; case 82: flip = 5; break; } } if (tag == 7 && type == 2 && len > 20) fgets (model2, 64, ifp); if (tag == 8 && type == 4) shot_order = get4(); if (tag == 9 && !strcmp(make,"Canon")) fread (artist, 64, 1, ifp); if (tag == 0xc && len == 4) { cam_mul[0] = getreal(type); cam_mul[2] = getreal(type); } if (tag == 0xd && type == 7 && get2() == 0xaaaa) { fread (buf97, 1, sizeof buf97, ifp); i = (uchar *) memmem (buf97, sizeof buf97,"\xbb\xbb",2) - buf97 + 10; if (i < 70 && buf97[i] < 3) flip = "065"[buf97[i]]-'0'; } if (tag == 0x10 && type == 4) unique_id = get4(); if (tag == 0x11 && is_raw && !strncmp(make,"NIKON",5)) { fseek (ifp, get4()+base, SEEK_SET); parse_tiff_ifd (base); } if (tag == 0x14 && len == 2560 && type == 7) { fseek (ifp, 1248, SEEK_CUR); goto get2_256; } if (tag == 0x15 && type == 2 && is_raw) fread (model, 64, 1, ifp); if (strstr(make,"PENTAX")) { if (tag == 0x1b) tag = 0x1018; if (tag == 0x1c) tag = 0x1017; } if (tag == 0x1d) while ((c = fgetc(ifp)) && c != EOF) serial = serial*10 + (isdigit(c) ? c - '0' : c % 10); if (tag == 0x81) { /* NTC UF*/ tone_mode_offset = ftell(ifp); tone_mode_size = len; } /* NTC UF*/ if (tag == 0x81 && type == 4) { data_offset = get4(); fseek (ifp, data_offset + 41, SEEK_SET); raw_height = get2() * 2; raw_width = get2(); filters = 0x61616161; } if (tag == 0x29 && type == 1) { c = wbi < 18 ? "012347800000005896"[wbi]-'0' : 0; fseek (ifp, 8 + c*32, SEEK_CUR); FORC4 cam_mul[c ^ (c >> 1) ^ 1] = get4(); } if ((tag == 0x81 && type == 7) || (tag == 0x100 && type == 7) || (tag == 0x280 && type == 1)) { thumb_offset = ftell(ifp); thumb_length = len; } if (tag == 0x88 && type == 4 && (thumb_offset = get4())) thumb_offset += base; if (tag == 0x89 && type == 4) thumb_length = get4(); if (tag == 0x8c || tag == 0x96) meta_offset = ftell(ifp); if (tag == 0x8c) { /* NTC UF*/ tone_curve_offset = ftell(ifp); tone_curve_size = len; } /* NTC UF*/ if (tag == 0x97) { for (i=0; i < 4; i++) ver97 = ver97 * 10 + fgetc(ifp)-'0'; switch (ver97) { case 100: fseek (ifp, 68, SEEK_CUR); FORC4 cam_mul[(c >> 1) | ((c & 1) << 1)] = get2(); break; case 102: fseek (ifp, 6, SEEK_CUR); goto get2_rggb; case 103: fseek (ifp, 16, SEEK_CUR); FORC4 cam_mul[c] = get2(); } if (ver97 >= 200) { if (ver97 != 205) fseek (ifp, 280, SEEK_CUR); fread (buf97, 324, 1, ifp); } } if (tag == 0xa1 && type == 7) { type = order; order = 0x4949; fseek (ifp, 140, SEEK_CUR); FORC3 cam_mul[c] = get4(); order = type; } if (tag == 0xa4 && type == 3) { fseek (ifp, wbi*48, SEEK_CUR); FORC3 cam_mul[c] = get2(); } if (tag == 0xa7 && (unsigned) (ver97-200) < 12 && !cam_mul[0]) { ci = xlat[0][serial & 0xff]; cj = xlat[1][fgetc(ifp)^fgetc(ifp)^fgetc(ifp)^fgetc(ifp)]; ck = 0x60; for (i=0; i < 324; i++) buf97[i] ^= (cj += ci * ck++); i = "66666>666;6A"[ver97-200] - '0'; FORC4 cam_mul[c ^ (c >> 1) ^ (i & 1)] = sget2 (buf97 + (i & -2) + c*2); } if (tag == 0x200 && len == 3) shot_order = (get4(),get4()); if (tag == 0x200 && len == 4) FORC4 cblack[c ^ c >> 1] = get2(); if (tag == 0x201 && len == 4) goto get2_rggb; if (tag == 0x220 && type == 7) meta_offset = ftell(ifp); if (tag == 0x401 && type == 4 && len == 4) FORC4 cblack[c ^ c >> 1] = get4(); if (tag == 0xe01) { /* Nikon Capture Note */ type = order; order = 0x4949; fseek (ifp, 22, SEEK_CUR); for (offset=22; offset+22 < len; offset += 22+i) { tag = get4(); fseek (ifp, 14, SEEK_CUR); i = get4()-4; if (tag == 0x76a43207) flip = get2(); else fseek (ifp, i, SEEK_CUR); } order = type; } if (tag == 0xe80 && len == 256 && type == 7) { fseek (ifp, 48, SEEK_CUR); cam_mul[0] = get2() * 508 * 1.078 / 0x10000; cam_mul[2] = get2() * 382 * 1.173 / 0x10000; } if (tag == 0xf00 && type == 7) { if (len == 614) fseek (ifp, 176, SEEK_CUR); else if (len == 734 || len == 1502) fseek (ifp, 148, SEEK_CUR); else goto next; goto get2_256; } if ((tag == 0x1011 && len == 9) || tag == 0x20400200) for (i=0; i < 3; i++) FORC3 cmatrix[i][c] = ((short) get2()) / 256.0; if ((tag == 0x1012 || tag == 0x20400600) && len == 4) FORC4 cblack[c ^ c >> 1] = get2(); if (tag == 0x1017 || tag == 0x20400100) cam_mul[0] = get2() / 256.0; if (tag == 0x1018 || tag == 0x20400100) cam_mul[2] = get2() / 256.0; if (tag == 0x2011 && len == 2) { get2_256: order = 0x4d4d; cam_mul[0] = get2() / 256.0; cam_mul[2] = get2() / 256.0; } if ((tag | 0x70) == 0x2070 && type == 4) fseek (ifp, get4()+base, SEEK_SET); if (tag == 0x2010 && type != 7) load_raw = &CLASS olympus_load_raw; if (tag == 0x2020) parse_thumb_note (base, 257, 258); if (tag == 0x2040) parse_makernote (base, 0x2040); if (tag == 0xb028) { fseek (ifp, get4()+base, SEEK_SET); parse_thumb_note (base, 136, 137); } if (tag == 0x4001 && len > 500) { i = len == 582 ? 50 : len == 653 ? 68 : len == 5120 ? 142 : 126; fseek (ifp, i, SEEK_CUR); get2_rggb: FORC4 cam_mul[c ^ (c >> 1)] = get2(); fseek (ifp, 22, SEEK_CUR); FORC4 sraw_mul[c ^ (c >> 1)] = get2(); } next: fseek (ifp, save, SEEK_SET); } quit: order = sorder; } /* Since the TIFF DateTime string has no timezone information, assume that the camera's clock was set to Universal Time. */ void CLASS get_timestamp (int reversed) { struct tm t; char str[20]; int i; str[19] = 0; if (reversed) for (i=19; i--; ) str[i] = fgetc(ifp); else fread (str, 19, 1, ifp); memset (&t, 0, sizeof t); if (sscanf (str, "%d:%d:%d %d:%d:%d", &t.tm_year, &t.tm_mon, &t.tm_mday, &t.tm_hour, &t.tm_min, &t.tm_sec) != 6) return; t.tm_year -= 1900; t.tm_mon -= 1; if (mktime(&t) > 0) timestamp = mktime(&t); } void CLASS parse_exif (int base) { unsigned kodak, entries, tag, type, len, save, c; double expo; kodak = !strncmp(make,"EASTMAN",7) && tiff_nifds < 3; entries = get2(); while (entries--) { tiff_get (base, &tag, &type, &len, &save); switch (tag) { case 33434: shutter = getreal(type); break; case 33437: aperture = getreal(type); break; case 34855: iso_speed = get2(); break; case 36867: case 36868: get_timestamp(0); break; case 37377: if ((expo = -getreal(type)) < 128) shutter = pow (2, expo); break; case 37378: aperture = pow (2, getreal(type)/2); break; case 37386: focal_len = getreal(type); break; case 37500: parse_makernote (base, 0); break; case 40962: if (kodak) raw_width = get4(); break; case 40963: if (kodak) raw_height = get4(); break; case 41730: if (get4() == 0x20002) for (exif_cfa=c=0; c < 8; c+=2) exif_cfa |= fgetc(ifp) * 0x01010101 << c; } fseek (ifp, save, SEEK_SET); } } void CLASS parse_gps (int base) { unsigned entries, tag, type, len, save, c; entries = get2(); while (entries--) { tiff_get (base, &tag, &type, &len, &save); switch (tag) { case 1: case 3: case 5: gpsdata[29+tag/2] = getc(ifp); break; case 2: case 4: case 7: FORC(6) gpsdata[tag/3*6+c] = get4(); break; case 6: FORC(2) gpsdata[18+c] = get4(); break; case 18: case 29: fgets ((char *) (gpsdata+14+tag/3), MIN(len,12), ifp); } fseek (ifp, save, SEEK_SET); } } void CLASS romm_coeff (float romm_cam[3][3]) { static const float rgb_romm[3][3] = /* ROMM == Kodak ProPhoto */ { { 2.034193, -0.727420, -0.306766 }, { -0.228811, 1.231729, -0.002922 }, { -0.008565, -0.153273, 1.161839 } }; int i, j, k; for (i=0; i < 3; i++) for (j=0; j < 3; j++) for (cmatrix[i][j] = k=0; k < 3; k++) cmatrix[i][j] += rgb_romm[i][k] * romm_cam[k][j]; } void CLASS parse_mos (int offset) { char data[40]; int skip, from, i, c, neut[4], planes=0, frot=0; static const char *mod[] = { "","DCB2","Volare","Cantare","CMost","Valeo 6","Valeo 11","Valeo 22", "Valeo 11p","Valeo 17","","Aptus 17","Aptus 22","Aptus 75","Aptus 65", "Aptus 54S","Aptus 65S","Aptus 75S","AFi 5","AFi 6","AFi 7" }; float romm_cam[3][3]; fseek (ifp, offset, SEEK_SET); while (1) { if (get4() != 0x504b5453) break; get4(); fread (data, 1, 40, ifp); skip = get4(); from = ftell(ifp); if (!strcmp(data,"JPEG_preview_data")) { thumb_offset = from; thumb_length = skip; } if (!strcmp(data,"icc_camera_profile")) { profile_offset = from; profile_length = skip; } if (!strcmp(data,"ShootObj_back_type")) { fscanf (ifp, "%d", &i); if ((unsigned) i < sizeof mod / sizeof (*mod)) strcpy (model, mod[i]); } if (!strcmp(data,"icc_camera_to_tone_matrix")) { for (i=0; i < 9; i++) romm_cam[0][i] = int_to_float(get4()); romm_coeff (romm_cam); } if (!strcmp(data,"CaptProf_color_matrix")) { for (i=0; i < 9; i++) fscanf (ifp, "%f", &romm_cam[0][i]); romm_coeff (romm_cam); } if (!strcmp(data,"CaptProf_number_of_planes")) fscanf (ifp, "%d", &planes); if (!strcmp(data,"CaptProf_raw_data_rotation")) fscanf (ifp, "%d", &flip); if (!strcmp(data,"CaptProf_mosaic_pattern")) FORC4 { fscanf (ifp, "%d", &i); if (i == 1) frot = c ^ (c >> 1); } if (!strcmp(data,"ImgProf_rotation_angle")) { fscanf (ifp, "%d", &i); flip = i - flip; } if (!strcmp(data,"NeutObj_neutrals") && !cam_mul[0]) { FORC4 fscanf (ifp, "%d", neut+c); FORC3 cam_mul[c] = (float) neut[0] / neut[c+1]; } parse_mos (from); fseek (ifp, skip+from, SEEK_SET); } if (planes) filters = (planes == 1) * 0x01010101 * (uchar) "\x94\x61\x16\x49"[(flip/90 + frot) & 3]; } void CLASS linear_table (unsigned len) { int i; if (len > 0x1000) len = 0x1000; read_shorts (curve, len); for (i=len; i < 0x1000; i++) curve[i] = curve[i-1]; maximum = curve[0xfff]; } void CLASS parse_kodak_ifd (int base) { unsigned entries, tag, type, len, save; int i, c, wbi=-2, wbtemp=6500; float mul[3]={1,1,1}, num; static const unsigned wbtag[] = { 64037,64040,64039,64041,-1,-1,64042 }; entries = get2(); if (entries > 1024) return; while (entries--) { tiff_get (base, &tag, &type, &len, &save); if (tag == 1020) wbi = getint(type); if (tag == 1021 && len == 72) { /* WB set in software */ fseek (ifp, 40, SEEK_CUR); FORC3 cam_mul[c] = 2048.0 / get2(); wbi = -2; } if (tag == 2118) wbtemp = getint(type); if (tag == (unsigned)(2130 + wbi)) FORC3 mul[c] = getreal(type); if (tag == (unsigned)(2140 + wbi) && wbi >= 0) FORC3 { for (num=i=0; i < 4; i++) num += getreal(type) * pow (wbtemp/100.0, i); cam_mul[c] = 2048 / (num * mul[c]); } if (tag == 2317) linear_table (len); if (tag == 6020) iso_speed = getint(type); if (tag == 64013) wbi = fgetc(ifp); if ((unsigned) wbi < 7 && tag == wbtag[wbi]) FORC3 cam_mul[c] = get4(); if (tag == 64019) width = getint(type); if (tag == 64020) height = (getint(type)+1) & -2; fseek (ifp, save, SEEK_SET); } } //void CLASS parse_minolta (int base); //int CLASS parse_tiff (int base); int CLASS parse_tiff_ifd (int base) { unsigned entries, tag, type, len, plen=16, save; int ifd, use_cm=0, cfa, i, j, c, ima_len=0; int blrr=1, blrc=1, dblack[] = { 0,0,0,0 }; char software[64], *cbuf, *cp; uchar cfa_pat[16], cfa_pc[] = { 0,1,2,3 }, tab[256]; double cc[4][4], cm[4][3], cam_xyz[4][3], num; double ab[]={ 1,1,1,1 }, asn[] = { 0,0,0,0 }, xyz[] = { 1,1,1 }; int sony_curve[] = { 0,0,0,0,0,4095 }; unsigned sony_offset=0, sony_length=0, sony_key=0; #ifndef WITH_MMAP_HACK unsigned *buf; FILE *sfp; #endif /* WITH_MMAP_HACK */ struct jhead jh; if (tiff_nifds >= (int) sizeof tiff_ifd / (int) sizeof tiff_ifd[0]) return 1; ifd = tiff_nifds++; for (j=0; j < 4; j++) for (i=0; i < 4; i++) cc[j][i] = i == j; entries = get2(); if (entries > 512) return 1; while (entries--) { tiff_get (base, &tag, &type, &len, &save); switch (tag) { case 5: width = get2(); break; case 6: height = get2(); break; case 7: width += get2(); break; case 9: filters = get2(); break; case 17: case 18: if (type == 3 && len == 1) cam_mul[(tag-17)*2] = get2() / 256.0; break; case 23: if (type == 3) iso_speed = get2(); break; case 36: case 37: case 38: cam_mul[tag-0x24] = get2(); break; case 39: if (len < 50 || cam_mul[0]) break; fseek (ifp, 12, SEEK_CUR); FORC3 cam_mul[c] = get2(); break; case 46: if (type != 7 || fgetc(ifp) != 0xff || fgetc(ifp) != 0xd8) break; thumb_offset = ftell(ifp) - 2; thumb_length = len; break; case 61440: /* Fuji HS10 table */ parse_tiff_ifd (base); break; case 2: case 256: case 61441: /* ImageWidth */ tiff_ifd[ifd].width = getint(type); break; case 3: case 257: case 61442: /* ImageHeight */ tiff_ifd[ifd].height = getint(type); break; case 258: /* BitsPerSample */ case 61443: tiff_ifd[ifd].samples = len & 7; tiff_ifd[ifd].bps = getint(type); break; case 259: /* Compression */ tiff_ifd[ifd].comp = get2(); break; case 262: /* PhotometricInterpretation */ tiff_ifd[ifd].phint = get2(); break; case 270: /* ImageDescription */ fread (desc, 512, 1, ifp); break; case 271: /* Make */ fgets (make, 64, ifp); break; case 272: /* Model */ fgets (model, 64, ifp); break; case 280: /* Panasonic RW2 offset */ if (type != 4) break; load_raw = &CLASS panasonic_load_raw; load_flags = 0x2008; case 273: /* StripOffset */ case 513: /* JpegIFOffset */ case 61447: tiff_ifd[ifd].offset = get4()+base; if (!tiff_ifd[ifd].bps) { fseek (ifp, tiff_ifd[ifd].offset, SEEK_SET); if (ljpeg_start (&jh, 1)) { tiff_ifd[ifd].comp = 6; tiff_ifd[ifd].width = jh.wide; tiff_ifd[ifd].height = jh.high; tiff_ifd[ifd].bps = jh.bits; tiff_ifd[ifd].samples = jh.clrs; if (!(jh.sraw || (jh.clrs & 1))) tiff_ifd[ifd].width *= jh.clrs; i = order; parse_tiff (tiff_ifd[ifd].offset + 12); order = i; } } break; case 274: /* Orientation */ tiff_ifd[ifd].flip = "50132467"[get2() & 7]-'0'; break; case 277: /* SamplesPerPixel */ tiff_ifd[ifd].samples = getint(type) & 7; break; case 279: /* StripByteCounts */ case 514: case 61448: tiff_ifd[ifd].bytes = get4(); break; case 61454: FORC3 cam_mul[(4-c) % 3] = getint(type); break; case 305: case 11: /* Software */ fgets (software, 64, ifp); if (!strncmp(software,"Adobe",5) || !strncmp(software,"dcraw",5) || !strncmp(software,"UFRaw",5) || !strncmp(software,"Bibble",6) || !strncmp(software,"Nikon Scan",10) || !strcmp (software,"Digital Photo Professional")) is_raw = 0; break; case 306: /* DateTime */ get_timestamp(0); break; case 315: /* Artist */ fread (artist, 64, 1, ifp); break; case 322: /* TileWidth */ tile_width = getint(type); break; case 323: /* TileLength */ tile_length = getint(type); break; case 324: /* TileOffsets */ tiff_ifd[ifd].offset = len > 1 ? ftell(ifp) : get4(); if (len == 4) { load_raw = &CLASS sinar_4shot_load_raw; is_raw = 5; } break; case 330: /* SubIFDs */ if (!strcmp(model,"DSLR-A100") && tiff_ifd[ifd].width == 3872) { load_raw = &CLASS sony_arw_load_raw; data_offset = get4()+base; ifd++; break; } while (len--) { i = ftell(ifp); fseek (ifp, get4()+base, SEEK_SET); if (parse_tiff_ifd (base)) break; fseek (ifp, i+4, SEEK_SET); } break; case 400: strcpy (make, "Sarnoff"); maximum = 0xfff; break; case 28688: FORC4 sony_curve[c+1] = get2() >> 2 & 0xfff; for (i=0; i < 5; i++) for (j = sony_curve[i]+1; j <= sony_curve[i+1]; j++) curve[j] = curve[j-1] + (1 << i); break; case 29184: sony_offset = get4(); break; case 29185: sony_length = get4(); break; case 29217: sony_key = get4(); break; case 29264: parse_minolta (ftell(ifp)); raw_width = 0; break; case 29443: FORC4 cam_mul[c ^ (c < 2)] = get2(); break; case 29459: FORC4 cam_mul[c] = get2(); i = (cam_mul[1] == 1024 && cam_mul[2] == 1024) << 1; SWAP (cam_mul[i],cam_mul[i+1]) break; case 33405: /* Model2 */ fgets (model2, 64, ifp); break; case 33422: /* CFAPattern */ case 64777: /* Kodak P-series */ if ((plen=len) > 16) plen = 16; fread (cfa_pat, 1, plen, ifp); for (colors=cfa=i=0; i < (int) plen; i++) { colors += !(cfa & (1 << cfa_pat[i])); cfa |= 1 << cfa_pat[i]; } if (cfa == 070) memcpy (cfa_pc,"\003\004\005",3); /* CMY */ if (cfa == 072) memcpy (cfa_pc,"\005\003\004\001",4); /* GMCY */ goto guess_cfa_pc; case 33424: case 65024: fseek (ifp, get4()+base, SEEK_SET); parse_kodak_ifd (base); break; case 33434: /* ExposureTime */ shutter = getreal(type); break; case 33437: /* FNumber */ aperture = getreal(type); break; case 34306: /* Leaf white balance */ FORC4 cam_mul[c ^ 1] = 4096.0 / get2(); break; case 34307: /* Leaf CatchLight color matrix */ fread (software, 1, 7, ifp); if (strncmp(software,"MATRIX",6)) break; colors = 4; for (raw_color = i=0; i < 3; i++) { FORC4 fscanf (ifp, "%f", &rgb_cam[i][c^1]); if (!use_camera_wb) continue; num = 0; FORC4 num += rgb_cam[i][c]; FORC4 rgb_cam[i][c] /= num; } break; case 34310: /* Leaf metadata */ parse_mos (ftell(ifp)); case 34303: strcpy (make, "Leaf"); break; case 34665: /* EXIF tag */ fseek (ifp, get4()+base, SEEK_SET); parse_exif (base); break; case 34853: /* GPSInfo tag */ fseek (ifp, get4()+base, SEEK_SET); parse_gps (base); break; case 34675: /* InterColorProfile */ case 50831: /* AsShotICCProfile */ profile_offset = ftell(ifp); profile_length = len; break; case 37122: /* CompressedBitsPerPixel */ kodak_cbpp = get4(); break; case 37386: /* FocalLength */ focal_len = getreal(type); break; case 37393: /* ImageNumber */ shot_order = getint(type); break; case 37400: /* old Kodak KDC tag */ for (raw_color = i=0; i < 3; i++) { getreal(type); FORC3 rgb_cam[i][c] = getreal(type); } break; case 46275: /* Imacon tags */ strcpy (make, "Imacon"); data_offset = ftell(ifp); ima_len = len; break; case 46279: if (!ima_len) break; fseek (ifp, 78, SEEK_CUR); raw_width = get4(); raw_height = get4(); left_margin = get4() & 7; width = raw_width - left_margin - (get4() & 7); top_margin = get4() & 7; height = raw_height - top_margin - (get4() & 7); if (raw_width == 7262) { height = 5444; width = 7244; left_margin = 7; } fseek (ifp, 52, SEEK_CUR); FORC3 cam_mul[c] = getreal(11); fseek (ifp, 114, SEEK_CUR); flip = (get2() >> 7) * 90; if (width * height * 6 == ima_len) { if (flip % 180 == 90) SWAP(width,height); filters = flip = 0; } sprintf (model, "Ixpress %d-Mp", height*width/1000000); load_raw = &CLASS imacon_full_load_raw; if (filters) { if (left_margin & 1) filters = 0x61616161; load_raw = &CLASS unpacked_load_raw; } maximum = 0xffff; break; case 50454: /* Sinar tag */ case 50455: if (!(cbuf = (char *) malloc(len))) break; fread (cbuf, 1, len, ifp); for (cp = cbuf-1; cp && cp < cbuf+len; cp = strchr(cp,'\n')) if (!strncmp (++cp,"Neutral ",8)) sscanf (cp+8, "%f %f %f", cam_mul, cam_mul+1, cam_mul+2); free (cbuf); break; case 50458: if (!make[0]) strcpy (make, "Hasselblad"); break; case 50459: /* Hasselblad tag */ i = order; j = ftell(ifp); c = tiff_nifds; order = get2(); fseek (ifp, j+(get2(),get4()), SEEK_SET); parse_tiff_ifd (j); maximum = 0xffff; tiff_nifds = c; order = i; break; case 50706: /* DNGVersion */ FORC4 dng_version = (dng_version << 8) + fgetc(ifp); if (!make[0]) strcpy (make, "DNG"); is_raw = 1; break; case 50710: /* CFAPlaneColor */ if (len > 4) len = 4; colors = len; fread (cfa_pc, 1, colors, ifp); guess_cfa_pc: FORCC tab[cfa_pc[c]] = c; cdesc[c] = 0; for (i=16; i--; ) filters = filters << 2 | tab[cfa_pat[i % plen]]; break; case 50711: /* CFALayout */ if (get2() == 2) { fuji_width = 1; filters = 0x49494949; } break; case 291: case 50712: /* LinearizationTable */ linear_table (len); break; case 50713: /* BlackLevelRepeatDim */ blrr = get2(); blrc = get2(); break; case 61450: blrr = blrc = 2; case 50714: /* BlackLevel */ black = getreal(type); if (!filters || !~filters) break; dblack[0] = black; dblack[1] = (blrc == 2) ? getreal(type):dblack[0]; dblack[2] = (blrr == 2) ? getreal(type):dblack[0]; dblack[3] = (blrc == 2 && blrr == 2) ? getreal(type):dblack[1]; if (colors == 3) filters |= ((filters >> 2 & 0x22222222) | (filters << 2 & 0x88888888)) & filters << 1; FORC4 cblack[filters >> (c << 1) & 3] = dblack[c]; black = 0; break; case 50715: /* BlackLevelDeltaH */ case 50716: /* BlackLevelDeltaV */ for (num=i=0; i < (int) len; i++) num += getreal(type); black += num/len + 0.5; break; case 50717: /* WhiteLevel */ maximum = getint(type); break; case 50718: /* DefaultScale */ pixel_aspect = getreal(type); pixel_aspect /= getreal(type); break; case 50721: /* ColorMatrix1 */ if (use_cm) break; /* Prioritize Matrix2 over Matrix1 (UF) */ case 50722: /* ColorMatrix2 */ FORCC for (j=0; j < 3; j++) cm[c][j] = getreal(type); use_cm = 1; break; case 50723: /* CameraCalibration1 */ case 50724: /* CameraCalibration2 */ for (i=0; i < colors; i++) FORCC cc[i][c] = getreal(type); break; case 50727: /* AnalogBalance */ FORCC ab[c] = getreal(type); break; case 50728: /* AsShotNeutral */ FORCC asn[c] = getreal(type); break; case 50729: /* AsShotWhiteXY */ xyz[0] = getreal(type); xyz[1] = getreal(type); xyz[2] = 1 - xyz[0] - xyz[1]; FORC3 xyz[c] /= d65_white[c]; break; case 50740: /* DNGPrivateData */ if (dng_version) break; parse_minolta (j = get4()+base); fseek (ifp, j, SEEK_SET); parse_tiff_ifd (base); break; case 50752: read_shorts (cr2_slice, 3); break; case 50829: /* ActiveArea */ top_margin = getint(type); left_margin = getint(type); height = getint(type) - top_margin; width = getint(type) - left_margin; break; case 64772: /* Kodak P-series */ if (len < 13) break; fseek (ifp, 16, SEEK_CUR); data_offset = get4(); fseek (ifp, 28, SEEK_CUR); data_offset += get4(); load_raw = &CLASS packed_load_raw; break; case 65026: if (type == 2) fgets (model2, 64, ifp); } fseek (ifp, save, SEEK_SET); } #ifndef WITH_MMAP_HACK if (sony_length && (buf = (unsigned *) malloc(sony_length))) { fseek (ifp, sony_offset, SEEK_SET); fread (buf, sony_length, 1, ifp); sony_decrypt (buf, sony_length/4, 1, sony_key); sfp = ifp; if ((ifp = tmpfile())) { fwrite (buf, sony_length, 1, ifp); fseek (ifp, 0, SEEK_SET); parse_tiff_ifd (-sony_offset); fclose (ifp); } ifp = sfp; free (buf); } #endif /* WITH_MMAP_HACK */ for (i=0; i < colors; i++) FORCC cc[i][c] *= ab[i]; if (use_cm) { FORCC for (i=0; i < 3; i++) for (cam_xyz[c][i]=j=0; j < colors; j++) cam_xyz[c][i] += cc[c][j] * cm[j][i] * xyz[i]; cam_xyz_coeff (cam_xyz); } if (asn[0]) { cam_mul[3] = 0; FORCC cam_mul[c] = 1 / asn[c]; } if (!use_cm) FORCC pre_mul[c] /= cc[c][c]; return 0; } int CLASS parse_tiff (int base) { int doff; fseek (ifp, base, SEEK_SET); order = get2(); if (order != 0x4949 && order != 0x4d4d) return 0; get2(); while ((doff = get4())) { fseek (ifp, doff+base, SEEK_SET); if (parse_tiff_ifd (base)) break; } return 1; } void CLASS apply_tiff() { int max_samp=0, raw=-1, thm=-1, i; struct jhead jh; thumb_misc = 16; if (thumb_offset) { fseek (ifp, thumb_offset, SEEK_SET); if (ljpeg_start (&jh, 1)) { thumb_misc = jh.bits; thumb_width = jh.wide; thumb_height = jh.high; } } for (i=0; i < (int) tiff_nifds; i++) { if (max_samp < tiff_ifd[i].samples) max_samp = tiff_ifd[i].samples; if (max_samp > 3) max_samp = 3; if ((tiff_ifd[i].comp != 6 || tiff_ifd[i].samples != 3) && (tiff_ifd[i].width | tiff_ifd[i].height) < 0x10000 && tiff_ifd[i].width*tiff_ifd[i].height > raw_width*raw_height) { raw_width = tiff_ifd[i].width; raw_height = tiff_ifd[i].height; tiff_bps = tiff_ifd[i].bps; tiff_compress = tiff_ifd[i].comp; data_offset = tiff_ifd[i].offset; tiff_flip = tiff_ifd[i].flip; tiff_samples = tiff_ifd[i].samples; raw = i; } } for (i=tiff_nifds; i--; ) if (tiff_ifd[i].flip) tiff_flip = tiff_ifd[i].flip; if (raw >= 0 && !load_raw) switch (tiff_compress) { case 0: case 1: switch (tiff_bps) { case 8: load_raw = &CLASS eight_bit_load_raw; break; case 12: load_raw = &CLASS packed_load_raw; if (tiff_ifd[raw].phint == 2) load_flags = 6; if (strncmp(make,"PENTAX",6)) break; case 14: case 16: load_raw = &CLASS unpacked_load_raw; break; } if (tiff_ifd[raw].bytes*5 == raw_width*raw_height*8) { tiff_bps = 12; load_raw = &CLASS packed_load_raw; load_flags = 17; } break; case 6: case 7: case 99: load_raw = &CLASS lossless_jpeg_load_raw; break; case 262: load_raw = &CLASS kodak_262_load_raw; break; case 32767: if (tiff_ifd[raw].bytes == raw_width*raw_height) { tiff_bps = 12; load_raw = &CLASS sony_arw2_load_raw; break; } if (tiff_ifd[raw].bytes*8 != (int)(raw_width*raw_height*tiff_bps)) { raw_height += 8; load_raw = &CLASS sony_arw_load_raw; break; } load_flags = 15; case 32769: load_flags++; case 32770: case 32773: load_raw = &CLASS packed_load_raw; break; case 34713: load_raw = &CLASS nikon_compressed_load_raw; break; case 65535: load_raw = &CLASS pentax_load_raw; break; case 65000: switch (tiff_ifd[raw].phint) { case 2: load_raw = &CLASS kodak_rgb_load_raw; filters = 0; break; case 6: load_raw = &CLASS kodak_ycbcr_load_raw; filters = 0; break; case 32803: load_raw = &CLASS kodak_65000_load_raw; } case 32867: break; default: is_raw = 0; } if (!dng_version) if ( (tiff_samples == 3 && tiff_ifd[raw].bytes && tiff_bps != 14 && tiff_bps != 2048) || (tiff_bps == 8 && !strstr(make,"KODAK") && !strstr(make,"Kodak") && !strstr(model2,"DEBUG RAW"))) is_raw = 0; for (i=0; i < (int) tiff_nifds; i++) if (i != raw && tiff_ifd[i].samples == max_samp && tiff_ifd[i].width * tiff_ifd[i].height / SQR(tiff_ifd[i].bps+1) > (int)(thumb_width * thumb_height / SQR(thumb_misc+1))) { thumb_width = tiff_ifd[i].width; thumb_height = tiff_ifd[i].height; thumb_offset = tiff_ifd[i].offset; thumb_length = tiff_ifd[i].bytes; thumb_misc = tiff_ifd[i].bps; thm = i; } if (thm >= 0) { thumb_misc |= tiff_ifd[thm].samples << 5; switch (tiff_ifd[thm].comp) { case 0: write_thumb = &CLASS layer_thumb; break; case 1: if (tiff_ifd[thm].bps > 8) thumb_load_raw = &CLASS kodak_thumb_load_raw; else write_thumb = &CLASS ppm_thumb; break; case 65000: thumb_load_raw = tiff_ifd[thm].phint == 6 ? &CLASS kodak_ycbcr_load_raw : &CLASS kodak_rgb_load_raw; } } } void CLASS parse_minolta (int base) { int save, tag, len, offset, high=0, wide=0, i, c; short sorder=order; fseek (ifp, base, SEEK_SET); if (fgetc(ifp) || fgetc(ifp)-'M' || fgetc(ifp)-'R') return; order = fgetc(ifp) * 0x101; offset = base + get4() + 8; while ((save=ftell(ifp)) < offset) { for (tag=i=0; i < 4; i++) tag = tag << 8 | fgetc(ifp); len = get4(); switch (tag) { case 0x505244: /* PRD */ fseek (ifp, 8, SEEK_CUR); high = get2(); wide = get2(); break; case 0x574247: /* WBG */ get4(); i = strcmp(model,"DiMAGE A200") ? 0:3; FORC4 cam_mul[c ^ (c >> 1) ^ i] = get2(); break; case 0x545457: /* TTW */ parse_tiff (ftell(ifp)); data_offset = offset; } fseek (ifp, save+len+8, SEEK_SET); } raw_height = high; raw_width = wide; order = sorder; } /* Many cameras have a "debug mode" that writes JPEG and raw at the same time. The raw file has no header, so try to to open the matching JPEG file and read its metadata. */ void CLASS parse_external_jpeg() { const char *file, *ext; char *jname, *jfile, *jext; FILE *save=ifp; ext = strrchr (ifname, '.'); file = strrchr (ifname, '/'); if (!file) file = strrchr (ifname, '\\'); if (!file) file = ifname-1; file++; if (!ext || strlen(ext) != 4 || ext-file != 8) return; jname = (char *) malloc (strlen(ifname) + 1); merror (jname, "parse_external_jpeg()"); strcpy (jname, ifname); jfile = file - ifname + jname; jext = ext - ifname + jname; if (strcasecmp (ext, ".jpg")) { strcpy (jext, isupper(ext[1]) ? ".JPG":".jpg"); if (isdigit(*file)) { memcpy (jfile, file+4, 4); memcpy (jfile+4, file, 4); } } else while (isdigit(*--jext)) { if (*jext != '9') { (*jext)++; break; } *jext = '0'; } if (strcmp (jname, ifname)) { if ((ifp = fopen (jname, "rb"))) { dcraw_message (DCRAW_VERBOSE,_("Reading metadata from %s ...\n"), jname); parse_tiff (12); thumb_offset = 0; is_raw = 1; fclose (ifp); } } if (!timestamp) dcraw_message (DCRAW_WARNING,_("Failed to read metadata from %s\n"), jname); free (jname); ifp = save; } /* CIFF block 0x1030 contains an 8x8 white sample. Load this into white[][] for use in scale_colors(). */ void CLASS ciff_block_1030() { static const ushort key[] = { 0x410, 0x45f3 }; int i, bpp, row, col, vbits=0; unsigned long bitbuf=0; if ((get2(),get4()) != 0x80008 || !get4()) return; bpp = get2(); if (bpp != 10 && bpp != 12) return; for (i=row=0; row < 8; row++) for (col=0; col < 8; col++) { if (vbits < bpp) { bitbuf = bitbuf << 16 | (get2() ^ key[i++ & 1]); vbits += 16; } white[row][col] = bitbuf << (LONG_BIT - vbits) >> (LONG_BIT - bpp); vbits -= bpp; } } /* Parse a CIFF file, better known as Canon CRW format. */ void CLASS parse_ciff (int offset, int length) { int tboff, nrecs, c, type, len, save, wbi=-1; ushort key[] = { 0x410, 0x45f3 }; fseek (ifp, offset+length-4, SEEK_SET); tboff = get4() + offset; fseek (ifp, tboff, SEEK_SET); nrecs = get2(); if (nrecs > 100) return; while (nrecs--) { type = get2(); len = get4(); save = ftell(ifp) + 4; fseek (ifp, offset+get4(), SEEK_SET); if ((((type >> 8) + 8) | 8) == 0x38) parse_ciff (ftell(ifp), len); /* Parse a sub-table */ if (type == 0x0810) fread (artist, 64, 1, ifp); if (type == 0x080a) { fread (make, 64, 1, ifp); fseek (ifp, strlen(make) - 63, SEEK_CUR); fread (model, 64, 1, ifp); } if (type == 0x1810) { fseek (ifp, 12, SEEK_CUR); flip = get4(); } if (type == 0x1835) /* Get the decoder table */ tiff_compress = get4(); if (type == 0x2007) { thumb_offset = ftell(ifp); thumb_length = len; } if (type == 0x1818) { shutter = pow (2, -int_to_float((get4(),get4()))); aperture = pow (2, int_to_float(get4())/2); } if (type == 0x102a) { iso_speed = pow (2, (get4(),get2())/32.0 - 4) * 50; aperture = pow (2, (get2(),(short)get2())/64.0); shutter = pow (2,-((short)get2())/32.0); wbi = (get2(),get2()); if (wbi > 17) wbi = 0; fseek (ifp, 32, SEEK_CUR); if (shutter > 1e6) shutter = get2()/10.0; } if (type == 0x102c) { if (get2() > 512) { /* Pro90, G1 */ fseek (ifp, 118, SEEK_CUR); FORC4 cam_mul[c ^ 2] = get2(); } else { /* G2, S30, S40 */ fseek (ifp, 98, SEEK_CUR); FORC4 cam_mul[c ^ (c >> 1) ^ 1] = get2(); } } if (type == 0x0032) { if (len == 768) { /* EOS D30 */ fseek (ifp, 72, SEEK_CUR); FORC4 cam_mul[c ^ (c >> 1)] = 1024.0 / get2(); if (!wbi) cam_mul[0] = -1; /* use my auto white balance */ } else if (!cam_mul[0]) { if (get2() == key[0]) /* Pro1, G6, S60, S70 */ c = (strstr(model,"Pro1") ? "012346000000000000":"01345:000000006008")[wbi]-'0'+ 2; else { /* G3, G5, S45, S50 */ c = "023457000000006000"[wbi]-'0'; key[0] = key[1] = 0; } fseek (ifp, 78 + c*8, SEEK_CUR); FORC4 cam_mul[c ^ (c >> 1) ^ 1] = get2() ^ key[c & 1]; if (!wbi) cam_mul[0] = -1; } } if (type == 0x10a9) { /* D60, 10D, 300D, and clones */ if (len > 66) wbi = "0134567028"[wbi]-'0'; fseek (ifp, 2 + wbi*8, SEEK_CUR); FORC4 cam_mul[c ^ (c >> 1)] = get2(); } if (type == 0x1030 && (0x18040 >> wbi & 1)) ciff_block_1030(); /* all that don't have 0x10a9 */ if (type == 0x1031) { raw_width = (get2(),get2()); raw_height = get2(); } if (type == 0x5029) { focal_len = len >> 16; if ((len & 0xffff) == 2) focal_len /= 32; } if (type == 0x5813) flash_used = int_to_float(len); if (type == 0x5814) canon_ev = int_to_float(len); if (type == 0x5817) shot_order = len; if (type == 0x5834) unique_id = len; if (type == 0x580e) timestamp = len; if (type == 0x180e) timestamp = get4(); #ifdef LOCALTIME if ((type | 0x4000) == 0x580e) timestamp = mktime (gmtime (×tamp)); #endif fseek (ifp, save, SEEK_SET); } } void CLASS parse_rollei() { char line[128], *val; struct tm t; fseek (ifp, 0, SEEK_SET); memset (&t, 0, sizeof t); do { fgets (line, 128, ifp); if ((val = strchr(line,'='))) *val++ = 0; else val = line + strlen(line); if (!strcmp(line,"DAT")) sscanf (val, "%d.%d.%d", &t.tm_mday, &t.tm_mon, &t.tm_year); if (!strcmp(line,"TIM")) sscanf (val, "%d:%d:%d", &t.tm_hour, &t.tm_min, &t.tm_sec); if (!strcmp(line,"HDR")) thumb_offset = atoi(val); if (!strcmp(line,"X ")) raw_width = atoi(val); if (!strcmp(line,"Y ")) raw_height = atoi(val); if (!strcmp(line,"TX ")) thumb_width = atoi(val); if (!strcmp(line,"TY ")) thumb_height = atoi(val); } while (strncmp(line,"EOHD",4)); data_offset = thumb_offset + thumb_width * thumb_height * 2; t.tm_year -= 1900; t.tm_mon -= 1; if (mktime(&t) > 0) timestamp = mktime(&t); strcpy (make, "Rollei"); strcpy (model,"d530flex"); write_thumb = &CLASS rollei_thumb; } void CLASS parse_sinar_ia() { int entries, off; char str[8], *cp; order = 0x4949; fseek (ifp, 4, SEEK_SET); entries = get4(); fseek (ifp, get4(), SEEK_SET); while (entries--) { off = get4(); get4(); fread (str, 8, 1, ifp); if (!strcmp(str,"META")) meta_offset = off; if (!strcmp(str,"THUMB")) thumb_offset = off; if (!strcmp(str,"RAW0")) data_offset = off; } fseek (ifp, meta_offset+20, SEEK_SET); fread (make, 64, 1, ifp); make[63] = 0; if ((cp = strchr(make,' '))) { strcpy (model, cp+1); *cp = 0; } raw_width = get2(); raw_height = get2(); load_raw = &CLASS unpacked_load_raw; thumb_width = (get4(),get2()); thumb_height = get2(); write_thumb = &CLASS ppm_thumb; maximum = 0x3fff; } void CLASS parse_phase_one (int base) { unsigned entries, tag, type, len, data, save, i, j, c; float romm_cam[3][3]; char *cp; memset (&ph1, 0, sizeof ph1); fseek (ifp, base, SEEK_SET); order = get4() & 0xffff; if (get4() >> 8 != 0x526177) return; /* "Raw" */ fseek (ifp, get4()+base, SEEK_SET); entries = get4(); get4(); while (entries--) { tag = get4(); type = get4(); len = get4(); data = get4(); save = ftell(ifp); fseek (ifp, base+data, SEEK_SET); switch (tag) { case 0x100: flip = "0653"[data & 3]-'0'; break; case 0x106: for (i=0; i < 3; i++) for (j=0; j < 3; j++) romm_cam[i][j] = getreal(11); romm_coeff (romm_cam); break; case 0x107: FORC3 cam_mul[c] = getreal(11); break; case 0x108: raw_width = data; break; case 0x109: raw_height = data; break; case 0x10a: left_margin = data; break; case 0x10b: top_margin = data; break; case 0x10c: width = data; break; case 0x10d: height = data; break; case 0x10e: ph1.format = data; break; case 0x10f: data_offset = data+base; break; case 0x110: meta_offset = data+base; meta_length = len; break; case 0x112: ph1.key_off = save - 4; break; case 0x210: ph1.tag_210 = int_to_float(data); break; case 0x21a: ph1.tag_21a = data; break; case 0x21c: strip_offset = data+base; break; case 0x21d: ph1.black = data; break; case 0x222: ph1.split_col = data - left_margin; break; case 0x223: ph1.black_off = data+base; break; case 0x301: model[63] = 0; fread (model, 1, 63, ifp); if ((cp = strstr(model," camera"))) *cp = 0; } fseek (ifp, save, SEEK_SET); } load_raw = ph1.format < 3 ? &CLASS phase_one_load_raw : &CLASS phase_one_load_raw_c; maximum = 0xffff; strcpy (make, "Phase One"); if (model[0]) return; switch (raw_height) { case 2060: strcpy (model,"LightPhase"); break; case 2682: strcpy (model,"H 10"); break; case 4128: strcpy (model,"H 20"); break; case 5488: strcpy (model,"H 25"); break; } } void CLASS parse_fuji (int offset) { unsigned entries, tag, len, save, c; fseek (ifp, offset, SEEK_SET); entries = get4(); if (entries > 255) return; while (entries--) { tag = get2(); len = get2(); save = ftell(ifp); if (tag == 0x100) { raw_height = get2(); raw_width = get2(); } else if (tag == 0x121) { height = get2(); if ((width = get2()) == 4284) width += 3; } else if (tag == 0x130) { fuji_layout = fgetc(ifp) >> 7; load_raw = fgetc(ifp) & 8 ? &CLASS unpacked_load_raw : &CLASS fuji_load_raw; } if (tag == 0x2ff0) FORC4 cam_mul[c ^ 1] = get2(); fseek (ifp, save+len, SEEK_SET); } if (!raw_height) { filters = 0x16161616; load_raw = &CLASS packed_load_raw; load_flags = 24; } height <<= fuji_layout; width >>= fuji_layout; } int CLASS parse_jpeg (int offset) { int len, save, hlen, mark; fseek (ifp, offset, SEEK_SET); if (fgetc(ifp) != 0xff || fgetc(ifp) != 0xd8) return 0; while (fgetc(ifp) == 0xff && (mark = fgetc(ifp)) != 0xda) { order = 0x4d4d; len = get2() - 2; save = ftell(ifp); if (mark == 0xc0 || mark == 0xc3) { fgetc(ifp); raw_height = get2(); raw_width = get2(); } order = get2(); hlen = get4(); if (get4() == 0x48454150) /* "HEAP" */ parse_ciff (save+hlen, len-hlen); if (parse_tiff (save+6)) apply_tiff(); fseek (ifp, save+len, SEEK_SET); } return 1; } void CLASS parse_riff() { unsigned i, size, end; char tag[4], date[64], month[64]; static const char mon[12][4] = { "Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec" }; struct tm t; order = 0x4949; fread (tag, 4, 1, ifp); size = get4(); end = ftell(ifp) + size; if (!memcmp(tag,"RIFF",4) || !memcmp(tag,"LIST",4)) { get4(); while ((unsigned)(ftell(ifp)+7) < end) parse_riff(); } else if (!memcmp(tag,"nctg",4)) { while ((unsigned)(ftell(ifp)+7) < end) { i = get2(); size = get2(); if ((i+1) >> 1 == 10 && size == 20) get_timestamp(0); else fseek (ifp, size, SEEK_CUR); } } else if (!memcmp(tag,"IDIT",4) && size < 64) { fread (date, 64, 1, ifp); date[size] = 0; memset (&t, 0, sizeof t); if (sscanf (date, "%*s %s %d %d:%d:%d %d", month, &t.tm_mday, &t.tm_hour, &t.tm_min, &t.tm_sec, &t.tm_year) == 6) { for (i=0; i < 12 && strcasecmp(mon[i],month); i++); t.tm_mon = i; t.tm_year -= 1900; if (mktime(&t) > 0) timestamp = mktime(&t); } } else fseek (ifp, size, SEEK_CUR); } void CLASS parse_smal (int offset, unsigned fsize) { int ver; fseek (ifp, offset+2, SEEK_SET); order = 0x4949; ver = fgetc(ifp); if (ver == 6) fseek (ifp, 5, SEEK_CUR); if (get4() != fsize) return; if (ver > 6) data_offset = get4(); raw_height = height = get2(); raw_width = width = get2(); strcpy (make, "SMaL"); sprintf (model, "v%d %dx%d", ver, width, height); if (ver == 6) load_raw = &CLASS smal_v6_load_raw; if (ver == 9) load_raw = &CLASS smal_v9_load_raw; } void CLASS parse_cine() { unsigned off_head, off_setup, off_image, i; order = 0x4949; fseek (ifp, 4, SEEK_SET); is_raw = get2() == 2; fseek (ifp, 14, SEEK_CUR); is_raw *= get4(); off_head = get4(); off_setup = get4(); off_image = get4(); timestamp = get4(); if ((i = get4())) timestamp = i; fseek (ifp, off_head+4, SEEK_SET); raw_width = get4(); raw_height = get4(); switch (get2(),get2()) { case 8: load_raw = &CLASS eight_bit_load_raw; break; case 16: load_raw = &CLASS unpacked_load_raw; } fseek (ifp, off_setup+792, SEEK_SET); strcpy (make, "CINE"); sprintf (model, "%d", get4()); fseek (ifp, 12, SEEK_CUR); switch ((i=get4()) & 0xffffff) { case 3: filters = 0x94949494; break; case 4: filters = 0x49494949; break; default: is_raw = 0; } fseek (ifp, 72, SEEK_CUR); switch ((get4()+3600) % 360) { case 270: flip = 4; break; case 180: flip = 1; break; case 90: flip = 7; break; case 0: flip = 2; } cam_mul[0] = getreal(11); cam_mul[2] = getreal(11); maximum = ~(-1 << get4()); fseek (ifp, 668, SEEK_CUR); shutter = get4()/1000000000.0; fseek (ifp, off_image, SEEK_SET); if (shot_select < is_raw) fseek (ifp, shot_select*8, SEEK_CUR); data_offset = (INT64) get4() + 8; data_offset += (INT64) get4() << 32; } char * CLASS foveon_gets (int offset, char *str, int len) { int i; fseek (ifp, offset, SEEK_SET); for (i=0; i < len-1; i++) if ((str[i] = get2()) == 0) break; str[i] = 0; return str; } void CLASS parse_foveon() { int entries, img=0, off, len, tag, save, i, wide, high, pent, poff[256][2]; char name[64], value[64]; order = 0x4949; /* Little-endian */ fseek (ifp, 36, SEEK_SET); flip = get4(); fseek (ifp, -4, SEEK_END); fseek (ifp, get4(), SEEK_SET); if (get4() != 0x64434553) return; /* SECd */ entries = (get4(),get4()); while (entries--) { off = get4(); len = get4(); tag = get4(); save = ftell(ifp); fseek (ifp, off, SEEK_SET); if (get4() != (unsigned)(0x20434553 | (tag << 24))) return; switch (tag) { case 0x47414d49: /* IMAG */ case 0x32414d49: /* IMA2 */ fseek (ifp, 8, SEEK_CUR); if (get4() == 30) { /* SIGMA DP* and SD15 are unsupported */ is_foveon = 0; return; } wide = get4(); high = get4(); if (wide > raw_width && high > raw_height) { raw_width = wide; raw_height = high; data_offset = off+24; } fseek (ifp, off+28, SEEK_SET); if (fgetc(ifp) == 0xff && fgetc(ifp) == 0xd8 && thumb_length < (unsigned)(len-28)) { thumb_offset = off+28; thumb_length = len-28; write_thumb = &CLASS jpeg_thumb; } if (++img == 2 && !thumb_length) { thumb_offset = off+24; thumb_width = wide; thumb_height = high; write_thumb = &CLASS foveon_thumb; } break; case 0x464d4143: /* CAMF */ meta_offset = off+24; meta_length = len-28; if (meta_length > 0x20000) meta_length = 0x20000; break; case 0x504f5250: /* PROP */ pent = (get4(),get4()); fseek (ifp, 12, SEEK_CUR); off += pent*8 + 24; if ((unsigned) pent > 256) pent=256; for (i=0; i < pent*2; i++) poff[0][i] = off + get4()*2; for (i=0; i < pent; i++) { foveon_gets (poff[i][0], name, 64); foveon_gets (poff[i][1], value, 64); if (!strcmp (name, "ISO")) iso_speed = atoi(value); if (!strcmp (name, "CAMMANUF")) strcpy (make, value); if (!strcmp (name, "CAMMODEL")) strcpy (model, value); if (!strcmp (name, "WB_DESC")) strcpy (model2, value); if (!strcmp (name, "TIME")) timestamp = atoi(value); if (!strcmp (name, "EXPTIME")) shutter = atoi(value) / 1000000.0; if (!strcmp (name, "APERTURE")) aperture = atof(value); if (!strcmp (name, "FLENGTH")) focal_len = atof(value); } #ifdef LOCALTIME timestamp = mktime (gmtime (×tamp)); #endif } fseek (ifp, save, SEEK_SET); } is_foveon = 1; } /* All matrices are from Adobe DNG Converter unless otherwise noted. */ void CLASS adobe_coeff (const char *make, const char *model) { static const struct { const char *prefix; short black, maximum, trans[12]; } table[] = { { "AGFAPHOTO DC-833m", 0, 0, /* DJC */ { 11438,-3762,-1115,-2409,9914,2497,-1227,2295,5300 } }, { "Apple QuickTake", 0, 0, /* DJC */ { 21392,-5653,-3353,2406,8010,-415,7166,1427,2078 } }, { "Canon EOS D2000", 0, 0, { 24542,-10860,-3401,-1490,11370,-297,2858,-605,3225 } }, { "Canon EOS D6000", 0, 0, { 20482,-7172,-3125,-1033,10410,-285,2542,226,3136 } }, { "Canon EOS D30", 0, 0, { 9805,-2689,-1312,-5803,13064,3068,-2438,3075,8775 } }, { "Canon EOS D60", 0, 0xfa0, { 6188,-1341,-890,-7168,14489,2937,-2640,3228,8483 } }, { "Canon EOS 5D Mark II", 0, 0x3cf0, { 4716,603,-830,-7798,15474,2480,-1496,1937,6651 } }, { "Canon EOS 5D", 0, 0xe6c, { 6347,-479,-972,-8297,15954,2480,-1968,2131,7649 } }, { "Canon EOS 7D", 0, 0x3510, { 6844,-996,-856,-3876,11761,2396,-593,1772,6198 } }, { "Canon EOS 10D", 0, 0xfa0, { 8197,-2000,-1118,-6714,14335,2592,-2536,3178,8266 } }, { "Canon EOS 20Da", 0, 0, { 14155,-5065,-1382,-6550,14633,2039,-1623,1824,6561 } }, { "Canon EOS 20D", 0, 0xfff, { 6599,-537,-891,-8071,15783,2424,-1983,2234,7462 } }, { "Canon EOS 30D", 0, 0, { 6257,-303,-1000,-7880,15621,2396,-1714,1904,7046 } }, { "Canon EOS 40D", 0, 0x3f60, { 6071,-747,-856,-7653,15365,2441,-2025,2553,7315 } }, { "Canon EOS 50D", 0, 0x3d93, { 4920,616,-593,-6493,13964,2784,-1774,3178,7005 } }, { "Canon EOS 60D", 0, 0x2ff7, { 6719,-994,-925,-4408,12426,2211,-887,2129,6051 } }, { "Canon EOS 300D", 0, 0xfa0, { 8197,-2000,-1118,-6714,14335,2592,-2536,3178,8266 } }, { "Canon EOS 350D", 0, 0xfff, { 6018,-617,-965,-8645,15881,2975,-1530,1719,7642 } }, { "Canon EOS 400D", 0, 0xe8e, { 7054,-1501,-990,-8156,15544,2812,-1278,1414,7796 } }, { "Canon EOS 450D", 0, 0x390d, { 5784,-262,-821,-7539,15064,2672,-1982,2681,7427 } }, { "Canon EOS 500D", 0, 0x3479, { 4763,712,-646,-6821,14399,2640,-1921,3276,6561 } }, { "Canon EOS 550D", 0, 0x3dd7, { 6941,-1164,-857,-3825,11597,2534,-416,1540,6039 } }, { "Canon EOS 1000D", 0, 0xe43, { 6771,-1139,-977,-7818,15123,2928,-1244,1437,7533 } }, { "Canon EOS-1Ds Mark III", 0, 0x3bb0, { 5859,-211,-930,-8255,16017,2353,-1732,1887,7448 } }, { "Canon EOS-1Ds Mark II", 0, 0xe80, { 6517,-602,-867,-8180,15926,2378,-1618,1771,7633 } }, { "Canon EOS-1D Mark IV", 0, 0x3bb0, { 6014,-220,-795,-4109,12014,2361,-561,1824,5787 } }, { "Canon EOS-1D Mark III", 0, 0x3bb0, { 6291,-540,-976,-8350,16145,2311,-1714,1858,7326 } }, { "Canon EOS-1D Mark II N", 0, 0xe80, { 6240,-466,-822,-8180,15825,2500,-1801,1938,8042 } }, { "Canon EOS-1D Mark II", 0, 0xe80, { 6264,-582,-724,-8312,15948,2504,-1744,1919,8664 } }, { "Canon EOS-1DS", 0, 0xe20, { 4374,3631,-1743,-7520,15212,2472,-2892,3632,8161 } }, { "Canon EOS-1D", 0, 0xe20, { 6806,-179,-1020,-8097,16415,1687,-3267,4236,7690 } }, { "Canon EOS", 0, 0, { 8197,-2000,-1118,-6714,14335,2592,-2536,3178,8266 } }, { "Canon PowerShot A530", 0, 0, { 0 } }, /* don't want the A5 matrix */ { "Canon PowerShot A50", 0, 0, { -5300,9846,1776,3436,684,3939,-5540,9879,6200,-1404,11175,217 } }, { "Canon PowerShot A5", 0, 0, { -4801,9475,1952,2926,1611,4094,-5259,10164,5947,-1554,10883,547 } }, { "Canon PowerShot G10", 0, 0, { 11093,-3906,-1028,-5047,12492,2879,-1003,1750,5561 } }, { "Canon PowerShot G11", 0, 0, { 12177,-4817,-1069,-1612,9864,2049,-98,850,4471 } }, { "Canon PowerShot G12", 0, 0, { 0 } }, { "Canon PowerShot G1", 0, 0, { -4778,9467,2172,4743,-1141,4344,-5146,9908,6077,-1566,11051,557 } }, { "Canon PowerShot G2", 0, 0, { 9087,-2693,-1049,-6715,14382,2537,-2291,2819,7790 } }, { "Canon PowerShot G3", 0, 0, { 9212,-2781,-1073,-6573,14189,2605,-2300,2844,7664 } }, { "Canon PowerShot G5", 0, 0, { 9757,-2872,-933,-5972,13861,2301,-1622,2328,7212 } }, { "Canon PowerShot G6", 0, 0, { 9877,-3775,-871,-7613,14807,3072,-1448,1305,7485 } }, { "Canon PowerShot G9", 0, 0, { 7368,-2141,-598,-5621,13254,2625,-1418,1696,5743 } }, { "Canon PowerShot Pro1", 0, 0, { 10062,-3522,-999,-7643,15117,2730,-765,817,7323 } }, { "Canon PowerShot Pro70", 34, 0, { -4155,9818,1529,3939,-25,4522,-5521,9870,6610,-2238,10873,1342 } }, { "Canon PowerShot Pro90", 0, 0, { -4963,9896,2235,4642,-987,4294,-5162,10011,5859,-1770,11230,577 } }, { "Canon PowerShot S30", 0, 0, { 10566,-3652,-1129,-6552,14662,2006,-2197,2581,7670 } }, { "Canon PowerShot S40", 0, 0, { 8510,-2487,-940,-6869,14231,2900,-2318,2829,9013 } }, { "Canon PowerShot S45", 0, 0, { 8163,-2333,-955,-6682,14174,2751,-2077,2597,8041 } }, { "Canon PowerShot S50", 0, 0, { 8882,-2571,-863,-6348,14234,2288,-1516,2172,6569 } }, { "Canon PowerShot S60", 0, 0, { 8795,-2482,-797,-7804,15403,2573,-1422,1996,7082 } }, { "Canon PowerShot S70", 0, 0, { 9976,-3810,-832,-7115,14463,2906,-901,989,7889 } }, { "Canon PowerShot S90", 0, 0, { 12374,-5016,-1049,-1677,9902,2078,-83,852,4683 } }, { "Canon PowerShot S95", 0, 0, { 13610,-5487,-1268,-1373,9773,1601,-824,1545,3772 } }, { "Canon PowerShot A470", 0, 0, /* DJC */ { 12513,-4407,-1242,-2680,10276,2405,-878,2215,4734 } }, { "Canon PowerShot A610", 0, 0, /* DJC */ { 15591,-6402,-1592,-5365,13198,2168,-1300,1824,5075 } }, { "Canon PowerShot A620", 0, 0, /* DJC */ { 15265,-6193,-1558,-4125,12116,2010,-888,1639,5220 } }, { "Canon PowerShot A630", 0, 0, /* DJC */ { 14201,-5308,-1757,-6087,14472,1617,-2191,3105,5348 } }, { "Canon PowerShot A640", 0, 0, /* DJC */ { 13124,-5329,-1390,-3602,11658,1944,-1612,2863,4885 } }, { "Canon PowerShot A650", 0, 0, /* DJC */ { 9427,-3036,-959,-2581,10671,1911,-1039,1982,4430 } }, { "Canon PowerShot A720", 0, 0, /* DJC */ { 14573,-5482,-1546,-1266,9799,1468,-1040,1912,3810 } }, { "Canon PowerShot S3 IS", 0, 0, /* DJC */ { 14062,-5199,-1446,-4712,12470,2243,-1286,2028,4836 } }, { "Canon PowerShot SX1 IS", 0, 0, { 6578,-259,-502,-5974,13030,3309,-308,1058,4970 } }, { "Canon PowerShot SX110 IS", 0, 0, /* DJC */ { 14134,-5576,-1527,-1991,10719,1273,-1158,1929,3581 } }, { "CASIO EX-S20", 0, 0, /* DJC */ { 11634,-3924,-1128,-4968,12954,2015,-1588,2648,7206 } }, { "CASIO EX-Z750", 0, 0, /* DJC */ { 10819,-3873,-1099,-4903,13730,1175,-1755,3751,4632 } }, { "CINE 650", 0, 0, { 3390,480,-500,-800,3610,340,-550,2336,1192 } }, { "CINE 660", 0, 0, { 3390,480,-500,-800,3610,340,-550,2336,1192 } }, { "CINE", 0, 0, { 20183,-4295,-423,-3940,15330,3985,-280,4870,9800 } }, { "Contax N Digital", 0, 0xf1e, { 7777,1285,-1053,-9280,16543,2916,-3677,5679,7060 } }, { "EPSON R-D1", 0, 0, { 6827,-1878,-732,-8429,16012,2564,-704,592,7145 } }, { "FUJIFILM FinePix E550", 0, 0, { 11044,-3888,-1120,-7248,15168,2208,-1531,2277,8069 } }, { "FUJIFILM FinePix E900", 0, 0, { 9183,-2526,-1078,-7461,15071,2574,-2022,2440,8639 } }, { "FUJIFILM FinePix F8", 0, 0, { 11044,-3888,-1120,-7248,15168,2208,-1531,2277,8069 } }, { "FUJIFILM FinePix F7", 0, 0, { 10004,-3219,-1201,-7036,15047,2107,-1863,2565,7736 } }, { "FUJIFILM FinePix S100FS", 514, 0, { 11521,-4355,-1065,-6524,13767,3058,-1466,1984,6045 } }, { "FUJIFILM FinePix S200EXR", 512, 0x3fff, { 0 } }, { "FUJIFILM FinePix S20Pro", 0, 0, { 10004,-3219,-1201,-7036,15047,2107,-1863,2565,7736 } }, { "FUJIFILM FinePix S2Pro", 128, 0, { 12492,-4690,-1402,-7033,15423,1647,-1507,2111,7697 } }, { "FUJIFILM FinePix S3Pro", 0, 0, { 11807,-4612,-1294,-8927,16968,1988,-2120,2741,8006 } }, { "FUJIFILM FinePix S5Pro", 0, 0, { 12300,-5110,-1304,-9117,17143,1998,-1947,2448,8100 } }, { "FUJIFILM FinePix S5000", 0, 0, { 8754,-2732,-1019,-7204,15069,2276,-1702,2334,6982 } }, { "FUJIFILM FinePix S5100", 0, 0, { 11940,-4431,-1255,-6766,14428,2542,-993,1165,7421 } }, { "FUJIFILM FinePix S5500", 0, 0, { 11940,-4431,-1255,-6766,14428,2542,-993,1165,7421 } }, { "FUJIFILM FinePix S5200", 0, 0, { 9636,-2804,-988,-7442,15040,2589,-1803,2311,8621 } }, { "FUJIFILM FinePix S5600", 0, 0, { 9636,-2804,-988,-7442,15040,2589,-1803,2311,8621 } }, { "FUJIFILM FinePix S6", 0, 0, { 12628,-4887,-1401,-6861,14996,1962,-2198,2782,7091 } }, { "FUJIFILM FinePix S7000", 0, 0, { 10190,-3506,-1312,-7153,15051,2238,-2003,2399,7505 } }, { "FUJIFILM FinePix S9000", 0, 0, { 10491,-3423,-1145,-7385,15027,2538,-1809,2275,8692 } }, { "FUJIFILM FinePix S9500", 0, 0, { 10491,-3423,-1145,-7385,15027,2538,-1809,2275,8692 } }, { "FUJIFILM FinePix S9100", 0, 0, { 12343,-4515,-1285,-7165,14899,2435,-1895,2496,8800 } }, { "FUJIFILM FinePix S9600", 0, 0, { 12343,-4515,-1285,-7165,14899,2435,-1895,2496,8800 } }, { "FUJIFILM IS-1", 0, 0, { 21461,-10807,-1441,-2332,10599,1999,289,875,7703 } }, { "FUJIFILM IS Pro", 0, 0, { 12300,-5110,-1304,-9117,17143,1998,-1947,2448,8100 } }, { "FUJIFILM FinePix HS10 HS11", 0, 0xf68, { 12440,-3954,-1183,-1123,9674,1708,-83,1614,4086 } }, { "Imacon Ixpress", 0, 0, /* DJC */ { 7025,-1415,-704,-5188,13765,1424,-1248,2742,6038 } }, { "KODAK NC2000", 0, 0, { 13891,-6055,-803,-465,9919,642,2121,82,1291 } }, { "Kodak DCS315C", 8, 0, { 17523,-4827,-2510,756,8546,-137,6113,1649,2250 } }, { "Kodak DCS330C", 8, 0, { 20620,-7572,-2801,-103,10073,-396,3551,-233,2220 } }, { "KODAK DCS420", 0, 0, { 10868,-1852,-644,-1537,11083,484,2343,628,2216 } }, { "KODAK DCS460", 0, 0, { 10592,-2206,-967,-1944,11685,230,2206,670,1273 } }, { "KODAK EOSDCS1", 0, 0, { 10592,-2206,-967,-1944,11685,230,2206,670,1273 } }, { "KODAK EOSDCS3B", 0, 0, { 9898,-2700,-940,-2478,12219,206,1985,634,1031 } }, { "Kodak DCS520C", 180, 0, { 24542,-10860,-3401,-1490,11370,-297,2858,-605,3225 } }, { "Kodak DCS560C", 188, 0, { 20482,-7172,-3125,-1033,10410,-285,2542,226,3136 } }, { "Kodak DCS620C", 180, 0, { 23617,-10175,-3149,-2054,11749,-272,2586,-489,3453 } }, { "Kodak DCS620X", 185, 0, { 13095,-6231,154,12221,-21,-2137,895,4602,2258 } }, { "Kodak DCS660C", 214, 0, { 18244,-6351,-2739,-791,11193,-521,3711,-129,2802 } }, { "Kodak DCS720X", 0, 0, { 11775,-5884,950,9556,1846,-1286,-1019,6221,2728 } }, { "Kodak DCS760C", 0, 0, { 16623,-6309,-1411,-4344,13923,323,2285,274,2926 } }, { "Kodak DCS Pro SLR", 0, 0, { 5494,2393,-232,-6427,13850,2846,-1876,3997,5445 } }, { "Kodak DCS Pro 14nx", 0, 0, { 5494,2393,-232,-6427,13850,2846,-1876,3997,5445 } }, { "Kodak DCS Pro 14", 0, 0, { 7791,3128,-776,-8588,16458,2039,-2455,4006,6198 } }, { "Kodak ProBack645", 0, 0, { 16414,-6060,-1470,-3555,13037,473,2545,122,4948 } }, { "Kodak ProBack", 0, 0, { 21179,-8316,-2918,-915,11019,-165,3477,-180,4210 } }, { "KODAK P712", 0, 0, { 9658,-3314,-823,-5163,12695,2768,-1342,1843,6044 } }, { "KODAK P850", 0, 0xf7c, { 10511,-3836,-1102,-6946,14587,2558,-1481,1792,6246 } }, { "KODAK P880", 0, 0xfff, { 12805,-4662,-1376,-7480,15267,2360,-1626,2194,7904 } }, { "KODAK EasyShare Z980", 0, 0, { 11313,-3559,-1101,-3893,11891,2257,-1214,2398,4908 } }, { "KODAK EasyShare Z981", 0, 0, { 12729,-4717,-1188,-1367,9187,2582,274,860,4411 } }, { "KODAK EASYSHARE Z1015", 0, 0xef1, { 11265,-4286,-992,-4694,12343,2647,-1090,1523,5447 } }, { "Leaf CMost", 0, 0, { 3952,2189,449,-6701,14585,2275,-4536,7349,6536 } }, { "Leaf Valeo 6", 0, 0, { 3952,2189,449,-6701,14585,2275,-4536,7349,6536 } }, { "Leaf Aptus 54S", 0, 0, { 8236,1746,-1314,-8251,15953,2428,-3673,5786,5771 } }, { "Leaf Aptus 65", 0, 0, { 7914,1414,-1190,-8777,16582,2280,-2811,4605,5562 } }, { "Leaf Aptus 75", 0, 0, { 7914,1414,-1190,-8777,16582,2280,-2811,4605,5562 } }, { "Leaf", 0, 0, { 8236,1746,-1314,-8251,15953,2428,-3673,5786,5771 } }, { "Mamiya ZD", 0, 0, { 7645,2579,-1363,-8689,16717,2015,-3712,5941,5961 } }, { "Micron 2010", 110, 0, /* DJC */ { 16695,-3761,-2151,155,9682,163,3433,951,4904 } }, { "Minolta DiMAGE 5", 0, 0xf7d, { 8983,-2942,-963,-6556,14476,2237,-2426,2887,8014 } }, { "Minolta DiMAGE 7Hi", 0, 0xf7d, { 11368,-3894,-1242,-6521,14358,2339,-2475,3056,7285 } }, { "Minolta DiMAGE 7", 0, 0xf7d, { 9144,-2777,-998,-6676,14556,2281,-2470,3019,7744 } }, { "Minolta DiMAGE A1", 0, 0xf8b, { 9274,-2547,-1167,-8220,16323,1943,-2273,2720,8340 } }, { "MINOLTA DiMAGE A200", 0, 0, { 8560,-2487,-986,-8112,15535,2771,-1209,1324,7743 } }, { "Minolta DiMAGE A2", 0, 0xf8f, { 9097,-2726,-1053,-8073,15506,2762,-966,981,7763 } }, { "Minolta DiMAGE Z2", 0, 0, /* DJC */ { 11280,-3564,-1370,-4655,12374,2282,-1423,2168,5396 } }, { "MINOLTA DYNAX 5", 0, 0xffb, { 10284,-3283,-1086,-7957,15762,2316,-829,882,6644 } }, { "MINOLTA DYNAX 7", 0, 0xffb, { 10239,-3104,-1099,-8037,15727,2451,-927,925,6871 } }, { "MOTOROLA PIXL", 0, 0, /* DJC */ { 8898,-989,-1033,-3292,11619,1674,-661,3178,5216 } }, { "NIKON D100", 0, 0, { 5902,-933,-782,-8983,16719,2354,-1402,1455,6464 } }, { "NIKON D1H", 0, 0, { 7577,-2166,-926,-7454,15592,1934,-2377,2808,8606 } }, { "NIKON D1X", 0, 0, { 7702,-2245,-975,-9114,17242,1875,-2679,3055,8521 } }, { "NIKON D1", 0, 0, /* multiplied by 2.218750, 1.0, 1.148438 */ { 16772,-4726,-2141,-7611,15713,1972,-2846,3494,9521 } }, { "NIKON D200", 0, 0xfbc, { 8367,-2248,-763,-8758,16447,2422,-1527,1550,8053 } }, { "NIKON D2H", 0, 0, { 5710,-901,-615,-8594,16617,2024,-2975,4120,6830 } }, { "NIKON D2X", 0, 0, { 10231,-2769,-1255,-8301,15900,2552,-797,680,7148 } }, { "NIKON D3000", 0, 0, { 8736,-2458,-935,-9075,16894,2251,-1354,1242,8263 } }, { "NIKON D300", 0, 0, { 9030,-1992,-715,-8465,16302,2255,-2689,3217,8069 } }, { "NIKON D3X", 0, 0, { 7171,-1986,-648,-8085,15555,2718,-2170,2512,7457 } }, { "NIKON D3S", 0, 0, { 8828,-2406,-694,-4874,12603,2541,-660,1509,7587 } }, { "NIKON D3", 0, 0, { 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 } }, { "NIKON D40X", 0, 0, { 8819,-2543,-911,-9025,16928,2151,-1329,1213,8449 } }, { "NIKON D40", 0, 0, { 6992,-1668,-806,-8138,15748,2543,-874,850,7897 } }, { "NIKON D5000", 0, 0xf00, { 7309,-1403,-519,-8474,16008,2622,-2433,2826,8064 } }, { "NIKON D50", 0, 0, { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } }, { "NIKON D60", 0, 0, { 8736,-2458,-935,-9075,16894,2251,-1354,1242,8263 } }, { "NIKON D7000", 0, 0, /* DJC */ { 6629,-2254,-2,-3468,9387,4081,-760,2102,7574 } }, { "NIKON D700", 0, 0, { 8139,-2171,-663,-8747,16541,2295,-1925,2008,8093 } }, { "NIKON D70", 0, 0, { 7732,-2422,-789,-8238,15884,2498,-859,783,7330 } }, { "NIKON D80", 0, 0, { 8629,-2410,-883,-9055,16940,2171,-1490,1363,8520 } }, { "NIKON D90", 0, 0xf00, { 7309,-1403,-519,-8474,16008,2622,-2434,2826,8064 } }, { "NIKON E950", 0, 0x3dd, /* DJC */ { -3746,10611,1665,9621,-1734,2114,-2389,7082,3064,3406,6116,-244 } }, { "NIKON E995", 0, 0, /* copied from E5000 */ { -5547,11762,2189,5814,-558,3342,-4924,9840,5949,688,9083,96 } }, { "NIKON E2100", 0, 0, /* copied from Z2, new white balance */ { 13142,-4152,-1596,-4655,12374,2282,-1769,2696,6711} }, { "NIKON E2500", 0, 0, { -5547,11762,2189,5814,-558,3342,-4924,9840,5949,688,9083,96 } }, { "NIKON E3200", 0, 0, /* DJC */ { 9846,-2085,-1019,-3278,11109,2170,-774,2134,5745 } }, { "NIKON E4300", 0, 0, /* copied from Minolta DiMAGE Z2 */ { 11280,-3564,-1370,-4655,12374,2282,-1423,2168,5396 } }, { "NIKON E4500", 0, 0, { -5547,11762,2189,5814,-558,3342,-4924,9840,5949,688,9083,96 } }, { "NIKON E5000", 0, 0, { -5547,11762,2189,5814,-558,3342,-4924,9840,5949,688,9083,96 } }, { "NIKON E5400", 0, 0, { 9349,-2987,-1001,-7919,15766,2266,-2098,2680,6839 } }, { "NIKON E5700", 0, 0, { -5368,11478,2368,5537,-113,3148,-4969,10021,5782,778,9028,211 } }, { "NIKON E8400", 0, 0, { 7842,-2320,-992,-8154,15718,2599,-1098,1342,7560 } }, { "NIKON E8700", 0, 0, { 8489,-2583,-1036,-8051,15583,2643,-1307,1407,7354 } }, { "NIKON E8800", 0, 0, { 7971,-2314,-913,-8451,15762,2894,-1442,1520,7610 } }, { "NIKON COOLPIX P6000", 0, 0, { 9698,-3367,-914,-4706,12584,2368,-837,968,5801 } }, { "OLYMPUS C5050", 0, 0, { 10508,-3124,-1273,-6079,14294,1901,-1653,2306,6237 } }, { "OLYMPUS C5060", 0, 0, { 10445,-3362,-1307,-7662,15690,2058,-1135,1176,7602 } }, { "OLYMPUS C7070", 0, 0, { 10252,-3531,-1095,-7114,14850,2436,-1451,1723,6365 } }, { "OLYMPUS C70", 0, 0, { 10793,-3791,-1146,-7498,15177,2488,-1390,1577,7321 } }, { "OLYMPUS C80", 0, 0, { 8606,-2509,-1014,-8238,15714,2703,-942,979,7760 } }, { "OLYMPUS E-10", 0, 0xffc, { 12745,-4500,-1416,-6062,14542,1580,-1934,2256,6603 } }, { "OLYMPUS E-1", 0, 0, { 11846,-4767,-945,-7027,15878,1089,-2699,4122,8311 } }, { "OLYMPUS E-20", 0, 0xffc, { 13173,-4732,-1499,-5807,14036,1895,-2045,2452,7142 } }, { "OLYMPUS E-300", 0, 0, { 7828,-1761,-348,-5788,14071,1830,-2853,4518,6557 } }, { "OLYMPUS E-330", 0, 0, { 8961,-2473,-1084,-7979,15990,2067,-2319,3035,8249 } }, { "OLYMPUS E-30", 0, 0xfbc, { 8144,-1861,-1111,-7763,15894,1929,-1865,2542,7607 } }, { "OLYMPUS E-3", 0, 0xf99, { 9487,-2875,-1115,-7533,15606,2010,-1618,2100,7389 } }, { "OLYMPUS E-400", 0, 0, { 6169,-1483,-21,-7107,14761,2536,-2904,3580,8568 } }, { "OLYMPUS E-410", 0, 0xf6a, { 8856,-2582,-1026,-7761,15766,2082,-2009,2575,7469 } }, { "OLYMPUS E-420", 0, 0xfd7, { 8746,-2425,-1095,-7594,15612,2073,-1780,2309,7416 } }, { "OLYMPUS E-450", 0, 0xfd2, { 8745,-2425,-1095,-7594,15613,2073,-1780,2309,7416 } }, { "OLYMPUS E-500", 0, 0, { 8136,-1968,-299,-5481,13742,1871,-2556,4205,6630 } }, { "OLYMPUS E-510", 0, 0xf6a, { 8785,-2529,-1033,-7639,15624,2112,-1783,2300,7817 } }, { "OLYMPUS E-520", 0, 0xfd2, { 8344,-2322,-1020,-7596,15635,2048,-1748,2269,7287 } }, { "OLYMPUS E-5", 0, 0, /* DJC */ { 10033,-4067,-600,-3784,10494,3291,-923,2594,7744 } }, { "OLYMPUS E-600", 0, 0xfaf, { 8453,-2198,-1092,-7609,15681,2008,-1725,2337,7824 } }, { "OLYMPUS E-620", 0, 0xfaf, { 8453,-2198,-1092,-7609,15681,2008,-1725,2337,7824 } }, { "OLYMPUS E-P1", 0, 0xffd, { 8343,-2050,-1021,-7715,15705,2103,-1831,2380,8235 } }, { "OLYMPUS E-P2", 0, 0xffd, { 8343,-2050,-1021,-7715,15705,2103,-1831,2380,8235 } }, { "OLYMPUS E-PL1", 0, 0, { 11408,-4289,-1215,-4286,12385,2118,-387,1467,7787 } }, { "OLYMPUS SP350", 0, 0, { 12078,-4836,-1069,-6671,14306,2578,-786,939,7418 } }, { "OLYMPUS SP3", 0, 0, { 11766,-4445,-1067,-6901,14421,2707,-1029,1217,7572 } }, { "OLYMPUS SP500UZ", 0, 0xfff, { 9493,-3415,-666,-5211,12334,3260,-1548,2262,6482 } }, { "OLYMPUS SP510UZ", 0, 0xffe, { 10593,-3607,-1010,-5881,13127,3084,-1200,1805,6721 } }, { "OLYMPUS SP550UZ", 0, 0xffe, { 11597,-4006,-1049,-5432,12799,2957,-1029,1750,6516 } }, { "OLYMPUS SP560UZ", 0, 0xff9, { 10915,-3677,-982,-5587,12986,2911,-1168,1968,6223 } }, { "OLYMPUS SP570UZ", 0, 0, { 11522,-4044,-1146,-4736,12172,2904,-988,1829,6039 } }, { "PENTAX *ist DL2", 0, 0, { 10504,-2438,-1189,-8603,16207,2531,-1022,863,12242 } }, { "PENTAX *ist DL", 0, 0, { 10829,-2838,-1115,-8339,15817,2696,-837,680,11939 } }, { "PENTAX *ist DS2", 0, 0, { 10504,-2438,-1189,-8603,16207,2531,-1022,863,12242 } }, { "PENTAX *ist DS", 0, 0, { 10371,-2333,-1206,-8688,16231,2602,-1230,1116,11282 } }, { "PENTAX *ist D", 0, 0, { 9651,-2059,-1189,-8881,16512,2487,-1460,1345,10687 } }, { "PENTAX K10D", 0, 0, { 9566,-2863,-803,-7170,15172,2112,-818,803,9705 } }, { "PENTAX K1", 0, 0, { 11095,-3157,-1324,-8377,15834,2720,-1108,947,11688 } }, { "PENTAX K20D", 0, 0, { 9427,-2714,-868,-7493,16092,1373,-2199,3264,7180 } }, { "PENTAX K200D", 0, 0, { 9186,-2678,-907,-8693,16517,2260,-1129,1094,8524 } }, { "PENTAX K2000", 0, 0, { 11057,-3604,-1155,-5152,13046,2329,-282,375,8104 } }, { "PENTAX K-m", 0, 0, { 11057,-3604,-1155,-5152,13046,2329,-282,375,8104 } }, { "PENTAX K-x", 0, 0, { 8843,-2837,-625,-5025,12644,2668,-411,1234,7410 } }, { "PENTAX K-r", 0, 0, /* Pentax DNG */ { 21746,-6684,-1521,-10014,26601,6573,-1920,3062,19415 } }, { "PENTAX K-5", 0, 0, /* Pentax DNG */ { 19331,-5842,-2589,-9103,28027,4285,-2216,3884,14767 } }, { "PENTAX K-7", 0, 0, { 9142,-2947,-678,-8648,16967,1663,-2224,2898,8615 } }, { "PENTAX 645D", 0, 0x3e00, { 10646,-3593,-1158,-3329,11699,1831,-667,2874,6287 } }, { "Panasonic DMC-FZ8", 0, 0xf7f, { 8986,-2755,-802,-6341,13575,3077,-1476,2144,6379 } }, { "Panasonic DMC-FZ18", 0, 0, { 9932,-3060,-935,-5809,13331,2753,-1267,2155,5575 } }, { "Panasonic DMC-FZ28", 15, 0xf96, { 10109,-3488,-993,-5412,12812,2916,-1305,2140,5543 } }, { "Panasonic DMC-FZ30", 0, 0xf94, { 10976,-4029,-1141,-7918,15491,2600,-1670,2071,8246 } }, { "Panasonic DMC-FZ3", 143, 0, { 9938,-2780,-890,-4604,12393,2480,-1117,2304,4620 } }, { "Panasonic DMC-FZ40", 143, 0, { 13639,-5535,-1371,-1698,9633,2430,316,1152,4108 } }, { "Panasonic DMC-FZ50", 0, 0, { 7906,-2709,-594,-6231,13351,3220,-1922,2631,6537 } }, { "LEICA V-LUX1", 0, 0, { 7906,-2709,-594,-6231,13351,3220,-1922,2631,6537 } }, { "Panasonic DMC-L10", 15, 0xf96, { 8025,-1942,-1050,-7920,15904,2100,-2456,3005,7039 } }, { "Panasonic DMC-L1", 0, 0xf7f, { 8054,-1885,-1025,-8349,16367,2040,-2805,3542,7629 } }, { "LEICA DIGILUX 3", 0, 0xf7f, { 8054,-1885,-1025,-8349,16367,2040,-2805,3542,7629 } }, { "Panasonic DMC-LC1", 0, 0, { 11340,-4069,-1275,-7555,15266,2448,-2960,3426,7685 } }, { "LEICA DIGILUX 2", 0, 0, { 11340,-4069,-1275,-7555,15266,2448,-2960,3426,7685 } }, { "Panasonic DMC-LX1", 0, 0xf7f, { 10704,-4187,-1230,-8314,15952,2501,-920,945,8927 } }, { "LEICA D-LUX2", 0, 0xf7f, { 10704,-4187,-1230,-8314,15952,2501,-920,945,8927 } }, { "Panasonic DMC-LX2", 0, 0, { 8048,-2810,-623,-6450,13519,3272,-1700,2146,7049 } }, { "LEICA D-LUX3", 0, 0, { 8048,-2810,-623,-6450,13519,3272,-1700,2146,7049 } }, { "Panasonic DMC-LX3", 15, 0, { 8128,-2668,-655,-6134,13307,3161,-1782,2568,6083 } }, { "LEICA D-LUX4", 15, 0, { 8128,-2668,-655,-6134,13307,3161,-1782,2568,6083 } }, { "Panasonic DMC-LX5", 143, 0, { 10909,-4295,-948,-1333,9306,2399,22,1738,4582 } }, { "Panasonic DMC-FZ100", 143, 0xfff, { 16197,-6146,-1761,-2393,10765,1869,366,2238,5248 } }, { "Panasonic DMC-FX150", 15, 0xfff, { 9082,-2907,-925,-6119,13377,3058,-1797,2641,5609 } }, { "Panasonic DMC-G10", 0, 0, { 10113,-3400,-1114,-4765,12683,2317,-377,1437,6710 } }, { "Panasonic DMC-G1", 15, 0xf94, { 8199,-2065,-1056,-8124,16156,2033,-2458,3022,7220 } }, { "Panasonic DMC-G2", 15, 0xf3c, { 10113,-3400,-1114,-4765,12683,2317,-377,1437,6710 } }, { "Panasonic DMC-GF1", 15, 0xf92, { 7888,-1902,-1011,-8106,16085,2099,-2353,2866,7330 } }, { "Panasonic DMC-GH1", 15, 0xf92, { 6299,-1466,-532,-6535,13852,2969,-2331,3112,5984 } }, { "Phase One H 20", 0, 0, /* DJC */ { 1313,1855,-109,-6715,15908,808,-327,1840,6020 } }, { "Phase One P 2", 0, 0, { 2905,732,-237,-8134,16626,1476,-3038,4253,7517 } }, { "Phase One P 30", 0, 0, { 4516,-245,-37,-7020,14976,2173,-3206,4671,7087 } }, { "Phase One P 45", 0, 0, { 5053,-24,-117,-5684,14076,1702,-2619,4492,5849 } }, { "Phase One P65", 0, 0, { 7914,1414,-1190,-8777,16582,2280,-2811,4605,5562 } }, { "SAMSUNG EX1", 0, 0x3e00, { 8898,-2498,-994,-3144,11328,2066,-760,1381,4576 } }, { "SAMSUNG NX10", 20, 0xea6, { 10332,-3234,-1168,-6111,14639,1520,-1352,2647,8331 } }, { "SAMSUNG WB2000", 0, 0xfff, { 0 } }, { "SAMSUNG GX-1", 0, 0, { 10504,-2438,-1189,-8603,16207,2531,-1022,863,12242 } }, { "SAMSUNG S85", 0, 0xffff, /* DJC */ { 11885,-3968,-1473,-4214,12299,1916,-835,1655,5549 } }, { "Sinar", 0, 0, /* DJC */ { 16442,-2956,-2422,-2877,12128,750,-1136,6066,4559 } }, { "SONY DSC-F828", 491, 0, { 7924,-1910,-777,-8226,15459,2998,-1517,2199,6818,-7242,11401,3481 } }, { "SONY DSC-R1", 512, 0, { 8512,-2641,-694,-8042,15670,2526,-1821,2117,7414 } }, { "SONY DSC-V3", 0, 0, { 7511,-2571,-692,-7894,15088,3060,-948,1111,8128 } }, { "SONY DSLR-A100", 0, 0xfeb, { 9437,-2811,-774,-8405,16215,2290,-710,596,7181 } }, { "SONY DSLR-A2", 0, 0, { 9847,-3091,-928,-8485,16345,2225,-715,595,7103 } }, { "SONY DSLR-A300", 0, 0, { 9847,-3091,-928,-8485,16345,2225,-715,595,7103 } }, { "SONY DSLR-A330", 0, 0, { 9847,-3091,-929,-8485,16346,2225,-714,595,7103 } }, { "SONY DSLR-A350", 0, 0xffc, { 6038,-1484,-578,-9146,16746,2513,-875,746,7217 } }, { "SONY DSLR-A380", 0, 0, { 6038,-1484,-579,-9145,16746,2512,-875,746,7218 } }, { "SONY DSLR-A450", 128, 0xfeb, { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, { "SONY DSLR-A5", 128, 0xfeb, { 4950,-580,-103,-5228,12542,3029,-709,1435,7371 } }, { "SONY DSLR-A700", 126, 0, { 5775,-805,-359,-8574,16295,2391,-1943,2341,7249 } }, { "SONY DSLR-A850", 128, 0, { 5413,-1162,-365,-5665,13098,2866,-608,1179,8440 } }, { "SONY DSLR-A900", 128, 0, { 5209,-1072,-397,-8845,16120,2919,-1618,1803,8654 } }, { "SONY NEX-3", 138, 0, /* DJC */ { 6907,-1256,-645,-4940,12621,2320,-1710,2581,6230 } }, { "SONY NEX-5", 116, 0, /* DJC */ { 6807,-1350,-342,-4216,11649,2567,-1089,2001,6420 } }, { "SONY NEX", 128, 0, /* Adobe's matrix */ { 6549,-1550,-436,-4880,12435,2753,-854,1868,6976 } }, { "SONY SLT-A33", 128, 0, { 6069,-1221,-366,-5221,12779,2734,-1024,2066,6834 } }, { "SONY SLT-A55", 128, 0, { 5932,-1492,-411,-4813,12285,2856,-741,1524,6739 } } }; double cam_xyz[4][3]; char name[130]; int i, j, k; sprintf (name, "%s %s", make, model); for (i=0; i < (int) sizeof table / (int) sizeof *table; i++) if (!strncmp (name, table[i].prefix, strlen(table[i].prefix))) { if (table[i].black) black = (ushort) table[i].black; if (table[i].maximum) maximum = (ushort) table[i].maximum; if (table[i].trans[0]) { for (j=0; j < 4; j++) for (k=0; k < 3; k++) cam_xyz[j][k] = table[i].trans[3*j+k] / 10000.0; cam_xyz_coeff (cam_xyz); } break; } } void CLASS simple_coeff (int index) { static const float table[][12] = { /* index 0 -- all Foveon cameras */ { 1.4032,-0.2231,-0.1016,-0.5263,1.4816,0.017,-0.0112,0.0183,0.9113 }, /* index 1 -- Kodak DC20 and DC25 */ { 2.25,0.75,-1.75,-0.25,-0.25,0.75,0.75,-0.25,-0.25,-1.75,0.75,2.25 }, /* index 2 -- Logitech Fotoman Pixtura */ { 1.893,-0.418,-0.476,-0.495,1.773,-0.278,-1.017,-0.655,2.672 }, /* index 3 -- Nikon E880, E900, and E990 */ { -1.936280, 1.800443, -1.448486, 2.584324, 1.405365, -0.524955, -0.289090, 0.408680, -1.204965, 1.082304, 2.941367, -1.818705 } }; int i, c; for (raw_color = i=0; i < 3; i++) FORCC rgb_cam[i][c] = table[index][i*colors+c]; } short CLASS guess_byte_order (int words) { uchar test[4][2]; int t=2, msb; double diff, sum[2] = {0,0}; fread (test[0], 2, 2, ifp); for (words-=2; words--; ) { fread (test[t], 2, 1, ifp); for (msb=0; msb < 2; msb++) { diff = (test[t^2][msb] << 8 | test[t^2][!msb]) - (test[t ][msb] << 8 | test[t ][!msb]); sum[msb] += diff*diff; } t = (t+1) & 3; } return sum[0] < sum[1] ? 0x4d4d : 0x4949; } float CLASS find_green (int bps, int bite, int off0, int off1) { UINT64 bitbuf=0; int vbits, col, i, c; ushort img[2][2064]; double sum[]={0,0}; FORC(2) { fseek (ifp, c ? off1:off0, SEEK_SET); for (vbits=col=0; col < width; col++) { for (vbits -= bps; vbits < 0; vbits += bite) { bitbuf <<= bite; for (i=0; i < bite; i+=8) bitbuf |= (unsigned) (fgetc(ifp) << i); } img[c][col] = bitbuf << (64-bps-vbits) >> (64-bps); } } FORC(width-1) { sum[ c & 1] += ABS(img[0][c]-img[1][c+1]); sum[~c & 1] += ABS(img[1][c]-img[0][c+1]); } return 100 * log(sum[0]/sum[1]); } /* Identify which camera created this file, and set global variables accordingly. */ void CLASS identify() { char head[32], *cp; int hlen, flen, fsize, zero_fsize=1, i, c, is_canon; struct jhead jh; short pana[][6] = { { 3130, 1743, 4, 0, -6, 0 }, { 3130, 2055, 4, 0, -6, 0 }, { 3130, 2319, 4, 0, -6, 0 }, { 3170, 2103, 18, 0,-42, 20 }, { 3170, 2367, 18, 13,-42,-21 }, { 3177, 2367, 0, 0, -1, 0 }, { 3304, 2458, 0, 0, -1, 0 }, { 3330, 2463, 9, 0, -5, 0 }, { 3330, 2479, 9, 0,-17, 4 }, { 3370, 1899, 15, 0,-44, 20 }, { 3370, 2235, 15, 0,-44, 20 }, { 3370, 2511, 15, 10,-44,-21 }, { 3690, 2751, 3, 0, -8, -3 }, { 3710, 2751, 0, 0, -3, 0 }, { 3724, 2450, 0, 0, 0, -2 }, { 3770, 2487, 17, 0,-44, 19 }, { 3770, 2799, 17, 15,-44,-19 }, { 3880, 2170, 6, 0, -6, 0 }, { 4060, 3018, 0, 0, 0, -2 }, { 4290, 2391, 3, 0, -8, -1 }, { 4330, 2439, 17, 15,-44,-19 }, { 4508, 2962, 0, 0, -3, -4 }, { 4508, 3330, 0, 0, -3, -6 } }; static const struct { int fsize; const char make[12], model[19], withjpeg; } table[] = { { 62464, "Kodak", "DC20" ,0 }, { 124928, "Kodak", "DC20" ,0 }, { 1652736, "Kodak", "DCS200" ,0 }, { 4159302, "Kodak", "C330" ,0 }, { 4162462, "Kodak", "C330" ,0 }, { 460800, "Kodak", "C603v" ,0 }, { 614400, "Kodak", "C603v" ,0 }, { 6163328, "Kodak", "C603" ,0 }, { 6166488, "Kodak", "C603" ,0 }, { 9116448, "Kodak", "C603y" ,0 }, { 311696, "ST Micro", "STV680 VGA" ,0 }, /* SPYz */ { 787456, "Creative", "PC-CAM 600" ,0 }, { 1138688, "Minolta", "RD175" ,0 }, { 3840000, "Foculus", "531C" ,0 }, { 786432, "AVT", "F-080C" ,0 }, { 1447680, "AVT", "F-145C" ,0 }, { 1920000, "AVT", "F-201C" ,0 }, { 5067304, "AVT", "F-510C" ,0 }, { 5067316, "AVT", "F-510C" ,0 }, { 10134608, "AVT", "F-510C" ,0 }, { 10134620, "AVT", "F-510C" ,0 }, { 16157136, "AVT", "F-810C" ,0 }, { 1409024, "Sony", "XCD-SX910CR" ,0 }, { 2818048, "Sony", "XCD-SX910CR" ,0 }, { 3884928, "Micron", "2010" ,0 }, { 6624000, "Pixelink", "A782" ,0 }, { 13248000, "Pixelink", "A782" ,0 }, { 6291456, "RoverShot","3320AF" ,0 }, { 6553440, "Canon", "PowerShot A460" ,0 }, { 6653280, "Canon", "PowerShot A530" ,0 }, { 6573120, "Canon", "PowerShot A610" ,0 }, { 9219600, "Canon", "PowerShot A620" ,0 }, { 9243240, "Canon", "PowerShot A470" ,0 }, { 10341600, "Canon", "PowerShot A720 IS",0 }, { 10383120, "Canon", "PowerShot A630" ,0 }, { 12945240, "Canon", "PowerShot A640" ,0 }, { 15636240, "Canon", "PowerShot A650" ,0 }, { 5298000, "Canon", "PowerShot SD300" ,0 }, { 7710960, "Canon", "PowerShot S3 IS" ,0 }, { 15467760, "Canon", "PowerShot SX110 IS",0 }, { 15534576, "Canon", "PowerShot SX120 IS",0 }, { 18653760, "Canon", "PowerShot SX20 IS",0 }, { 5939200, "OLYMPUS", "C770UZ" ,0 }, { 1581060, "NIKON", "E900" ,1 }, /* or E900s,E910 */ { 2465792, "NIKON", "E950" ,1 }, /* or E800,E700 */ { 2940928, "NIKON", "E2100" ,1 }, /* or E2500 */ { 4771840, "NIKON", "E990" ,1 }, /* or E995, Oly C3030Z */ { 4775936, "NIKON", "E3700" ,1 }, /* or Optio 33WR */ { 5869568, "NIKON", "E4300" ,1 }, /* or DiMAGE Z2 */ { 5865472, "NIKON", "E4500" ,1 }, { 7438336, "NIKON", "E5000" ,1 }, /* or E5700 */ { 8998912, "NIKON", "COOLPIX S6" ,1 }, { 1976352, "CASIO", "QV-2000UX" ,1 }, { 3217760, "CASIO", "QV-3*00EX" ,1 }, { 6218368, "CASIO", "QV-5700" ,1 }, { 6054400, "CASIO", "QV-R41" ,1 }, { 7530816, "CASIO", "QV-R51" ,1 }, { 7684000, "CASIO", "QV-4000" ,1 }, { 2937856, "CASIO", "EX-S20" ,1 }, { 4948608, "CASIO", "EX-S100" ,1 }, { 7542528, "CASIO", "EX-Z50" ,1 }, { 7753344, "CASIO", "EX-Z55" ,1 }, { 7816704, "CASIO", "EX-Z60" ,1 }, { 10843712, "CASIO", "EX-Z75" ,1 }, { 10834368, "CASIO", "EX-Z750" ,1 }, { 12310144, "CASIO", "EX-Z850" ,1 }, { 15499264, "CASIO", "EX-Z1050" ,1 }, { 7426656, "CASIO", "EX-P505" ,1 }, { 9313536, "CASIO", "EX-P600" ,1 }, { 10979200, "CASIO", "EX-P700" ,1 }, { 3178560, "PENTAX", "Optio S" ,1 }, { 4841984, "PENTAX", "Optio S" ,1 }, { 6114240, "PENTAX", "Optio S4" ,1 }, /* or S4i, CASIO EX-Z4 */ { 10702848, "PENTAX", "Optio 750Z" ,1 }, { 15980544, "AGFAPHOTO","DC-833m" ,1 }, { 16098048, "SAMSUNG", "S85" ,1 }, { 16215552, "SAMSUNG", "S85" ,1 }, { 20487168, "SAMSUNG", "WB550" ,1 }, { 24000000, "SAMSUNG", "WB550" ,1 }, { 12582980, "Sinar", "" ,0 }, { 33292868, "Sinar", "" ,0 }, { 44390468, "Sinar", "" ,0 } }; static const char *corp[] = { "Canon", "NIKON", "EPSON", "KODAK", "Kodak", "OLYMPUS", "PENTAX", "MINOLTA", "Minolta", "Konica", "CASIO", "Sinar", "Phase One", "SAMSUNG", "Mamiya", "MOTOROLA" }; tiff_flip = flip = filters = -1; /* 0 is valid, so -1 is unknown */ raw_height = raw_width = fuji_width = fuji_layout = cr2_slice[0] = 0; maximum = height = width = top_margin = left_margin = 0; cdesc[0] = desc[0] = artist[0] = make[0] = model[0] = model2[0] = 0; iso_speed = shutter = aperture = focal_len = unique_id = 0; tiff_nifds = 0; memset (tiff_ifd, 0, sizeof tiff_ifd); memset (gpsdata, 0, sizeof gpsdata); memset (cblack, 0, sizeof cblack); memset (white, 0, sizeof white); thumb_offset = thumb_length = thumb_width = thumb_height = 0; load_raw = thumb_load_raw = 0; write_thumb = &CLASS jpeg_thumb; data_offset = meta_length = tiff_bps = tiff_compress = 0; kodak_cbpp = zero_after_ff = dng_version = load_flags = 0; timestamp = shot_order = tiff_samples = black = is_foveon = 0; mix_green = profile_length = data_error = zero_is_bad = 0; pixel_aspect = is_raw = raw_color = 1; tile_width = tile_length = INT_MAX; for (i=0; i < 4; i++) { cam_mul[i] = i == 1; pre_mul[i] = i < 3; FORC3 cmatrix[c][i] = 0; FORC3 rgb_cam[c][i] = c == i; } colors = 3; for (i=0; i < 0x4000; i++) curve[i] = i; order = get2(); hlen = get4(); fseek (ifp, 0, SEEK_SET); fread (head, 1, 32, ifp); fseek (ifp, 0, SEEK_END); flen = fsize = ftell(ifp); /* Note for Rawstudio maintainers, this check is not present in upstream dcraw */ if (fsize < 32) return; if ((cp = (char *) memmem (head, 32, "MMMM", 4)) || (cp = (char *) memmem (head, 32, "IIII", 4))) { parse_phase_one (cp-head); if (cp-head && parse_tiff(0)) apply_tiff(); } else if (order == 0x4949 || order == 0x4d4d) { if (!memcmp (head+6,"HEAPCCDR",8)) { data_offset = hlen; parse_ciff (hlen, flen - hlen); } else if (parse_tiff(0)) apply_tiff(); } else if (!memcmp (head,"\xff\xd8\xff\xe1",4) && !memcmp (head+6,"Exif",4)) { fseek (ifp, 4, SEEK_SET); data_offset = 4 + get2(); fseek (ifp, data_offset, SEEK_SET); if (fgetc(ifp) != 0xff) parse_tiff(12); thumb_offset = 0; } else if (!memcmp (head+25,"ARECOYK",7)) { strcpy (make, "Contax"); strcpy (model,"N Digital"); fseek (ifp, 33, SEEK_SET); get_timestamp(1); fseek (ifp, 60, SEEK_SET); FORC4 cam_mul[c ^ (c >> 1)] = get4(); } else if (!strcmp (head, "PXN")) { strcpy (make, "Logitech"); strcpy (model,"Fotoman Pixtura"); } else if (!strcmp (head, "qktk")) { strcpy (make, "Apple"); strcpy (model,"QuickTake 100"); } else if (!strcmp (head, "qktn")) { strcpy (make, "Apple"); strcpy (model,"QuickTake 150"); } else if (!memcmp (head,"FUJIFILM",8)) { fseek (ifp, 84, SEEK_SET); thumb_offset = get4(); thumb_length = get4(); fseek (ifp, 92, SEEK_SET); parse_fuji (get4()); if (thumb_offset > 120) { fseek (ifp, 120, SEEK_SET); is_raw += (i = get4()) && 1; if (is_raw == 2 && shot_select) parse_fuji (i); } fseek (ifp, 100, SEEK_SET); parse_tiff (data_offset = get4()); parse_tiff (thumb_offset+12); apply_tiff(); } else if (!memcmp (head,"RIFF",4)) { fseek (ifp, 0, SEEK_SET); parse_riff(); } else if (!memcmp (head,"\0\001\0\001\0@",6)) { fseek (ifp, 6, SEEK_SET); fread (make, 1, 8, ifp); fread (model, 1, 8, ifp); fread (model2, 1, 16, ifp); data_offset = get2(); get2(); raw_width = get2(); raw_height = get2(); load_raw = &CLASS nokia_load_raw; filters = 0x61616161; } else if (!memcmp (head,"NOKIARAW",8)) { strcpy (make, "NOKIA"); strcpy (model, "X2"); order = 0x4949; fseek (ifp, 300, SEEK_SET); data_offset = get4(); i = get4(); width = get2(); height = get2(); data_offset += i - width * 5 / 4 * height; load_raw = &CLASS nokia_load_raw; filters = 0x61616161; } else if (!memcmp (head,"DSC-Image",9)) parse_rollei(); else if (!memcmp (head,"PWAD",4)) parse_sinar_ia(); else if (!memcmp (head,"\0MRM",4)) parse_minolta(0); else if (!memcmp (head,"FOVb",4)) parse_foveon(); else if (!memcmp (head,"CI",2)) parse_cine(); else for (zero_fsize=i=0; i < (int) sizeof table / (int) sizeof *table; i++) if (fsize == table[i].fsize) { strcpy (make, table[i].make ); strcpy (model, table[i].model); if (table[i].withjpeg) parse_external_jpeg(); } if (zero_fsize) fsize = 0; if (make[0] == 0) parse_smal (0, flen); if (make[0] == 0) parse_jpeg (is_raw = 0); for (i=0; i < (int) sizeof corp / (int) sizeof *corp; i++) if (strstr (make, corp[i])) /* Simplify company names */ strcpy (make, corp[i]); if (!strncmp (make,"KODAK",5) && ((cp = strstr(model," DIGITAL CAMERA")) || (cp = strstr(model," Digital Camera")) || (cp = strstr(model,"FILE VERSION")))) *cp = 0; cp = make + strlen(make); /* Remove trailing spaces */ while (*--cp == ' ') *cp = 0; cp = model + strlen(model); while (*--cp == ' ') *cp = 0; i = strlen(make); /* Remove make from model */ if (!strncasecmp (model, make, i) && model[i++] == ' ') memmove (model, model+i, 64-i); if (!strncmp (model,"Digital Camera ",15)) strcpy (model, model+15); desc[511] = artist[63] = make[63] = model[63] = model2[63] = 0; if (!is_raw) goto notraw; if (!height) height = raw_height; if (!width) width = raw_width; if (fuji_width) { fuji_width = (raw_width+1)/2; width = height + fuji_width; height = width - 1; pixel_aspect = 1; } if (height == 2624 && width == 3936) /* Pentax K10D and Samsung GX10 */ { height = 2616; width = 3896; } if (height == 3136 && width == 4864) /* Pentax K20D and Samsung GX20 */ { height = 3124; width = 4688; filters = 0x16161616; } if (!strcmp(model,"K-r") || !strcmp(model,"K-x")) { width = 4309; filters = 0x16161616; } if (!strcmp(model,"K-5")) { left_margin = 10; width = 4950; filters = 0x16161616; } if (!strcmp(model,"K-7")) { height = 3122; width = 4684; filters = 0x16161616; top_margin = 2; } if (!strcmp(model,"645D")) { height = 5502; width = 7328; filters = 0x61616161; top_margin = 29; left_margin = 48; } if (height == 3014 && width == 4096) /* Ricoh GX200 */ width = 4014; if (dng_version) { if (filters == UINT_MAX) filters = 0; if (filters) is_raw = tiff_samples; else colors = tiff_samples; if (tiff_compress == 1) load_raw = &CLASS adobe_dng_load_raw_nc; if (tiff_compress == 7) load_raw = &CLASS adobe_dng_load_raw_lj; goto dng_skip; } if ((is_canon = !strcmp(make,"Canon"))) load_raw = memcmp (head+6,"HEAPCCDR",8) ? &CLASS lossless_jpeg_load_raw : &CLASS canon_compressed_load_raw; if (!strcmp(make,"NIKON")) { if (!load_raw) load_raw = &CLASS packed_load_raw; if (model[0] == 'E') load_flags |= !data_offset << 2 | 2; } if (!strcmp(make,"CASIO")) { load_raw = &CLASS packed_load_raw; maximum = 0xf7f; } /* Set parameters based on camera name (for non-DNG files). */ if (is_foveon) { if (height*2 < width) pixel_aspect = 0.5; if (height > width) pixel_aspect = 2; filters = 0; load_raw = &CLASS foveon_load_raw; simple_coeff(0); } else if (is_canon && tiff_bps == 15) { switch (width) { case 3344: width -= 66; case 3872: width -= 6; } filters = 0; load_raw = &CLASS canon_sraw_load_raw; } else if (!strcmp(model,"PowerShot 600")) { height = 613; width = 854; raw_width = 896; pixel_aspect = 607/628.0; colors = 4; filters = 0xe1e4e1e4; load_raw = &CLASS canon_600_load_raw; } else if (!strcmp(model,"PowerShot A5") || !strcmp(model,"PowerShot A5 Zoom")) { height = 773; width = 960; raw_width = 992; pixel_aspect = 256/235.0; colors = 4; filters = 0x1e4e1e4e; goto canon_a5; } else if (!strcmp(model,"PowerShot A50")) { height = 968; width = 1290; raw_width = 1320; colors = 4; filters = 0x1b4e4b1e; goto canon_a5; } else if (!strcmp(model,"PowerShot Pro70")) { height = 1024; width = 1552; colors = 4; filters = 0x1e4b4e1b; goto canon_a5; } else if (!strcmp(model,"PowerShot SD300")) { height = 1752; width = 2344; raw_height = 1766; raw_width = 2400; top_margin = 12; left_margin = 12; goto canon_a5; } else if (!strcmp(model,"PowerShot A460")) { height = 1960; width = 2616; raw_height = 1968; raw_width = 2664; top_margin = 4; left_margin = 4; goto canon_a5; } else if (!strcmp(model,"PowerShot A530")) { height = 1984; width = 2620; raw_height = 1992; raw_width = 2672; top_margin = 6; left_margin = 10; goto canon_a5; } else if (!strcmp(model,"PowerShot A610")) { if (canon_s2is()) strcpy (model+10, "S2 IS"); height = 1960; width = 2616; raw_height = 1968; raw_width = 2672; top_margin = 8; left_margin = 12; goto canon_a5; } else if (!strcmp(model,"PowerShot A620")) { height = 2328; width = 3112; raw_height = 2340; raw_width = 3152; top_margin = 12; left_margin = 36; goto canon_a5; } else if (!strcmp(model,"PowerShot A470")) { height = 2328; width = 3096; raw_height = 2346; raw_width = 3152; top_margin = 6; left_margin = 12; goto canon_a5; } else if (!strcmp(model,"PowerShot A720 IS")) { height = 2472; width = 3298; raw_height = 2480; raw_width = 3336; top_margin = 5; left_margin = 6; goto canon_a5; } else if (!strcmp(model,"PowerShot A630")) { height = 2472; width = 3288; raw_height = 2484; raw_width = 3344; top_margin = 6; left_margin = 12; goto canon_a5; } else if (!strcmp(model,"PowerShot A640")) { height = 2760; width = 3672; raw_height = 2772; raw_width = 3736; top_margin = 6; left_margin = 12; goto canon_a5; } else if (!strcmp(model,"PowerShot A650")) { height = 3024; width = 4032; raw_height = 3048; raw_width = 4104; top_margin = 12; left_margin = 48; goto canon_a5; } else if (!strcmp(model,"PowerShot S3 IS")) { height = 2128; width = 2840; raw_height = 2136; raw_width = 2888; top_margin = 8; left_margin = 44; canon_a5: tiff_bps = 10; load_raw = &CLASS packed_load_raw; load_flags = 40; if (raw_width > 1600) zero_is_bad = 1; } else if (!strcmp(model,"PowerShot SX110 IS")) { height = 2760; width = 3684; raw_height = 2772; raw_width = 3720; top_margin = 12; left_margin = 6; load_raw = &CLASS packed_load_raw; load_flags = 40; zero_is_bad = 1; } else if (!strcmp(model,"PowerShot SX120 IS")) { height = 2742; width = 3664; raw_height = 2778; raw_width = 3728; top_margin = 18; left_margin = 16; filters = 0x49494949; load_raw = &CLASS packed_load_raw; load_flags = 40; zero_is_bad = 1; } else if (!strcmp(model,"PowerShot SX20 IS")) { height = 3024; width = 4032; raw_height = 3048; raw_width = 4080; top_margin = 12; left_margin = 24; load_raw = &CLASS packed_load_raw; load_flags = 40; zero_is_bad = 1; } else if (!strcmp(model,"PowerShot Pro90 IS")) { width = 1896; colors = 4; filters = 0xb4b4b4b4; } else if (is_canon && raw_width == 2144) { height = 1550; width = 2088; top_margin = 8; left_margin = 4; if (!strcmp(model,"PowerShot G1")) { colors = 4; filters = 0xb4b4b4b4; } } else if (is_canon && raw_width == 2224) { height = 1448; width = 2176; top_margin = 6; left_margin = 48; } else if (is_canon && raw_width == 2376) { height = 1720; width = 2312; top_margin = 6; left_margin = 12; } else if (is_canon && raw_width == 2672) { height = 1960; width = 2616; top_margin = 6; left_margin = 12; } else if (is_canon && raw_width == 3152) { height = 2056; width = 3088; top_margin = 12; left_margin = 64; if (unique_id == 0x80000170) adobe_coeff ("Canon","EOS 300D"); } else if (is_canon && raw_width == 3160) { height = 2328; width = 3112; top_margin = 12; left_margin = 44; } else if (is_canon && raw_width == 3344) { height = 2472; width = 3288; top_margin = 6; left_margin = 4; } else if (!strcmp(model,"EOS D2000C")) { filters = 0x61616161; black = curve[200]; } else if (is_canon && raw_width == 3516) { top_margin = 14; left_margin = 42; if (unique_id == 0x80000189) adobe_coeff ("Canon","EOS 350D"); goto canon_cr2; } else if (is_canon && raw_width == 3596) { top_margin = 12; left_margin = 74; goto canon_cr2; } else if (is_canon && raw_width == 3744) { height = 2760; width = 3684; top_margin = 16; left_margin = 8; if (unique_id > 0x2720000) { top_margin = 12; left_margin = 52; } } else if (is_canon && raw_width == 3944) { height = 2602; width = 3908; top_margin = 18; left_margin = 30; } else if (is_canon && raw_width == 3948) { top_margin = 18; left_margin = 42; height -= 2; if (unique_id == 0x80000236) adobe_coeff ("Canon","EOS 400D"); if (unique_id == 0x80000254) adobe_coeff ("Canon","EOS 1000D"); goto canon_cr2; } else if (is_canon && raw_width == 3984) { top_margin = 20; left_margin = 76; height -= 2; goto canon_cr2; } else if (is_canon && raw_width == 4104) { height = 3024; width = 4032; top_margin = 12; left_margin = 48; } else if (is_canon && raw_width == 4152) { top_margin = 12; left_margin = 192; goto canon_cr2; } else if (is_canon && raw_width == 4312) { top_margin = 18; left_margin = 22; height -= 2; if (unique_id == 0x80000176) adobe_coeff ("Canon","EOS 450D"); goto canon_cr2; } else if (is_canon && raw_width == 4476) { top_margin = 34; left_margin = 90; goto canon_cr2; } else if (is_canon && raw_width == 4480) { height = 3326; width = 4432; top_margin = 10; left_margin = 12; filters = 0x49494949; } else if (is_canon && raw_width == 4832) { top_margin = unique_id == 0x80000261 ? 51:26; left_margin = 62; if (unique_id == 0x80000252) adobe_coeff ("Canon","EOS 500D"); goto canon_cr2; } else if (is_canon && raw_width == 5120) { height -= top_margin = 45; left_margin = 142; width = 4916; } else if (is_canon && raw_width == 5344) { top_margin = 51; left_margin = 142; if (unique_id == 0x80000270) adobe_coeff ("Canon","EOS 550D"); goto canon_cr2; } else if (is_canon && raw_width == 5360) { top_margin = 51; left_margin = 158; goto canon_cr2; } else if (is_canon && raw_width == 5792) { top_margin = 51; left_margin = 158; goto canon_cr2; } else if (is_canon && raw_width == 5108) { top_margin = 13; left_margin = 98; canon_cr2: height -= top_margin; width -= left_margin; } else if (is_canon && raw_width == 5712) { height = 3752; width = 5640; top_margin = 20; left_margin = 62; } else if (!strcmp(model,"D1")) { cam_mul[0] *= 256/527.0; cam_mul[2] *= 256/317.0; } else if (!strcmp(model,"D1X")) { width -= 4; pixel_aspect = 0.5; } else if (!strcmp(model,"D40X") || !strcmp(model,"D60") || !strcmp(model,"D80") || !strcmp(model,"D3000")) { height -= 3; width -= 4; } else if (!strcmp(model,"D3") || !strcmp(model,"D3S") || !strcmp(model,"D700")) { width -= 4; left_margin = 2; } else if (!strcmp(model,"D5000")) { width -= 42; } else if (!strcmp(model,"D7000")) { width -= 44; } else if (!strcmp(model,"D3100")) { width -= 28; left_margin = 6; } else if (!strncmp(model,"D40",3) || !strncmp(model,"D50",3) || !strncmp(model,"D70",3)) { width--; } else if (!strcmp(model,"D90")) { width -= 42; } else if (!strcmp(model,"D100")) { if (tiff_compress == 34713 && !nikon_is_compressed()) { load_raw = &CLASS packed_load_raw; load_flags |= 1; raw_width = (width += 3) + 3; } } else if (!strcmp(model,"D200")) { left_margin = 1; width -= 4; filters = 0x94949494; } else if (!strncmp(model,"D2H",3)) { left_margin = 6; width -= 14; } else if (!strncmp(model,"D2X",3)) { if (width == 3264) width -= 32; else width -= 8; } else if (!strncmp(model,"D300",4)) { width -= 32; } else if (!strncmp(model,"COOLPIX P",9)) { load_flags = 24; filters = 0x94949494; } else if (fsize == 1581060) { height = 963; width = 1287; raw_width = 1632; maximum = 0x3f4; colors = 4; filters = 0x1e1e1e1e; simple_coeff(3); pre_mul[0] = 1.2085; pre_mul[1] = 1.0943; pre_mul[3] = 1.1103; goto e900; } else if (fsize == 2465792) { height = 1203; width = 1616; raw_width = 2048; colors = 4; filters = 0x4b4b4b4b; adobe_coeff ("NIKON","E950"); e900: tiff_bps = 10; load_raw = &CLASS packed_load_raw; load_flags = 6; } else if (fsize == 4771840) { height = 1540; width = 2064; colors = 4; filters = 0xe1e1e1e1; load_raw = &CLASS packed_load_raw; load_flags = 6; if (!timestamp && nikon_e995()) strcpy (model, "E995"); if (strcmp(model,"E995")) { filters = 0xb4b4b4b4; simple_coeff(3); pre_mul[0] = 1.196; pre_mul[1] = 1.246; pre_mul[2] = 1.018; } } else if (!strcmp(model,"E2100")) { if (!timestamp && !nikon_e2100()) goto cp_e2500; height = 1206; width = 1616; load_flags = 30; } else if (!strcmp(model,"E2500")) { cp_e2500: strcpy (model, "E2500"); height = 1204; width = 1616; colors = 4; filters = 0x4b4b4b4b; } else if (fsize == 4775936) { height = 1542; width = 2064; load_raw = &CLASS packed_load_raw; load_flags = 30; if (!timestamp) nikon_3700(); if (model[0] == 'E' && atoi(model+1) < 3700) filters = 0x49494949; if (!strcmp(model,"Optio 33WR")) { flip = 1; filters = 0x16161616; } if (make[0] == 'O') { i = find_green (12, 32, 1188864, 3576832); c = find_green (12, 32, 2383920, 2387016); if (abs(i) < abs(c)) { SWAP(i,c); load_flags = 24; } if (i < 0) filters = 0x61616161; } } else if (fsize == 5869568) { height = 1710; width = 2288; filters = 0x16161616; if (!timestamp && minolta_z2()) { strcpy (make, "Minolta"); strcpy (model,"DiMAGE Z2"); } load_raw = &CLASS packed_load_raw; load_flags = 6 + 24*(make[0] == 'M'); } else if (!strcmp(model,"E4500")) { height = 1708; width = 2288; colors = 4; filters = 0xb4b4b4b4; } else if (fsize == 7438336) { height = 1924; width = 2576; colors = 4; filters = 0xb4b4b4b4; } else if (fsize == 8998912) { height = 2118; width = 2832; maximum = 0xf83; load_raw = &CLASS packed_load_raw; load_flags = 30; } else if (!strcmp(model,"FinePix S5100") || !strcmp(model,"FinePix S5500")) { height -= top_margin = 6; } else if (!strcmp(make,"FUJIFILM")) { if (!strcmp(model+7,"S2Pro")) { strcpy (model+7," S2Pro"); height = 2144; width = 2880; flip = 6; } else if (load_raw != &CLASS packed_load_raw) maximum = 0x3e00; if (is_raw == 2 && shot_select) maximum = 0x2f00; top_margin = (raw_height - height)/2; left_margin = (raw_width - width )/2; if (is_raw == 2) data_offset += (shot_select > 0) * ( fuji_layout ? (raw_width *= 2) : raw_height*raw_width*2 ); if (load_raw == &CLASS fuji_load_raw) { fuji_width = width >> !fuji_layout; width = (height >> fuji_layout) + fuji_width; raw_height = height; height = width - 1; if (~fuji_width & 1) filters = 0x49494949; } } else if (!strcmp(model,"RD175")) { height = 986; width = 1534; data_offset = 513; filters = 0x61616161; load_raw = &CLASS minolta_rd175_load_raw; } else if (!strcmp(model,"KD-400Z")) { height = 1712; width = 2312; raw_width = 2336; goto konica_400z; } else if (!strcmp(model,"KD-510Z")) { goto konica_510z; } else if (!strcasecmp(make,"MINOLTA")) { load_raw = &CLASS unpacked_load_raw; maximum = 0xfff; if (!strncmp(model,"DiMAGE A",8)) { if (!strcmp(model,"DiMAGE A200")) filters = 0x49494949; tiff_bps = 12; load_raw = &CLASS packed_load_raw; } else if (!strncmp(model,"ALPHA",5) || !strncmp(model,"DYNAX",5) || !strncmp(model,"MAXXUM",6)) { sprintf (model+20, "DYNAX %-10s", model+6+(model[0]=='M')); adobe_coeff (make, model+20); load_raw = &CLASS packed_load_raw; } else if (!strncmp(model,"DiMAGE G",8)) { if (model[8] == '4') { height = 1716; width = 2304; } else if (model[8] == '5') { konica_510z: height = 1956; width = 2607; raw_width = 2624; } else if (model[8] == '6') { height = 2136; width = 2848; } data_offset += 14; filters = 0x61616161; konica_400z: load_raw = &CLASS unpacked_load_raw; maximum = 0x3df; order = 0x4d4d; } } else if (!strcmp(model,"*ist D")) { data_error = -1; } else if (!strcmp(model,"*ist DS")) { height -= 2; } else if (!strcmp(model,"Optio S")) { if (fsize == 3178560) { height = 1540; width = 2064; load_raw = &CLASS eight_bit_load_raw; cam_mul[0] *= 4; cam_mul[2] *= 4; } else { height = 1544; width = 2068; raw_width = 3136; load_raw = &CLASS packed_load_raw; maximum = 0xf7c; } } else if (fsize == 6114240) { height = 1737; width = 2324; raw_width = 3520; load_raw = &CLASS packed_load_raw; maximum = 0xf7a; } else if (!strcmp(model,"Optio 750Z")) { height = 2302; width = 3072; load_raw = &CLASS packed_load_raw; load_flags = 30; } else if (!strcmp(model,"DC-833m")) { height = 2448; width = 3264; order = 0x4949; filters = 0x61616161; load_raw = &CLASS unpacked_load_raw; maximum = 0xfc00; } else if (!strncmp(model,"S85",3)) { height = 2448; width = 3264; raw_width = fsize/height/2; order = 0x4d4d; load_raw = &CLASS unpacked_load_raw; } else if (!strcmp(model,"NX10")) { height -= top_margin = 4; width -= 2 * (left_margin = 8); } else if (!strcmp(model,"EX1")) { order = 0x4949; height = 2760; top_margin = 2; if ((width -= 6) > 3682) { height = 2750; width = 3668; top_margin = 8; } } else if (!strcmp(model,"WB2000")) { order = 0x4949; height -= 3; width -= 10; top_margin = 2; } else if (fsize == 20487168) { height = 2808; width = 3648; goto wb550; } else if (fsize == 24000000) { height = 3000; width = 4000; wb550: strcpy (model, "WB550"); order = 0x4d4d; load_raw = &CLASS unpacked_load_raw; load_flags = 6; maximum = 0x3df; } else if (!strcmp(model,"STV680 VGA")) { height = 484; width = 644; load_raw = &CLASS eight_bit_load_raw; flip = 2; filters = 0x16161616; black = 16; } else if (!strcmp(model,"N95")) { height = raw_height - (top_margin = 2); } else if (!strcmp(model,"531C")) { height = 1200; width = 1600; load_raw = &CLASS unpacked_load_raw; filters = 0x49494949; } else if (!strcmp(model,"F-080C")) { height = 768; width = 1024; load_raw = &CLASS eight_bit_load_raw; } else if (!strcmp(model,"F-145C")) { height = 1040; width = 1392; load_raw = &CLASS eight_bit_load_raw; } else if (!strcmp(model,"F-201C")) { height = 1200; width = 1600; load_raw = &CLASS eight_bit_load_raw; } else if (!strcmp(model,"F-510C")) { height = 1958; width = 2588; load_raw = fsize < 7500000 ? &CLASS eight_bit_load_raw : &CLASS unpacked_load_raw; data_offset = fsize - width*height*(fsize >> 22); maximum = 0xfff0; } else if (!strcmp(model,"F-810C")) { height = 2469; width = 3272; load_raw = &CLASS unpacked_load_raw; maximum = 0xfff0; } else if (!strcmp(model,"XCD-SX910CR")) { height = 1024; width = 1375; raw_width = 1376; filters = 0x49494949; maximum = 0x3ff; load_raw = fsize < 2000000 ? &CLASS eight_bit_load_raw : &CLASS unpacked_load_raw; } else if (!strcmp(model,"2010")) { height = 1207; width = 1608; order = 0x4949; filters = 0x16161616; data_offset = 3212; maximum = 0x3ff; load_raw = &CLASS unpacked_load_raw; } else if (!strcmp(model,"A782")) { height = 3000; width = 2208; filters = 0x61616161; load_raw = fsize < 10000000 ? &CLASS eight_bit_load_raw : &CLASS unpacked_load_raw; maximum = 0xffc0; } else if (!strcmp(model,"3320AF")) { height = 1536; raw_width = width = 2048; filters = 0x61616161; load_raw = &CLASS unpacked_load_raw; maximum = 0x3ff; fseek (ifp, 0x300000, SEEK_SET); if ((order = guess_byte_order(0x10000)) == 0x4d4d) { height -= (top_margin = 16); width -= (left_margin = 28); maximum = 0xf5c0; strcpy (make, "ISG"); model[0] = 0; } } else if (!strcmp(make,"Hasselblad")) { if (load_raw == &CLASS lossless_jpeg_load_raw) load_raw = &CLASS hasselblad_load_raw; if (raw_width == 7262) { height = 5444; width = 7248; top_margin = 4; left_margin = 7; filters = 0x61616161; } else if (raw_width == 7410) { height = 5502; width = 7328; top_margin = 4; left_margin = 41; filters = 0x61616161; } else if (raw_width == 4090) { strcpy (model, "V96C"); height -= (top_margin = 6); width -= (left_margin = 3) + 7; filters = 0x61616161; } } else if (!strcmp(make,"Sinar")) { if (!memcmp(head,"8BPS",4)) { fseek (ifp, 14, SEEK_SET); height = get4(); width = get4(); filters = 0x61616161; data_offset = 68; } if (!load_raw) load_raw = &CLASS unpacked_load_raw; maximum = 0x3fff; } else if (!strcmp(make,"Leaf")) { maximum = 0x3fff; fseek (ifp, data_offset, SEEK_SET); if (ljpeg_start (&jh, 1) && jh.bits == 15) maximum = 0x1fff; if (tiff_samples > 1) filters = 0; if (tiff_samples > 1 || tile_length < raw_height) load_raw = &CLASS leaf_hdr_load_raw; if ((width | height) == 2048) { if (tiff_samples == 1) { filters = 1; strcpy (cdesc, "RBTG"); strcpy (model, "CatchLight"); top_margin = 8; left_margin = 18; height = 2032; width = 2016; } else { strcpy (model, "DCB2"); top_margin = 10; left_margin = 16; height = 2028; width = 2022; } } else if (width+height == 3144+2060) { if (!model[0]) strcpy (model, "Cantare"); if (width > height) { top_margin = 6; left_margin = 32; height = 2048; width = 3072; filters = 0x61616161; } else { left_margin = 6; top_margin = 32; width = 2048; height = 3072; filters = 0x16161616; } if (!cam_mul[0] || model[0] == 'V') filters = 0; else is_raw = tiff_samples; } else if (width == 2116) { strcpy (model, "Valeo 6"); height -= 2 * (top_margin = 30); width -= 2 * (left_margin = 55); filters = 0x49494949; } else if (width == 3171) { strcpy (model, "Valeo 6"); height -= 2 * (top_margin = 24); width -= 2 * (left_margin = 24); filters = 0x16161616; } } else if (!strcmp(make,"LEICA") || !strcmp(make,"Panasonic")) { if ((flen - data_offset) / (raw_width*8/7) == raw_height) load_raw = &CLASS panasonic_load_raw; if (!load_raw) { load_raw = &CLASS unpacked_load_raw; load_flags = 4; } zero_is_bad = 1; if ((height += 12) > raw_height) height = raw_height; for (i=0; i < (int) sizeof pana / (int) sizeof *pana; i++) if (raw_width == pana[i][0] && raw_height == pana[i][1]) { left_margin = pana[i][2]; top_margin = pana[i][3]; width += pana[i][4]; height += pana[i][5]; } filters = 0x01010101 * (uchar) "\x94\x61\x49\x16" [((filters-1) ^ (left_margin & 1) ^ (top_margin << 1)) & 3]; } else if (!strcmp(model,"C770UZ")) { height = 1718; width = 2304; filters = 0x16161616; load_raw = &CLASS packed_load_raw; load_flags = 30; } else if (!strcmp(make,"OLYMPUS")) { height += height & 1; filters = exif_cfa; if (width == 4100) width -= 4; if (load_raw == &CLASS unpacked_load_raw) load_flags = 4; tiff_bps = 12; if (!strcmp(model,"E-300") || !strcmp(model,"E-500")) { width -= 20; if (load_raw == &CLASS unpacked_load_raw) { maximum = 0xfc3; memset (cblack, 0, sizeof cblack); } } else if (!strcmp(model,"E-330")) { width -= 30; if (load_raw == &CLASS unpacked_load_raw) maximum = 0xf79; } else if (!strcmp(model,"SP550UZ")) { thumb_length = flen - (thumb_offset = 0xa39800); thumb_height = 480; thumb_width = 640; } } else if (!strcmp(model,"N Digital")) { height = 2047; width = 3072; filters = 0x61616161; data_offset = 0x1a00; load_raw = &CLASS packed_load_raw; } else if (!strcmp(model,"DSC-F828")) { width = 3288; left_margin = 5; data_offset = 862144; load_raw = &CLASS sony_load_raw; filters = 0x9c9c9c9c; colors = 4; strcpy (cdesc, "RGBE"); } else if (!strcmp(model,"DSC-V3")) { width = 3109; left_margin = 59; data_offset = 787392; load_raw = &CLASS sony_load_raw; } else if (!strcmp(make,"SONY") && raw_width == 3984) { adobe_coeff ("SONY","DSC-R1"); width = 3925; order = 0x4d4d; } else if (!strcmp(model,"DSLR-A100")) { if (width == 3880) { height--; width = ++raw_width; } else { order = 0x4d4d; load_flags = 2; } filters = 0x61616161; } else if (!strcmp(model,"DSLR-A350")) { height -= 4; } else if (!strcmp(model,"PIXL")) { height -= top_margin = 4; width -= left_margin = 32; gamma_curve (0, 7, 1, 255); } else if (!strcmp(model,"C603v")) { height = 480; width = 640; if (fsize < 614400 || find_green (16, 16, 3840, 5120) < 25) goto c603v; strcpy (model,"KAI-0340"); height -= 3; data_offset = 3840; order = 0x4949; load_raw = &CLASS unpacked_load_raw; } else if (!strcmp(model,"C603y")) { height = 2134; width = 2848; c603v: filters = 0; load_raw = &CLASS kodak_yrgb_load_raw; gamma_curve (0, 3.875, 1, 255); } else if (!strcmp(model,"C603")) { raw_height = height = 2152; raw_width = width = 2864; goto c603; } else if (!strcmp(model,"C330")) { height = 1744; width = 2336; raw_height = 1779; raw_width = 2338; top_margin = 33; left_margin = 1; c603: order = 0x4949; if ((data_offset = fsize - raw_height*raw_width)) { fseek (ifp, 168, SEEK_SET); read_shorts (curve, 256); } else gamma_curve (0, 3.875, 1, 255); load_raw = &CLASS eight_bit_load_raw; } else if (!strncasecmp(model,"EasyShare",9)) { data_offset = 0x15000; load_raw = &CLASS packed_load_raw; } else if (!strcasecmp(make,"KODAK")) { if (filters == UINT_MAX) filters = 0x61616161; if (!strncmp(model,"NC2000",6)) { width -= 4; left_margin = 2; } else if (!strcmp(model,"EOSDCS3B")) { width -= 4; left_margin = 2; } else if (!strcmp(model,"EOSDCS1")) { width -= 4; left_margin = 2; } else if (!strcmp(model,"DCS420")) { width -= 4; left_margin = 2; } else if (!strncmp(model,"DCS460 ",7)) { model[6] = 0; width -= 4; left_margin = 2; } else if (!strcmp(model,"DCS460A")) { width -= 4; left_margin = 2; colors = 1; filters = 0; } else if (!strcmp(model,"DCS660M")) { black = 214; colors = 1; filters = 0; } else if (!strcmp(model,"DCS760M")) { colors = 1; filters = 0; } if (!strcmp(model+4,"20X")) strcpy (cdesc, "MYCY"); if (strstr(model,"DC25")) { strcpy (model, "DC25"); data_offset = 15424; } if (!strncmp(model,"DC2",3)) { height = 242; if (flen < 100000) { raw_width = 256; width = 249; pixel_aspect = (4.0*height) / (3.0*width); } else { raw_width = 512; width = 501; pixel_aspect = (493.0*height) / (373.0*width); } data_offset += raw_width + 1; colors = 4; filters = 0x8d8d8d8d; simple_coeff(1); pre_mul[1] = 1.179; pre_mul[2] = 1.209; pre_mul[3] = 1.036; load_raw = &CLASS eight_bit_load_raw; } else if (!strcmp(model,"40")) { strcpy (model, "DC40"); height = 512; width = 768; data_offset = 1152; load_raw = &CLASS kodak_radc_load_raw; } else if (strstr(model,"DC50")) { strcpy (model, "DC50"); height = 512; width = 768; data_offset = 19712; load_raw = &CLASS kodak_radc_load_raw; } else if (strstr(model,"DC120")) { strcpy (model, "DC120"); height = 976; width = 848; pixel_aspect = height/0.75/width; load_raw = tiff_compress == 7 ? &CLASS kodak_jpeg_load_raw : &CLASS kodak_dc120_load_raw; } else if (!strcmp(model,"DCS200")) { thumb_height = 128; thumb_width = 192; thumb_offset = 6144; thumb_misc = 360; write_thumb = &CLASS layer_thumb; height = 1024; width = 1536; data_offset = 79872; load_raw = &CLASS eight_bit_load_raw; black = 17; } } else if (!strcmp(model,"Fotoman Pixtura")) { height = 512; width = 768; data_offset = 3632; load_raw = &CLASS kodak_radc_load_raw; filters = 0x61616161; simple_coeff(2); } else if (!strcmp(model,"QuickTake 100")) { fseek (ifp, 544, SEEK_SET); height = get2(); width = get2(); data_offset = (get4(),get2()) == 30 ? 738:736; if (height > width) { SWAP(height,width); fseek (ifp, data_offset-6, SEEK_SET); flip = ~get2() & 3 ? 5:6; } load_raw = &CLASS quicktake_100_load_raw; filters = 0x61616161; } else if (!strcmp(model,"QuickTake 150")) { data_offset = 738 - head[5]; if (head[5]) strcpy (model+10, "200"); load_raw = &CLASS kodak_radc_load_raw; height = 480; width = 640; filters = 0x61616161; } else if (!strcmp(make,"Rollei") && !load_raw) { switch (raw_width) { case 1316: height = 1030; width = 1300; top_margin = 1; left_margin = 6; break; case 2568: height = 1960; width = 2560; top_margin = 2; left_margin = 8; } filters = 0x16161616; load_raw = &CLASS rollei_load_raw; } else if (!strcmp(model,"PC-CAM 600")) { height = 768; data_offset = width = 1024; filters = 0x49494949; load_raw = &CLASS eight_bit_load_raw; } else if (!strcmp(model,"QV-2000UX")) { height = 1208; width = 1632; data_offset = width * 2; load_raw = &CLASS eight_bit_load_raw; } else if (fsize == 3217760) { height = 1546; width = 2070; raw_width = 2080; load_raw = &CLASS eight_bit_load_raw; } else if (!strcmp(model,"QV-4000")) { height = 1700; width = 2260; load_raw = &CLASS unpacked_load_raw; maximum = 0xffff; } else if (!strcmp(model,"QV-5700")) { height = 1924; width = 2576; raw_width = 3232; tiff_bps = 10; } else if (!strcmp(model,"QV-R41")) { height = 1720; width = 2312; raw_width = 3520; left_margin = 2; } else if (!strcmp(model,"QV-R51")) { height = 1926; width = 2580; raw_width = 3904; } else if (!strcmp(model,"EX-S20")) { height = 1208; width = 1620; raw_width = 2432; flip = 3; } else if (!strcmp(model,"EX-S100")) { height = 1544; width = 2058; raw_width = 3136; } else if (!strcmp(model,"EX-Z50")) { height = 1931; width = 2570; raw_width = 3904; } else if (!strcmp(model,"EX-Z55")) { height = 1960; width = 2570; raw_width = 3904; } else if (!strcmp(model,"EX-Z60")) { height = 2145; width = 2833; raw_width = 3584; filters = 0x16161616; tiff_bps = 10; } else if (!strcmp(model,"EX-Z75")) { height = 2321; width = 3089; raw_width = 4672; maximum = 0xfff; } else if (!strcmp(model,"EX-Z750")) { height = 2319; width = 3087; raw_width = 4672; maximum = 0xfff; } else if (!strcmp(model,"EX-Z850")) { height = 2468; width = 3279; raw_width = 4928; maximum = 0xfff; } else if (!strcmp(model,"EX-Z1050")) { height = 2752; width = 3672; raw_width = 5632; maximum = 0xffc; } else if (!strcmp(model,"EX-P505")) { height = 1928; width = 2568; raw_width = 3852; maximum = 0xfff; } else if (fsize == 9313536) { /* EX-P600 or QV-R61 */ height = 2142; width = 2844; raw_width = 4288; } else if (!strcmp(model,"EX-P700")) { height = 2318; width = 3082; raw_width = 4672; } if (!model[0]) sprintf (model, "%dx%d", width, height); if (filters == UINT_MAX) filters = 0x94949494; if (raw_color) adobe_coeff (make, model); if (load_raw == &CLASS kodak_radc_load_raw) if (raw_color) adobe_coeff ("Apple","Quicktake"); if (thumb_offset && !thumb_height) { fseek (ifp, thumb_offset, SEEK_SET); if (ljpeg_start (&jh, 1)) { thumb_width = jh.wide; thumb_height = jh.high; } } dng_skip: if (!tiff_bps) tiff_bps = 12; if (!maximum) maximum = (1 << tiff_bps) - 1; if (!load_raw || height < 22) is_raw = 0; #ifndef HAVE_LIBJPEG if (load_raw == &CLASS kodak_jpeg_load_raw) { dcraw_message (DCRAW_ERROR,_("%s: You must link dcraw with libjpeg!!\n"), ifname_display); is_raw = 0; } #endif if (!cdesc[0]) strcpy (cdesc, colors == 3 ? "RGB":"GMCY"); if (!raw_height) raw_height = height; if (!raw_width ) raw_width = width; if (filters && colors == 3) filters |= ((filters >> 2 & 0x22222222) | (filters << 2 & 0x88888888)) & filters << 1; notraw: if (flip == -1) flip = tiff_flip; if (flip == -1) flip = 0; } #ifndef NO_LCMS void CLASS apply_profile (const char *input, const char *output) { char *prof; cmsHPROFILE hInProfile=0, hOutProfile=0; cmsHTRANSFORM hTransform; FILE *fp; unsigned size; cmsErrorAction (LCMS_ERROR_SHOW); if (strcmp (input, "embed")) hInProfile = cmsOpenProfileFromFile (input, "r"); else if (profile_length) { prof = (char *) malloc (profile_length); merror (prof, "apply_profile()"); fseek (ifp, profile_offset, SEEK_SET); fread (prof, 1, profile_length, ifp); hInProfile = cmsOpenProfileFromMem (prof, profile_length); free (prof); } else dcraw_message (DCRAW_ERROR,_("%s has no embedded profile.\n"), ifname_display); if (!hInProfile) return; if (!output) hOutProfile = cmsCreate_sRGBProfile(); else if ((fp = fopen (output, "rb"))) { fread (&size, 4, 1, fp); fseek (fp, 0, SEEK_SET); oprof = (unsigned *) malloc (size = ntohl(size)); merror (oprof, "apply_profile()"); fread (oprof, 1, size, fp); fclose (fp); if (!(hOutProfile = cmsOpenProfileFromMem (oprof, size))) { free (oprof); oprof = 0; } } else dcraw_message (DCRAW_ERROR,_("Cannot open file %s!\n"), output); if (!hOutProfile) goto quit; dcraw_message (DCRAW_VERBOSE,_("Applying color profile...\n")); hTransform = cmsCreateTransform (hInProfile, TYPE_RGBA_16, hOutProfile, TYPE_RGBA_16, INTENT_PERCEPTUAL, 0); cmsDoTransform (hTransform, image, image, width*height); raw_color = 1; /* Don't use rgb_cam with a profile */ cmsDeleteTransform (hTransform); cmsCloseProfile (hOutProfile); quit: cmsCloseProfile (hInProfile); } #endif void CLASS convert_to_rgb() { int row, col, c, i, j, k; ushort *img; float out[3], out_cam[3][4]; double num, inverse[3][3]; static const double xyzd50_srgb[3][3] = { { 0.436083, 0.385083, 0.143055 }, { 0.222507, 0.716888, 0.060608 }, { 0.013930, 0.097097, 0.714022 } }; static const double rgb_rgb[3][3] = { { 1,0,0 }, { 0,1,0 }, { 0,0,1 } }; static const double adobe_rgb[3][3] = { { 0.715146, 0.284856, 0.000000 }, { 0.000000, 1.000000, 0.000000 }, { 0.000000, 0.041166, 0.958839 } }; static const double wide_rgb[3][3] = { { 0.593087, 0.404710, 0.002206 }, { 0.095413, 0.843149, 0.061439 }, { 0.011621, 0.069091, 0.919288 } }; static const double prophoto_rgb[3][3] = { { 0.529317, 0.330092, 0.140588 }, { 0.098368, 0.873465, 0.028169 }, { 0.016879, 0.117663, 0.865457 } }; static const double (*out_rgb[])[3] = { rgb_rgb, adobe_rgb, wide_rgb, prophoto_rgb, xyz_rgb }; static const char *name[] = { "sRGB", "Adobe RGB (1998)", "WideGamut D65", "ProPhoto D65", "XYZ" }; static const unsigned phead[] = { 1024, 0, 0x2100000, 0x6d6e7472, 0x52474220, 0x58595a20, 0, 0, 0, 0x61637370, 0, 0, 0x6e6f6e65, 0, 0, 0, 0, 0xf6d6, 0x10000, 0xd32d }; unsigned pbody[] = { 10, 0x63707274, 0, 36, /* cprt */ 0x64657363, 0, 40, /* desc */ 0x77747074, 0, 20, /* wtpt */ 0x626b7074, 0, 20, /* bkpt */ 0x72545243, 0, 14, /* rTRC */ 0x67545243, 0, 14, /* gTRC */ 0x62545243, 0, 14, /* bTRC */ 0x7258595a, 0, 20, /* rXYZ */ 0x6758595a, 0, 20, /* gXYZ */ 0x6258595a, 0, 20 }; /* bXYZ */ static const unsigned pwhite[] = { 0xf351, 0x10000, 0x116cc }; unsigned pcurve[] = { 0x63757276, 0, 1, 0x1000000 }; gamma_curve (gamm[0], gamm[1], 0, 0); memcpy (out_cam, rgb_cam, sizeof out_cam); raw_color |= colors == 1 || document_mode || output_color < 1 || output_color > 5; if (!raw_color) { oprof = (unsigned *) calloc (phead[0], 1); merror (oprof, "convert_to_rgb()"); memcpy (oprof, phead, sizeof phead); if (output_color == 5) oprof[4] = oprof[5]; oprof[0] = 132 + 12*pbody[0]; for (i=0; i < (int)pbody[0]; i++) { oprof[oprof[0]/4] = i ? (i > 1 ? 0x58595a20 : 0x64657363) : 0x74657874; pbody[i*3+2] = oprof[0]; oprof[0] += (pbody[i*3+3] + 3) & -4; } memcpy (oprof+32, pbody, sizeof pbody); oprof[pbody[5]/4+2] = strlen(name[output_color-1]) + 1; memcpy ((char *)oprof+pbody[8]+8, pwhite, sizeof pwhite); pcurve[3] = (short)(256/gamm[5]+0.5) << 16; for (i=4; i < 7; i++) memcpy ((char *)oprof+pbody[i*3+2], pcurve, sizeof pcurve); pseudoinverse ((double (*)[3]) out_rgb[output_color-1], inverse, 3); for (i=0; i < 3; i++) for (j=0; j < 3; j++) { for (num = k=0; k < 3; k++) num += xyzd50_srgb[i][k] * inverse[j][k]; oprof[pbody[j*3+23]/4+i+2] = num * 0x10000 + 0.5; } for (i=0; i < (int)phead[0]/4; i++) oprof[i] = htonl(oprof[i]); strcpy ((char *)oprof+pbody[2]+8, "auto-generated by dcraw"); strcpy ((char *)oprof+pbody[5]+12, name[output_color-1]); for (i=0; i < 3; i++) for (j=0; j < colors; j++) for (out_cam[i][j] = k=0; k < 3; k++) out_cam[i][j] += out_rgb[output_color-1][i][k] * rgb_cam[k][j]; } dcraw_message (DCRAW_VERBOSE, raw_color ? _("Building histograms...\n") : _("Converting to %s colorspace...\n"), name[output_color-1]); memset (histogram, 0, sizeof histogram); for (img=image[0], row=0; row < height; row++) for (col=0; col < width; col++, img+=4) { if (!raw_color) { out[0] = out[1] = out[2] = 0; FORCC { out[0] += out_cam[0][c] * img[c]; out[1] += out_cam[1][c] * img[c]; out[2] += out_cam[2][c] * img[c]; } FORC3 img[c] = CLIP((int) out[c]); } else if (document_mode) img[0] = img[FC(row,col)]; FORCC histogram[c][img[c] >> 3]++; } if (colors == 4 && output_color) colors = 3; if (document_mode && filters) colors = 1; } /* Start of functions copied to dcraw_indi.c (UF) */ void CLASS fuji_rotate() { int i, row, col; double step; float r, c, fr, fc; int ur, uc; ushort wide, high, (*img)[4], (*pix)[4]; if (!fuji_width) return; dcraw_message (DCRAW_VERBOSE,_("Rotating image 45 degrees...\n")); fuji_width = (fuji_width - 1 + shrink) >> shrink; step = sqrt(0.5); wide = fuji_width / step; high = (height - fuji_width) / step; img = (ushort (*)[4]) calloc (wide*high, sizeof *img); merror (img, "fuji_rotate()"); for (row=0; row < high; row++) for (col=0; col < wide; col++) { ur = r = fuji_width + (row-col)*step; uc = c = (row+col)*step; if (ur > height-2 || uc > width-2) continue; fr = r - ur; fc = c - uc; pix = image + ur*width + uc; for (i=0; i < colors; i++) img[row*wide+col][i] = (pix[ 0][i]*(1-fc) + pix[ 1][i]*fc) * (1-fr) + (pix[width][i]*(1-fc) + pix[width+1][i]*fc) * fr; } free (image); width = wide; height = high; image = img; fuji_width = 0; } /* End of functions copied to dcraw_indi.c (UF) */ void CLASS stretch() { ushort newdim, (*img)[4], *pix0, *pix1; int row, col, c; double rc, frac; if (pixel_aspect == 1) return; dcraw_message (DCRAW_VERBOSE,_("Stretching the image...\n")); if (pixel_aspect < 1) { newdim = height / pixel_aspect + 0.5; img = (ushort (*)[4]) calloc (width*newdim, sizeof *img); merror (img, "stretch()"); for (rc=row=0; row < newdim; row++, rc+=pixel_aspect) { frac = rc - (c = rc); pix0 = pix1 = image[c*width]; if (c+1 < height) pix1 += width*4; for (col=0; col < width; col++, pix0+=4, pix1+=4) FORCC img[row*width+col][c] = pix0[c]*(1-frac) + pix1[c]*frac + 0.5; } height = newdim; } else { newdim = width * pixel_aspect + 0.5; img = (ushort (*)[4]) calloc (height*newdim, sizeof *img); merror (img, "stretch()"); for (rc=col=0; col < newdim; col++, rc+=1/pixel_aspect) { frac = rc - (c = rc); pix0 = pix1 = image[c]; if (c+1 < width) pix1 += 4; for (row=0; row < height; row++, pix0+=width*4, pix1+=width*4) FORCC img[row*newdim+col][c] = pix0[c]*(1-frac) + pix1[c]*frac + 0.5; } width = newdim; } free (image); image = img; } int CLASS flip_index (int row, int col) { if (flip & 4) SWAP(row,col); if (flip & 2) row = iheight - 1 - row; if (flip & 1) col = iwidth - 1 - col; return row * iwidth + col; } struct tiff_tag { ushort tag, type; int count; union { char c[4]; short s[2]; int i; } val; }; struct tiff_hdr { ushort order, magic; int ifd; ushort pad, ntag; struct tiff_tag tag[23]; int nextifd; ushort pad2, nexif; struct tiff_tag exif[4]; ushort pad3, ngps; struct tiff_tag gpst[10]; short bps[4]; int rat[10]; unsigned gps[26]; char desc[512], make[64], model[64], soft[32], date[20], artist[64]; }; void CLASS tiff_set (ushort *ntag, ushort tag, ushort type, int count, int val) { struct tiff_tag *tt; int c; tt = (struct tiff_tag *)(ntag+1) + (*ntag)++; tt->tag = tag; tt->type = type; tt->count = count; if (type < 3 && count <= 4) FORC(4) tt->val.c[c] = val >> (c << 3); else if (type == 3 && count <= 2) FORC(2) tt->val.s[c] = val >> (c << 4); else tt->val.i = val; } #define TOFF(ptr) ((char *)(&(ptr)) - (char *)th) void CLASS tiff_head (struct tiff_hdr *th, int full) { int c, psize=0; struct tm *t; memset (th, 0, sizeof *th); th->order = htonl(0x4d4d4949) >> 16; th->magic = 42; th->ifd = 10; if (full) { tiff_set (&th->ntag, 254, 4, 1, 0); tiff_set (&th->ntag, 256, 4, 1, width); tiff_set (&th->ntag, 257, 4, 1, height); tiff_set (&th->ntag, 258, 3, colors, output_bps); if (colors > 2) th->tag[th->ntag-1].val.i = TOFF(th->bps); FORC4 th->bps[c] = output_bps; tiff_set (&th->ntag, 259, 3, 1, 1); tiff_set (&th->ntag, 262, 3, 1, 1 + (colors > 1)); } tiff_set (&th->ntag, 270, 2, 512, TOFF(th->desc)); tiff_set (&th->ntag, 271, 2, 64, TOFF(th->make)); tiff_set (&th->ntag, 272, 2, 64, TOFF(th->model)); if (full) { if (oprof) psize = ntohl(oprof[0]); tiff_set (&th->ntag, 273, 4, 1, sizeof *th + psize); tiff_set (&th->ntag, 277, 3, 1, colors); tiff_set (&th->ntag, 278, 4, 1, height); tiff_set (&th->ntag, 279, 4, 1, height*width*colors*output_bps/8); } else tiff_set (&th->ntag, 274, 3, 1, "12435867"[flip]-'0'); tiff_set (&th->ntag, 282, 5, 1, TOFF(th->rat[0])); tiff_set (&th->ntag, 283, 5, 1, TOFF(th->rat[2])); tiff_set (&th->ntag, 284, 3, 1, 1); tiff_set (&th->ntag, 296, 3, 1, 2); tiff_set (&th->ntag, 305, 2, 32, TOFF(th->soft)); tiff_set (&th->ntag, 306, 2, 20, TOFF(th->date)); tiff_set (&th->ntag, 315, 2, 64, TOFF(th->artist)); tiff_set (&th->ntag, 34665, 4, 1, TOFF(th->nexif)); if (psize) tiff_set (&th->ntag, 34675, 7, psize, sizeof *th); tiff_set (&th->nexif, 33434, 5, 1, TOFF(th->rat[4])); tiff_set (&th->nexif, 33437, 5, 1, TOFF(th->rat[6])); tiff_set (&th->nexif, 34855, 3, 1, iso_speed); tiff_set (&th->nexif, 37386, 5, 1, TOFF(th->rat[8])); if (gpsdata[1]) { tiff_set (&th->ntag, 34853, 4, 1, TOFF(th->ngps)); tiff_set (&th->ngps, 0, 1, 4, 0x202); tiff_set (&th->ngps, 1, 2, 2, gpsdata[29]); tiff_set (&th->ngps, 2, 5, 3, TOFF(th->gps[0])); tiff_set (&th->ngps, 3, 2, 2, gpsdata[30]); tiff_set (&th->ngps, 4, 5, 3, TOFF(th->gps[6])); tiff_set (&th->ngps, 5, 1, 1, gpsdata[31]); tiff_set (&th->ngps, 6, 5, 1, TOFF(th->gps[18])); tiff_set (&th->ngps, 7, 5, 3, TOFF(th->gps[12])); tiff_set (&th->ngps, 18, 2, 12, TOFF(th->gps[20])); tiff_set (&th->ngps, 29, 2, 12, TOFF(th->gps[23])); memcpy (th->gps, gpsdata, sizeof th->gps); } th->rat[0] = th->rat[2] = 300; th->rat[1] = th->rat[3] = 1; FORC(6) th->rat[4+c] = 1000000; th->rat[4] *= shutter; th->rat[6] *= aperture; th->rat[8] *= focal_len; strncpy (th->desc, desc, 512); strncpy (th->make, make, 64); strncpy (th->model, model, 64); strcpy (th->soft, "dcraw v"DCRAW_VERSION); t = gmtime (×tamp); sprintf (th->date, "%04d:%02d:%02d %02d:%02d:%02d", t->tm_year+1900,t->tm_mon+1,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); strncpy (th->artist, artist, 64); } void CLASS jpeg_thumb() { char *thumb; ushort exif[5]; struct tiff_hdr th; thumb = (char *) malloc (thumb_length); merror (thumb, "jpeg_thumb()"); fread (thumb, 1, thumb_length, ifp); fputc (0xff, ofp); fputc (0xd8, ofp); if (strcmp (thumb+6, "Exif")) { memcpy (exif, "\xff\xe1 Exif\0\0", 10); exif[1] = htons (8 + sizeof th); fwrite (exif, 1, sizeof exif, ofp); tiff_head (&th, 0); fwrite (&th, 1, sizeof th, ofp); } fwrite (thumb+2, 1, thumb_length-2, ofp); free (thumb); } void CLASS write_ppm_tiff() { struct tiff_hdr th; uchar *ppm; ushort *ppm2; int c, row, col, soff, rstep, cstep; int perc, val, total, white=0x2000; perc = width * height * 0.01; /* 99th percentile white level */ if (fuji_width) perc /= 2; if (!((highlight & ~2) || no_auto_bright)) for (white=c=0; c < colors; c++) { for (val=0x2000, total=0; --val > 32; ) if ((total += histogram[c][val]) > perc) break; if (white < val) white = val; } gamma_curve (gamm[0], gamm[1], 2, (white << 3)/bright); iheight = height; iwidth = width; if (flip & 4) SWAP(height,width); ppm = (uchar *) calloc (width, colors*output_bps/8); ppm2 = (ushort *) ppm; merror (ppm, "write_ppm_tiff()"); if (output_tiff) { tiff_head (&th, 1); fwrite (&th, sizeof th, 1, ofp); if (oprof) fwrite (oprof, ntohl(oprof[0]), 1, ofp); } else if (colors > 3) fprintf (ofp, "P7\nWIDTH %d\nHEIGHT %d\nDEPTH %d\nMAXVAL %d\nTUPLTYPE %s\nENDHDR\n", width, height, colors, (1 << output_bps)-1, cdesc); else fprintf (ofp, "P%d\n%d %d\n%d\n", colors/2+5, width, height, (1 << output_bps)-1); soff = flip_index (0, 0); cstep = flip_index (0, 1) - soff; rstep = flip_index (1, 0) - flip_index (0, width); for (row=0; row < height; row++, soff += rstep) { for (col=0; col < width; col++, soff += cstep) if (output_bps == 8) FORCC ppm [col*colors+c] = curve[image[soff][c]] >> 8; else FORCC ppm2[col*colors+c] = curve[image[soff][c]]; if (output_bps == 16 && !output_tiff && htons(0x55aa) != 0x55aa) swab ((const char *)ppm2, (char *)ppm2, width*colors*2); /*mingw UF*/ fwrite (ppm, colors*output_bps/8, width, ofp); } free (ppm); } int CLASS main (int argc, const char **argv) { // The following variables are static to supress clobbering warnings. // They are not thread-safe, but main() should never be called in a thread. static int arg, status=0; static int timestamp_only=0, thumbnail_only=0, identify_only=0; static int user_qual=-1, user_black=-1, user_sat=-1, user_flip=-1; static int use_fuji_rotate=1, write_to_stdout=0, quality, i, c; static const char *sp, *bpfile=0, *dark_frame=0, *write_ext; static char opm, opt, *ofname, *cp; static struct utimbuf ut; #ifndef NO_LCMS static const char *cam_profile=0, *out_profile=0; #endif #ifndef LOCALTIME putenv ((char *) "TZ=UTC"); #endif #ifdef LOCALEDIR setlocale (LC_CTYPE, ""); setlocale (LC_MESSAGES, ""); bindtextdomain ("dcraw", LOCALEDIR); textdomain ("dcraw"); #endif if (argc == 1) { printf(_("\nRaw photo decoder \"dcraw\" v%s"), DCRAW_VERSION); printf(_("\nby Dave Coffin, dcoffin a cybercom o net\n")); printf(_("\nUsage: %s [OPTION]... [FILE]...\n\n"), argv[0]); puts(_("-v Print verbose messages")); puts(_("-c Write image data to standard output")); puts(_("-e Extract embedded thumbnail image")); puts(_("-i Identify files without decoding them")); puts(_("-i -v Identify files and show metadata")); puts(_("-z Change file dates to camera timestamp")); puts(_("-w Use camera white balance, if possible")); puts(_("-a Average the whole image for white balance")); puts(_("-A Average a grey box for white balance")); puts(_("-r Set custom white balance")); puts(_("+M/-M Use/don't use an embedded color matrix")); puts(_("-C Correct chromatic aberration")); puts(_("-P Fix the dead pixels listed in this file")); puts(_("-K Subtract dark frame (16-bit raw PGM)")); puts(_("-k Set the darkness level")); puts(_("-S Set the saturation level")); puts(_("-n Set threshold for wavelet denoising")); puts(_("-H [0-9] Highlight mode (0=clip, 1=unclip, 2=blend, 3+=rebuild)")); puts(_("-t [0-7] Flip image (0=none, 3=180, 5=90CCW, 6=90CW)")); puts(_("-o [0-5] Output colorspace (raw,sRGB,Adobe,Wide,ProPhoto,XYZ)")); #ifndef NO_LCMS puts(_("-o Apply output ICC profile from file")); puts(_("-p Apply camera ICC profile from file or \"embed\"")); #endif puts(_("-d Document mode (no color, no interpolation)")); puts(_("-D Document mode without scaling (totally raw)")); puts(_("-j Don't stretch or rotate raw pixels")); puts(_("-W Don't automatically brighten the image")); puts(_("-b Adjust brightness (default = 1.0)")); puts(_("-g

Set custom gamma curve (default = 2.222 4.5)")); puts(_("-q [0-3] Set the interpolation quality")); puts(_("-h Half-size color image (twice as fast as \"-q 0\")")); puts(_("-f Interpolate RGGB as four colors")); puts(_("-m Apply a 3x3 median filter to R-G and B-G")); puts(_("-s [0..N-1] Select one raw image or \"all\" from each file")); puts(_("-6 Write 16-bit instead of 8-bit")); puts(_("-4 Linear 16-bit, same as \"-6 -W -g 1 1\"")); puts(_("-T Write TIFF instead of PPM")); puts(""); return 1; } argv[argc] = ""; for (arg=1; (((opm = argv[arg][0]) - 2) | 2) == '+'; ) { opt = argv[arg++][1]; if ((cp = (char *) strchr (sp="nbrkStqmHACg", opt))) for (i=0; i < "114111111422"[cp-sp]-'0'; i++) if (!isdigit(argv[arg+i][0])) { dcraw_message (DCRAW_ERROR,_("Non-numeric argument to \"-%c\"\n"), opt); return 1; } switch (opt) { case 'n': threshold = atof(argv[arg++]); break; case 'b': bright = atof(argv[arg++]); break; case 'r': FORC4 user_mul[c] = atof(argv[arg++]); break; case 'C': aber[0] = 1 / atof(argv[arg++]); aber[2] = 1 / atof(argv[arg++]); break; case 'g': gamm[0] = atof(argv[arg++]); gamm[1] = atof(argv[arg++]); if (gamm[0]) gamm[0] = 1/gamm[0]; break; case 'k': user_black = atoi(argv[arg++]); break; case 'S': user_sat = atoi(argv[arg++]); break; case 't': user_flip = atoi(argv[arg++]); break; case 'q': user_qual = atoi(argv[arg++]); break; case 'm': med_passes = atoi(argv[arg++]); break; case 'H': highlight = atoi(argv[arg++]); break; case 's': shot_select = abs(atoi(argv[arg])); multi_out = !strcmp(argv[arg++],"all"); break; case 'o': if (isdigit(argv[arg][0]) && !argv[arg][1]) output_color = atoi(argv[arg++]); #ifndef NO_LCMS else out_profile = argv[arg++]; break; case 'p': cam_profile = argv[arg++]; #endif break; case 'P': bpfile = const_cast(argv[arg++]); break; case 'K': dark_frame = argv[arg++]; break; case 'z': timestamp_only = 1; break; case 'e': thumbnail_only = 1; break; case 'i': identify_only = 1; break; case 'c': write_to_stdout = 1; break; case 'v': verbose = 1; break; case 'h': half_size = 1; /* "-h" implies "-f" */ case 'f': four_color_rgb = 1; break; case 'A': FORC4 greybox[c] = atoi(argv[arg++]); case 'a': use_auto_wb = 1; break; case 'w': use_camera_wb = 1; break; case 'M': use_camera_matrix = (opm == '+'); break; case 'D': case 'd': document_mode = 1 + (opt == 'D'); case 'j': use_fuji_rotate = 0; break; case 'W': no_auto_bright = 1; break; case 'T': output_tiff = 1; break; case '4': gamm[0] = gamm[1] = no_auto_bright = 1; case '6': output_bps = 16; break; default: dcraw_message (DCRAW_ERROR,_("Unknown option \"-%c\".\n"), opt); return 1; } } if (use_camera_matrix < 0) use_camera_matrix = use_camera_wb; if (arg == argc) { dcraw_message (DCRAW_ERROR,_("No files to process.\n")); return 1; } if (write_to_stdout) { if (isatty(1)) { dcraw_message (DCRAW_ERROR,_("Will not write an image to the terminal!\n")); return 1; } #if defined(WIN32) || defined(DJGPP) || defined(__CYGWIN__) if (setmode(1,O_BINARY) < 0) { perror ("setmode()"); return 1; } #endif } for ( ; arg < argc; arg++) { status = 1; image = 0; oprof = 0; meta_data = ofname = 0; ofp = stdout; if (setjmp (failure)) { if (fileno(ifp) > 2) fclose(ifp); if (fileno(ofp) > 2) fclose(ofp); status = 1; goto cleanup; } ifname = const_cast(argv[arg]); ifname_display = ifname; if (!(ifp = fopen (ifname, "rb"))) { perror (ifname); continue; } status = (identify(),!is_raw); if (user_flip >= 0) flip = user_flip; switch ((flip+3600) % 360) { case 270: flip = 5; break; case 180: flip = 3; break; case 90: flip = 6; } if (timestamp_only) { if ((status = !timestamp)) dcraw_message (DCRAW_ERROR,_("%s has no timestamp.\n"), ifname); else if (identify_only) printf ("%10ld%10d %s\n", (long) timestamp, shot_order, ifname); else { dcraw_message (DCRAW_VERBOSE,_("%s time set to %d.\n"), ifname, (int) timestamp); ut.actime = ut.modtime = timestamp; utime (ifname, &ut); } goto next; } write_fun = &CLASS write_ppm_tiff; if (thumbnail_only) { if ((status = !thumb_offset)) { dcraw_message (DCRAW_ERROR,_("%s has no thumbnail.\n"), ifname); goto next; } else if (thumb_load_raw) { load_raw = thumb_load_raw; data_offset = thumb_offset; height = thumb_height; width = thumb_width; filters = 0; } else { fseek (ifp, thumb_offset, SEEK_SET); write_fun = write_thumb; goto thumbnail; } } if (load_raw == &CLASS kodak_ycbcr_load_raw) { height += height & 1; width += width & 1; } if (identify_only && verbose && make[0]) { printf (_("\nFilename: %s\n"), ifname); printf (_("Timestamp: %s"), ctime(×tamp)); printf (_("Camera: %s %s\n"), make, model); if (artist[0]) printf (_("Owner: %s\n"), artist); if (dng_version) { printf (_("DNG Version: ")); for (i=24; i >= 0; i -= 8) printf ("%d%c", dng_version >> i & 255, i ? '.':'\n'); } printf (_("ISO speed: %d\n"), (int) iso_speed); printf (_("Shutter: ")); if (shutter > 0 && shutter < 1) shutter = (printf ("1/"), 1 / shutter); printf (_("%0.1f sec\n"), shutter); printf (_("Aperture: f/%0.1f\n"), aperture); printf (_("Focal length: %0.1f mm\n"), focal_len); printf (_("Embedded ICC profile: %s\n"), profile_length ? _("yes"):_("no")); printf (_("Number of raw images: %d\n"), is_raw); if (pixel_aspect != 1) printf (_("Pixel Aspect Ratio: %0.6f\n"), pixel_aspect); if (thumb_offset) printf (_("Thumb size: %4d x %d\n"), thumb_width, thumb_height); printf (_("Full size: %4d x %d\n"), raw_width, raw_height); } else if (!is_raw) dcraw_message (DCRAW_ERROR,_("Cannot decode file %s\n"), ifname); if (!is_raw) goto next; shrink = filters && (half_size || ((threshold || aber[0] != 1 || aber[2] != 1) && !identify_only)); iheight = (height + shrink) >> shrink; iwidth = (width + shrink) >> shrink; if (identify_only) { if (verbose) { if (use_fuji_rotate) { if (fuji_width) { fuji_width = (fuji_width - 1 + shrink) >> shrink; iwidth = fuji_width / sqrt(0.5); iheight = (iheight - fuji_width) / sqrt(0.5); } else { if (pixel_aspect < 1) iheight = iheight / pixel_aspect + 0.5; if (pixel_aspect > 1) iwidth = iwidth * pixel_aspect + 0.5; } } if (flip & 4) SWAP(iheight,iwidth); printf (_("Image size: %4d x %d\n"), width, height); printf (_("Output size: %4d x %d\n"), iwidth, iheight); printf (_("Raw colors: %d"), colors); if (filters) { printf (_("\nFilter pattern: ")); if (!cdesc[3]) cdesc[3] = 'G'; for (i=0; i < 16; i++) putchar (cdesc[fc(i >> 1,i & 1)]); } printf (_("\nDaylight multipliers:")); FORCC printf (" %f", pre_mul[c]); if (cam_mul[0] > 0) { printf (_("\nCamera multipliers:")); FORC4 printf (" %f", cam_mul[c]); } putchar ('\n'); } else printf (_("%s is a %s %s image.\n"), ifname, make, model); next: fclose(ifp); continue; } if (use_camera_matrix && cmatrix[0][0] > 0.25) { memcpy (rgb_cam, cmatrix, sizeof cmatrix); raw_color = 0; } image = (ushort (*)[4]) calloc (iheight*iwidth, sizeof *image); merror (image, "main()"); if (meta_length) { meta_data = (char *) malloc (meta_length); merror (meta_data, "main()"); } dcraw_message (DCRAW_VERBOSE,_("Loading %s %s image from %s ...\n"), make, model, ifname); if (shot_select >= is_raw) dcraw_message (DCRAW_ERROR,_("%s: \"-s %d\" requests a nonexistent image!\n"), ifname, shot_select); #ifdef HAVE_FSEEKO fseeko (ifp, data_offset, SEEK_SET); #else fseek (ifp, data_offset, SEEK_SET); #endif (*this.*load_raw)(); if (zero_is_bad) remove_zeroes(); bad_pixels (bpfile); if (dark_frame) subtract (dark_frame); quality = 2 + !fuji_width; if (user_qual >= 0) quality = user_qual; i = cblack[3]; FORC3 if (i > (int) cblack[c]) i = cblack[c]; FORC4 cblack[c] -= i; black += i; if (user_black >= 0) black = user_black; if (user_sat > 0) maximum = user_sat; #ifdef COLORCHECK colorcheck(); #endif if (is_foveon && !document_mode) foveon_interpolate(); if (!is_foveon && document_mode < 2) scale_colors(); pre_interpolate(); if (filters && !document_mode) { if (quality == 0) lin_interpolate(); else if (quality == 1 || colors > 3) vng_interpolate(); else if (quality == 2) ppg_interpolate(); else ahd_interpolate(); } if (mix_green) for (colors=3, i=0; i < height*width; i++) image[i][1] = (image[i][1] + image[i][3]) >> 1; if (!is_foveon && colors == 3) median_filter(); if (!is_foveon && highlight == 2) blend_highlights(); if (!is_foveon && highlight > 2) recover_highlights(); if (use_fuji_rotate) fuji_rotate(); #ifndef NO_LCMS if (cam_profile) apply_profile (cam_profile, out_profile); #endif convert_to_rgb(); if (use_fuji_rotate) stretch(); thumbnail: if (write_fun == &CLASS jpeg_thumb) write_ext = ".jpg"; else if (output_tiff && write_fun == &CLASS write_ppm_tiff) write_ext = ".tiff"; else write_ext = ".pgm\0.ppm\0.ppm\0.pam" + colors*5-5; ofname = (char *) malloc (strlen(ifname) + 64); merror (ofname, "main()"); if (write_to_stdout) strcpy (ofname,_("standard output")); else { strcpy (ofname, ifname); if ((cp = strrchr (ofname, '.'))) *cp = 0; if (multi_out) sprintf (ofname+strlen(ofname), "_%0*d", snprintf(0,0,"%d",is_raw-1), shot_select); if (thumbnail_only) strcat (ofname, ".thumb"); strcat (ofname, write_ext); ofp = fopen (ofname, "wb"); if (!ofp) { status = 1; perror (ofname); goto cleanup; } } dcraw_message (DCRAW_VERBOSE,_("Writing data to %s ...\n"), ofname); (*this.*write_fun)(); fclose(ifp); if (ofp != stdout) fclose(ofp); cleanup: if (meta_data) free (meta_data); if (ofname) free (ofname); if (oprof) free (oprof); if (image) free (image); if (multi_out) { if (++shot_select < is_raw) arg--; else shot_select = 0; } } /* Make sure ifname are not free()'d (UF) */ ifname = NULL; ifname_display = NULL; return status; } #ifndef DCRAW_NOMAIN /*UF*/ int main(int argc, const char **argv) { DCRaw *d = new DCRaw; return d->main(argc, argv); } #endif /*DCRAW_NOMAIN*/ /*UF*/ rawstudio-2.0/plugins/load-dcraw/dcraw_api.h0000644000175000017500000000401611526533643016126 00000000000000/* * UFRaw - Unidentified Flying Raw converter for digital camera images * * dcraw_api.h - API for DCRaw * Copyright 2004-2010 by Udi Fuchs * * based on dcraw by Dave Coffin * http://www.cybercom.net/~dcoffin/ * * 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. */ #ifndef _DCRAW_API_H #define _DCRAW_API_H #ifdef __cplusplus extern "C" { #endif typedef guint16 dcraw_image_type[4]; typedef struct { dcraw_image_type *image; int width, height, colors; } dcraw_image_data; typedef struct { void *dcraw; FILE *ifp; int width, height, colors, fourColorFilters, filters, raw_color; int flip, shrink; double pixel_aspect; dcraw_image_data raw; dcraw_image_type thresholds; float pre_mul[4], post_mul[4], cam_mul[4], rgb_cam[3][4]; double cam_rgb[4][3]; int rgbMax, black, fuji_width; double fuji_step; int toneCurveSize, toneCurveOffset; int toneModeSize, toneModeOffset; char *message; float iso_speed, shutter, aperture, focal_len; time_t timestamp; char make[80], model[80]; int thumbType, thumbOffset; size_t thumbBufferLength; } dcraw_data; enum { dcraw_ahd_interpolation, dcraw_vng_interpolation, dcraw_four_color_interpolation, dcraw_ppg_interpolation, dcraw_bilinear_interpolation, dcraw_none_interpolation }; enum { unknown_thumb_type, jpeg_thumb_type, ppm_thumb_type }; int dcraw_open(dcraw_data *h, char *filename); int dcraw_load_raw(dcraw_data *h); int dcraw_load_thumb(dcraw_data *h, dcraw_image_data *thumb); void dcraw_close(dcraw_data *h); #define DCRAW_SUCCESS 0 #define DCRAW_ERROR 1 #define DCRAW_UNSUPPORTED 2 #define DCRAW_NO_CAMERA_WB 3 #define DCRAW_VERBOSE 4 #define DCRAW_WARNING 5 #define DCRAW_OPEN_ERROR 6 void dcraw_message(void *dcraw, int code, char *format, ...); #ifdef __cplusplus } #endif #endif /*_DCRAW_API_H*/ rawstudio-2.0/plugins/load-dcraw/mmap-hack.c0000644000175000017500000000546011526533643016032 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ #ifdef WITH_MMAP_HACK #include #include #include #include #include #include #include #include "mmap-hack.h" #include RS_FILE * rs_fopen(const char *path, const char *mode) { RS_FILE *file; int fd; struct stat st; if(stat(path, &st)) return(NULL); if ((fd = open(path, O_RDONLY)) == -1) return(NULL); file = (RS_FILE *) malloc(sizeof(RS_FILE)); file->fd = fd; file->size = st.st_size; file->map = (unsigned char *) mmap(NULL, st.st_size, PROT_READ, MAP_SHARED, file->fd, 0); file->offset = 0; return file; } int rs_fclose(RS_FILE *RS_FILE) { munmap(RS_FILE->map, RS_FILE->size); close(RS_FILE->fd); free(RS_FILE); return 0; } inline int rs_fseek(RS_FILE *stream, long offset, int whence) { switch(whence) { case SEEK_SET: stream->offset = offset; break; case SEEK_CUR: stream->offset += offset; break; case SEEK_END: stream->offset = stream->size + offset; } /* clamp */ stream->offset = (stream->offset > stream->size) ? stream->size : ((stream->offset < 0) ? 0 : stream->offset); return(0); } inline size_t rs_fread(void *ptr, size_t size, size_t nmemb, RS_FILE *stream) { if (stream->offset + size*nmemb <= stream->size) { memcpy(ptr, &stream->map[stream->offset], size*nmemb); stream->offset+=size*nmemb; return nmemb; } int bytes = stream->size - stream->offset; memcpy(ptr, &stream->map[stream->offset], bytes); stream->offset+=bytes; return(bytes / size); } char * rs_fgets(char *s, int size, RS_FILE *stream) { int destoff = 0; while (destoff < size) { if (stream->offset >= stream->size) return 0; s[destoff] = stream->map[stream->offset++]; if (s[destoff] == 0 || s[destoff] == '\n') return s; destoff++; } return(NULL); } int rs_fscanf(RS_FILE *stream, const char *format, void* dst) { int scanned = scanf(format, &stream->map[stream->offset], dst); stream->offset+= scanned; return(scanned); } #endif rawstudio-2.0/plugins/load-dcraw/Makefile.in0000644000175000017500000004616411547430037016077 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/load-dcraw DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) load_dcraw_la_DEPENDENCIES = am_load_dcraw_la_OBJECTS = dcrawloader.lo dcraw.lo dcraw_api.lo \ mmap-hack.lo load_dcraw_la_OBJECTS = $(am_load_dcraw_la_OBJECTS) load_dcraw_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(load_dcraw_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(load_dcraw_la_SOURCES) DIST_SOURCES = $(load_dcraw_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4\ -DDCRAW_NOMAIN\ -DDCRAW_NOLCMS\ -DWITH_MMAP_HACK AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = load_dcraw.la load_dcraw_la_LIBADD = @PACKAGE_LIBS@ load_dcraw_la_LDFLAGS = -module -avoid-version load_dcraw_la_SOURCES = dcrawloader.c dcraw.cc dcraw.h dcraw_api.cc dcraw_api.h mmap-hack.c mmap-hack.h all: all-am .SUFFIXES: .SUFFIXES: .c .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/load-dcraw/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/load-dcraw/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done load_dcraw.la: $(load_dcraw_la_OBJECTS) $(load_dcraw_la_DEPENDENCIES) $(load_dcraw_la_LINK) -rpath $(libdir) $(load_dcraw_la_OBJECTS) $(load_dcraw_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcraw.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcraw_api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dcrawloader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mmap-hack.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/load-dcraw/dcraw_api.cc0000644000175000017500000001776111526533643016277 00000000000000/* * UFRaw - Unidentified Flying Raw converter for digital camera images * * dcraw_api.cc - API for DCRaw * Copyright 2004-2010 by Udi Fuchs * * based on dcraw by Dave Coffin * http://www.cybercom.net/~dcoffin/ * * 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. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include /* for sqrt() */ #include #include #include #include #include /*For _(String) definition - NKBJ*/ #include #include "dcraw_api.h" #include "dcraw.h" #ifdef WITH_MMAP_HACK #include "mmap-hack.h" #endif #define FORC(cnt) for (c=0; c < cnt; c++) #define FORC3 FORC(3) #define FORC4 FORC(4) #define FORCC FORC(colors) #define FC(filters,row,col) \ (filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3) extern "C" { int dcraw_open(dcraw_data *h, char *filename) { DCRaw *d = new DCRaw; int c, i; #ifndef LOCALTIME putenv (const_cast("TZ=UTC")); #endif g_free(d->messageBuffer); d->messageBuffer = NULL; d->lastStatus = DCRAW_SUCCESS; d->verbose = 1; d->ifname = g_strdup(filename); d->ifname_display = g_filename_display_name(d->ifname); if (setjmp(d->failure)) { d->dcraw_message(DCRAW_ERROR,_("Fatal internal error\n")); h->message = d->messageBuffer; delete d; return DCRAW_ERROR; } if (!(d->ifp = fopen (d->ifname, "rb"))) { gchar *err_u8 = g_locale_to_utf8(strerror(errno), -1, NULL, NULL, NULL); d->dcraw_message(DCRAW_OPEN_ERROR,_("Cannot open file %s: %s\n"), d->ifname_display, err_u8); g_free(err_u8); h->message = d->messageBuffer; delete d; return DCRAW_OPEN_ERROR; } try { d->identify(); /* We first check if dcraw recognizes the file, this is equivalent * to 'dcraw -i' succeeding */ if (!d->make[0]) { d->dcraw_message(DCRAW_OPEN_ERROR,_("%s: unsupported file format.\n"), d->ifname_display); fclose(d->ifp); h->message = d->messageBuffer; delete d; return DCRAW_OPEN_ERROR; } /* Next we check if dcraw can decode the file */ if (!d->is_raw) { d->dcraw_message(DCRAW_OPEN_ERROR,_("Cannot decode file %s\n"), d->ifname_display); fclose(d->ifp); h->message = d->messageBuffer; delete d; return DCRAW_OPEN_ERROR; } if (d->load_raw == &DCRaw::kodak_ycbcr_load_raw) { d->height += d->height & 1; d->width += d->width & 1; } /* Pass class variables to the handler on two conditions: * 1. They are needed at this stage. * 2. They where set in identify() and won't change in load_raw() */ h->dcraw = d; h->ifp = d->ifp; h->height = d->height; h->width = d->width; h->fuji_width = d->fuji_width; h->fuji_step = sqrt(0.5); h->colors = d->colors; h->filters = d->filters; h->raw_color = d->raw_color; memcpy(h->cam_mul, d->cam_mul, sizeof d->cam_mul); // maximun and black might change during load_raw. We need them for the // camera-wb. If they'll change we will recalculate the camera-wb. h->rgbMax = d->maximum; i = d->cblack[3]; FORC3 if ((unsigned)i > d->cblack[c]) i = d->cblack[c]; FORC4 d->cblack[c] -= i; d->black += i; h->black = d->black; h->shrink = d->shrink = (h->filters!=0); h->pixel_aspect = d->pixel_aspect; /* copied from dcraw's main() */ switch ((d->flip+3600) % 360) { case 270: d->flip = 5; break; case 180: d->flip = 3; break; case 90: d->flip = 6; } h->flip = d->flip; h->toneCurveSize = d->tone_curve_size; h->toneCurveOffset = d->tone_curve_offset; h->toneModeOffset = d->tone_mode_offset; h->toneModeSize = d->tone_mode_size; g_strlcpy(h->make, d->make, 80); g_strlcpy(h->model, d->model, 80); h->iso_speed = d->iso_speed; h->shutter = d->shutter; h->aperture = d->aperture; h->focal_len = d->focal_len; h->timestamp = d->timestamp; h->raw.image = NULL; h->thumbType = unknown_thumb_type; h->message = d->messageBuffer; } catch (...) { delete d; return DCRAW_OPEN_ERROR; } return d->lastStatus; } void dcraw_image_dimensions(dcraw_data *raw, int flip, int shrink, int *height, int *width) { // Effect of dcraw_finilize_shrink() *width = raw->width / shrink; *height = raw->height / shrink; // Effect of fuji_rotate_INDI() */ if (raw->fuji_width) { int fuji_width = raw->fuji_width / shrink - 1; *width = fuji_width / raw->fuji_step; *height = (*height - fuji_width) / raw->fuji_step; } // Effect of dcraw_image_stretch() if (raw->pixel_aspect < 1) *height = *height / raw->pixel_aspect + 0.5; if (raw->pixel_aspect > 1) *width = *width * raw->pixel_aspect + 0.5; // Effect of dcraw_flip_image() if (flip & 4) { int tmp = *height; *height = *width; *width = tmp; } } int dcraw_load_raw(dcraw_data *h) { DCRaw *d = (DCRaw *)h->dcraw; int c, i, j; double dmin; g_free(d->messageBuffer); d->messageBuffer = NULL; d->lastStatus = DCRAW_SUCCESS; if (setjmp(d->failure)) { d->dcraw_message(DCRAW_ERROR,_("Fatal internal error\n")); h->message = d->messageBuffer; delete d; return DCRAW_ERROR; } h->raw.height = d->iheight = (h->height+h->shrink) >> h->shrink; h->raw.width = d->iwidth = (h->width+h->shrink) >> h->shrink; h->raw.image = d->image = g_new0(dcraw_image_type, d->iheight * d->iwidth + d->meta_length); d->meta_data = (char *) (d->image + d->iheight*d->iwidth); /* copied from the end of dcraw's identify() */ if (d->filters && d->colors == 3) { d->filters |= ((d->filters >> 2 & 0x22222222) | (d->filters << 2 & 0x88888888)) & d->filters << 1; } h->raw.colors = d->colors; h->fourColorFilters = d->filters; d->dcraw_message(DCRAW_VERBOSE,_("Loading %s %s image from %s ...\n"), d->make, d->model, d->ifname_display); fseek(d->ifp, 0, SEEK_END); d->ifpSize = ftell(d->ifp); fseek(d->ifp, d->data_offset, SEEK_SET); try { (d->*d->load_raw)(); if (!--d->data_error) d->lastStatus = DCRAW_ERROR; if (d->zero_is_bad) d->remove_zeroes(); d->bad_pixels(NULL); if (d->is_foveon) { d->foveon_interpolate(); h->raw.width = h->width = d->width; h->raw.height = h->height = d->height; } // TODO: Go over the following settings to see if they change during // load_raw. If they change, document where. If not, move to dcraw_open(). h->rgbMax = d->maximum; i = d->cblack[3]; FORC3 if ((unsigned)i > d->cblack[c]) i = d->cblack[c]; FORC4 d->cblack[c] -= i; d->black += i; h->black = d->black; d->dcraw_message(DCRAW_VERBOSE,_("Black: %d, Maximum: %d\n"), d->black, d->maximum); dmin = DBL_MAX; for (i=0; icolors; i++) if (dmin > d->pre_mul[i]) dmin = d->pre_mul[i]; for (i=0; icolors; i++) h->pre_mul[i] = d->pre_mul[i]/dmin; if (h->colors==3) h->pre_mul[3] = 0; memcpy(h->rgb_cam, d->rgb_cam, sizeof d->rgb_cam); double rgb_cam_transpose[4][3]; for (i=0; i<4; i++) for (j=0; j<3; j++) rgb_cam_transpose[i][j] = d->rgb_cam[j][i]; d->pseudoinverse (rgb_cam_transpose, h->cam_rgb, d->colors); } catch (...) { d->dcraw_message(DCRAW_ERROR,_("Dcraw could not load image.\n")); h->message = d->messageBuffer; fclose(d->ifp); h->ifp = NULL; delete d; return DCRAW_ERROR; } fclose(d->ifp); h->ifp = NULL; h->message = d->messageBuffer; return d->lastStatus; } void dcraw_close(dcraw_data *h) { DCRaw *d = (DCRaw *)h->dcraw; g_free(h->raw.image); delete d; } void DCRaw::dcraw_message(int code, const char *format, ...) { } void dcraw_message(void *dcraw, int code, char *format, ...) { char *message; DCRaw *d = (DCRaw *)dcraw; va_list ap; va_start(ap, format); message = g_strdup_vprintf(format, ap); d->dcraw_message(code, message); va_end(ap); g_free(message); } } /*extern "C"*/ rawstudio-2.0/plugins/Makefile.am0000644000175000017500000000072611541737630014046 00000000000000SUBDIRS = \ cache \ colorspace-adobergb \ colorspace-prophoto \ colorspace-srgb \ colorspace-transform \ crop \ dcp \ demosaic \ denoise \ exposure-mask \ fuji-rotate \ input-file \ input-image16 \ lensfun \ load-dcraw \ load-gdk \ load-rawspeed \ meta-ciff \ meta-exiv2 \ meta-mrw \ meta-raf \ meta-tiff \ meta-x3f \ output-jpegfile \ output-facebook \ output-flickr \ output-picasa \ output-pngfile \ output-tifffile \ resample \ rotate rawstudio-2.0/plugins/denoise/0000755000175000017500000000000011547430074013511 500000000000000rawstudio-2.0/plugins/denoise/denoiseinterface.h0000644000175000017500000000606011526533643017116 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 denoiseinterface_h__ #define denoiseinterface_h__ #include #ifdef _unix_ G_BEGIN_DECLS #endif #ifdef __cplusplus /* If this is a C++ compiler, use C linkage */ extern "C" { #endif typedef enum { PROCESS_RGB, PROCESS_YUV, PROCESS_PATTERN_RGB, PROCESS_PATTERN_YUV } InitDenoiseMode; typedef struct { InitDenoiseMode processMode; // Set this before initializing, DO NOT modify after that. RS_IMAGE16* image; // This will be input and output float sigmaLuma; // In RGB mode this is used for all planes, YUV mode only luma. float sigmaChroma; // Used only in YUV mode. float betaLuma; // In RGB mode this is used for all planes, YUV mode only luma. float betaChroma; // Used only in YUV mode. /* Sharpening - Luma is used for all planes in RGB */ float sharpenLuma; // sharpening strength (default=0 - not sharpen) float sharpenCutoffLuma; // sharpening cutoff frequency, relative to max (default=0.3) float sharpenMinSigmaLuma; // Minimum limit (approximate noise margin) for sharpening stage (default=4.0) float sharpenMaxSigmaLuma; // Maximum limit (approximate oversharping margin) for sharpening stage (default=20.0) float sharpenChroma; // sharpening strength (default=0 - not sharpen) float sharpenCutoffChroma; // sharpening cutoff frequency, relative to max (default=0.3) float sharpenMinSigmaChroma; // Minimum limit (approximate noise margin) for sharpening stage (default=4.0) float sharpenMaxSigmaChroma; // Maximum limit (approximate oversharping margin) for sharpening stage (default=20.0) float redCorrection; // Red coefficient, multiplid to R in YUV conversion. (default: 1.0) float blueCorrection; // Blue coefficient, multiplid to R in YUV conversion. (default: 1.0) void* _this; // Do not modify this value. } FFTDenoiseInfo; void initDenoiser(FFTDenoiseInfo* info); void denoiseImage(FFTDenoiseInfo* info); void destroyDenoiser(FFTDenoiseInfo* info); void abortDenoiser(FFTDenoiseInfo* info); #ifdef _unix_ G_END_DECLS #endif #ifdef __cplusplus /* If this is a C++ compiler, end C linkage */ } #endif #endif // denoiseinterface_h__ rawstudio-2.0/plugins/denoise/floatplanarimage-x86.cpp0000644000175000017500000004150011547406412020065 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "floatplanarimage.h" namespace RawStudio { namespace FFTFilter { #if defined (__i386__) || defined (__x86_64__) #if defined (__x86_64__) // Only 64 bits, and only if pixelsize is 4 void FloatPlanarImage::unpackInterleavedYUV_SSE2( const ImgConvertJob* j ) { RS_IMAGE16* image = j->rs; float* temp = p[0]->data; temp[0] = redCorrection; temp[1] = 1.0f; temp[2] = blueCorrection; temp[3] = 0.0f; for (int i = 0; i < 4; i++) { temp[i+4] = (0.299); //r->Y temp[i+8] = (0.587); //g->Y temp[i+12] = (0.114); //b->Y temp[i+16] = (-0.169); //r->Cb temp[i+20] = (-0.331); //g->Cb temp[i+24] = (0.499); //b->Cb temp[i+28] = (0.499); //r->Cr temp[i+32] = (-0.418); //g->Cr temp[i+36] = (-0.0813); //b->Cr } asm volatile ( "movaps 0(%0), %%xmm15\n" // Red, green, bluecorrection : // no output registers : "r" (temp) : // %0 ); for (int y = j->start_y; y < j->end_y; y++ ) { const gushort* pix = GET_PIXEL(image,0,y); gfloat *Y = p[0]->getAt(ox, y+oy); gfloat *Cb = p[1]->getAt(ox, y+oy); gfloat *Cr = p[2]->getAt(ox, y+oy); gint w = (3+image->w) >>2; asm volatile ( "unpack_next_pixel:\n" "movaps (%0), %%xmm0\n" // Load xx,b1,g1,r1,xx,b0,g0,r0 "movaps 16(%0), %%xmm2\n" // Load xx,b3,g3,r3,xx,b2,g2,r2 "prefetchnta 64(%0)\n" // Prefetch next "pxor %%xmm5,%%xmm5\n" "movaps %%xmm0, %%xmm1\n" "movaps %%xmm2, %%xmm3\n" "punpcklwd %%xmm5,%%xmm0\n" //00xx 00b0 00g0 00r0 "punpckhwd %%xmm5,%%xmm1\n" //00xx 00b1 00g1 00r1 "punpcklwd %%xmm5,%%xmm2\n" //00xx 00b2 00g2 00r2 "punpckhwd %%xmm5,%%xmm3\n" //00xx 00b3 00g3 00r3 "cvtdq2ps %%xmm0, %%xmm0\n" // doubleword to float "cvtdq2ps %%xmm1, %%xmm1\n" "cvtdq2ps %%xmm2, %%xmm2\n" // doubleword to float "cvtdq2ps %%xmm3, %%xmm3\n" "mulps %%xmm15, %%xmm0\n" // Multiply by redcorrection/bluecorrection "mulps %%xmm15, %%xmm1\n" // Multiply by redcorrection/bluecorrection "mulps %%xmm15, %%xmm2\n" // Multiply by redcorrection/bluecorrection "mulps %%xmm15, %%xmm3\n" // Multiply by redcorrection/bluecorrection "rsqrtps %%xmm0, %%xmm0\n" // 1 / sqrt() "rsqrtps %%xmm1, %%xmm1\n" "rsqrtps %%xmm2, %%xmm2\n" "rsqrtps %%xmm3, %%xmm3\n" "rcpps %%xmm0, %%xmm0\n" // sqrt "rcpps %%xmm1, %%xmm1\n" // sqrt "rcpps %%xmm2, %%xmm2\n" // sqrt "rcpps %%xmm3, %%xmm3\n" // sqrt "movaps %%xmm0, %%xmm5\n" "movaps %%xmm2, %%xmm7\n" "unpcklps %%xmm1, %%xmm0\n" //g1 g0 r1 r0 "unpcklps %%xmm3, %%xmm2\n" //g3 g2 r3 r2 "movaps %%xmm0, %%xmm4\n" //g1 g0 r1 r0 "movlhps %%xmm2, %%xmm0\n" //r3 r2 r1 r0 "movhlps %%xmm4, %%xmm2\n" //g3 g2 g1 g0 "unpckhps %%xmm1, %%xmm5\n" //xx xx b1 b0 "unpckhps %%xmm3, %%xmm7\n" //xx xx b3 b2 "movlhps %%xmm7, %%xmm5\n" //b3 b2 b1 b0 "movaps %%xmm2, %%xmm1\n" // Green in xmm1 "movaps %%xmm2, %%xmm4\n" // Green (copy) in xmm4 "movaps %%xmm5, %%xmm2\n" // Blue in xmm2 "movaps %%xmm0, %%xmm3\n" // Red (copy) in xmm3 "mulps 16(%5), %%xmm3\n" // R->Y "mulps 32(%5), %%xmm4\n" // G->Y "mulps 48(%5), %%xmm5\n" // B->Y "movaps %%xmm0, %%xmm6\n" // Red (copy) in xmm6 "movaps %%xmm1, %%xmm7\n" // Green (copy) in xmm7 "movaps %%xmm2, %%xmm8\n" // Blue (copy) in xmm8 "mulps 64(%5), %%xmm0\n" // R->Cb "mulps 80(%5), %%xmm1\n" // G->Cb "mulps 96(%5), %%xmm2\n" // B->Cb "addps %%xmm4, %%xmm3\n" // Add Y "addps %%xmm1, %%xmm0\n" // Add Cb "mulps 112(%5), %%xmm6\n" // R->Cr "mulps 128(%5), %%xmm7\n" // G->Cr "mulps 144(%5), %%xmm8\n" // B->Cr "addps %%xmm5, %%xmm3\n" // Add Y (finished) "addps %%xmm2, %%xmm0\n" // Add Cb (finished) "addps %%xmm7, %%xmm6\n" // Add Cr "addps %%xmm8, %%xmm6\n" // Add Cr (finished) "movntdq %%xmm3, (%1)\n" // Store Y "movntdq %%xmm0, (%2)\n" // Store Cb "movntdq %%xmm6, (%3)\n" // Store Cr "add $32, %0\n" "add $16, %1\n" "add $16, %2\n" "add $16, %3\n" "dec %4\n" "jnz unpack_next_pixel\n" : // no output registers : "r" (pix), "r" (Y), "r" (Cb), "r" (Cr), "r" (w), "r" (temp) // %0 %1 %2 %3 %4 %5 : "%rax", "%rbx", "%rcx" ); } asm volatile ( "emms\nsfence\n" ); } #endif // defined (__x86_64__) #if defined (__x86_64__) void FloatPlanarImage::packInterleavedYUV_SSE2( const ImgConvertJob* j) { RS_IMAGE16* image = j->rs; float* temp = p[0]->data; for (int i = 0; i < 4; i++) { temp[i] = 1.402f; // Cr to r temp[i+4] = -0.714f; // Cr to g temp[i+8] = -0.344f; // Cb to g temp[i+12] = 1.772f; // Cb to b temp[i+16] = (1.0f/redCorrection); // Red correction temp[i+20] = (1.0f/blueCorrection); // Blue correction *((gint*)&temp[i+24]) = 32768; // Subtract *((guint*)&temp[i+28]) = 0x80008000; // xor sign shift } asm volatile ( "movaps (%0), %%xmm10\n" // Cr to r "movaps 16(%0), %%xmm11\n" // Cr to g "movaps 32(%0), %%xmm12\n" // Cb to g "movaps 48(%0), %%xmm13\n" // Cb to b "movaps 64(%0), %%xmm14\n" // Red Correction "movaps 80(%0), %%xmm15\n" // Blue Correction "movaps 96(%0), %%xmm9\n" // 0x00008000 "pxor %%xmm8, %%xmm8\n" // Zero "movaps 112(%0), %%xmm7\n" // word 0x8000 : // no output registers : "r" (temp) : // %0 ); for (int y = j->start_y; y < j->end_y; y++ ) { gfloat *Y = p[0]->getAt(ox, y+oy); gfloat *Cb = p[1]->getAt(ox, y+oy); gfloat *Cr = p[2]->getAt(ox, y+oy); gushort* out = GET_PIXEL(image,0,y); guint n = (image->w+3)>>2; asm volatile ( "loopback_YUV_SSE2_64:" "movaps (%2), %%xmm1\n" // xmm1: Cb (4 pixels) "movaps (%3), %%xmm2\n" // xmm2: Cr "movaps (%1), %%xmm0\n" // xmm0: Y "movaps %%xmm1, %%xmm3\n" // xmm3: Cb "movaps %%xmm2, %%xmm4\n" // xmm4: Cr "mulps %%xmm12, %%xmm1\n" // xmm1: Cb for green "mulps %%xmm11, %%xmm2\n" // xmm2: Cr for green "addps %%xmm0, %%xmm1\n" // xmm1: Add Y for green "mulps %%xmm13, %%xmm3\n" // xmm3: Cb for blue "mulps %%xmm10, %%xmm4\n" // xmm4: Cr for red "addps %%xmm2, %%xmm1\n" // Green ready in xmm1 "addps %%xmm0, %%xmm3\n" // Add Y to blue "addps %%xmm0, %%xmm4\n" // Add Y to red - xmm 0 free "mulps %%xmm1, %%xmm1\n" // Square green "cvtps2dq %%xmm1, %%xmm1\n" // Convert green to dwords "mulps %%xmm3, %%xmm3\n" // Square blue "mulps %%xmm4, %%xmm4\n" // Square red "mulps %%xmm15, %%xmm3\n" // Multiply blue correction - maybe not needed later "mulps %%xmm14, %%xmm4\n" // Multiply red correction - maybe not needed later "psubd %%xmm9, %%xmm1\n" // g = g - 32768 ( to avoid saturation) "cvtps2dq %%xmm3, %%xmm3\n" // Convert blue to dwords "packssdw %%xmm1,%%xmm1\n" // g3g2 g1g0 g3g2 g1g0 "cvtps2dq %%xmm4, %%xmm4\n" // Convert red to dwords "pxor %%xmm7, %%xmm1\n" // Shift sign "psubd %%xmm9, %%xmm3\n" // b = b - 32768 ( to avoid saturation) "psubd %%xmm9, %%xmm4\n" // r = r - 32768 ( to avoid saturation) "packssdw %%xmm3,%%xmm3\n" // b3b2 b1b0 b3b2 b1b0 "packssdw %%xmm4,%%xmm4\n" // g3g2 g1g0 r3r2 r1r0 "pxor %%xmm7, %%xmm3\n" // Shift sign (b) "pxor %%xmm7, %%xmm4\n" // Shift sign (r) "punpcklwd %%xmm1, %%xmm4\n" // g3r3 g2r2 g1r1 g0r0 "punpcklwd %%xmm8, %%xmm3\n" // 00b3 00b2 00b1 00b0 "movdqa %%xmm4, %%xmm0\n" // Copy r&g "punpckldq %%xmm3, %%xmm4\n" // Interleave lower blue into reg&green in xmm4 Now 00b1 g1r1 00b0 g0r0 "punpckhdq %%xmm3, %%xmm0\n" // Interleave higher blue into reg&green in xmm0 Now 00b3 g3r3 00b2 g2r2 "movntdq %%xmm4, (%0)\n" // Store low pixels "movntdq %%xmm0, 16(%0)\n" // Store high pixels "add $32, %0\n" "add $16, %1\n" "add $16, %2\n" "add $16, %3\n" "dec %4\n" "jnz loopback_YUV_SSE2_64\n" : // no output registers : "r" (out), "r" (Y), "r" (Cb), "r" (Cr), "r"(n) : // %0 %1 %2 %3 %4 ); } asm volatile ( "emms\nsfence\n" ); } #if 0 void FloatPlanarImage::packInterleavedYUV_SSE4( const ImgConvertJob* j) { RS_IMAGE16* image = j->rs; float* temp = p[0]->data; for (int i = 0; i < 4; i++) { temp[i] = 1.402f; // Cr to r temp[i+4] = -0.714f; // Cr to g temp[i+8] = -0.344f; // Cb to g temp[i+12] = 1.772f; // Cb to b temp[i+16] = (1.0f/redCorrection); // Red correction temp[i+20] = (1.0f/blueCorrection); // Blue correction } asm volatile ( "movaps (%0), %%xmm10\n" // Cr to r "movaps 16(%0), %%xmm11\n" // Cr to g "movaps 32(%0), %%xmm12\n" // Cb to g "movaps 48(%0), %%xmm13\n" // Cb to b "movaps 64(%0), %%xmm14\n" // Red Correction "movaps 80(%0), %%xmm15\n" // Blue Correction : // no output registers : "r" (temp) : // %0 ); for (int y = j->start_y; y < j->end_y; y++ ) { gfloat *Y = p[0]->getAt(ox, y+oy); gfloat *Cb = p[1]->getAt(ox, y+oy); gfloat *Cr = p[2]->getAt(ox, y+oy); gushort* out = GET_PIXEL(image,0,y); guint n = (image->w+3)>>2; asm volatile ( "loopback_YUV_SSE4_64:" "movaps (%2), %%xmm1\n" // xmm1: Cb (4 pixels) "movaps (%3), %%xmm2\n" // xmm2: Cr "movaps (%1), %%xmm0\n" // xmm0: Y "movaps %%xmm1, %%xmm3\n" // xmm3: Cb "movaps %%xmm2, %%xmm4\n" // xmm4: Cr "mulps %%xmm12, %%xmm1\n" // xmm1: Cb for green "mulps %%xmm11, %%xmm2\n" // xmm2: Cr for green "addps %%xmm0, %%xmm1\n" // xmm1: Add Y for green "mulps %%xmm13, %%xmm3\n" // xmm3: Cb for blue "mulps %%xmm10, %%xmm4\n" // xmm4: Cr for red "addps %%xmm2, %%xmm1\n" // Green ready in xmm1 "addps %%xmm0, %%xmm3\n" // Add Y to blue "addps %%xmm0, %%xmm4\n" // Add Y to red - xmm 0 free "mulps %%xmm1, %%xmm1\n" // Square green "mulps %%xmm3, %%xmm3\n" // Square blue "mulps %%xmm4, %%xmm4\n" // Square red "cvtps2dq %%xmm1, %%xmm1\n" // Convert green to dwords "mulps %%xmm15, %%xmm3\n" // Multiply blue correction - maybe not needed later "mulps %%xmm14, %%xmm4\n" // Multiply red correction - maybe not needed later "cvtps2dq %%xmm4, %%xmm4\n" // Convert red to dwords "cvtps2dq %%xmm3, %%xmm3\n" // Convert blue to dwords "packusdw %%xmm1, %%xmm1\n" // green g3g2 g1g0 g3g2 g1g0 "packusdw %%xmm3, %%xmm3\n" // blue "packusdw %%xmm4, %%xmm4\n" // red "pxor %%xmm0,%%xmm0\n" // Not really needed, but almost a no-op, so we play nice "punpcklwd %%xmm1,%%xmm4\n" // red + green interleaved g3r3 g2r2 g1r1 g0r0 "punpcklwd %%xmm0,%%xmm3\n" // blue zero interleaved 00b3 00b2 00b1 00b0 "movdqa %%xmm4, %%xmm1\n" // Copy r+g "punpckldq %%xmm3,%%xmm4\n" // interleave r+g and blue low "punpckhdq %%xmm3,%%xmm1\n" // interleave r+g and blue high "movntdq %%xmm4, (%0)\n" // Store low pixels "movntdq %%xmm1, 16(%0)\n" // Store high pixels "add $32, %0\n" "add $16, %1\n" "add $16, %2\n" "add $16, %3\n" "dec %4\n" "jnz loopback_YUV_SSE4_64\n" : // no output registers : "r" (out), "r" (Y), "r" (Cb), "r" (Cr), "r"(n) : // %0 %1 %2 %3 %4 ); } asm volatile ( "emms\nsfence\n" ); } #endif #else // 32 bits void FloatPlanarImage::packInterleavedYUV_SSE2( const ImgConvertJob* j) { RS_IMAGE16* image = j->rs; float temp[32] __attribute__ ((aligned (16))); for (int i = 0; i < 4; i++) { temp[i] = 1.402f; // Cr to r temp[i+4] = -0.714f; // Cr to g temp[i+8] = -0.344f; // Cb to g temp[i+12] = 1.772f; // Cb to b temp[i+16] = (1.0f/redCorrection); // Red correction temp[i+20] = (1.0f/blueCorrection); // Blue correction *((gint*)&temp[i+24]) = 32768; // Subtract *((guint*)&temp[i+28]) = 0x80008000; // xor sign shift } int* itemp = (int*)(&temp[28]); asm volatile ( "movaps 96(%0), %%xmm7\n" // Subtract "movaps 112(%0), %%xmm5\n" // Xor sign "pxor %%xmm6, %%xmm6\n" // Zero : // no output registers : "r" (temp) : // %0 ); for (int y = j->start_y; y < j->end_y; y++ ) { gfloat *Y = p[0]->getAt(ox, y+oy); gfloat *Cb = p[1]->getAt(ox, y+oy); gfloat *Cr = p[2]->getAt(ox, y+oy); gushort* out = GET_PIXEL(image,0,y); itemp[0] = (image->w+3)>>2; asm volatile ( "loopback_YUV_SSE2_32:" "movaps (%2), %%xmm1\n" // xmm1: Cb (4 pixels) "movaps (%3), %%xmm2\n" // xmm2: Cr "movaps (%1), %%xmm0\n" // xmm0: Y "movaps %%xmm1, %%xmm3\n" // xmm3: Cb "movaps %%xmm2, %%xmm4\n" // xmm4: Cr "mulps 32(%4), %%xmm1\n" // xmm1: Cb for green "mulps 16(%4), %%xmm2\n" // xmm2: Cr for green "addps %%xmm0, %%xmm1\n" // xmm1: Add Y for green "mulps 48(%4), %%xmm3\n" // xmm3: Cb for blue "mulps (%4), %%xmm4\n" // xmm4: Cr for red "addps %%xmm2, %%xmm1\n" // Green ready in xmm1 "addps %%xmm0, %%xmm3\n" // Add Y to blue "addps %%xmm0, %%xmm4\n" // Add Y to red - xmm 0 free "mulps %%xmm1, %%xmm1\n" // Square green "mulps %%xmm3, %%xmm3\n" // Square blue "mulps %%xmm4, %%xmm4\n" // Square red "cvtps2dq %%xmm1, %%xmm1\n" // Convert green to dwords "mulps 80(%4), %%xmm3\n" // Multiply blue correction - maybe not needed later "mulps 64(%4), %%xmm4\n" // Multiply red correction - maybe not needed later "psubd %%xmm7, %%xmm1\n" // g = g - 32768 ( to avoid saturation) "cvtps2dq %%xmm3, %%xmm3\n" // Convert blue to dwords "packssdw %%xmm1,%%xmm1\n" // g3g2 g1g0 g3g2 g1g0 "cvtps2dq %%xmm4, %%xmm4\n" // Convert red to dwords "pxor %%xmm5, %%xmm1\n" // Shift sign "psubd %%xmm7, %%xmm3\n" // b = b - 32768 ( to avoid saturation) "psubd %%xmm7, %%xmm4\n" // r = r - 32768 ( to avoid saturation) "packssdw %%xmm3,%%xmm3\n" // b3b2 b1b0 b3b2 b1b0 "packssdw %%xmm4,%%xmm4\n" // g3g2 g1g0 r3r2 r1r0 "pxor %%xmm5, %%xmm3\n" // Shift sign (b) "pxor %%xmm5, %%xmm4\n" // Shift sign (r) "punpcklwd %%xmm1, %%xmm4\n" // g3r3 g2r2 g1r1 g0r0 "punpcklwd %%xmm6, %%xmm3\n" // 00b3 00b2 00b1 00b0 "movdqa %%xmm4, %%xmm0\n" // Copy r&g "punpckldq %%xmm3, %%xmm4\n" // Interleave lower blue into reg&green in xmm4 Now 00b1 g1r1 00b0 g0r0 "punpckhdq %%xmm3, %%xmm0\n" // Interleave higher blue into reg&green in xmm0 Now 00b3 g3r3 00b2 g2r2 "movdqa %%xmm4, (%0)\n" // Store low pixels "movdqa %%xmm0, 16(%0)\n" // Store high pixels "add $32, %0\n" "add $16, %1\n" "add $16, %2\n" "add $16, %3\n" "decl 112(%4)\n" "jnz loopback_YUV_SSE2_32\n" "emms\n" : // no output registers : "r" (out), "r" (Y), "r" (Cb), "r" (Cr), "r"(temp) : // %0 %1 %2 %3 %4 ); } } #endif #endif // defined (__i386__) || defined (__x86_64__) }}// namespace RawStudio::FFTFilter rawstudio-2.0/plugins/denoise/fftdenoiseryuv.cpp0000644000175000017500000000652411526533643017223 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "fftdenoiseryuv.h" #include namespace RawStudio { namespace FFTFilter { FFTDenoiserYUV::FFTDenoiserYUV(void) { } FFTDenoiserYUV::~FFTDenoiserYUV(void) { } void FFTDenoiserYUV::denoiseImage( RS_IMAGE16* image ) { FloatPlanarImage img; img.bw = FFT_BLOCK_SIZE; img.bh = FFT_BLOCK_SIZE; img.ox = FFT_BLOCK_OVERLAP; img.oy = FFT_BLOCK_OVERLAP; img.redCorrection = redCorrection; img.blueCorrection = blueCorrection; if ((image->w < FFT_BLOCK_SIZE) || (image->h < FFT_BLOCK_SIZE)) return; // Image too small to denoise if (image->channels != 3 || image->filters!=0) return; // No conversion possible with this image waitForJobs(img.getUnpackInterleavedYUVJobs(image)); if (abort) return; img.mirrorEdges(); if (abort) return; FFTWindow window(img.bw,img.bh); window.createHalfCosineWindow(img.ox, img.oy); ComplexFilter *filter = new ComplexWienerFilterDeGrid(img.bw, img.bh, beta, sigmaLuma, 1.0, plan_forward, &window); filter->setSharpen(sharpen, sharpenMinSigma, sharpenMaxSigma, sharpenCutoff); img.setFilter(0,filter,&window); filter = new ComplexWienerFilterDeGrid(img.bw, img.bh, betaChroma, sigmaChroma, 1.0, plan_forward, &window); filter->setSharpen(sharpenChroma, sharpenMinSigmaChroma, sharpenMaxSigmaChroma, sharpenCutoffChroma); img.setFilter(1,filter,&window); filter = new ComplexWienerFilterDeGrid(img.bw, img.bh, betaChroma, sigmaChroma, 1.0, plan_forward, &window); filter->setSharpen(sharpenChroma, sharpenMinSigmaChroma, sharpenMaxSigmaChroma, sharpenCutoffChroma); img.setFilter(2,filter,&window); FloatPlanarImage outImg(img); processJobs(img, outImg); if (abort) return; // Convert back waitForJobs(outImg.getPackInterleavedYUVJobs(image)); } void FFTDenoiserYUV::setParameters( FFTDenoiseInfo *info ) { FFTDenoiser::setParameters(info); sigmaLuma = info->sigmaLuma*SIGMA_FACTOR; sigmaChroma = info->sigmaChroma*SIGMA_FACTOR; betaChroma = info->betaChroma; sharpen = info->sharpenLuma; sharpenCutoff = info->sharpenCutoffLuma; sharpenMinSigma = info->sharpenMinSigmaLuma*SIGMA_FACTOR; sharpenMaxSigma = info->sharpenMaxSigmaLuma*SIGMA_FACTOR; sharpenChroma = info->sharpenChroma; sharpenCutoffChroma = info->sharpenCutoffChroma*SIGMA_FACTOR; sharpenMinSigmaChroma = info->sharpenMinSigmaChroma*SIGMA_FACTOR; sharpenMaxSigmaChroma = info->sharpenMaxSigmaChroma*SIGMA_FACTOR; redCorrection = info->redCorrection; blueCorrection = info->blueCorrection; } }}// namespace RawStudio::FFTFilter rawstudio-2.0/plugins/denoise/floatimageplane.h0000644000175000017500000000371311526533643016741 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 imageplane_h__ #define imageplane_h__ #include "jobqueue.h" #include #include #include "complexfilter.h" namespace RawStudio { namespace FFTFilter { using namespace std; class FFTWindow; class FloatImagePlane { public: FloatImagePlane(int _w, int _h, int id = -1); FloatImagePlane(const FloatImagePlane& p); virtual ~FloatImagePlane(void); void allocateImage(); void mirrorEdges(int mirror_x, int mirror_y); gfloat* getLine(int y); gfloat* getAt(int x, int y); FloatImagePlane* getSlice(int x,int y,int new_w, int new_h); void blitOnto(FloatImagePlane *dst); void multiply(float mul); void addJobs(JobQueue *jobs, int bw, int bh, int ox, int oy, FloatImagePlane *outPlane); void applySlice(PlanarImageSlice *p); const int w; const int h; gfloat* data; int plane_id; ComplexFilter* filter; FFTWindow* window; int pitch; // Not in bytes, but in floats private: gfloat* allocated; }; void FBitBlt(guchar* dstp, int dst_pitch, const guchar* srcp, int src_pitch, int row_size, int height); }} // namespace RawStudio::FFTFilter #endif // imageplane_h__ rawstudio-2.0/plugins/denoise/complexblock.cpp0000644000175000017500000000256611526533643016633 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "complexblock.h" #include #include "floatimageplane.h" #include /* posix_memalign() */ namespace RawStudio { namespace FFTFilter { ComplexBlock::ComplexBlock(int _w, int _h): w(_w), h(_h) { pitch = w * sizeof(fftwf_complex); g_assert(0 == posix_memalign((void**)&complex, 16, pitch*h)); g_assert(complex); temp = new FloatImagePlane(256,1); temp->allocateImage(); } ComplexBlock::~ComplexBlock(void) { free(complex); complex = 0; delete temp; } }}// namespace RawStudio::FFTFilter rawstudio-2.0/plugins/denoise/Makefile.am0000644000175000017500000000162611526533643015475 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall \ -g3 \ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ -ffast-math \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = denoise.la libdir = $(datadir)/rawstudio/plugins/ denoise_la_LIBADD = @PACKAGE_LIBS@ denoise_la_LDFLAGS = -module -avoid-version denoise_la_SOURCES = denoise.c \ complexblock.cpp complexblock.h \ complexfilter.cpp complexfilter.h \ complexfilter-x86.cpp \ denoiseinterface.h \ denoisethread.cpp denoisethread.h \ fftdenoiser.cpp fftdenoiser.h \ fftdenoiseryuv.cpp fftdenoiseryuv.h \ fftwindow.cpp fftwindow.h \ floatimageplane.cpp floatimageplane.h \ floatplanarimage.cpp floatplanarimage-x86.cpp floatplanarimage.h \ jobqueue.cpp jobqueue.h \ planarimageslice.cpp planarimageslice.h rawstudio-2.0/plugins/denoise/floatplanarimage.h0000644000175000017500000000503211547406412017107 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 floatplanarimage_h__ #define floatplanarimage_h__ #include "floatimageplane.h" #include "jobqueue.h" #include "fftwindow.h" namespace RawStudio { namespace FFTFilter { // A container and utility class #define WB_R_CORR 2.4150f #define WB_B_CORR 1.4140f class FloatPlanarImage { public: FloatPlanarImage(void); FloatPlanarImage( const FloatPlanarImage &img ); // Creates image with similar features virtual ~FloatPlanarImage(void); void allocate_planes(); void mirrorEdges(); FloatImagePlane **p; int nPlanes; void unpackInterleaved(const RS_IMAGE16* image); void packInterleaved( RS_IMAGE16* image ); void setFilter( int plane, ComplexFilter *f, FFTWindow *window); JobQueue* getJobs(FloatPlanarImage &outImg); void unpackInterleavedYUV( const ImgConvertJob* j ); #if defined (__i386__) || defined (__x86_64__) void packInterleavedYUV_SSE2( const ImgConvertJob* j); #endif #if defined (__x86_64__) void unpackInterleavedYUV_SSE2( const ImgConvertJob* j ); // void packInterleavedYUV_SSE4( const ImgConvertJob* j); #endif void packInterleavedYUV( const ImgConvertJob* j); JobQueue* getUnpackInterleavedYUVJobs(RS_IMAGE16* image); JobQueue* getPackInterleavedYUVJobs(RS_IMAGE16* image); FloatImagePlane* getPlaneSliceFrom(int plane, int x, int y); int bw; // Block width int bh; // Block height int ox; // Overlap pixels int oy; // Overlap pixels float redCorrection; float blueCorrection; static void initConvTable(); static float shortToFloat[65536*4]; }; }} // namespace RawStudio::FFTFilter #endif // floatplanarimage_h__ inline guint clampbits(gint x, guint n) { guint32 _y_temp; if( (_y_temp=x>>n) ) x = ~_y_temp >> (32-n); return x;} rawstudio-2.0/plugins/denoise/jobqueue.h0000644000175000017500000000416711526533643015434 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 jobqueue_h__ #define jobqueue_h__ #include #include "planarimageslice.h" #include "pthread.h" namespace RawStudio { namespace FFTFilter { class FloatPlanarImage; using namespace std; typedef enum { JOB_FFT, JOB_CONVERT_TOFLOAT_YUV, JOB_CONVERT_FROMFLOAT_YUV } JobType; class Job { public: Job(JobType _type) : type(_type) {}; virtual ~Job(void) {}; JobType type; }; class FFTJob : public Job { public: FFTJob(PlanarImageSlice *slice); virtual ~FFTJob(void); PlanarImageSlice *p; FloatImagePlane *outPlane; }; class ImgConvertJob : public Job { public: ImgConvertJob(FloatPlanarImage *_img, JobType _type) : Job(_type), img(_img) {}; virtual ~ImgConvertJob(void) {}; RS_IMAGE16 *rs; FloatPlanarImage *img; int start_y; int end_y; }; class JobQueue { public: JobQueue(void); virtual ~JobQueue(void); Job* getJob(); void addJob(Job*); int removeRemaining(); // Removes remaining jobs, and returns the number of deleted jobs. int jobsLeft(); Job* waitForJob(); vector getJobs(int n); vector getJobsPercent(int percent); private: vector jobs; // Requires a mutex, so private. pthread_mutex_t job_mutex; pthread_cond_t job_added_notify; }; }} // namespace RawStudio::FFTFilter #endif // jobqueue_h__ rawstudio-2.0/plugins/denoise/denoisethread.cpp0000644000175000017500000001050711526533643016761 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "floatimageplane.h" #include "denoisethread.h" #include "complexfilter.h" #include "fftwindow.h" #include "floatplanarimage.h" namespace RawStudio { namespace FFTFilter { void *StartDenoiseThread(void *_this) { DenoiseThread *d = (DenoiseThread*)_this; d->threadExited = false; d->runDenoise(); d->threadExited = true; pthread_exit(NULL); return NULL; } DenoiseThread::DenoiseThread(void) { complex = 0; input_plane = 0; exitThread = false; threadExited = false; pthread_mutex_init(&run_thread_mutex, NULL); pthread_cond_init (&run_thread, NULL); // Signal thread to run pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); pthread_create(&thread_id,&attr,StartDenoiseThread,this); pthread_attr_destroy(&attr); } DenoiseThread::~DenoiseThread(void) { if (!threadExited) exitThread = true; waiting = 0; pthread_mutex_lock(&run_thread_mutex); pthread_cond_signal(&run_thread); // Start thread pthread_mutex_unlock(&run_thread_mutex); pthread_join(thread_id, NULL); pthread_mutex_destroy(&run_thread_mutex); pthread_cond_destroy(&run_thread); if (complex) delete complex; complex = 0; if (input_plane) delete input_plane; input_plane = 0; } void DenoiseThread::addJobs( JobQueue *_waiting, JobQueue *_finished ) { pthread_mutex_lock(&run_thread_mutex); waiting = _waiting; finished = _finished; pthread_cond_signal(&run_thread); pthread_mutex_unlock(&run_thread_mutex); } void DenoiseThread::jobsEnded() { pthread_mutex_lock(&run_thread_mutex); waiting = 0; finished = 0; pthread_mutex_unlock(&run_thread_mutex); } void DenoiseThread::runDenoise() { pthread_mutex_lock(&run_thread_mutex); while (!exitThread) { pthread_cond_wait(&run_thread,&run_thread_mutex); // Wait for jobs vector jobs; if (waiting) jobs = waiting->getJobsPercent(10); while (!exitThread && !jobs.empty()) { Job* j = jobs[0]; jobs.erase(jobs.begin()); switch (j->type) { case JOB_FFT: procesFFT((FFTJob*)j); break; case JOB_CONVERT_FROMFLOAT_YUV: { ImgConvertJob *job = (ImgConvertJob*)j; job->img->packInterleavedYUV(job); break; } case JOB_CONVERT_TOFLOAT_YUV: { ImgConvertJob *job = (ImgConvertJob*)j; job->img->unpackInterleavedYUV(job); break; } default: break; } finished->addJob(j); if (jobs.empty()) jobs = waiting->getJobsPercent(10); } } pthread_mutex_unlock(&run_thread_mutex); } void DenoiseThread::procesFFT( FFTJob* j ) { FloatImagePlane* input = j->p->in; g_assert(j->p->filter); if (j->p->filter->skipBlock()) { j->outPlane->applySlice(j->p); return; } if (!complex) complex = new ComplexBlock(input->w, input->h); if (!input_plane) { input_plane = new FloatImagePlane(input->w, input->h); input_plane->allocateImage(); } j->p->window->applyAnalysisWindow(input, input_plane); fftwf_execute_dft_r2c(forward, input_plane->data, complex->complex); j->p->filter->process(complex); fftwf_execute_dft_c2r(reverse, complex->complex, input_plane->data); j->p->setOut(input_plane); // Currently not used, as no overlapped data is used. //j->p->window->applySynthesisWindow(j->p->out); j->outPlane->applySlice(j->p); } }}// namespace RawStudio::FFTFilter rawstudio-2.0/plugins/denoise/complexfilter.cpp0000644000175000017500000003656111526533643017030 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. * * Based on FFT3DFilter plugin for Avisynth 2.5 - 3D Frequency Domain filter * Copyright(C)2004-2005 A.G.Balakhnin aka Fizick, email: bag@hotmail.ru, web: http://bag.hotmail.ru */ #include "complexfilter.h" #include #include "fftwindow.h" /* * These classes define the processing that must be done * to each block. * Note that the process() function must be re-entrant, * as all threads will use the same instance for each plane. * */ #ifndef MAX #define MAX(x,y) ((x) > (y) ? (x) : (y)) #endif namespace RawStudio { namespace FFTFilter { /**** BASE CLASS *****/ ComplexFilter::ComplexFilter( int block_width, int block_height ) : bw(block_width), bh(block_height), norm(1.0f/(block_width*block_height)), sharpen(0), sigmaSquaredSharpenMin(0), sigmaSquaredSharpenMax(0), sharpenWindow(0) {} ComplexFilter::~ComplexFilter(void) { if (sharpenWindow) delete sharpenWindow; sharpenWindow = 0; } void ComplexFilter::setSharpen( float _sharpen, float sigmaSharpenMin, float sigmaSharpenMax, float scutoff ) { if (ABS(_sharpen) <0.001f) return; sharpen = _sharpen; sigmaSquaredSharpenMin = sigmaSharpenMin*sigmaSharpenMin/norm; sigmaSquaredSharpenMax = sigmaSharpenMax*sigmaSharpenMax/norm; // window for sharpen float svr = 1.0f; // Horizontal to vertical ratio if (!sharpenWindow) { sharpenWindow = new FloatImagePlane(bw, bh); sharpenWindow->allocateImage(); } for (int j=0; j=bh/2) dj = bh-j; float d2v = float(dj*dj)*(svr*svr)/((bh/2)*(bh/2)); float *wsharpen = sharpenWindow->getLine(j); for (int i=0; i0.001f) processSharpen(block); else processNoSharpen(block); } gboolean ComplexFilter::skipBlock() { if (ABS(sharpen) >0.001f) return false; return true; } /** DeGridComplexFilter **/ DeGridComplexFilter::DeGridComplexFilter(int block_width, int block_height, float _degrid, FFTWindow *_window, fftwf_plan plan_forward) : ComplexFilter(block_width, block_height), degrid(_degrid), window(_window) { grid = new ComplexBlock(bw, bh); FloatImagePlane realGrid(bw, bh); realGrid.allocateImage(); float* f = realGrid.data; int count = bh*realGrid.pitch; for (int i = 0 ; i < count; i++){ f[i] = 65535.0f; } window->applyAnalysisWindow(&realGrid,&realGrid); fftwf_execute_dft_r2c(plan_forward, f, grid->complex); } DeGridComplexFilter::~DeGridComplexFilter( void ) { delete grid; } void DeGridComplexFilter::processSharpenOnly(ComplexBlock* block) { #if defined (__i386__) || defined (__x86_64__) guint cpu = rs_detect_cpu_features(); if (cpu & RS_CPU_FLAG_SSE3) return processSharpenOnlySSE3(block); else if (cpu & RS_CPU_FLAG_SSE) return processSharpenOnlySSE(block); #endif int x,y; fftwf_complex* outcur = block->complex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; for (y=0; ygetLine(y); for (x=0; x0.001f) return false; if (sigmaSquaredNoiseNormed > 1e-15f) return false; return true; } void ComplexWienerFilter::processNoSharpen( ComplexBlock* block ) { int x,y; float psd; float WienerFactor; fftwf_complex* outcur = block->complex; g_assert(bw == block->w); g_assert(bh == block->h); for (y=0; ycomplex; g_assert(bw == block->w); g_assert(bh == block->h); for (y=0; ygetLine(y); for (x=0; xw); g_assert(bh == block->h); int x,y; float psd; fftwf_complex* outcur = block->complex; float* pattern2d = pattern->data; float patternfactor; for (y=0; ypitch; } } void ComplexPatternFilter::processSharpen( ComplexBlock* block ) { g_assert(!"Not implemented"); } gboolean ComplexPatternFilter::skipBlock() { if (ABS(sharpen) >0.001f) return false; if (pfactor > 1e-15f) return false; return true; } ComplexWienerFilterDeGrid::ComplexWienerFilterDeGrid( int block_width, int block_height, float _beta, float _sigma, float _degrid, fftwf_plan plan_forward, FFTWindow *_window) : DeGridComplexFilter(block_width, block_height, _degrid, _window, plan_forward) { lowlimit = (_beta-1)/_beta; sigmaSquaredNoiseNormed = _sigma*_sigma/norm; } ComplexWienerFilterDeGrid::~ComplexWienerFilterDeGrid( void ) { } gboolean ComplexWienerFilterDeGrid::skipBlock() { if (ABS(sharpen) >0.001f) return false; if (sigmaSquaredNoiseNormed > 1e-15f) return false; return true; } void ComplexWienerFilterDeGrid::processNoSharpen( ComplexBlock* block ) { if (sigmaSquaredNoiseNormed <= 1e-15f) return; #if defined (__i386__) || defined (__x86_64__) guint cpu = rs_detect_cpu_features(); if (cpu & RS_CPU_FLAG_SSE3) return processNoSharpen_SSE3(block); else if (cpu & RS_CPU_FLAG_SSE) return processNoSharpen_SSE(block); #endif int x,y; float psd; float WienerFactor; fftwf_complex* outcur = block->complex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; for (y=0; ycomplex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; for (y=0; ygetLine(y); for (x=0; xcomplex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; for (y=0; ygetLine(y); for (x=0; xcomplex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; for (y=0; ygetLine(y); float *wsharpen = sharpenWindow->getLine(y); for (x=0; x, * * Anders Kvist and Klaus Post * * 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 fftdenoiseryuv_h__ #define fftdenoiseryuv_h__ #include "fftdenoiser.h" namespace RawStudio { namespace FFTFilter { class FFTDenoiserYUV : public FFTDenoiser { public: FFTDenoiserYUV(); virtual ~FFTDenoiserYUV(void); virtual void denoiseImage(RS_IMAGE16* image); virtual void setParameters( FFTDenoiseInfo *info); float betaChroma; float sigmaLuma; float sigmaChroma; float sharpenChroma; float sharpenCutoffChroma; float sharpenMinSigmaChroma; float sharpenMaxSigmaChroma; float redCorrection; float blueCorrection; }; }} // namespace RawStudio::FFTFilter #endif // fftdenoiseryuv_h__ rawstudio-2.0/plugins/denoise/complexfilter.h0000644000175000017500000001033011526533643016457 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 complexfilter_h__ #define complexfilter_h__ #include "complexblock.h" #include "floatimageplane.h" namespace RawStudio { namespace FFTFilter { class FFTWindow; class ComplexFilter { public: ComplexFilter(int block_width, int block_height); ComplexFilter(const ComplexFilter& p); virtual ~ComplexFilter(void); void process(ComplexBlock* block); virtual void setSharpen( float sharpen, float sigmaSharpenMin, float sigmaSharpenMax, float scutoff ); virtual gboolean skipBlock(); protected: virtual void processNoSharpen(ComplexBlock* block) = 0; virtual void processSharpen(ComplexBlock* block) = 0; const int bw; const int bh; const float norm; // Normalization factor float lowlimit; float sharpen; float sigmaSquaredSharpenMin; float sigmaSquaredSharpenMax; FloatImagePlane *sharpenWindow; }; class DeGridComplexFilter : public ComplexFilter { public: DeGridComplexFilter(int block_width, int block_height, float degrid, FFTWindow *window, fftwf_plan plan_forward); virtual ~DeGridComplexFilter(void); protected: virtual void processSharpenOnly(ComplexBlock* block); #if defined (__i386__) || defined (__x86_64__) void processSharpenOnlySSE(ComplexBlock* block); void processSharpenOnlySSE3(ComplexBlock* block); #endif const float degrid; FFTWindow *window; ComplexBlock* grid; }; class ComplexWienerFilter : public ComplexFilter { public: ComplexWienerFilter(int block_width, int block_height, float beta, float sigma); virtual ~ComplexWienerFilter(void); virtual gboolean skipBlock(); protected: virtual void processNoSharpen(ComplexBlock* block); virtual void processSharpen(ComplexBlock* block); float sigmaSquaredNoiseNormed; }; class ComplexWienerFilterDeGrid : public DeGridComplexFilter { public: ComplexWienerFilterDeGrid(int block_width, int block_height, float beta, float sigma, float degrid, fftwf_plan plan, FFTWindow *window); virtual ~ComplexWienerFilterDeGrid(void); virtual gboolean skipBlock(); protected: virtual void processNoSharpen(ComplexBlock* block); virtual void processSharpen(ComplexBlock* block); #if defined (__i386__) || defined (__x86_64__) virtual void processSharpen_SSE3(ComplexBlock* block); virtual void processSharpen_SSE(ComplexBlock* block); virtual void processNoSharpen_SSE(ComplexBlock* block); virtual void processNoSharpen_SSE3(ComplexBlock* block); #endif float sigmaSquaredNoiseNormed; FFTWindow *window; }; class ComplexPatternFilter : public ComplexFilter { public: ComplexPatternFilter(int block_width, int block_height, float beta, FloatImagePlane* pattern, float pattern_strength ); virtual ~ComplexPatternFilter(void); virtual gboolean skipBlock(); protected: virtual void processNoSharpen(ComplexBlock* block); virtual void processSharpen(ComplexBlock* block); FloatImagePlane* pattern; const float pfactor; }; class ComplexFilterPatternDeGrid : public DeGridComplexFilter { public: ComplexFilterPatternDeGrid(int block_width, int block_height, float beta, float sigma, float degrid, fftwf_plan plan, FFTWindow *window, FloatImagePlane *pattern); virtual ~ComplexFilterPatternDeGrid(void); virtual gboolean skipBlock(); protected: virtual void processNoSharpen(ComplexBlock* block); virtual void processSharpen(ComplexBlock* block); float sigmaSquaredNoiseNormed; FloatImagePlane *pattern; }; }} // namespace RawStudio::FFTFilter #endif // complexfilter_h__ rawstudio-2.0/plugins/denoise/fftdenoiser.cpp0000644000175000017500000001476611526533643016466 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "fftdenoiser.h" #include "complexblock.h" #include "fftdenoiseryuv.h" #ifdef WIN32 int rs_get_number_of_processor_cores(){return 4;} #endif namespace RawStudio { namespace FFTFilter { FFTDenoiser::FFTDenoiser(void) { nThreads = rs_get_number_of_processor_cores(); threads = new DenoiseThread[nThreads]; initializeFFT(); FloatPlanarImage::initConvTable(); } FFTDenoiser::~FFTDenoiser(void) { delete[] threads; fftwf_destroy_plan(plan_forward); fftwf_destroy_plan(plan_reverse); } void FFTDenoiser::denoiseImage( RS_IMAGE16* image ) { FloatPlanarImage img; img.bw = FFT_BLOCK_SIZE; img.bh = FFT_BLOCK_SIZE; img.ox = FFT_BLOCK_OVERLAP; img.oy = FFT_BLOCK_OVERLAP; if ((image->w < FFT_BLOCK_SIZE) || (image->h < FFT_BLOCK_SIZE)) return; // Image too small to denoise if (image->channels > 1 && image->filters==0) { img.unpackInterleaved(image); } else { return; } if (abort) return; img.mirrorEdges(); if (abort) return; FFTWindow window(img.bw,img.bh); window.createHalfCosineWindow(img.ox, img.oy); ComplexFilter *filter = new ComplexWienerFilterDeGrid(img.bw, img.bh, beta, sigma, 1.0, plan_forward, &window); filter->setSharpen(sharpen, sharpenMinSigma, sharpenMaxSigma, sharpenCutoff); img.setFilter(0,filter,&window); filter = new ComplexWienerFilterDeGrid(img.bw, img.bh, beta, sigma, 1.0, plan_forward, &window); filter->setSharpen(sharpen, sharpenMinSigma, sharpenMaxSigma, sharpenCutoff); img.setFilter(1,filter,&window); filter = new ComplexWienerFilterDeGrid(img.bw, img.bh, beta, sigma, 1.0, plan_forward, &window); filter->setSharpen(sharpen, sharpenMinSigma, sharpenMaxSigma, sharpenCutoff); img.setFilter(2,filter,&window); FloatPlanarImage outImg(img); processJobs(img, outImg); if (abort) return; // Convert back if (image->channels > 1 && image->filters==0) { outImg.packInterleaved(image); } } void FFTDenoiser::processJobs(FloatPlanarImage &img, FloatPlanarImage &outImg) { // Prepare for reassembling the image outImg.allocate_planes(); // Split input image JobQueue* waiting_jobs = img.getJobs(outImg); JobQueue* finished_jobs = new JobQueue(); // Count waiting jobs gint njobs = waiting_jobs->jobsLeft(); for (guint i = 0; i < nThreads; i++) { threads[i].addJobs(waiting_jobs,finished_jobs); } gint jobs_added = 0; while (jobs_added < njobs) { Job *_j = finished_jobs->waitForJob(); if (_j->type == JOB_FFT) { delete _j; jobs_added++; if (abort) { jobs_added += waiting_jobs->removeRemaining(); jobs_added += finished_jobs->removeRemaining(); } } } for (guint i = 0; i < nThreads; i++) threads[i].jobsEnded(); delete finished_jobs; delete waiting_jobs; } void FFTDenoiser::waitForJobs(JobQueue *waiting_jobs) { JobQueue* finished_jobs = new JobQueue(); gint njobs = waiting_jobs->jobsLeft(); for (guint i = 0; i < nThreads; i++) { threads[i].addJobs(waiting_jobs,finished_jobs); } gint jobs_added = 0; while (jobs_added < njobs) { Job *j = finished_jobs->waitForJob(); delete j; jobs_added++; } for (guint i = 0; i < nThreads; i++) threads[i].jobsEnded(); delete waiting_jobs; delete finished_jobs; } gboolean FFTDenoiser::initializeFFT() { // Create dummy block FloatImagePlane plane(FFT_BLOCK_SIZE,FFT_BLOCK_SIZE); plane.allocateImage(); ComplexBlock complex(FFT_BLOCK_SIZE,FFT_BLOCK_SIZE); int dim[2]; dim[0] = FFT_BLOCK_SIZE; dim[1] = FFT_BLOCK_SIZE; plan_forward = fftwf_plan_dft_r2c(2, dim, plane.data, complex.complex,FFTW_MEASURE|FFTW_DESTROY_INPUT); plan_reverse = fftwf_plan_dft_c2r(2, dim, complex.complex, plane.data,FFTW_MEASURE|FFTW_DESTROY_INPUT); for (guint i = 0; i < nThreads; i++) { threads[i].forward = plan_forward; threads[i].reverse = plan_reverse; } return (plan_forward && plan_reverse); } void FFTDenoiser::setParameters( FFTDenoiseInfo *info ) { sigma = info->sigmaLuma *SIGMA_FACTOR; beta = max(1.0f, info->betaLuma); sharpen = info->sharpenLuma; sharpenCutoff = info->sharpenCutoffLuma; sharpenMinSigma = info->sharpenMinSigmaLuma*SIGMA_FACTOR; sharpenMaxSigma = info->sharpenMaxSigmaLuma*SIGMA_FACTOR; } }}// namespace RawStudio::FFTFilter extern "C" { /** INTERFACE **/ void initDenoiser(FFTDenoiseInfo* info) { RawStudio::FFTFilter::FFTDenoiser *t; switch (info->processMode) { case PROCESS_RGB: t = new RawStudio::FFTFilter::FFTDenoiser(); break; case PROCESS_YUV: t = new RawStudio::FFTFilter::FFTDenoiserYUV(); break; default: g_assert(false); } info->_this = t; // Initialize parameters to default info->betaLuma = 1.0f; info->betaChroma = 1.0f; info->sigmaLuma = 1.0f; info->sigmaChroma = 1.0f; info->sharpenLuma = 0.0f; info->sharpenChroma = 0.0f; info->sharpenCutoffLuma = 0.10f; info->sharpenCutoffChroma = 0.3f; info->sharpenMinSigmaLuma = 4.0f; info->sharpenMinSigmaChroma = 4.0f; info->sharpenMaxSigmaLuma = 20.0f; info->sharpenMaxSigmaChroma = 20.0f; info->redCorrection = 1.0f; info->blueCorrection = 1.0f; } void denoiseImage(FFTDenoiseInfo* info) { RawStudio::FFTFilter::FFTDenoiser *t = (RawStudio::FFTFilter::FFTDenoiser*)info->_this; t->abort = false; t->setParameters(info); t->denoiseImage(info->image); } void destroyDenoiser(FFTDenoiseInfo* info) { RawStudio::FFTFilter::FFTDenoiser *t = (RawStudio::FFTFilter::FFTDenoiser*)info->_this; delete t; } void abortDenoiser(FFTDenoiseInfo* info) { RawStudio::FFTFilter::FFTDenoiser *t = (RawStudio::FFTFilter::FFTDenoiser*)info->_this; t->abort = true; } } // extern "C" rawstudio-2.0/plugins/denoise/floatplanarimage.cpp0000644000175000017500000001726711526533643017463 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "floatplanarimage.h" #include "complexfilter.h" #include namespace RawStudio { namespace FFTFilter { float FloatPlanarImage::shortToFloat[65536*4] = {0}; FloatPlanarImage::FloatPlanarImage(void) { p = 0; redCorrection = blueCorrection = 1.0f; nPlanes = 0; } FloatPlanarImage::FloatPlanarImage( const FloatPlanarImage &img ) { nPlanes = img.nPlanes; p = new FloatImagePlane*[nPlanes]; for (int i = 0; i < nPlanes; i++) p[i] = new FloatImagePlane(img.p[i]->w, img.p[i]->h, i); bw = img.bw; bh = img.bh; ox = img.ox; oy = img.oy; redCorrection = img.redCorrection; blueCorrection = img.blueCorrection; } FloatPlanarImage::~FloatPlanarImage(void) { if (p != 0) { for (int i = 0; i < nPlanes; i++) { if (p[i]) delete p[i]; p[i] = 0; } delete[] p; p = 0; } p = 0; nPlanes = 0; } void FloatPlanarImage::allocate_planes() { for (int i = 0; i < nPlanes; i++) p[i]->allocateImage(); } void FloatPlanarImage::mirrorEdges() { for (int i = 0; i < nPlanes; i++) p[i]->mirrorEdges(ox, oy); } void FloatPlanarImage::setFilter( int plane, ComplexFilter *f, FFTWindow *window ) { if (plane >= nPlanes) return; p[plane]->filter = f; p[plane]->window = window; } // TODO: Begs to be SSE2 and/or SMP. void FloatPlanarImage::unpackInterleaved( const RS_IMAGE16* image ) { // Already demosaiced if (image->channels != 3) return; nPlanes = 3; g_assert(p == 0); p = new FloatImagePlane*[nPlanes]; for (int i = 0; i < nPlanes; i++) p[i] = new FloatImagePlane(image->w+ox*2, image->h+oy*2, i); allocate_planes(); for (int y = 0; y < image->h; y++ ) { const gushort* pix = GET_PIXEL(image,0,y); gfloat *rp = p[0]->getAt(ox, y+oy); gfloat *gp = p[1]->getAt(ox, y+oy); gfloat *bp = p[2]->getAt(ox, y+oy); for (int x=0; xw; x++) { *rp++ = shortToFloat[*pix]; *gp++ = shortToFloat[*(pix+1)]; *bp++ = shortToFloat[*(pix+2)]; pix += image->pixelsize; } } } // TODO: Begs to be SSE2 and/or SMP. Scalar int<->float is incredibly slow. void FloatPlanarImage::packInterleaved( RS_IMAGE16* image ) { for (int i = 0; i < nPlanes; i++) { g_assert(p[i]->w == image->w+ox*2); g_assert(p[i]->h == image->h+oy*2); } for (int y = 0; y < image->h; y++ ) { for (int c = 0; cgetAt(ox, y+oy); gushort* out = GET_PIXEL(image,0,y) + c; for (int x=0; xw; x++) { float fp = *(in++); int p = (int)(fp*fp); *out = clampbits(p,16); out += image->pixelsize; } } } } JobQueue* FloatPlanarImage::getUnpackInterleavedYUVJobs(RS_IMAGE16* image) { // Already demosaiced JobQueue* queue = new JobQueue(); if (image->channels != 3) return queue; g_assert(p == 0); nPlanes = 3; p = new FloatImagePlane*[nPlanes]; for (int i = 0; i < nPlanes; i++) p[i] = new FloatImagePlane(image->w+ox*2, image->h+oy*2, i); allocate_planes(); int threads = rs_get_number_of_processor_cores()*4; int hEvery = MAX(1,(image->h+threads)/threads); for (int i = 0; i < threads; i++) { ImgConvertJob *j = new ImgConvertJob(this,JOB_CONVERT_TOFLOAT_YUV); j->start_y = i*hEvery; j->end_y = MIN((i+1)*hEvery,image->h); j->rs = image; queue->addJob(j); } return queue; } void FloatPlanarImage::unpackInterleavedYUV( const ImgConvertJob* j ) { RS_IMAGE16* image = j->rs; // We cannot allow red/blue to become negative, since we need to square root it for gamma correction redCorrection = MAX(0.0f, redCorrection); blueCorrection = MAX(0.0f, blueCorrection); #if defined (__x86_64__) if (image->pixelsize == 4) return unpackInterleavedYUV_SSE2(j); #endif // We cannot look up more than 65535*4 redCorrection = MIN( 4.0f, redCorrection); blueCorrection = MIN( 4.0f, blueCorrection); gint redc = (gint)(8192 * redCorrection + 0.5); gint bluec = (gint)(8192 * blueCorrection + 0.5); for (int y = j->start_y; y < j->end_y; y++ ) { const gushort* pix = GET_PIXEL(image,0,y); gfloat *Y = p[0]->getAt(ox, y+oy); gfloat *Cb = p[1]->getAt(ox, y+oy); gfloat *Cr = p[2]->getAt(ox, y+oy); for (int x=0; xw; x++) { float r = shortToFloat[((*pix)*redc)>>13]; float g = shortToFloat[(*(pix+1))]; float b = shortToFloat[((*(pix+2))*bluec)>>13]; *Y++ = r * 0.299 + g * 0.587 + b * 0.114 ; *Cb++ = r * -0.169 + g * -0.331 + b * 0.499; *Cr++ = r * 0.499 + g * -0.418 + b * -0.0813; pix += image->pixelsize; } } } JobQueue* FloatPlanarImage::getPackInterleavedYUVJobs(RS_IMAGE16* image) { JobQueue* queue = new JobQueue(); if (image->channels != 3) return queue; for (int i = 0; i < nPlanes; i++) { g_assert(p[i]->w == image->w+ox*2); g_assert(p[i]->h == image->h+oy*2); } int threads = rs_get_number_of_processor_cores()*4; int hEvery = MAX(1,(image->h+threads)/threads); for (int i = 0; i < threads; i++) { ImgConvertJob *j = new ImgConvertJob(this,JOB_CONVERT_FROMFLOAT_YUV); j->start_y = i*hEvery; j->end_y = MIN((i+1)*hEvery,image->h); j->rs = image; queue->addJob(j); } return queue; } void FloatPlanarImage::packInterleavedYUV( const ImgConvertJob* j) { RS_IMAGE16* image = j->rs; guint cpu = rs_detect_cpu_features(); #if defined (__x86_64__) if ((image->pixelsize == 4) && (cpu & RS_CPU_FLAG_SSE4_1)) { // TODO: Test on SSE4 capable machine before enabling. // packInterleavedYUV_SSE4(j); // return; } #endif #if defined (__i386__) || defined (__x86_64__) if ((image->pixelsize == 4) && (cpu & RS_CPU_FLAG_SSE2)) { packInterleavedYUV_SSE2(j); return; } #endif gfloat r_factor = (1.0f/redCorrection); gfloat b_factor = (1.0f/blueCorrection); for (int y = j->start_y; y < j->end_y; y++ ) { gfloat *Y = p[0]->getAt(ox, y+oy); gfloat *Cb = p[1]->getAt(ox, y+oy); gfloat *Cr = p[2]->getAt(ox, y+oy); gushort* out = GET_PIXEL(image,0,y); for (int x=0; xw; x++) { float fr = (Y[x] + 1.402 * Cr[x]); float fg = Y[x] - 0.344 * Cb[x] - 0.714 * Cr[x]; float fb = (Y[x] + 1.772 * Cb[x]) ; int r = (int)(fr*fr* r_factor); int g = (int)(fg*fg); int b = (int)(fb*fb* b_factor); out[0] = clampbits(r,16); out[1] = clampbits(g,16); out[2] = clampbits(b,16); out += image->pixelsize; } } } JobQueue* FloatPlanarImage::getJobs(FloatPlanarImage &outImg) { JobQueue *jobs = new JobQueue(); for (int i = 0; i < nPlanes; i++) p[i]->addJobs(jobs, bw, bh, ox, oy, outImg.p[i]); return jobs; } FloatImagePlane* FloatPlanarImage::getPlaneSliceFrom( int plane, int x, int y ) { g_assert(plane>=0 && planegetSlice(x,y,ox,oy); } void FloatPlanarImage::initConvTable() { for (int i = 0; i < 65536*4; i++) { shortToFloat[i] = sqrt((float)i); } } }}// namespace RawStudio::FFTFilter rawstudio-2.0/plugins/denoise/jobqueue.cpp0000644000175000017500000000606311526533643015764 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "jobqueue.h" #include "floatplanarimage.h" namespace RawStudio { namespace FFTFilter { FFTJob::FFTJob( PlanarImageSlice *s ) : Job(JOB_FFT), p(s) { } FFTJob::~FFTJob( void ) { if (p) delete(p); } JobQueue::JobQueue(void) { pthread_mutex_init(&job_mutex, NULL); pthread_cond_init(&job_added_notify, NULL); } JobQueue::~JobQueue(void) { pthread_mutex_lock(&job_mutex); pthread_mutex_unlock(&job_mutex); pthread_mutex_destroy(&job_mutex); pthread_cond_destroy(&job_added_notify); } Job* JobQueue::getJob() { Job *j; pthread_mutex_lock(&job_mutex); if (jobs.empty()) j = 0; else { j = jobs[0]; jobs.erase(jobs.begin()); } pthread_mutex_unlock(&job_mutex); return j; } vector JobQueue::getJobs(int n) { vector j; pthread_mutex_lock(&job_mutex); n = MIN(n,(int)jobs.size()); for (int i = 0; i < n; i++) { j.push_back(jobs[0]); jobs.erase(jobs.begin()); } pthread_mutex_unlock(&job_mutex); return j; } vector JobQueue::getJobsPercent( int percent ) { vector j; pthread_mutex_lock(&job_mutex); if (jobs.empty()) { pthread_mutex_unlock(&job_mutex); return j; } // Ensure that we get at least 1 job, otherwise respect percentage int n = MAX(1, percent * jobs.size() / 100); for (int i = 0; i < n; i++) { j.push_back(jobs[0]); jobs.erase(jobs.begin()); } pthread_mutex_unlock(&job_mutex); return j; } void JobQueue::addJob( Job* job) { pthread_mutex_lock(&job_mutex); jobs.push_back(job); pthread_cond_signal(&job_added_notify); pthread_mutex_unlock(&job_mutex); } int JobQueue::jobsLeft(void) { int size; pthread_mutex_lock(&job_mutex); size = jobs.size(); pthread_mutex_unlock(&job_mutex); return size; } Job* JobQueue::waitForJob() { Job *j; pthread_mutex_lock(&job_mutex); if (jobs.empty()) pthread_cond_wait(&job_added_notify, &job_mutex); j = jobs[0]; jobs.erase(jobs.begin()); pthread_mutex_unlock(&job_mutex); return j; } int JobQueue::removeRemaining() { pthread_mutex_lock(&job_mutex); int n = jobs.size(); for (int i = 0; i < n; i++) { delete jobs[i]; } jobs.clear(); pthread_mutex_unlock(&job_mutex); return n; } }}// namespace RawStudio::FFTFilter rawstudio-2.0/plugins/denoise/floatimageplane.cpp0000644000175000017500000001307611526533643017277 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "floatimageplane.h" #include "fftw3.h" #include #include /* posix_memalign() */ namespace RawStudio { namespace FFTFilter { FloatImagePlane::FloatImagePlane( int _w, int _h, int _plane_id ) : w(_w), h(_h), data(0), plane_id(_plane_id), filter(0), window(0), pitch(0), allocated(0) { } FloatImagePlane::FloatImagePlane( const FloatImagePlane& p ) : w(p.w), h(p.h),data(p.data), plane_id(p.plane_id), filter(0), window(p.window), pitch(p.pitch), allocated(0) { } FloatImagePlane::~FloatImagePlane(void) { if (allocated) free(allocated); if (filter) delete filter; filter = 0; allocated = 0; } void FloatImagePlane::allocateImage() { if (allocated) return; pitch = ((w+3)/4)*4; g_assert(0 == posix_memalign((void**)&allocated, 16, pitch*h*sizeof(gfloat))); g_assert(allocated); data = allocated; } gfloat* FloatImagePlane::getLine( int y ) { return &data[pitch*y]; } gfloat* FloatImagePlane::getAt( int x, int y ) { return &data[pitch*y+x]; } void FloatImagePlane::mirrorEdges( int mirror_x, int mirror_y ) { // Mirror top for (int y = 0; yin = getSlice(start_x, start_y, bw, bh); s->offset_x = start_x; s->offset_y = start_y; s->overlap_x = ox; s->overlap_y = oy; s->filter = filter; s->window = window; FFTJob *j = new FFTJob(s); j->outPlane = outPlane; jobs->addJob(j); if (start_x + bw*2 - ox*2 >= w) { //Will next block be out of frame? if (start_x == w - bw) endx = true; start_x = w - bw; // Add last possible block } else { start_x += bw - ox*2; } } // end while x if (start_y + bh*2 - oy*2 >= h) { //Will next block be out of frame? if (start_y == h - bh) endy = true; start_y = h - bh; // Add last possible block } else { start_y += bh - oy*2; } }//end while y } FloatImagePlane* FloatImagePlane::getSlice( int x, int y,int new_w, int new_h ) { g_assert(x+new_w<=w); g_assert(y+new_h<=h); g_assert(x>=0); g_assert(x>=0); FloatImagePlane* s = new FloatImagePlane(new_w, new_h, plane_id); s->data = getAt(x,y); s->pitch = pitch; return s; } //TODO: SSE2 me. void FBitBlt(guchar* dstp, int dst_pitch, const guchar* srcp, int src_pitch, int row_size, int height) { if (height == 1 || (dst_pitch == src_pitch && src_pitch == row_size)) { memcpy(dstp, srcp, row_size*height); return; } for (int y=height; y>0; --y) { memcpy(dstp, srcp, row_size); dstp += dst_pitch; srcp += src_pitch; } } void FloatImagePlane::applySlice( PlanarImageSlice *p ) { int start_y = p->offset_y + p->overlap_y; int start_x = p->offset_x + p->overlap_x; g_assert(start_y >= 0); g_assert(start_x >= 0); g_assert(start_y < h); g_assert(start_x < w); if (p->blockSkipped) { FBitBlt((guchar*)getAt(start_x,start_y), pitch*sizeof(float), (const guchar*)p->in->getAt(p->overlap_x,p->overlap_y), p->in->pitch*sizeof(float), p->in->w*sizeof(float)-p->overlap_x*2*sizeof(float), p->in->h-p->overlap_y*2); return; } float normalization = 1.0f / (float)(p->out->w * p->out->h); int end_x = p->offset_x + p->out->w - p->overlap_x; int end_y = p->offset_y + p->out->h - p->overlap_y; g_assert(end_y >= 0); g_assert(end_x >= 0); g_assert(end_y < h); g_assert(end_x < w); for (int y = start_y; y < end_y; y++ ) { float* src = p->out->getAt(p->overlap_x,y-start_y+p->overlap_y); float* dst = getAt(start_x,y); for (int x = start_x; x < end_x; x++) { *dst++ = normalization * (*src++); } } } void FloatImagePlane::blitOnto( FloatImagePlane *dst ) { g_assert(dst->w == w); g_assert(dst->h == h); FBitBlt((guchar*)dst->data, dst->pitch*sizeof(float),(guchar*)data,pitch*sizeof(float),w*sizeof(float),h); } void FloatImagePlane::multiply(float factor) { for (int y = 0; y < h; y++ ) { float* src = getAt(0,y); for (int x = 0; x < w; x++) { src[x] *= factor; } } } }}// namespace RawStudio::FFTFilter rawstudio-2.0/plugins/denoise/complexblock.h0000644000175000017500000000240211526533643016265 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 complexblock_h__ #define complexblock_h__ #include "fftw3.h" #include namespace RawStudio { namespace FFTFilter { class FloatImagePlane; class ComplexBlock { public: ComplexBlock(int w, int h); ~ComplexBlock(void); fftwf_complex* complex; FloatImagePlane *temp; const int w; const int h; private: int pitch; }; }} // namespace RawStudio::FFTFilter #endif // complexblock_h__ rawstudio-2.0/plugins/denoise/complexfilter-x86.cpp0000644000175000017500000014170611526533643017451 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "complexfilter.h" #include #include "fftwindow.h" namespace RawStudio { namespace FFTFilter { #if defined (__i386__) || defined (__x86_64__) #if defined (__x86_64__) void DeGridComplexFilter::processSharpenOnlySSE3(ComplexBlock* block) { fftwf_complex* outcur = block->complex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; float* temp = block->temp->data; // Get aligned temp area, at least 256 bytes, only used by this thread. float *wsharpen = sharpenWindow->getLine(0); for (int i = 0; i < 4; i++) { temp[i+0] = 1e-15f; // 0 temp[i+4] = gridfraction; // 16 temp[i+8] = sigmaSquaredSharpenMin; // 32 temp[i+12] = sigmaSquaredSharpenMax; // 48 temp[i+16] = 1.0f; // 64 } int size = bw*bh; if ((size & 7) == 0) { // TODO: Benchmark on non-vm platform - slower under VMWARE asm volatile ( "movaps 16(%1),%%xmm14\n" // Load gridfraction into xmm6 "loop_sharpenonly_sse3_big:\n" "movaps (%2), %%xmm0\n" // in r0i0 r1i1 "movaps 16(%2), %%xmm1\n" //in r2i2 r3i3 "movaps 32(%2), %%xmm8\n" // in r0i0 r1i1 "movaps 48(%2), %%xmm9\n" //in r2i2 r3i3 "movaps (%3), %%xmm4\n" // grid r0i0 r1i1 "movaps 16(%3), %%xmm5\n" // grid r2i2 r3i3 "movaps 32(%3), %%xmm12\n" // grid r0i0 r1i1 "movaps 48(%3), %%xmm13\n" // grid r2i2 r3i3 "mulps %%xmm14, %%xmm4\n" //grid r0*gf i0*gf r1*gf i1*gf (xmm4: gridcorrection0 + 1) "mulps %%xmm14, %%xmm5\n" //grid r2*gf i2*gf r3*gf i3*gf (gridfraction*gridsample[x]) "mulps %%xmm14, %%xmm12\n" //grid r0*gf i0*gf r1*gf i1*gf (xmm4: gridcorrection0 + 1) "mulps %%xmm14, %%xmm13\n" //grid r2*gf i2*gf r3*gf i3*gf (gridfraction*gridsample[x]) "movaps %%xmm4, %%xmm2\n" // maintain gridcorrection in memory "movaps %%xmm5, %%xmm3\n" "movaps %%xmm12, %%xmm10\n" // maintain gridcorrection in memory "movaps %%xmm13, %%xmm11\n" "subps %%xmm4, %%xmm0\n" // re0 im0 re1 im1 (re = outcur[x][0] - gridcorrection0;, etc) (xmm0 - xmm4) "subps %%xmm5, %%xmm1\n" // re2 im2 re3 im3 - "subps %%xmm12, %%xmm8\n" // re0 im0 re1 im1 (re = outcur[x][0] - gridcorrection0;, etc) (xmm0 - xmm4) "subps %%xmm13, %%xmm9\n" // re2 im2 re3 im3 - "movaps %%xmm0, %%xmm4\n" // copy re0+im0 ... into xmm4 and 5, xmm0 & 1 retained "movaps %%xmm1, %%xmm5\n" "movaps %%xmm8, %%xmm12\n" // copy re0+im0 ... into xmm4 and 5, xmm0 & 1 retained "movaps %%xmm9, %%xmm13\n" "movaps (%1), %%xmm6\n" // Move 1e-15 into xmm6 "mulps %%xmm4, %%xmm4\n" //r0i0 r1i1 squared "mulps %%xmm5, %%xmm5\n" //r2i2 r3i3 squared "mulps %%xmm12, %%xmm12\n" //r0i0 r1i1 squared "mulps %%xmm13, %%xmm13\n" //r2i2 r3i3 squared "haddps %%xmm5, %%xmm4\n" //r0+i0 r1+i1 r2+i2 r3+i3 r4+i4 (all squared) (SSE3!) - xmm 5 free "haddps %%xmm13, %%xmm12\n" //r0+i0 r1+i1 r2+i2 r3+i3 r4+i4 (all squared) (SSE3!) - xmm 5 free "addps %%xmm6, %%xmm4\n" // add 1e-15 (xmm4: psd for all 4 pixels) "addps %%xmm6, %%xmm12\n" // add 1e-15 (xmm4: psd for all 4 pixels) "movaps 48(%1), %%xmm7\n" // Move sigmaSquaredSharpenMax into xmm7 // float sfact = (1 + wsharpen[x]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) )) ; "movaps 32(%1), %%xmm6\n" // Move sigmaSquaredSharpenMin into xmm6 "movaps %%xmm4, %%xmm5\n" // Copy psd into xmm5 "movaps %%xmm12, %%xmm13\n" // Copy psd into xmm5 "movaps %%xmm7, %%xmm15\n" // Copy sigmaSquaredSharpenMax "addps %%xmm7, %%xmm4\n" // xmm4 = psd + sigmaSquaredSharpenMax "addps %%xmm7, %%xmm12\n" // xmm4 = psd + sigmaSquaredSharpenMax "mulps %%xmm5, %%xmm7\n" // xmm7 = psd*sigmaSquaredSharpenMax "mulps %%xmm13, %%xmm15\n" // xmm7 = psd*sigmaSquaredSharpenMax "addps %%xmm6, %%xmm5\n" //xmm5 = psd + sigmaSquaredSharpenMin //xmm6 free "addps %%xmm6, %%xmm13\n" //xmm5 = psd + sigmaSquaredSharpenMin //xmm6 free "mulps %%xmm4, %%xmm5\n" // (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) xmm4 free "mulps %%xmm12, %%xmm13\n" // (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) xmm4 free "rcpps %%xmm5, %%xmm5\n" // 1 / (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) (stall) "movaps (%4), %%xmm6\n" // load wsharpen[0->4] "rcpps %%xmm13, %%xmm13\n" // 1 / (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) (stall) "movaps 16(%4), %%xmm4\n" // Load wsharpen "mulps %%xmm5, %%xmm7\n" // psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) - xmm5 free "mulps %%xmm13, %%xmm15\n" // psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) - xmm5 free "movaps 64(%1), %%xmm5\n" // Load "1.0" "rsqrtps %%xmm7, %%xmm7\n" // 1.0 / sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) "rsqrtps %%xmm15, %%xmm15\n" // 1.0 / sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) "rcpps %%xmm7, %%xmm7\n" // sqrt (..) "rcpps %%xmm15, %%xmm15\n" // sqrt (..) "mulps %%xmm6, %%xmm7\n" // multiply wsharpen "mulps %%xmm4, %%xmm15\n" // multiply wsharpen "addps %%xmm5, %%xmm7\n" // + 1.0 xmm7 = sfact "addps %%xmm5, %%xmm15\n" // + 1.0 xmm7 = sfact "movaps %%xmm7, %%xmm5\n" "movaps %%xmm15, %%xmm13\n" "unpcklps %%xmm7, %%xmm7\n" // unpack low to xmm7 "unpckhps %%xmm5, %%xmm5\n" // unpack high to xmm5 "unpcklps %%xmm15, %%xmm15\n" // unpack low to xmm7 "unpckhps %%xmm13, %%xmm13\n" // unpack high to xmm5 "mulps %%xmm7, %%xmm0\n" // re+im *= sfact "mulps %%xmm5, %%xmm1\n" // re+im *= sfact "mulps %%xmm15, %%xmm8\n" // re+im *= sfact "mulps %%xmm13, %%xmm9\n" // re+im *= sfact "addps %%xmm2, %%xmm0\n" // add gridcorrection "addps %%xmm3, %%xmm1\n" // add gridcorrection "addps %%xmm10, %%xmm8\n" // add gridcorrection "addps %%xmm11, %%xmm9\n" // add gridcorrection "movaps %%xmm0, (%2)\n" // Store "movaps %%xmm1, 16(%2)\n" // Store "movaps %%xmm8, 32(%2)\n" // Store "movaps %%xmm9, 48(%2)\n" // Store "sub $8, %0\n" // size -=8 "add $64, %2\n" // outcur+=64 "add $64, %3\n" // gridsample+=64 "add $32, %4\n" // wsharpen+=32 "cmp $0, %0\n" "jg loop_sharpenonly_sse3_big\n" : /* no output registers */ : "r" (size), "r" (temp), "r" (outcur), "r" (gridsample), "r"(wsharpen) : /* %0 %1 %2 %3 %4 */ ); } else { asm volatile ( "movaps (%1), %%xmm11\n" "movaps 16(%1), %%xmm12\n" "movaps 32(%1), %%xmm13\n" "movaps 48(%1), %%xmm14\n" "movaps 64(%1), %%xmm15\n" "loop_sharpenonly_sse3:\n" "movaps (%2), %%xmm0\n" // in r0i0 r1i1 "movaps 16(%2), %%xmm1\n" //in r2i2 r3i3 "movaps (%3), %%xmm4\n" // grid r0i0 r1i1 "movaps 16(%3), %%xmm5\n" // grid r2i2 r3i3 "mulps %%xmm12, %%xmm4\n" //grid r0*gf i0*gf r1*gf i1*gf (xmm4: gridcorrection0 + 1) "mulps %%xmm12, %%xmm5\n" //grid r2*gf i2*gf r3*gf i3*gf (gridfraction*gridsample[x]) "movaps %%xmm4, %%xmm2\n" // maintain gridcorrection in memory "movaps %%xmm5, %%xmm3\n" "subps %%xmm4, %%xmm0\n" // re0 im0 re1 im1 (re = outcur[x][0] - gridcorrection0;, etc) (xmm0 - xmm4) "subps %%xmm5, %%xmm1\n" // re2 im2 re3 im3 - "movaps %%xmm0, %%xmm4\n" // copy re0+im0 ... into xmm4 and 5, xmm0 & 1 retained "movaps %%xmm1, %%xmm5\n" "mulps %%xmm4, %%xmm4\n" //r0i0 r1i1 squared "mulps %%xmm5, %%xmm5\n" //r2i2 r3i3 squared "haddps %%xmm5, %%xmm4\n" //r0+i0 r1+i1 r2+i2 r3+i3 r4+i4 (all squared) (SSE3!) - xmm 5 free "addps %%xmm11, %%xmm4\n" // add 1e-15 (xmm4: psd for all 4 pixels) "movaps %%xmm14, %%xmm7\n" // Move sigmaSquaredSharpenMax into xmm7 // float sfact = (1 + wsharpen[x]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) )) ; "movaps %%xmm4, %%xmm5\n" // Copy psd into xmm5 "addps %%xmm7, %%xmm4\n" // xmm4 = psd + sigmaSquaredSharpenMax "mulps %%xmm5, %%xmm7\n" // xmm7 = psd*sigmaSquaredSharpenMax "addps %%xmm13, %%xmm5\n" //xmm5 = psd + sigmaSquaredSharpenMin //xmm6 free "mulps %%xmm4, %%xmm5\n" // (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) xmm4 free "movaps (%4), %%xmm6\n" // load wsharpen[0->4] "rcpps %%xmm5, %%xmm5\n" // 1 / (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) (stall) "mulps %%xmm5, %%xmm7\n" // psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) - xmm5 free "rsqrtps %%xmm7, %%xmm7\n" // 1.0 / sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) "rcpps %%xmm7, %%xmm7\n" // sqrt (..) "mulps %%xmm6, %%xmm7\n" // multiply wsharpen "addps %%xmm15, %%xmm7\n" // + 1.0 xmm7 = sfact "movaps %%xmm7, %%xmm5\n" "unpcklps %%xmm7, %%xmm7\n" // unpack low to xmm7 "unpckhps %%xmm5, %%xmm5\n" // unpack high to xmm5 "mulps %%xmm7, %%xmm0\n" // re+im *= sfact "mulps %%xmm5, %%xmm1\n" // re+im *= sfact "addps %%xmm2, %%xmm0\n" // add gridcorrection "addps %%xmm3, %%xmm1\n" // add gridcorrection "movaps %%xmm0, (%2)\n" // Store "movaps %%xmm1, 16(%2)\n" // Store "sub $4, %0\n" // size -=4 "add $32, %2\n" // outcur+=32 "add $32, %3\n" // gridsample+=32 "add $16, %4\n" // wsharpen+=16 "cmp $0, %0\n" "jg loop_sharpenonly_sse3\n" : /* no output registers */ : "r" (size), "r" (temp), "r" (outcur), "r" (gridsample), "r"(wsharpen) : /* %0 %1 %2 %3 %4 */ ); } } #else // 32 bits void DeGridComplexFilter::processSharpenOnlySSE3(ComplexBlock* block) { fftwf_complex* outcur = block->complex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; float* temp = block->temp->data; // Get aligned temp area, at least 256 bytes, only used by this thread. float *wsharpen = sharpenWindow->getLine(0); for (int i = 0; i < 4; i++) { temp[i+0] = 1e-15f; // 0 temp[i+4] = gridfraction; // 16 temp[i+8] = sigmaSquaredSharpenMin; // 32 temp[i+12] = sigmaSquaredSharpenMax; // 48 temp[i+16] = 1.0f; // 64 } int size = bw*bh; asm volatile ( "loop_sharpenonly_sse3:\n" "movaps 16(%1),%%xmm6\n" // Load gridfraction into xmm6 "movaps (%2), %%xmm0\n" // in r0i0 r1i1 "movaps 16(%2), %%xmm1\n" //in r2i2 r3i3 "movaps (%3), %%xmm4\n" // grid r0i0 r1i1 "movaps 16(%3), %%xmm5\n" // grid r2i2 r3i3 "mulps %%xmm6, %%xmm4\n" //grid r0*gf i0*gf r1*gf i1*gf (xmm4: gridcorrection0 + 1) "mulps %%xmm6, %%xmm5\n" //grid r2*gf i2*gf r3*gf i3*gf (gridfraction*gridsample[x]) "movaps %%xmm4, %%xmm2\n" // maintain gridcorrection in memory "movaps %%xmm5, %%xmm3\n" "subps %%xmm4, %%xmm0\n" // re0 im0 re1 im1 (re = outcur[x][0] - gridcorrection0;, etc) (xmm0 - xmm4) "subps %%xmm5, %%xmm1\n" // re2 im2 re3 im3 - "movaps %%xmm0, %%xmm4\n" // copy re0+im0 ... into xmm4 and 5, xmm0 & 1 retained "movaps %%xmm1, %%xmm5\n" "mulps %%xmm4, %%xmm4\n" //r0i0 r1i1 squared "mulps %%xmm5, %%xmm5\n" //r2i2 r3i3 squared "movaps 32(%1), %%xmm6\n" // Move sigmaSquaredSharpenMin into xmm6 "haddps %%xmm5, %%xmm4\n" //r0+i0 r1+i1 r2+i2 r3+i3 r4+i4 (all squared) (SSE3!) - xmm 5 free "addps (%1), %%xmm4\n" // add 1e-15 (xmm4: psd for all 4 pixels) "movaps 48(%1), %%xmm7\n" // Move sigmaSquaredSharpenMax into xmm7 // float sfact = (1 + wsharpen[x]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) )) ; "movaps %%xmm4, %%xmm5\n" // Copy psd into xmm5 "addps %%xmm7, %%xmm4\n" // xmm4 = psd + sigmaSquaredSharpenMax "mulps %%xmm5, %%xmm7\n" // xmm7 = psd*sigmaSquaredSharpenMax "addps %%xmm6, %%xmm5\n" //xmm5 = psd + sigmaSquaredSharpenMin //xmm6 free "mulps %%xmm4, %%xmm5\n" // (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) xmm4 free "movaps (%4), %%xmm6\n" // load wsharpen[0->4] "rcpps %%xmm5, %%xmm5\n" // 1 / (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) (stall) "mulps %%xmm5, %%xmm7\n" // psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) - xmm5 free "movaps 64(%1), %%xmm5\n" // Load "1.0" "rsqrtps %%xmm7, %%xmm7\n" // 1.0 / sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) "rcpps %%xmm7, %%xmm7\n" // sqrt (..) "mulps %%xmm6, %%xmm7\n" // multiply wsharpen "addps %%xmm5, %%xmm7\n" // + 1.0 xmm7 = sfact "movaps %%xmm7, %%xmm5\n" "unpcklps %%xmm7, %%xmm7\n" // unpack low to xmm7 "unpckhps %%xmm5, %%xmm5\n" // unpack high to xmm5 "mulps %%xmm7, %%xmm0\n" // re+im *= sfact "mulps %%xmm5, %%xmm1\n" // re+im *= sfact "addps %%xmm2, %%xmm0\n" // add gridcorrection "addps %%xmm3, %%xmm1\n" // add gridcorrection "movaps %%xmm0, (%2)\n" // Store "movaps %%xmm1, 16(%2)\n" // Store "sub $4, %0\n" // size -=4 "add $32, %2\n" // outcur+=32 "add $32, %3\n" // gridsample+=32 "add $16, %4\n" // wsharpen+=16 "cmp $0, %0\n" "jg loop_sharpenonly_sse3\n" : /* no output registers */ : "r" (size), "r" (temp), "r" (outcur), "r" (gridsample), "r"(wsharpen) : /* %0 %1 %2 %3 %4 */ ); } #endif void DeGridComplexFilter::processSharpenOnlySSE(ComplexBlock* block) { fftwf_complex* outcur = block->complex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; float* temp = block->temp->data; // Get aligned temp area, at least 256 bytes, only used by this thread. float *wsharpen = sharpenWindow->getLine(0); for (int i = 0; i < 4; i++) { temp[i+0] = 1e-15f; // 0 temp[i+4] = gridfraction; // 16 temp[i+8] = sigmaSquaredSharpenMin; // 32 temp[i+12] = sigmaSquaredSharpenMax; // 48 temp[i+16] = 1.0f; // 64 } int size = bw*bh; asm volatile ( "loop_sharpenonly_sse:\n" "movaps 16(%1),%%xmm6\n" // Load gridfraction into xmm6 "movaps (%2), %%xmm0\n" // in r0i0 r1i1 "movaps 16(%2), %%xmm1\n" //in r2i2 r3i3 "movaps (%3), %%xmm4\n" // grid r0i0 r1i1 "movaps 16(%3), %%xmm5\n" // grid r2i2 r3i3 "mulps %%xmm6, %%xmm4\n" //grid r0*gf i0*gf r1*gf i1*gf (xmm4: gridcorrection0 + 1) "mulps %%xmm6, %%xmm5\n" //grid r2*gf i2*gf r3*gf i3*gf (gridfraction*gridsample[x]) "movaps %%xmm4, %%xmm2\n" // maintain gridcorrection in memory "movaps %%xmm5, %%xmm3\n" "subps %%xmm4, %%xmm0\n" // re0 im0 re1 im1 (re = outcur[x][0] - gridcorrection0;, etc) (xmm0 - xmm4) "subps %%xmm5, %%xmm1\n" // re2 im2 re3 im3 - "movaps %%xmm0, %%xmm4\n" // copy re0+im0 ... into xmm4 and 5, xmm0 & 1 retained "movaps %%xmm1, %%xmm5\n" "mulps %%xmm4, %%xmm4\n" //r0i0 r1i1 squared "mulps %%xmm5, %%xmm5\n" //r2i2 r3i3 squared "movaps %%xmm4, %%xmm7\n" "shufps $136, %%xmm5, %%xmm4\n" // xmm7 r0r1 r2r3 [10 00 10 00 = 136] "shufps $221, %%xmm5, %%xmm7\n" // xmm6 i0i1 i2i3 [11 01 11 01 = 221] "movaps 32(%1), %%xmm6\n" // Move sigmaSquaredSharpenMin into xmm6 "addps %%xmm7, %%xmm4\n" "movaps 48(%1), %%xmm7\n" // Move sigmaSquaredSharpenMax into xmm7 "addps (%1), %%xmm4\n" // add 1e-15 (xmm4: psd for all 4 pixels) // float sfact = (1 + wsharpen[x]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) )) ; "movaps %%xmm4, %%xmm5\n" // Copy psd into xmm5 "addps %%xmm7, %%xmm4\n" // xmm4 = psd + sigmaSquaredSharpenMax "mulps %%xmm5, %%xmm7\n" // xmm7 = psd*sigmaSquaredSharpenMax "addps %%xmm6, %%xmm5\n" //xmm5 = psd + sigmaSquaredSharpenMin //xmm6 free "mulps %%xmm4, %%xmm5\n" // (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) xmm4 free "movaps (%4), %%xmm6\n" // load wsharpen[0->4] "rcpps %%xmm5, %%xmm5\n" // 1 / (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) (stall) "mulps %%xmm5, %%xmm7\n" // psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) - xmm5 free "movaps 64(%1), %%xmm5\n" // Load "1.0" "rsqrtps %%xmm7, %%xmm7\n" // 1.0 / sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) "rcpps %%xmm7, %%xmm7\n" // sqrt (..) "mulps %%xmm6, %%xmm7\n" // multiply wsharpen "addps %%xmm5, %%xmm7\n" // + 1.0 xmm7 = sfact "movaps %%xmm7, %%xmm5\n" "unpcklps %%xmm7, %%xmm7\n" // unpack low to xmm7 "unpckhps %%xmm5, %%xmm5\n" // unpack high to xmm5 "mulps %%xmm7, %%xmm0\n" // re+im *= sfact "mulps %%xmm5, %%xmm1\n" // re+im *= sfact "addps %%xmm2, %%xmm0\n" // add gridcorrection "addps %%xmm3, %%xmm1\n" // add gridcorrection "movaps %%xmm0, (%2)\n" // Store "movaps %%xmm1, 16(%2)\n" // Store "sub $4, %0\n" // size -=4 "add $32, %2\n" // outcur+=32 "add $32, %3\n" // gridsample+=32 "add $16, %4\n" // wsharpen+=16 "cmp $0, %0\n" "jg loop_sharpenonly_sse\n" : /* no output registers */ : "r" (size), "r" (temp), "r" (outcur), "r" (gridsample), "r"(wsharpen) : /* %0 %1 %2 %3 %4 */ ); } #if defined (__x86_64__) void ComplexWienerFilterDeGrid::processSharpen_SSE3( ComplexBlock* block ) { fftwf_complex* outcur = block->complex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; float* temp = block->temp->data; // Get aligned temp area, at least 256 bytes, only used by this thread. float *wsharpen = sharpenWindow->getLine(0); for (int i = 0; i < 4; i++) { temp[i+0] = 1e-15f; // 0 temp[i+4] = gridfraction; // 16 temp[i+8] = sigmaSquaredSharpenMin; // 32 temp[i+12] = sigmaSquaredSharpenMax; // 48 temp[i+16] = 1.0f; // 64 temp[i+20] = sigmaSquaredNoiseNormed; // 80 temp[i+24] = lowlimit; // 96 } int size = bw*bh; asm volatile ( "movaps (%1), %%xmm15\n" // 1e-15f "movaps 16(%1),%%xmm14\n" // Load gridfraction into xmm14 "movaps 32(%1), %%xmm10\n" //xmm10 sigmaSquaredSharpenMin "movaps 48(%1), %%xmm11\n" // Move sigmaSquaredSharpenMax into xmm11 "movaps 64(%1), %%xmm9\n" // Load "1.0" "movaps 80(%1), %%xmm13\n" //sigmaSquaredNoiseNormed in xmm13 "movaps 96(%1), %%xmm12\n" // xmm12 = lowlimit "loop_wienerdegridsharpen_sse3:\n" "movaps (%2), %%xmm0\n" // in r0i0 r1i1 "movaps 16(%2), %%xmm1\n" //in r2i2 r3i3 "movaps (%3), %%xmm4\n" // grid r0i0 r1i1 "movaps 16(%3), %%xmm5\n" // grid r2i2 r3i3 "mulps %%xmm14, %%xmm4\n" //grid r0*gf i0*gf r1*gf i1*gf (xmm4: gridcorrection0 + 1) "mulps %%xmm14, %%xmm5\n" //grid r2*gf i2*gf r3*gf i3*gf (gridfraction*gridsample[x]) "movaps %%xmm4, %%xmm2\n" // maintain gridcorrection in memory "movaps %%xmm5, %%xmm3\n" "subps %%xmm4, %%xmm0\n" // re0 im0 re1 im1 (re = outcur[x][0] - gridcorrection0;, etc) (xmm0 - xmm4) "subps %%xmm5, %%xmm1\n" // re2 im2 re3 im3 - "movaps %%xmm0, %%xmm4\n" // copy re0+im0 ... into xmm4 and 5, xmm0 & 1 retained "movaps %%xmm1, %%xmm5\n" "mulps %%xmm4, %%xmm4\n" //r0i0 r1i1 squared "mulps %%xmm5, %%xmm5\n" //r2i2 r3i3 squared "haddps %%xmm5, %%xmm4\n" //r0+i0 r1+i1 r2+i2 r3+i3 r4+i4 (all squared) (SSE3!) - xmm 5 free "addps %%xmm15, %%xmm4\n" // add 1e-15 (xmm4: psd for all 4 pixels) //WienerFactor = MAX((psd - sigmaSquaredNoiseNormed)/psd, lowlimit); // limited Wiener filter "movaps %%xmm4, %%xmm6\n" // Copy psd into xmm6 "rcpps %%xmm4, %%xmm7\n" // xmm7: (1 / psd) "subps %%xmm13, %%xmm6\n" // xmm6 (psd) - xmm5 (ssnn) xmm5 free "mulps %%xmm7, %%xmm6\n" // xmm6 = (psd - sigmaSquaredNoiseNormed)/psd "maxps %%xmm12, %%xmm6\n" // xmm6 = Wienerfactor = MAX(xmm6, lowlimit) // float sfact = (1 + wsharpen[x]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) )) ; "movaps %%xmm11, %%xmm7\n" // Move sigmaSquaredSharpenMax into xmm7 "movaps %%xmm4, %%xmm5\n" // Copy psd into xmm5 "addps %%xmm11, %%xmm4\n" // xmm4 = psd + sigmaSquaredSharpenMax "mulps %%xmm5, %%xmm7\n" // xmm7 = psd*sigmaSquaredSharpenMax "addps %%xmm10, %%xmm5\n" //xmm5 = psd + sigmaSquaredSharpenMin //xmm6 free "mulps %%xmm4, %%xmm5\n" // (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) xmm4 free "rcpps %%xmm5, %%xmm5\n" // 1 / (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) (stall) "mulps %%xmm5, %%xmm7\n" // psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) - xmm5 free "rsqrtps %%xmm7, %%xmm7\n" // 1 / sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) "rcpps %%xmm7, %%xmm7\n" // sqrt(...) "mulps (%4), %%xmm7\n" // multiply wsharpen "addps %%xmm9, %%xmm7\n" // + 1.0 xmm7 = sfact "mulps %%xmm6, %%xmm7\n" // *= Wienerfactor "movaps %%xmm7, %%xmm5\n" "unpcklps %%xmm7, %%xmm7\n" // unpack low to xmm7 "unpckhps %%xmm5, %%xmm5\n" // unpack high to xmm5 "mulps %%xmm7, %%xmm0\n" // re+im *= sfact "mulps %%xmm5, %%xmm1\n" // re+im *= sfact "addps %%xmm2, %%xmm0\n" // add gridcorrection "addps %%xmm3, %%xmm1\n" // add gridcorrection "movaps %%xmm0, (%2)\n" // Store "movaps %%xmm1, 16(%2)\n" // Store "sub $4, %0\n" // size -=4 "add $32, %2\n" // outcur+=32 "add $32, %3\n" // gridsample+=32 "add $16, %4\n" // wsharpen+=16 "cmp $0, %0\n" "jg loop_wienerdegridsharpen_sse3\n" : /* no output registers */ : "r" (size), "r" (temp), "r" (outcur), "r" (gridsample), "r"(wsharpen) : /* %0 %1 %2 %3 %4 */ ); } #else // 32 bits void ComplexWienerFilterDeGrid::processSharpen_SSE3( ComplexBlock* block ) { fftwf_complex* outcur = block->complex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; float* temp = block->temp->data; // Get aligned temp area, at least 256 bytes, only used by this thread. float *wsharpen = sharpenWindow->getLine(0); for (int i = 0; i < 4; i++) { temp[i+0] = 1e-15f; // 0 temp[i+4] = gridfraction; // 16 temp[i+8] = sigmaSquaredSharpenMin; // 32 temp[i+12] = sigmaSquaredSharpenMax; // 48 temp[i+16] = 1.0f; // 64 temp[i+20] = sigmaSquaredNoiseNormed; // 80 temp[i+24] = lowlimit; // 96 } int size = bw*bh; asm volatile ( "loop_wienerdegridsharpen_sse3:\n" "movaps 16(%1),%%xmm6\n" // Load gridfraction into xmm6 "movaps (%2), %%xmm0\n" // in r0i0 r1i1 "movaps 16(%2), %%xmm1\n" //in r2i2 r3i3 "movaps (%3), %%xmm4\n" // grid r0i0 r1i1 "movaps 16(%3), %%xmm5\n" // grid r2i2 r3i3 "mulps %%xmm6, %%xmm4\n" //grid r0*gf i0*gf r1*gf i1*gf (xmm4: gridcorrection0 + 1) "mulps %%xmm6, %%xmm5\n" //grid r2*gf i2*gf r3*gf i3*gf (gridfraction*gridsample[x]) "movaps %%xmm4, %%xmm2\n" // maintain gridcorrection in memory "movaps %%xmm5, %%xmm3\n" "subps %%xmm4, %%xmm0\n" // re0 im0 re1 im1 (re = outcur[x][0] - gridcorrection0;, etc) (xmm0 - xmm4) "subps %%xmm5, %%xmm1\n" // re2 im2 re3 im3 - "movaps %%xmm0, %%xmm4\n" // copy re0+im0 ... into xmm4 and 5, xmm0 & 1 retained "movaps %%xmm1, %%xmm5\n" "mulps %%xmm4, %%xmm4\n" //r0i0 r1i1 squared "mulps %%xmm5, %%xmm5\n" //r2i2 r3i3 squared "haddps %%xmm5, %%xmm4\n" //r0+i0 r1+i1 r2+i2 r3+i3 r4+i4 (all squared) (SSE3!) - xmm 5 free "addps (%1), %%xmm4\n" // add 1e-15 (xmm4: psd for all 4 pixels) //WienerFactor = MAX((psd - sigmaSquaredNoiseNormed)/psd, lowlimit); // limited Wiener filter "movaps 80(%1), %%xmm5\n" //sigmaSquaredNoiseNormed in xmm5 "movaps %%xmm4, %%xmm6\n" // Copy psd into xmm6 "rcpps %%xmm4, %%xmm7\n" // xmm7: (1 / psd) "subps %%xmm5, %%xmm6\n" // xmm6 (psd) - xmm5 (ssnn) xmm5 free "movaps 96(%1), %%xmm5\n" // xmm5 = lowlimit "mulps %%xmm7, %%xmm6\n" // xmm6 = (psd - sigmaSquaredNoiseNormed)/psd "maxps %%xmm5, %%xmm6\n" // xmm6 = Wienerfactor = MAX(xmm6, lowlimit) // float sfact = (1 + wsharpen[x]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) )) ; "movaps 48(%1), %%xmm7\n" // Move sigmaSquaredSharpenMax into xmm7 "movaps %%xmm4, %%xmm5\n" // Copy psd into xmm5 "addps %%xmm7, %%xmm4\n" // xmm4 = psd + sigmaSquaredSharpenMax "mulps %%xmm5, %%xmm7\n" // xmm7 = psd*sigmaSquaredSharpenMax "addps 32(%1), %%xmm5\n" //xmm5 = psd + sigmaSquaredSharpenMin //xmm6 free "mulps %%xmm4, %%xmm5\n" // (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) xmm4 free "rcpps %%xmm5, %%xmm5\n" // 1 / (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) (stall) "mulps %%xmm5, %%xmm7\n" // psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) - xmm5 free "movaps 64(%1), %%xmm5\n" // Load "1.0" "rsqrtps %%xmm7, %%xmm7\n" // 1.0 / sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) "rcpps %%xmm7, %%xmm7\n" // sqrt (..) "mulps (%4), %%xmm7\n" // multiply wsharpen "addps %%xmm5, %%xmm7\n" // + 1.0 xmm7 = sfact "mulps %%xmm6, %%xmm7\n" // *= Wienerfactor "movaps %%xmm7, %%xmm5\n" "unpcklps %%xmm7, %%xmm7\n" // unpack low to xmm7 "unpckhps %%xmm5, %%xmm5\n" // unpack high to xmm5 "mulps %%xmm7, %%xmm0\n" // re+im *= sfact "mulps %%xmm5, %%xmm1\n" // re+im *= sfact "addps %%xmm2, %%xmm0\n" // add gridcorrection "addps %%xmm3, %%xmm1\n" // add gridcorrection "movaps %%xmm0, (%2)\n" // Store "movaps %%xmm1, 16(%2)\n" // Store "sub $4, %0\n" // size -=4 "add $32, %2\n" // outcur+=32 "add $32, %3\n" // gridsample+=32 "add $16, %4\n" // wsharpen+=16 "cmp $0, %0\n" "jg loop_wienerdegridsharpen_sse3\n" : /* no output registers */ : "r" (size), "r" (temp), "r" (outcur), "r" (gridsample), "r"(wsharpen) : /* %0 %1 %2 %3 %4 */ ); } #endif void ComplexWienerFilterDeGrid::processSharpen_SSE( ComplexBlock* block ) { fftwf_complex* outcur = block->complex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; float* temp = block->temp->data; // Get aligned temp area, at least 256 bytes, only used by this thread. float *wsharpen = sharpenWindow->getLine(0); for (int i = 0; i < 4; i++) { temp[i+0] = 1e-15f; // 0 temp[i+4] = gridfraction; // 16 temp[i+8] = sigmaSquaredSharpenMin; // 32 temp[i+12] = sigmaSquaredSharpenMax; // 48 temp[i+16] = 1.0f; // 64 temp[i+20] = sigmaSquaredNoiseNormed; // 72 temp[i+24] = lowlimit; // 96 } int size = bw*bh; asm volatile ( "loop_wienerdegridsharpen_sse:\n" "movaps 16(%1),%%xmm6\n" // Load gridfraction into xmm6 "movaps (%2), %%xmm0\n" // in r0i0 r1i1 "movaps 16(%2), %%xmm1\n" //in r2i2 r3i3 "movaps (%3), %%xmm4\n" // grid r0i0 r1i1 "movaps 16(%3), %%xmm5\n" // grid r2i2 r3i3 "mulps %%xmm6, %%xmm4\n" //grid r0*gf i0*gf r1*gf i1*gf (xmm4: gridcorrection0 + 1) "mulps %%xmm6, %%xmm5\n" //grid r2*gf i2*gf r3*gf i3*gf (gridfraction*gridsample[x]) "movaps %%xmm4, %%xmm2\n" // maintain gridcorrection in memory "movaps %%xmm5, %%xmm3\n" "subps %%xmm4, %%xmm0\n" // re0 im0 re1 im1 (re = outcur[x][0] - gridcorrection0;, etc) (xmm0 - xmm4) "subps %%xmm5, %%xmm1\n" // re2 im2 re3 im3 - "movaps %%xmm0, %%xmm4\n" // copy re0+im0 ... into xmm4 and 5, xmm0 & 1 retained "movaps %%xmm1, %%xmm5\n" "mulps %%xmm4, %%xmm4\n" //r0i0 r1i1 squared "mulps %%xmm5, %%xmm5\n" //r2i2 r3i3 squared "movaps %%xmm4, %%xmm7\n" "shufps $136, %%xmm5, %%xmm4\n" // xmm7 r0r1 r2r3 [10 00 10 00 = 136] "shufps $221, %%xmm5, %%xmm7\n" // xmm6 i0i1 i2i3 [11 01 11 01 = 221] "addps %%xmm7, %%xmm4\n" "addps (%1), %%xmm4\n" // add 1e-15 (xmm4: psd for all 4 pixels) //WienerFactor = MAX((psd - sigmaSquaredNoiseNormed)/psd, lowlimit); // limited Wiener filter "movaps 80(%1), %%xmm5\n" //sigmaSquaredNoiseNormed in xmm5 "movaps %%xmm4, %%xmm6\n" // Copy psd into xmm6 "rcpps %%xmm4, %%xmm7\n" // xmm7: (1 / psd) "subps %%xmm5, %%xmm6\n" // xmm6 (psd) - xmm5 (ssnn) xmm5 free "movaps 96(%1), %%xmm5\n" // xmm5 = lowlimit "mulps %%xmm7, %%xmm6\n" // xmm6 = (psd - sigmaSquaredNoiseNormed)/psd "maxps %%xmm5, %%xmm6\n" // xmm6 = Wienerfactor = MAX(xmm6, lowlimit) // float sfact = (1 + wsharpen[x]*sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) )) ; "movaps 48(%1), %%xmm7\n" // Move sigmaSquaredSharpenMax into xmm7 "movaps %%xmm4, %%xmm5\n" // Copy psd into xmm5 "addps %%xmm7, %%xmm4\n" // xmm4 = psd + sigmaSquaredSharpenMax "mulps %%xmm5, %%xmm7\n" // xmm7 = psd*sigmaSquaredSharpenMax "addps 32(%1), %%xmm5\n" //xmm5 = psd + sigmaSquaredSharpenMin //xmm6 free "mulps %%xmm4, %%xmm5\n" // (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) xmm4 free "rcpps %%xmm5, %%xmm5\n" // 1 / (psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax) (stall) "mulps %%xmm5, %%xmm7\n" // psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) - xmm5 free "movaps 64(%1), %%xmm5\n" // Load "1.0" "rsqrtps %%xmm7, %%xmm7\n" // 1.0 / sqrt( psd*sigmaSquaredSharpenMax/((psd + sigmaSquaredSharpenMin)*(psd + sigmaSquaredSharpenMax)) "rcpps %%xmm7, %%xmm7\n" // sqrt (..) "mulps (%4), %%xmm7\n" // multiply wsharpen "addps %%xmm5, %%xmm7\n" // + 1.0 xmm7 = sfact "mulps %%xmm6, %%xmm7\n" // *= Wienerfactor "movaps %%xmm7, %%xmm5\n" "unpcklps %%xmm7, %%xmm7\n" // unpack low to xmm7 "unpckhps %%xmm5, %%xmm5\n" // unpack high to xmm5 "mulps %%xmm7, %%xmm0\n" // re+im *= sfact "mulps %%xmm5, %%xmm1\n" // re+im *= sfact "addps %%xmm2, %%xmm0\n" // add gridcorrection "addps %%xmm3, %%xmm1\n" // add gridcorrection "movaps %%xmm0, (%2)\n" // Store "movaps %%xmm1, 16(%2)\n" // Store "sub $4, %0\n" // size -=4 "add $32, %2\n" // outcur+=32 "add $32, %3\n" // gridsample+=32 "add $16, %4\n" // wsharpen+=16 "cmp $0, %0\n" "jg loop_wienerdegridsharpen_sse\n" : /* no output registers */ : "r" (size), "r" (temp), "r" (outcur), "r" (gridsample), "r"(wsharpen) : /* %0 %1 %2 %3 %4 */ ); } void ComplexWienerFilterDeGrid::processNoSharpen_SSE( ComplexBlock* block ) { fftwf_complex* outcur = block->complex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; float* temp = block->temp->data; // Get aligned temp area, at least 256 bytes, only used by this thread. for (int i = 0; i < 4; i++) { temp[i+0] = 1e-15f; // 0 temp[i+4] = gridfraction; // 16 temp[i+8] = sigmaSquaredNoiseNormed; // 32 temp[i+12] = lowlimit; // 48 } int size = bw*bh; asm volatile ( "loop_wienerdegridnosharpen_sse:\n" "movaps 16(%1),%%xmm6\n" // Load gridfraction into xmm6 "movaps (%2), %%xmm0\n" // in r0i0 r1i1 "movaps 16(%2), %%xmm1\n" //in r2i2 r3i3 "movaps (%3), %%xmm4\n" // grid r0i0 r1i1 "movaps 16(%3), %%xmm5\n" // grid r2i2 r3i3 "mulps %%xmm6, %%xmm4\n" //grid r0*gf i0*gf r1*gf i1*gf (xmm4: gridcorrection0 + 1) "mulps %%xmm6, %%xmm5\n" //grid r2*gf i2*gf r3*gf i3*gf (gridfraction*gridsample[x]) "movaps %%xmm4, %%xmm2\n" // maintain gridcorrection in memory "movaps %%xmm5, %%xmm3\n" "subps %%xmm4, %%xmm0\n" // re0 im0 re1 im1 (re = outcur[x][0] - gridcorrection0;, etc) (xmm0 - xmm4) "subps %%xmm5, %%xmm1\n" // re2 im2 re3 im3 - "movaps %%xmm0, %%xmm4\n" // copy re0+im0 ... into xmm4 and 5, xmm0 & 1 retained "movaps %%xmm1, %%xmm5\n" "mulps %%xmm4, %%xmm4\n" //r0i0 r1i1 squared "mulps %%xmm5, %%xmm5\n" //r2i2 r3i3 squared "movaps %%xmm4, %%xmm7\n" "shufps $136, %%xmm5, %%xmm4\n" // xmm7 r0r1 r2r3 [10 00 10 00 = 136] "shufps $221, %%xmm5, %%xmm7\n" // xmm6 i0i1 i2i3 [11 01 11 01 = 221] "addps %%xmm7, %%xmm4\n" "addps (%1), %%xmm4\n" // add 1e-15 (xmm4: psd for all 4 pixels) //WienerFactor = MAX((psd - sigmaSquaredNoiseNormed)/psd, lowlimit); // limited Wiener filter "movaps 32(%1), %%xmm5\n" //sigmaSquaredNoiseNormed in xmm5 "movaps %%xmm4, %%xmm6\n" // Copy psd into xmm6 "rcpps %%xmm4, %%xmm7\n" // xmm7: (1 / psd) "subps %%xmm5, %%xmm6\n" // xmm6 (psd) - xmm5 (ssnn) xmm5 free "movaps 48(%1), %%xmm5\n" // xmm5 = lowlimit "mulps %%xmm7, %%xmm6\n" // xmm6 = (psd - sigmaSquaredNoiseNormed)/psd "maxps %%xmm6, %%xmm5\n" // xmm6 = Wienerfactor = MAX(xmm6, lowlimit) "movaps %%xmm5, %%xmm7\n" "unpcklps %%xmm7, %%xmm7\n" // unpack low to xmm7 "unpckhps %%xmm5, %%xmm5\n" // unpack high to xmm5 "mulps %%xmm7, %%xmm0\n" // re+im *= sfact "mulps %%xmm5, %%xmm1\n" // re+im *= sfact "addps %%xmm2, %%xmm0\n" // add gridcorrection "addps %%xmm3, %%xmm1\n" // add gridcorrection "movaps %%xmm0, (%2)\n" // Store "movaps %%xmm1, 16(%2)\n" // Store "sub $4, %0\n" // size -=4 "add $32, %2\n" // outcur+=32 "add $32, %3\n" // gridsample+=32 "cmp $0, %0\n" "jg loop_wienerdegridnosharpen_sse\n" : /* no output registers */ : "r" (size), "r" (temp), "r" (outcur), "r" (gridsample) : /* %0 %1 %2 %3 */ ); } #if defined (__x86_64__) void ComplexWienerFilterDeGrid::processNoSharpen_SSE3( ComplexBlock* block ) { fftwf_complex* outcur = block->complex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; float* temp = block->temp->data; // Get aligned temp area, at least 256 bytes, only used by this thread. for (int i = 0; i < 4; i++) { temp[i+0] = 1e-15f; // 0 temp[i+4] = gridfraction; // 16 temp[i+8] = sigmaSquaredNoiseNormed; // 32 temp[i+12] = lowlimit; // 48 } int size = bw*bh; if ((size & 7) == 0) { //TODO: Bench me to see if I'm faster asm volatile ( "movaps (%1), %%xmm14\n" // xmm14: 1e-15 "movaps 16(%1), %%xmm15\n" // Load gridfraction into xmm15 "loop_wienerdegridnosharpen_sse3_big:\n" "movaps (%2), %%xmm0\n" // in r0i0 r1i1 "movaps 16(%2), %%xmm1\n" //in r2i2 r3i3 "movaps 32(%2), %%xmm8\n" // in r4i4 r5i5 "movaps 48(%2), %%xmm9\n" //in r6i6 r7i7 "movaps (%3), %%xmm4\n" // grid r0i0 r1i1 "movaps 16(%3), %%xmm5\n" // grid r2i2 r3i3 "movaps 32(%3), %%xmm10\n" // grid r4i4 r5i5 "movaps 48(%3), %%xmm11\n" // grid r6i6 r7i7 "mulps %%xmm15, %%xmm4\n" //grid r0*gf i0*gf r1*gf i1*gf (xmm4: gridcorrection0 + 1) "mulps %%xmm15, %%xmm5\n" //grid r2*gf i2*gf r3*gf i3*gf (gridfraction*gridsample[x]) "mulps %%xmm15, %%xmm10\n" //grid r4*gf i4*gf r5*gf i5*gf "mulps %%xmm15, %%xmm11\n" //grid r6*gf i6*gf r7*gf i7*gf "movaps %%xmm4, %%xmm2\n" // maintain gridcorrection in memory "movaps %%xmm5, %%xmm3\n" "movaps %%xmm10, %%xmm12\n" // maintain gridcorrection in memory "movaps %%xmm11, %%xmm13\n" "subps %%xmm4, %%xmm0\n" // re0 im0 re1 im1 (re = outcur[x][0] - gridcorrection0;, etc) (xmm0 - xmm4) "subps %%xmm5, %%xmm1\n" // re2 im2 re3 im3 - "subps %%xmm10, %%xmm8\n" // re4 im4 re5 im5 (re = outcur[x][0] - gridcorrection0;, etc) (xmm0 - xmm4) "subps %%xmm11, %%xmm9\n" // re6 im6 re7 im7 - "movaps %%xmm0, %%xmm4\n" // copy re0+im0 ... into xmm4 and 5, xmm0 & 1 retained "movaps %%xmm1, %%xmm5\n" "movaps %%xmm8, %%xmm10\n" // copy re4+im4 "movaps %%xmm9, %%xmm11\n" "mulps %%xmm4, %%xmm4\n" //r0i0 r1i1 squared "mulps %%xmm5, %%xmm5\n" //r2i2 r3i3 squared "mulps %%xmm10, %%xmm10\n" //r4i4 r5i5 squared "mulps %%xmm11, %%xmm11\n" //r6i6 r7i7 squared "haddps %%xmm5, %%xmm4\n" //r0+i0 r1+i1 r2+i2 r3+i3 (all squared) (SSE3!) - xmm 5 free "haddps %%xmm11, %%xmm10\n" //r4+i4 r5+i5 r6+i6 r7+i7 (all squared) (SSE3!) - xmm 11 free "addps %%xmm14, %%xmm4\n" // add 1e-15 (xmm4: psd for all 4 pixels) "addps %%xmm14, %%xmm10\n" // add 1e-15 (xmm10: psd for all 4 pixels) //WienerFactor = MAX((psd - sigmaSquaredNoiseNormed)/psd, lowlimit); // limited Wiener filter "movaps %%xmm4, %%xmm5\n" // Copy psd into xmm5 "movaps %%xmm10, %%xmm11\n" // Copy psd into xmm11 "rcpps %%xmm4, %%xmm4\n" // xmm4: (1 / psd) "movaps 32(%1), %%xmm7\n" "rcpps %%xmm10, %%xmm10\n" // xmm10: (1 / psd) "subps %%xmm7, %%xmm5\n" // xmm5 (psd) - xmm5 (ssnn) "subps %%xmm7, %%xmm11\n" // xmm11 (psd) - xmm5 (ssnn) "movaps 48(%1), %%xmm7\n" "mulps %%xmm4, %%xmm5\n" // xmm6 = (psd - sigmaSquaredNoiseNormed)/psd "mulps %%xmm10, %%xmm11\n" // xmm6 = (psd - sigmaSquaredNoiseNormed)/psd "maxps %%xmm7, %%xmm5\n" // xmm6 = Wienerfactor = MAX(xmm6, lowlimit) "maxps %%xmm7, %%xmm11\n" // xmm6 = Wienerfactor = MAX(xmm6, lowlimit) "movaps %%xmm5, %%xmm7\n" "movaps %%xmm11, %%xmm10\n" "unpckhps %%xmm5, %%xmm5\n" // unpack high to xmm5 "unpcklps %%xmm7, %%xmm7\n" // unpack low to xmm7 "unpckhps %%xmm11, %%xmm11\n" // unpack high to xmm11 "unpcklps %%xmm10, %%xmm10\n" // unpack low to xmm10 "mulps %%xmm7, %%xmm0\n" // re+im *= sfact "mulps %%xmm5, %%xmm1\n" // re+im *= sfact "mulps %%xmm10, %%xmm8\n" // re+im *= sfact "mulps %%xmm11, %%xmm9\n" // re+im *= sfact "addps %%xmm2, %%xmm0\n" // add gridcorrection "addps %%xmm3, %%xmm1\n" // add gridcorrection "addps %%xmm12, %%xmm8\n" // add gridcorrection "addps %%xmm13, %%xmm9\n" // add gridcorrection "movaps %%xmm0, (%2)\n" // Store "movaps %%xmm1, 16(%2)\n" // Store "movaps %%xmm8, 32(%2)\n" // Store "movaps %%xmm9, 48(%2)\n" // Store "sub $8, %0\n" // size -=8 "add $64, %2\n" // outcur+=64 "add $64, %3\n" // gridsample+=64 "cmp $0, %0\n" "jg loop_wienerdegridnosharpen_sse3_big\n" : /* no output registers */ : "r" (size), "r" (temp), "r" (outcur), "r" (gridsample) : /* %0 %1 %2 %3 */ ); } else { asm volatile ( "movaps (%1), %%xmm14\n" // xmm14: 1e-15 "movaps 16(%1), %%xmm15\n" // Load gridfraction into xmm15 "movaps 32(%1), %%xmm13\n" //sigmaSquaredNoiseNormed in xmm13 "movaps 48(%1), %%xmm12\n" // xmm12 = lowlimit "loop_wienerdegridnosharpen_sse3:\n" "movaps (%2), %%xmm0\n" // in r0i0 r1i1 "movaps 16(%2), %%xmm1\n" //in r2i2 r3i3 "movaps (%3), %%xmm4\n" // grid r0i0 r1i1 "movaps 16(%3), %%xmm5\n" // grid r2i2 r3i3 "mulps %%xmm15, %%xmm4\n" //grid r0*gf i0*gf r1*gf i1*gf (xmm4: gridcorrection0 + 1) "mulps %%xmm15, %%xmm5\n" //grid r2*gf i2*gf r3*gf i3*gf (gridfraction*gridsample[x]) "movaps %%xmm4, %%xmm2\n" // maintain gridcorrection in memory "movaps %%xmm5, %%xmm3\n" "subps %%xmm4, %%xmm0\n" // re0 im0 re1 im1 (re = outcur[x][0] - gridcorrection0;, etc) (xmm0 - xmm4) "subps %%xmm5, %%xmm1\n" // re2 im2 re3 im3 - "movaps %%xmm0, %%xmm4\n" // copy re0+im0 ... into xmm4 and 5, xmm0 & 1 retained "movaps %%xmm1, %%xmm5\n" "mulps %%xmm4, %%xmm4\n" //r0i0 r1i1 squared "mulps %%xmm5, %%xmm5\n" //r2i2 r3i3 squared "haddps %%xmm5, %%xmm4\n" //r0+i0 r1+i1 r2+i2 r3+i3 r4+i4 (all squared) (SSE3!) - xmm 5 free "addps %%xmm14, %%xmm4\n" // add 1e-15 (xmm4: psd for all 4 pixels) //WienerFactor = MAX((psd - sigmaSquaredNoiseNormed)/psd, lowlimit); // limited Wiener filter "movaps %%xmm4, %%xmm6\n" // Copy psd into xmm6 "rcpps %%xmm4, %%xmm7\n" // xmm7: (1 / psd) "subps %%xmm13, %%xmm6\n" // xmm6 (psd) - xmm5 (ssnn) xmm5 free "mulps %%xmm7, %%xmm6\n" // xmm6 = (psd - sigmaSquaredNoiseNormed)/psd "maxps %%xmm12, %%xmm6\n" // xmm6 = Wienerfactor = MAX(xmm6, lowlimit) "movaps %%xmm6, %%xmm7\n" "unpcklps %%xmm7, %%xmm7\n" // unpack low to xmm7 "unpckhps %%xmm6, %%xmm6\n" // unpack high to xmm6 "mulps %%xmm7, %%xmm0\n" // re+im *= sfact "mulps %%xmm6, %%xmm1\n" // re+im *= sfact "addps %%xmm2, %%xmm0\n" // add gridcorrection "addps %%xmm3, %%xmm1\n" // add gridcorrection "movaps %%xmm0, (%2)\n" // Store "movaps %%xmm1, 16(%2)\n" // Store "sub $4, %0\n" // size -=4 "add $32, %2\n" // outcur+=32 "add $32, %3\n" // gridsample+=32 "cmp $0, %0\n" "jg loop_wienerdegridnosharpen_sse3\n" : /* no output registers */ : "r" (size), "r" (temp), "r" (outcur), "r" (gridsample) : /* %0 %1 %2 %3 */ ); } } #else // 32 bits void ComplexWienerFilterDeGrid::processNoSharpen_SSE3( ComplexBlock* block ) { fftwf_complex* outcur = block->complex; fftwf_complex* gridsample = grid->complex; float gridfraction = degrid*outcur[0][0]/gridsample[0][0]; float* temp = block->temp->data; // Get aligned temp area, at least 256 bytes, only used by this thread. for (int i = 0; i < 4; i++) { temp[i+0] = 1e-15f; // 0 temp[i+4] = gridfraction; // 16 temp[i+8] = sigmaSquaredNoiseNormed; // 32 temp[i+12] = lowlimit; // 48 } int size = bw*bh; asm volatile ( "loop_wienerdegridnosharpen_sse3:\n" "movaps 16(%1),%%xmm6\n" // Load gridfraction into xmm6 "movaps (%2), %%xmm0\n" // in r0i0 r1i1 "movaps 16(%2), %%xmm1\n" //in r2i2 r3i3 "movaps (%3), %%xmm4\n" // grid r0i0 r1i1 "movaps 16(%3), %%xmm5\n" // grid r2i2 r3i3 "mulps %%xmm6, %%xmm4\n" //grid r0*gf i0*gf r1*gf i1*gf (xmm4: gridcorrection0 + 1) "mulps %%xmm6, %%xmm5\n" //grid r2*gf i2*gf r3*gf i3*gf (gridfraction*gridsample[x]) "movaps %%xmm4, %%xmm2\n" // maintain gridcorrection in memory "movaps %%xmm5, %%xmm3\n" "subps %%xmm4, %%xmm0\n" // re0 im0 re1 im1 (re = outcur[x][0] - gridcorrection0;, etc) (xmm0 - xmm4) "subps %%xmm5, %%xmm1\n" // re2 im2 re3 im3 - "movaps %%xmm0, %%xmm4\n" // copy re0+im0 ... into xmm4 and 5, xmm0 & 1 retained "movaps %%xmm1, %%xmm5\n" "mulps %%xmm4, %%xmm4\n" //r0i0 r1i1 squared "mulps %%xmm5, %%xmm5\n" //r2i2 r3i3 squared "haddps %%xmm5, %%xmm4\n" //r0+i0 r1+i1 r2+i2 r3+i3 r4+i4 (all squared) (SSE3!) - xmm 5 free "addps (%1), %%xmm4\n" // add 1e-15 (xmm4: psd for all 4 pixels) //WienerFactor = MAX((psd - sigmaSquaredNoiseNormed)/psd, lowlimit); // limited Wiener filter "movaps 32(%1), %%xmm5\n" //sigmaSquaredNoiseNormed in xmm5 "movaps %%xmm4, %%xmm6\n" // Copy psd into xmm6 "rcpps %%xmm4, %%xmm7\n" // xmm7: (1 / psd) "subps %%xmm5, %%xmm6\n" // xmm6 (psd) - xmm5 (ssnn) xmm5 free "movaps 48(%1), %%xmm5\n" // xmm5 = lowlimit "mulps %%xmm7, %%xmm6\n" // xmm6 = (psd - sigmaSquaredNoiseNormed)/psd "maxps %%xmm6, %%xmm5\n" // xmm6 = Wienerfactor = MAX(xmm6, lowlimit) "movaps %%xmm5, %%xmm7\n" "unpcklps %%xmm7, %%xmm7\n" // unpack low to xmm7 "unpckhps %%xmm5, %%xmm5\n" // unpack high to xmm5 "mulps %%xmm7, %%xmm0\n" // re+im *= sfact "mulps %%xmm5, %%xmm1\n" // re+im *= sfact "addps %%xmm2, %%xmm0\n" // add gridcorrection "addps %%xmm3, %%xmm1\n" // add gridcorrection "movaps %%xmm0, (%2)\n" // Store "movaps %%xmm1, 16(%2)\n" // Store "sub $4, %0\n" // size -=4 "add $32, %2\n" // outcur+=32 "add $32, %3\n" // gridsample+=32 "cmp $0, %0\n" "jg loop_wienerdegridnosharpen_sse3\n" : /* no output registers */ : "r" (size), "r" (temp), "r" (outcur), "r" (gridsample) : /* %0 %1 %2 %3 */ ); } #endif #endif // defined (__i386__) || defined (__x86_64__) }}// namespace RawStudio::FFTFilter rawstudio-2.0/plugins/denoise/planarimageslice.cpp0000644000175000017500000000304611526533643017443 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "planarimageslice.h" #include "floatimageplane.h" namespace RawStudio { namespace FFTFilter { PlanarImageSlice::PlanarImageSlice(void) { filter = 0; in = 0; out = 0; blockSkipped = true; ownAlloc = false; } PlanarImageSlice::~PlanarImageSlice(void) { if (ownAlloc && out) delete out; out = 0; if (in) delete in; in = 0; } void PlanarImageSlice::setOut(FloatImagePlane *p) { ownAlloc = false; out = p; blockSkipped = false; } void PlanarImageSlice::allocateOut() { if (ownAlloc || out) return; out = new FloatImagePlane(in->w, in->h, in->plane_id); out->allocateImage(); blockSkipped = false; ownAlloc = true; } }}// namespace RawStudio::FFTFilter rawstudio-2.0/plugins/denoise/planarimageslice.h0000644000175000017500000000272111526533643017107 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 planarimageslice_h__ #define planarimageslice_h__ #include namespace RawStudio { namespace FFTFilter { class FloatImagePlane; class ComplexFilter; class FFTWindow; class PlanarImageSlice { public: PlanarImageSlice(void); virtual ~PlanarImageSlice(void); void setOut(FloatImagePlane *p); FloatImagePlane *in; FloatImagePlane *out; void allocateOut(); gint offset_x; gint offset_y; gint overlap_x; gint overlap_y; gboolean blockSkipped; gboolean ownAlloc; ComplexFilter *filter; FFTWindow *window; }; }} // namespace RawStudio::FFTFilter #endif // planarimageslice_h__ rawstudio-2.0/plugins/denoise/fftwindow.h0000644000175000017500000000331711526533643015620 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 fftwindow_h__ #define fftwindow_h__ #include "floatimageplane.h" namespace RawStudio { namespace FFTFilter { class FFTWindow { public: FFTWindow(int _w, int _h); virtual ~FFTWindow(void); FloatImagePlane analysis; FloatImagePlane synthesis; void createHalfCosineWindow(int ox, int oy); void createRaisedCosineWindow(int ox, int oy); void createSqrtHalfCosineWindow(int ox, int oy); void applyAnalysisWindow(FloatImagePlane *image, FloatImagePlane *dst); void applySynthesisWindow( FloatImagePlane *image ); // Inplace, written back to image private: void applyAnalysisWindowSSE( FloatImagePlane *image, FloatImagePlane *dst ); float createWindow( FloatImagePlane &window, int ox, float* wx); // Returns sum bool analysisIsFlat; bool synthesisIsFlat; bool SSEAvailable; }; }} // namespace RawStudio::FFTFilter #endif // fftwindow_h__ rawstudio-2.0/plugins/denoise/Makefile.in0000644000175000017500000005041711547430035015502 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/denoise DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) denoise_la_DEPENDENCIES = am_denoise_la_OBJECTS = denoise.lo complexblock.lo complexfilter.lo \ complexfilter-x86.lo denoisethread.lo fftdenoiser.lo \ fftdenoiseryuv.lo fftwindow.lo floatimageplane.lo \ floatplanarimage.lo floatplanarimage-x86.lo jobqueue.lo \ planarimageslice.lo denoise_la_OBJECTS = $(am_denoise_la_OBJECTS) denoise_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(denoise_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(denoise_la_SOURCES) DIST_SOURCES = $(denoise_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall \ -g3 \ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ -ffast-math \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = denoise.la denoise_la_LIBADD = @PACKAGE_LIBS@ denoise_la_LDFLAGS = -module -avoid-version denoise_la_SOURCES = denoise.c \ complexblock.cpp complexblock.h \ complexfilter.cpp complexfilter.h \ complexfilter-x86.cpp \ denoiseinterface.h \ denoisethread.cpp denoisethread.h \ fftdenoiser.cpp fftdenoiser.h \ fftdenoiseryuv.cpp fftdenoiseryuv.h \ fftwindow.cpp fftwindow.h \ floatimageplane.cpp floatimageplane.h \ floatplanarimage.cpp floatplanarimage-x86.cpp floatplanarimage.h \ jobqueue.cpp jobqueue.h \ planarimageslice.cpp planarimageslice.h all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/denoise/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/denoise/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done denoise.la: $(denoise_la_OBJECTS) $(denoise_la_DEPENDENCIES) $(denoise_la_LINK) -rpath $(libdir) $(denoise_la_OBJECTS) $(denoise_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complexblock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complexfilter-x86.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/complexfilter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/denoise.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/denoisethread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftdenoiser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftdenoiseryuv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftwindow.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floatimageplane.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floatplanarimage-x86.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/floatplanarimage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jobqueue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/planarimageslice.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/denoise/fftdenoiser.h0000644000175000017500000000373711526533643016127 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 fftdenoiser_h__ #define fftdenoiser_h__ #include #include "floatplanarimage.h" #include "denoisethread.h" #include "denoiseinterface.h" namespace RawStudio { namespace FFTFilter { #define FFT_BLOCK_SIZE 128 // Preferable able to be factorized into primes, must be divideable by 4. #define FFT_BLOCK_OVERLAP 24 // Must be dividable by 4 (OVERLAP * 2 must be < SIZE) #define SIGMA_FACTOR 0.25f; // Amount to multiply sigma by to give reasonable amount class FFTDenoiser { public: FFTDenoiser(void); virtual ~FFTDenoiser(void); gboolean initializeFFT(); virtual void setParameters( FFTDenoiseInfo *info); virtual void denoiseImage(RS_IMAGE16* image); gboolean abort; protected: virtual void processJobs(FloatPlanarImage &img, FloatPlanarImage &outImg); void waitForJobs(JobQueue *waiting_jobs); guint nThreads; DenoiseThread *threads; fftwf_plan plan_forward; fftwf_plan plan_reverse; float sigma; float beta; float sharpen; float sharpenCutoff; float sharpenMinSigma; float sharpenMaxSigma; }; }} // namespace RawStudio::FFTFilter #endif // fftdenoiser_h__ rawstudio-2.0/plugins/denoise/denoisethread.h0000644000175000017500000000316611526533643016431 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 denoisethread_h__ #define denoisethread_h__ #include "fftw3.h" #include "jobqueue.h" #include "pthread.h" #include "complexblock.h" #include "floatimageplane.h" namespace RawStudio { namespace FFTFilter { class DenoiseThread { public: DenoiseThread(void); virtual ~DenoiseThread(void); void addJobs(JobQueue *waiting, JobQueue *finished); void jobsEnded(); void runDenoise(); fftwf_plan forward; fftwf_plan reverse; ComplexBlock *complex; FloatImagePlane *input_plane; pthread_t thread_id; pthread_cond_t run_thread; pthread_mutex_t run_thread_mutex; gboolean exitThread; gboolean threadExited; private: JobQueue *waiting; JobQueue *finished; void procesFFT(FFTJob* job); }; }} // namespace RawStudio::FFTFilter #endif // denoisethread_h__ rawstudio-2.0/plugins/denoise/fftwindow.cpp0000644000175000017500000001633311526533643016155 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. * * Based on FFT3DFilter plugin for Avisynth 2.5 - 3D Frequency Domain filter * Copyright(C)2004-2005 A.G.Balakhnin aka Fizick, email: bag@hotmail.ru, web: http://bag.hotmail.ru */ #include "fftwindow.h" #include #define PI_F 3.14159265358979323846f namespace RawStudio { namespace FFTFilter { FFTWindow::FFTWindow( int _w, int _h ) : analysis(FloatImagePlane(_w, _h)), synthesis(FloatImagePlane(_w,_h)) { analysisIsFlat = true; synthesisIsFlat = true; analysis.allocateImage(); synthesis.allocateImage(); SSEAvailable = !!(rs_detect_cpu_features() & RS_CPU_FLAG_SSE); } FFTWindow::~FFTWindow(void) {} void FFTWindow::createHalfCosineWindow( int ox, int oy ) { float *wanx=new float[ox];//analysis windox float *wsynx=new float[ox];//syntesis windox //Calc 1d half-cosine window for(int i=0;ibh-overlap) yfactor *= weight[bh - y]; float *m = window.getLine(y); for (int x = 0; x < bw; x++) { float factor = yfactor; if (x bw-overlap) factor *= weight[bw - x]; m[x] = factor; sum += factor; } } return sum; } void FFTWindow::applyAnalysisWindow( FloatImagePlane *image, FloatImagePlane *dst ) { g_assert(image->w == analysis.w); g_assert(image->h == analysis.h); g_assert(dst->w == analysis.w); g_assert(dst->h == analysis.h); if (analysisIsFlat) { image->blitOnto(dst); return; } #if defined (__i386__) || defined (__x86_64__) if (SSEAvailable && ((analysis.w & 15) == 0)) { applyAnalysisWindowSSE( image, dst); return; } #endif // defined (__i386__) || defined (__x86_64__) for (int y = 0; y < analysis.h; y++) { float *srcp1 = analysis.getLine(y); float *srcp2 = image->getLine(y); float *dstp = dst->getLine(y); for (int x = 0; x < analysis.w; x++) { dstp[x] = srcp1[x] * srcp2[x]; } } } #if defined (__i386__) || defined (__x86_64__) void FFTWindow::applyAnalysisWindowSSE( FloatImagePlane *image, FloatImagePlane *dst ) { for (int y = 0; y < analysis.h; y++) { int sizew = analysis.w>>4; // Size in loops float* src1 = image->getLine(y); if ((uintptr_t)src1 & 15) { asm volatile ( "loop_analysis_sse_ua:\n" "prefetchnta (%4)\n" // Prefetch next line (Used once only, so don't pollute cache) "movups (%1), %%xmm0\n" // src1 pt1 "movups 16(%1), %%xmm1\n" // src1 pt2 "movups 32(%1), %%xmm2\n" // src1 pt3 "movups 48(%1), %%xmm3\n" // src1 pt4 "mulps (%0), %%xmm0\n" // src1 * window pt1 "mulps 16(%0), %%xmm1\n" // src1 * window pt2 "mulps 32(%0), %%xmm2\n" // src1 * window pt3 "mulps 48(%0), %%xmm3\n" // src1 * window pt4 "movaps %%xmm0, (%2)\n" // store pt1 "movaps %%xmm1, 16(%2)\n" // store pt2 "movaps %%xmm2, 32(%2)\n" // store pt1 "movaps %%xmm3, 48(%2)\n" // store pt2 "add $64, %0\n" "add $64, %1\n" "add $64, %2\n" "add $64, %4\n" "dec %3\n" "jnz loop_analysis_sse_ua\n" : /* no output registers */ : "r" (analysis.getLine(y)), "r" (src1), "r" (dst->getLine(y)), "r" (sizew), "r" (&src1[image->pitch]) : /* %0 %1 %2 %3 %4 */ ); } else { asm volatile ( "loop_analysis_sse_a:\n" "prefetchnta (%4)\n" // Prefetch next line (Used once only, so don't pollute cache) "movaps (%1), %%xmm0\n" // src1 pt1 "movaps 16(%1), %%xmm1\n" // src1 pt2 "movaps 32(%1), %%xmm2\n" // src1 pt3 "movaps 48(%1), %%xmm3\n" // src1 pt4 "mulps (%0), %%xmm0\n" // src1 * window pt1 "mulps 16(%0), %%xmm1\n" // src1 * window pt2 "mulps 32(%0), %%xmm2\n" // src1 * window pt3 "mulps 48(%0), %%xmm3\n" // src1 * window pt4 "movaps %%xmm0, (%2)\n" // store pt1 "movaps %%xmm1, 16(%2)\n" // store pt2 "movaps %%xmm2, 32(%2)\n" // store pt1 "movaps %%xmm3, 48(%2)\n" // store pt2 "add $64, %0\n" "add $64, %1\n" "add $64, %2\n" "add $64, %4\n" "dec %3\n" "jnz loop_analysis_sse_a\n" : /* no output registers */ : "r" (analysis.getLine(y)), "r" (src1), "r" (dst->getLine(y)), "r" (sizew), "r" (&src1[image->pitch]) : /* %0 %1 %2 %3 %4 */ ); } } } #endif // defined (__i386__) || defined (__x86_64__) // FIXME: SSE2 me, if used some time in the future void FFTWindow::applySynthesisWindow( FloatImagePlane *image ) { g_assert(image->w == synthesis.w); g_assert(image->h == synthesis.h); if (synthesisIsFlat) return; for (int y = 0; y < synthesis.h; y++) { float *srcp1 = image->getLine(y); float *srcp2 = synthesis.getLine(y); for (int x = 0; x < synthesis.w; x++) { srcp1[x] *= srcp2[x]; } } } }}// namespace RawStudio::FFTFilter rawstudio-2.0/plugins/denoise/denoise.c0000644000175000017500000002111011526533643015221 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 4 */ #include #include #include /* pow() */ #include "denoiseinterface.h" #include /* memcpy */ #define RS_TYPE_DENOISE (rs_denoise_type) #define RS_DENOISE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_DENOISE, RSDenoise)) #define RS_DENOISE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_DENOISE, RSDenoiseClass)) #define RS_IS_DENOISE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_DENOISE)) typedef struct _RSDenoise RSDenoise; typedef struct _RSDenoiseClass RSDenoiseClass; struct _RSDenoise { RSFilter parent; RSSettings *settings; gulong settings_signal_id; FFTDenoiseInfo info; gint sharpen; gint denoise_luma; gint denoise_chroma; }; struct _RSDenoiseClass { RSFilterClass parent_class; }; RS_DEFINE_FILTER(rs_denoise, RSDenoise) enum { PROP_0, PROP_SHARPEN, PROP_DENOISE_LUMA, PROP_DENOISE_CHROMA, PROP_SETTINGS }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static void settings_weak_notify(gpointer data, GObject *where_the_object_was); static RSFilterResponse *get_image(RSFilter *filter, const RSFilterRequest *request); static void settings_changed(RSSettings *settings, RSSettingsMask mask, RSDenoise *denoise); static RSFilterClass *rs_denoise_parent_class = NULL; G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_denoise_get_type(G_TYPE_MODULE(plugin)); } static void finalize(GObject *object) { RSDenoise *denoise = RS_DENOISE(object); destroyDenoiser(&denoise->info); if (denoise->settings && denoise->settings_signal_id) { g_signal_handler_disconnect(denoise->settings, denoise->settings_signal_id); g_object_weak_unref(G_OBJECT(denoise->settings), settings_weak_notify, denoise); } denoise->settings_signal_id = 0; denoise->settings = NULL; } static void rs_denoise_class_init(RSDenoiseClass *klass) { RSFilterClass *filter_class = RS_FILTER_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->finalize = finalize; rs_denoise_parent_class = g_type_class_peek_parent (klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_SETTINGS, g_param_spec_object( "settings", "Settings", "Settings to render from", RS_TYPE_SETTINGS, G_PARAM_READWRITE) ); filter_class->name = "FFT denoise filter"; filter_class->get_image = get_image; } static void settings_changed(RSSettings *settings, RSSettingsMask mask, RSDenoise *denoise) { gboolean changed = FALSE; if (mask & (MASK_SHARPEN|MASK_DENOISE_LUMA|MASK_DENOISE_CHROMA)) { const gfloat sharpen; const gfloat denoise_luma; const gfloat denoise_chroma; g_object_get(settings, "sharpen", &sharpen, "denoise_luma", &denoise_luma, "denoise_chroma", &denoise_chroma, NULL); if (ABS(((gint) sharpen) - denoise->sharpen) > 0 || ABS(((gint) denoise_luma) - denoise->denoise_luma) > 0 || ABS(((gint) denoise_chroma) - denoise->denoise_chroma) > 0) { changed = TRUE; denoise->sharpen = (gint) sharpen; denoise->denoise_luma = (gint) denoise_luma; denoise->denoise_chroma = (gint) denoise_chroma; } } if (changed) rs_filter_changed(RS_FILTER(denoise), RS_FILTER_CHANGED_PIXELDATA); } static void rs_denoise_init(RSDenoise *denoise) { denoise->info.processMode = PROCESS_YUV; initDenoiser(&denoise->info); denoise->sharpen = 0; denoise->denoise_luma = 0; denoise->denoise_chroma = 0; } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSDenoise *denoise = RS_DENOISE(object); switch (property_id) { case PROP_SHARPEN: g_value_set_int(value, denoise->sharpen); break; case PROP_DENOISE_LUMA: g_value_set_int(value, denoise->denoise_luma); break; case PROP_DENOISE_CHROMA: g_value_set_int(value, denoise->denoise_chroma); break; case PROP_SETTINGS: break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSDenoise *denoise = RS_DENOISE(object); switch (property_id) { case PROP_SETTINGS: if (denoise->settings && denoise->settings_signal_id) { g_signal_handler_disconnect(denoise->settings, denoise->settings_signal_id); g_object_weak_unref(G_OBJECT(denoise->settings), settings_weak_notify, denoise); } denoise->settings = g_value_get_object(value); denoise->settings_signal_id = g_signal_connect(denoise->settings, "settings-changed", G_CALLBACK(settings_changed), denoise); settings_changed(denoise->settings, MASK_ALL, denoise); g_object_weak_ref(G_OBJECT(denoise->settings), settings_weak_notify, denoise); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void settings_weak_notify(gpointer data, GObject *where_the_object_was) { RSDenoise *denoise = RS_DENOISE(data); denoise->settings = NULL; } static inline void bit_blt(char* dstp, int dst_pitch, const char* srcp, int src_pitch, int row_size, int height) { if (height == 1 || (dst_pitch == src_pitch && src_pitch == row_size)) { memcpy(dstp, srcp, row_size*height); return; } int y; for (y = height; y > 0; --y) { memcpy(dstp, srcp, row_size); dstp += dst_pitch; srcp += src_pitch; } } static RSFilterResponse * get_image(RSFilter *filter, const RSFilterRequest *request) { RSDenoise *denoise = RS_DENOISE(filter); GdkRectangle *roi; RSFilterResponse *previous_response; RSFilterResponse *response; RS_IMAGE16 *input; RS_IMAGE16 *output; RS_IMAGE16 *tmp; previous_response = rs_filter_get_image(filter->previous, request); if (!RS_IS_FILTER(filter->previous)) return previous_response; if ((denoise->sharpen + denoise->denoise_luma + denoise->denoise_chroma) == 0) return previous_response; input = rs_filter_response_get_image(previous_response); if (!input) return previous_response; response = rs_filter_response_clone(previous_response); g_object_unref(previous_response); /* If the request is marked as "quick", bail out, we're slow */ if (rs_filter_request_get_quick(request)) { rs_filter_response_set_image(response, input); rs_filter_response_set_quick(response); g_object_unref(input); return response; } gfloat scale = 1.0; rs_filter_get_recursive(RS_FILTER(denoise), "scale", &scale, NULL); if ((roi = rs_filter_request_get_roi(request))) { /* Align so we start at even pixel counts */ roi->width += (roi->x&1); roi->x -= (roi->x&1); roi->width = MIN(input->w - roi->x, roi->width); output = rs_image16_copy(input, FALSE); tmp = rs_image16_new_subframe(output, roi); bit_blt((char*)GET_PIXEL(tmp,0,0), tmp->rowstride * 2, (const char*)GET_PIXEL(input,roi->x,roi->y), input->rowstride * 2, tmp->w * tmp->pixelsize * 2, tmp->h); } else { output = rs_image16_copy(input, TRUE); tmp = g_object_ref(output); } g_object_unref(input); rs_filter_response_set_image(response, output); g_object_unref(output); denoise->info.image = tmp; denoise->info.sigmaLuma = ((float) denoise->denoise_luma * scale) / 3.0; denoise->info.sigmaChroma = ((float) denoise->denoise_chroma * scale) / 1.5; denoise->info.sharpenLuma = (float) denoise->sharpen / 20.0f; denoise->info.sharpenCutoffLuma = 0.05f * scale; denoise->info.betaLuma = 1.025; denoise->info.sharpenChroma = 0.0f; denoise->info.sharpenMinSigmaLuma = denoise->info.sigmaLuma * 2.0; denoise->info.sharpenMaxSigmaLuma = denoise->info.sharpenMinSigmaLuma + denoise->info.sharpenLuma * 2.0f; denoise->info.redCorrection = 1.0f; denoise->info.blueCorrection = 1.0f; denoiseImage(&denoise->info); g_object_unref(tmp); return response; } rawstudio-2.0/plugins/input-file/0000755000175000017500000000000011547430074014137 500000000000000rawstudio-2.0/plugins/input-file/Makefile.am0000644000175000017500000000073611526533643016124 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = input_file.la libdir = $(datadir)/rawstudio/plugins/ input_file_la_LIBADD = @PACKAGE_LIBS@ input_file_la_LDFLAGS = -module -avoid-version input_file_la_SOURCES = input-file.c rawstudio-2.0/plugins/input-file/input-file.c0000644000175000017500000001231311526533643016302 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #define RS_TYPE_INPUT_FILE (rs_input_file_type) #define RS_INPUT_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_INPUT_FILE, RSInputFile)) #define RS_INPUT_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_INPUT_FILE, RSInputFileClass)) #define RS_IS_INPUT_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_INPUT_FILE)) typedef struct _RSInputFile RSInputFile; typedef struct _RSInputFileClass RSInputFileClass; struct _RSInputFile { RSFilter parent; gchar *filename; RS_IMAGE16 *image; RSColorSpace *colorspace; }; struct _RSInputFileClass { RSFilterClass parent_class; }; RS_DEFINE_FILTER(rs_input_file, RSInputFile) enum { PROP_0, PROP_FILENAME, PROP_COLOR_SPACE }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static RSFilterResponse *get_image(RSFilter *filter, const RSFilterRequest *request); static RSFilterResponse *get_size(RSFilter *filter, const RSFilterRequest *request); static RSFilterClass *rs_input_file_parent_class = NULL; G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_input_file_get_type(G_TYPE_MODULE(plugin)); } static void rs_input_file_class_init (RSInputFileClass *klass) { RSFilterClass *filter_class = RS_FILTER_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); rs_input_file_parent_class = g_type_class_peek_parent (klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_FILENAME, g_param_spec_string ( "filename", "Filename", "The filename of the file to open", NULL, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_COLOR_SPACE, g_param_spec_object( "color-space", "color-space", "A colorspace to assign input", RS_TYPE_COLOR_SPACE, G_PARAM_READWRITE)); filter_class->name = "File loader based on rs_filetypes"; filter_class->get_image = get_image; filter_class->get_size = get_size; } static void rs_input_file_init (RSInputFile *filter) { filter->filename = NULL; filter->image = NULL; } static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSInputFile *input = RS_INPUT_FILE(object); switch (property_id) { case PROP_FILENAME: g_value_get_string (value); break; case PROP_COLOR_SPACE: g_value_set_object(value, input->colorspace); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSInputFile *input = RS_INPUT_FILE(object); switch (property_id) { case PROP_FILENAME: g_free (input->filename); input->filename = g_value_dup_string (value); if (input->image) g_object_unref(input->image); input->image = NULL; RSFilterResponse *response = rs_filetype_load(input->filename); if (response && RS_IS_FILTER_RESPONSE(response)) { if (rs_filter_response_has_image(response)) input->image = rs_filter_response_get_image(response); g_object_unref(response); rs_filter_changed(RS_FILTER(input), RS_FILTER_CHANGED_DIMENSION); } break; case PROP_COLOR_SPACE: if (input->colorspace) g_object_unref(input->colorspace); input->colorspace = g_object_ref(g_value_get_object(value)); rs_filter_changed(RS_FILTER(input), RS_FILTER_CHANGED_PIXELDATA); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static RSFilterResponse * get_image(RSFilter *filter, const RSFilterRequest *request) { RSFilterResponse *response = rs_filter_response_new(); RSInputFile *input = RS_INPUT_FILE(filter); if (RS_IS_COLOR_SPACE(input->colorspace)) rs_filter_param_set_object(RS_FILTER_PARAM(response), "colorspace", input->colorspace); if (input->image) { rs_filter_response_set_image(response, input->image); g_object_unref(input->image); } return response; } static RSFilterResponse * get_size(RSFilter *filter, const RSFilterRequest *request) { RSFilterResponse *response = rs_filter_response_new(); RSInputFile *input = RS_INPUT_FILE(filter); if (input->image) { rs_filter_response_set_width(response, input->image->w); rs_filter_response_set_height(response, input->image->h); } return response; } rawstudio-2.0/plugins/input-file/Makefile.in0000644000175000017500000004214011547430036016123 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/input-file DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) input_file_la_DEPENDENCIES = am_input_file_la_OBJECTS = input-file.lo input_file_la_OBJECTS = $(am_input_file_la_OBJECTS) input_file_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(input_file_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(input_file_la_SOURCES) DIST_SOURCES = $(input_file_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = input_file.la input_file_la_LIBADD = @PACKAGE_LIBS@ input_file_la_LDFLAGS = -module -avoid-version input_file_la_SOURCES = input-file.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/input-file/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/input-file/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done input_file.la: $(input_file_la_OBJECTS) $(input_file_la_DEPENDENCIES) $(input_file_la_LINK) -rpath $(libdir) $(input_file_la_OBJECTS) $(input_file_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input-file.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/output-jpegfile/0000755000175000017500000000000011547430076015210 500000000000000rawstudio-2.0/plugins/output-jpegfile/Makefile.am0000644000175000017500000000076611526533642017175 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = output_jpegfile.la libdir = $(datadir)/rawstudio/plugins/ output_jpegfile_la_LIBADD = @PACKAGE_LIBS@ output_jpegfile_la_LDFLAGS = -module -avoid-version output_jpegfile_la_SOURCES = output-jpegfile.c rawstudio-2.0/plugins/output-jpegfile/Makefile.in0000644000175000017500000004233011547430040017166 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/output-jpegfile DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) output_jpegfile_la_DEPENDENCIES = am_output_jpegfile_la_OBJECTS = output-jpegfile.lo output_jpegfile_la_OBJECTS = $(am_output_jpegfile_la_OBJECTS) output_jpegfile_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(output_jpegfile_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(output_jpegfile_la_SOURCES) DIST_SOURCES = $(output_jpegfile_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = output_jpegfile.la output_jpegfile_la_LIBADD = @PACKAGE_LIBS@ output_jpegfile_la_LDFLAGS = -module -avoid-version output_jpegfile_la_SOURCES = output-jpegfile.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/output-jpegfile/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/output-jpegfile/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done output_jpegfile.la: $(output_jpegfile_la_OBJECTS) $(output_jpegfile_la_DEPENDENCIES) $(output_jpegfile_la_LINK) -rpath $(libdir) $(output_jpegfile_la_OBJECTS) $(output_jpegfile_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output-jpegfile.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/output-jpegfile/output-jpegfile.c0000644000175000017500000002136611543243410020415 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #ifdef WIN32 #define HAVE_BOOLEAN #define _BASETSD_H_ #endif #include #include #include "config.h" /* stat() */ #include #include #include /* open() */ #include #define RS_TYPE_JPEGFILE (rs_jpegfile_type) #define RS_JPEGFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_JPEGFILE, RSJpegfile)) #define RS_JPEGFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_JPEGFILE, RSJpegfileClass)) #define RS_IS_JPEGFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_JPEGFILE)) typedef struct _RSJpegfile RSJpegfile; typedef struct _RSJpegfileClass RSJpegfileClass; struct _RSJpegfile { RSOutput parent; gchar *filename; gint quality; RSColorSpace *color_space; gboolean copy_metadata; }; struct _RSJpegfileClass { RSOutputClass parent_class; }; RS_DEFINE_OUTPUT(rs_jpegfile, RSJpegfile) enum { PROP_0, PROP_FILENAME, PROP_QUALITY, PROP_METADATA, PROP_COLORSPACE }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static gboolean execute(RSOutput *output, RSFilter *filter); G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_jpegfile_get_type(G_TYPE_MODULE(plugin)); } static void rs_jpegfile_class_init(RSJpegfileClass *klass) { RSOutputClass *output_class = RS_OUTPUT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_FILENAME, g_param_spec_string( "filename", "filename", _("Full export path"), NULL, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_QUALITY, g_param_spec_int( "quality", "JPEG Quality", _("JPEG Quality"), 10, 100, 90, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_COLORSPACE, g_param_spec_object( "colorspace", "Output colorspace", _("Color space used for saving"), RS_TYPE_COLOR_SPACE, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_METADATA, g_param_spec_boolean( "copy-metadata", "Copy Metadata", _("Copy EXIF metadata"), TRUE, G_PARAM_READWRITE) ); output_class->execute = execute; output_class->extension = "jpg"; output_class->display_name = _("JPEG (Joint Photographic Experts Group)"); } static void rs_jpegfile_init(RSJpegfile *jpegfile) { jpegfile->filename = NULL; jpegfile->quality = 90; jpegfile->color_space = rs_color_space_new_singleton("RSSrgb"); jpegfile->copy_metadata = TRUE; } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSJpegfile *jpegfile = RS_JPEGFILE(object); switch (property_id) { case PROP_FILENAME: g_value_set_string(value, jpegfile->filename); break; case PROP_QUALITY: g_value_set_int(value, jpegfile->quality); break; case PROP_COLORSPACE: g_value_set_object(value, jpegfile->color_space); break; case PROP_METADATA: g_value_set_boolean(value, jpegfile->copy_metadata); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSJpegfile *jpegfile = RS_JPEGFILE(object); switch (property_id) { case PROP_FILENAME: jpegfile->filename = g_value_dup_string(value); break; case PROP_QUALITY: jpegfile->quality = g_value_get_int(value); break; case PROP_COLORSPACE: if (jpegfile->color_space) g_object_unref(jpegfile->color_space); jpegfile->color_space = g_value_get_object(value); break; case PROP_METADATA: jpegfile->copy_metadata = g_value_get_boolean(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } /* This following function is an almost verbatim copy from little cms. Thanks Marti, you rock! */ #define ICC_MARKER (JPEG_APP0 + 2) /* JPEG marker code for ICC */ #define ICC_OVERHEAD_LEN 14 /* size of non-profile data in APP2 */ #define MAX_BYTES_IN_MARKER 65533 /* maximum data len of a JPEG marker */ #define MAX_DATA_BYTES_IN_MARKER (MAX_BYTES_IN_MARKER - ICC_OVERHEAD_LEN) #define ICC_MARKER_IDENT "ICC_PROFILE" static void rs_jpeg_write_icc_profile(j_compress_ptr cinfo, const JOCTET *icc_data_ptr, guint icc_data_len); static void rs_jpeg_write_icc_profile(j_compress_ptr cinfo, const JOCTET *icc_data_ptr, guint icc_data_len) { gchar *ident = ICC_MARKER_IDENT; guint num_markers; /* total number of markers we'll write */ gint cur_marker = 1; /* per spec, counting starts at 1 */ guint length; /* number of bytes to write in this marker */ num_markers = icc_data_len / MAX_DATA_BYTES_IN_MARKER; if (num_markers * MAX_DATA_BYTES_IN_MARKER != icc_data_len) num_markers++; while (icc_data_len > 0) { length = icc_data_len; if (length > MAX_DATA_BYTES_IN_MARKER) length = MAX_DATA_BYTES_IN_MARKER; icc_data_len -= length; jpeg_write_m_header(cinfo, ICC_MARKER, (guint) (length + ICC_OVERHEAD_LEN)); do { jpeg_write_m_byte(cinfo, *ident); } while(*ident++); jpeg_write_m_byte(cinfo, cur_marker); jpeg_write_m_byte(cinfo, (gint) num_markers); while (length--) { jpeg_write_m_byte(cinfo, *icc_data_ptr); icc_data_ptr++; } cur_marker++; } return; } static gboolean execute(RSOutput *output, RSFilter *filter) { RSJpegfile *jpegfile = RS_JPEGFILE(output); struct jpeg_compress_struct cinfo; struct jpeg_error_mgr jerr; FILE * outfile; JSAMPROW row_pointer[1]; gint x,y; RSFilterRequest *request = rs_filter_request_new(); rs_filter_request_set_quick(RS_FILTER_REQUEST(request), FALSE); rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", jpegfile->color_space); RSFilterResponse *response = rs_filter_get_image8(filter, request); g_object_unref(request); GdkPixbuf *pixbuf = rs_filter_response_get_image8(response); g_object_unref(response); cinfo.err = jpeg_std_error(&jerr); jpeg_create_compress(&cinfo); if ((outfile = fopen(jpegfile->filename, "wb")) == NULL) return(FALSE); jpeg_stdio_dest(&cinfo, outfile); cinfo.image_width = gdk_pixbuf_get_width(pixbuf); cinfo.image_height = gdk_pixbuf_get_height(pixbuf); cinfo.input_components = 3; cinfo.in_color_space = JCS_RGB; jpeg_set_defaults(&cinfo); jpeg_set_quality(&cinfo, jpegfile->quality, TRUE); rs_io_lock(); jpeg_start_compress(&cinfo, TRUE); if (jpegfile->color_space && !g_str_equal(G_OBJECT_TYPE_NAME(jpegfile->color_space), "RSSrgb")) { const RSIccProfile *profile = rs_color_space_get_icc_profile(jpegfile->color_space, FALSE); if (profile) { gchar *data; gsize data_length; rs_icc_profile_get_data(profile, &data, &data_length); rs_jpeg_write_icc_profile(&cinfo, (guchar *) data, data_length); g_free(data); } } if (gdk_pixbuf_get_n_channels(pixbuf) == 4) { GdkPixbuf *out = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, cinfo.image_width, cinfo.image_height); for( y = 0; y < cinfo.image_height; y++){ gint* in = (gint*)GET_PIXBUF_PIXEL(pixbuf, 0, y); guchar* o = GET_PIXBUF_PIXEL(out, 0, y); for( x = 0; x < cinfo.image_width ; x++) { guint i = *in++; o[0] = i&0xff; o[1] = (i>>8)&0xff; o[2] = (i>>16)&0xff; o+=3; } } g_object_unref(pixbuf); pixbuf = out; } while (cinfo.next_scanline < cinfo.image_height) { row_pointer[0] = GET_PIXBUF_PIXEL(pixbuf, 0, cinfo.next_scanline); if (jpeg_write_scanlines(&cinfo, row_pointer, 1) != 1) break; } jpeg_finish_compress(&cinfo); fclose(outfile); jpeg_destroy_compress(&cinfo); g_object_unref(pixbuf); gchar *input_filename = NULL; rs_filter_get_recursive(filter, "filename", &input_filename, NULL); if (jpegfile->copy_metadata) rs_exif_copy(input_filename, jpegfile->filename, G_OBJECT_TYPE_NAME(jpegfile->color_space), RS_EXIF_FILE_TYPE_JPEG); rs_io_unlock(); g_free(input_filename); return(TRUE); } rawstudio-2.0/plugins/output-flickr/0000755000175000017500000000000011547430076014675 500000000000000rawstudio-2.0/plugins/output-flickr/Makefile.am0000644000175000017500000000107511526533643016655 00000000000000plugindir = $(libdir) AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = output_flickr.la libdir = $(datadir)/rawstudio/plugins/ output_flickr_la_LIBADD = @PACKAGE_LIBS@ output_flickr_la_LDFLAGS = -module -avoid-version -L/usr/lib -lflickcurl output_flickr_la_SOURCES = output-flickr.c output-flickr.h plugin_DATA = flickr-logo.svg EXTRA_DIST = $(plugin_DATA)rawstudio-2.0/plugins/output-flickr/output-flickr.h0000644000175000017500000000171111526533643017577 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ #define FLICKR_API_KEY "0ef831c5ac838c533b300572fa72e58e" #define FLICKR_SECRET_KEY "ca0bb543187a30d1" rawstudio-2.0/plugins/output-flickr/flickr-logo.svg0000644000175000017500000000677611526533643017567 00000000000000 image/svg+xml rawstudio-2.0/plugins/output-flickr/Makefile.in0000644000175000017500000004425011547430040016656 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/output-flickr DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(plugindir)" LTLIBRARIES = $(lib_LTLIBRARIES) output_flickr_la_DEPENDENCIES = am_output_flickr_la_OBJECTS = output-flickr.lo output_flickr_la_OBJECTS = $(am_output_flickr_la_OBJECTS) output_flickr_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(output_flickr_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(output_flickr_la_SOURCES) DIST_SOURCES = $(output_flickr_la_SOURCES) DATA = $(plugin_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir) AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = output_flickr.la output_flickr_la_LIBADD = @PACKAGE_LIBS@ output_flickr_la_LDFLAGS = -module -avoid-version -L/usr/lib -lflickcurl output_flickr_la_SOURCES = output-flickr.c output-flickr.h plugin_DATA = flickr-logo.svg EXTRA_DIST = $(plugin_DATA) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/output-flickr/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/output-flickr/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done output_flickr.la: $(output_flickr_la_OBJECTS) $(output_flickr_la_DEPENDENCIES) $(output_flickr_la_LINK) -rpath $(libdir) $(output_flickr_la_OBJECTS) $(output_flickr_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output-flickr.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pluginDATA: $(plugin_DATA) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" @list='$(plugin_DATA)'; test -n "$(plugindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(plugindir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(plugindir)" || exit $$?; \ done uninstall-pluginDATA: @$(NORMAL_UNINSTALL) @list='$(plugin_DATA)'; test -n "$(plugindir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(plugindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(plugindir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(plugindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pluginDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-pluginDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pluginDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES \ uninstall-pluginDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/output-flickr/output-flickr.c0000644000175000017500000003674211541464366017610 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Output plugin tmpl version 1 */ /* TODO: - move rs_conf_* to librawstudio - this needs RS_FILETYPE from application.h. Should/can we move this to rs-filetypes.h? - decide if rawstudio can be dependent on libflickcurl. Will this plugin be build on dependency satisfiction or --with-output-flickr option. */ #include #include #include "config.h" #include "output-flickr.h" #include #include #include /* Ugly HACK - conf_interface.c|h needs to be ported to librawstudio */ gchar *rs_conf_get_string (const gchar * name); gboolean rs_conf_set_string (const gchar * name, const gchar * value); #define RS_TYPE_FLICKR (rs_flickr_type) #define RS_FLICKR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_FLICKR, RSFlickr)) #define RS_FLICKR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_FLICKR, RSFlickrClass)) #define RS_IS_FLICKR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_FLICKR)) typedef struct _RSFlickr RSFlickr; typedef struct _RSFlickrClass RSFlickrClass; struct _RSFlickr { RSOutput parent; gint quality; gchar *title; gchar *description; gchar *tags; gboolean is_public; gboolean is_friend; gboolean is_family; gint safety_level; gint content_type; }; struct _RSFlickrClass { RSOutputClass parent_class; }; RS_DEFINE_OUTPUT (rs_flickr, RSFlickr) enum { PROP_0, PROP_LOGO, PROP_JPEG_QUALITY, PROP_FILENAME, /* Required for a output plugin - not in use */ PROP_TITLE, PROP_DESCRIPTION, PROP_TAGS, PROP_IS_PUBLIC, PROP_IS_FRIEND, PROP_IS_FAMILY }; static void get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); static gboolean execute (RSOutput * output, RSFilter * filter); static GtkWidget * get_logo_widget(RSFlickr *flickr); G_MODULE_EXPORT void rs_plugin_load (RSPlugin * plugin) { rs_flickr_get_type (G_TYPE_MODULE (plugin)); } static void rs_flickr_class_init (RSFlickrClass * klass) { RSOutputClass *output_class = RS_OUTPUT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property (object_class, PROP_JPEG_QUALITY, g_param_spec_int ("quality", "JPEG Quality", _("JPEG Quality"), 10, 100, 90, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_TITLE, g_param_spec_string ("title", "title", _("Title"), NULL, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_DESCRIPTION, g_param_spec_string ("description", "description", _("Description"), NULL, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_TAGS, g_param_spec_string ("tags", "tags", _("Tags"), NULL, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_IS_PUBLIC, g_param_spec_boolean ("public", "public", _("Public (everyone can see this)"), FALSE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_IS_FRIEND, g_param_spec_boolean ("friend", "friend", _("Visible to Friends"), FALSE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_IS_PUBLIC, g_param_spec_boolean ("family", "family", _("Visible to Family"), FALSE, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_LOGO, g_param_spec_object ("Logo", "logo", "Logo", GTK_TYPE_WIDGET, G_PARAM_READABLE)); output_class->execute = execute; output_class->display_name = _("Upload photo to Flickr"); } static void rs_flickr_init (RSFlickr * flickr) { flickr->quality = 90; } static void get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { RSFlickr *flickr = RS_FLICKR (object); switch (property_id) { case PROP_JPEG_QUALITY: g_value_set_int (value, flickr->quality); break; case PROP_TITLE: g_value_set_string (value, flickr->title); break; case PROP_DESCRIPTION: g_value_set_string (value, flickr->description); break; case PROP_TAGS: g_value_set_string (value, flickr->tags); break; case PROP_IS_PUBLIC: g_value_set_boolean (value, flickr->is_public); break; case PROP_IS_FRIEND: g_value_set_boolean (value, flickr->is_friend); break; case PROP_IS_FAMILY: g_value_set_boolean (value, flickr->is_family); break; case PROP_LOGO: g_value_set_object(value, get_logo_widget(flickr)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { RSFlickr *flickr = RS_FLICKR (object); switch (property_id) { case PROP_JPEG_QUALITY: flickr->quality = g_value_get_int (value); break; case PROP_TITLE: flickr->title = g_value_dup_string (value); break; case PROP_DESCRIPTION: flickr->description = g_value_dup_string (value); break; case PROP_TAGS: flickr->tags = g_value_dup_string (value); break; case PROP_IS_PUBLIC: flickr->is_public = g_value_get_boolean (value); break; case PROP_IS_FRIEND: flickr->is_friend = g_value_get_boolean (value); break; case PROP_IS_FAMILY: flickr->is_family = g_value_get_boolean (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } GtkWidget * gui_dialog_make_from_widget (const gchar * stock_id, gchar * primary_text, GtkWidget * widget) { GtkWidget *dialog, *image, *hhbox, *vvbox; GtkWidget *primary_label; gchar *str; image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_DIALOG); gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); dialog = gtk_dialog_new (); gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); gtk_window_set_title (GTK_WINDOW (dialog), ""); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); primary_label = gtk_label_new (NULL); gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE); gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE); gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5); gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE); str = g_strconcat ("", primary_text, "", NULL); gtk_label_set_markup (GTK_LABEL (primary_label), str); g_free (str); hhbox = gtk_hbox_new (FALSE, 12); gtk_container_set_border_width (GTK_CONTAINER (hhbox), 5); gtk_box_pack_start (GTK_BOX (hhbox), image, FALSE, FALSE, 0); vvbox = gtk_vbox_new (FALSE, 12); gtk_box_pack_start (GTK_BOX (hhbox), vvbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vvbox), primary_label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vvbox), widget, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hhbox, FALSE, FALSE, 0); return (dialog); } GtkWidget * gui_dialog_make_from_text (const gchar * stock_id, gchar * primary_text, gchar * secondary_text) { GtkWidget *secondary_label; secondary_label = gtk_label_new (NULL); gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE); gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE); gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5); gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE); gtk_label_set_markup (GTK_LABEL (secondary_label), secondary_text); return (gui_dialog_make_from_widget(stock_id, primary_text, secondary_label)); } void flickcurl_print_error (void *user_data, const char *temp) { gchar *message = NULL; /* Errors not catched yet - probably due to lack of knowledge about what causes it Call failed with error 99 - Insufficient permissions. Method requires write privileges; none granted. */ /* DEBUG */ g_debug ("flickcurl: %s\n", temp); /* Catch errors and show our own and more userfriendly errors */ if (g_ascii_strcasecmp(temp,"Method flickr.auth.getToken failed with error 108 - Invalid frob") == 0) message = g_strdup(_("We recieved an error during authentication. Please try again.")); else if (g_ascii_strcasecmp(temp, "Call failed with error 98 - Invalid auth token") == 0) message = g_strdup(_("Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr.")); else if (g_ascii_strcasecmp(temp,"Method flickr.test.login failed with error 98 - Invalid auth token")) message = g_strdup(_("It seems like rawstudio lost its authentication to upload to your account, please re-authenticate.")); /* Everything else will be shown along with a note */ else message = g_strdup_printf(_("%s\n\nNote: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!"), (gchar *) temp); GtkWidget *dialog = gui_dialog_make_from_text (GTK_STOCK_DIALOG_ERROR, g_strdup (_("Flickr error")), message); gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_OK, GTK_RESPONSE_OK); gdk_threads_enter (); gtk_widget_show_all (dialog); gtk_dialog_run (GTK_DIALOG (dialog)); gdk_threads_leave (); gtk_widget_destroy (dialog); } static gboolean execute (RSOutput * output, RSFilter * filter) { RSFlickr *flickr = RS_FLICKR (output); flickcurl *fc; flickcurl_init (); /* optional static initialising of resources */ fc = flickcurl_new (); flickcurl_set_error_handler (fc, flickcurl_print_error, NULL); /* Set configuration, or more likely read from a config file */ flickcurl_set_api_key (fc, FLICKR_API_KEY); flickcurl_set_shared_secret (fc, FLICKR_SECRET_KEY); gchar *flickr_user_token = rs_conf_get_string ("flickr_user_token"); gchar *flickr_user_name = NULL; if (flickr_user_token) { flickcurl_set_auth_token (fc, flickr_user_token); flickr_user_name = flickcurl_test_login (fc); /* We need to reset all flickcurl */ flickcurl_free (fc); fc = flickcurl_new (); flickcurl_set_error_handler (fc, flickcurl_print_error, NULL); /* Set configuration, or more likely read from a config file */ flickcurl_set_api_key (fc, FLICKR_API_KEY); flickcurl_set_shared_secret (fc, FLICKR_SECRET_KEY); } if (!flickr_user_name) { char *frob = g_strdup (flickcurl_auth_getFrob (fc)); // FIXME: Returns NULL on failure char *sign = g_strdup_printf ("%sapi_key%sfrob%spermswrite", FLICKR_SECRET_KEY, FLICKR_API_KEY, frob); char *sign_md5 = g_compute_checksum_for_string (G_CHECKSUM_MD5, sign, strlen (sign)); char *auth_url = g_strdup_printf("http://flickr.com/services/auth/?api_key=%s&perms=write&frob=%s&api_sig=%s", FLICKR_API_KEY, frob, sign_md5); gdk_threads_enter (); GtkWidget *flickr_auth_dialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (flickr_auth_dialog), "Rawstudio"); gtk_container_set_border_width (GTK_CONTAINER (flickr_auth_dialog), 4); gtk_dialog_set_has_separator (GTK_DIALOG (flickr_auth_dialog), FALSE); GtkWidget *vbox = GTK_DIALOG (flickr_auth_dialog)->vbox; GtkWidget *textlabel = gtk_label_new(_("Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account.")); gtk_label_set_line_wrap (GTK_LABEL (textlabel), TRUE); gtk_box_pack_start (GTK_BOX (vbox), textlabel, TRUE, TRUE, 4); GtkWidget *table = gtk_table_new (2, 2, FALSE); GtkWidget *step1label = gtk_label_new (_("Step 1:")); GtkWidget *step2label = gtk_label_new (_("Step 2:")); GtkWidget *link = gtk_link_button_new_with_label (auth_url, _("Authenticate Rawstudio")); GtkWidget *hbox = gtk_hbox_new (FALSE, 4); GtkWidget *cancelbutton = gtk_button_new_from_stock (GTK_STOCK_CANCEL); GtkWidget *acceptbutton = gtk_button_new_from_stock (GTK_STOCK_GO_FORWARD); gtk_box_pack_start (GTK_BOX (hbox), cancelbutton, TRUE, TRUE, 4); gtk_box_pack_start (GTK_BOX (hbox), acceptbutton, TRUE, TRUE, 4); gtk_dialog_add_action_widget (GTK_DIALOG (flickr_auth_dialog), cancelbutton, GTK_RESPONSE_CANCEL); gtk_dialog_add_action_widget (GTK_DIALOG (flickr_auth_dialog), acceptbutton, GTK_RESPONSE_ACCEPT); gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 4); gtk_table_attach_defaults (GTK_TABLE (table), step1label, 0, 1, 0, 1); gtk_table_attach_defaults (GTK_TABLE (table), step2label, 0, 1, 1, 2); gtk_table_attach_defaults (GTK_TABLE (table), link, 1, 2, 0, 1); gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 1, 2); gtk_widget_show_all (flickr_auth_dialog); gint response = gtk_dialog_run (GTK_DIALOG (flickr_auth_dialog)); gtk_widget_destroy (flickr_auth_dialog); gdk_threads_leave (); if (response == GTK_RESPONSE_ACCEPT) { gchar *token = g_strdup (flickcurl_auth_getToken (fc, frob)); if (token) { rs_conf_set_string ("flickr_user_token", token); flickr_user_token = token; } else { return FALSE; } } else { return FALSE; } } RSOutput *jpegsave = rs_output_new ("RSJpegfile"); gchar *temp_file = g_strdup_printf ("%s%s.rawstudio-tmp-%d.jpg", g_get_tmp_dir (), G_DIR_SEPARATOR_S, (gint) (g_random_double () * 10000.0)); g_object_set (jpegsave, "filename", temp_file, "quality", flickr->quality, NULL); rs_output_execute (jpegsave, filter); g_object_unref (jpegsave); flickcurl_upload_params *upload_params = malloc (sizeof (flickcurl_upload_params)); flickcurl_set_auth_token (fc, flickr_user_token); upload_params->photo_file = temp_file; upload_params->title = flickr->title; upload_params->description = flickr->description; upload_params->tags = flickr->tags; upload_params->is_public = flickr->is_public; upload_params->is_friend = flickr->is_friend; upload_params->is_family = flickr->is_family; upload_params->safety_level = 0; /* FIXME: we leave this hardcoded at the moment */ upload_params->content_type = 0; /* FIXME: same as above */ /* Perform upload */ flickcurl_photos_upload_params (fc, upload_params); unlink (temp_file); g_free (temp_file); flickcurl_free (fc); flickcurl_finish (); /* optional static free of resources */ return TRUE; } static GtkWidget * get_logo_widget(RSFlickr *flickr) { gchar *filename = g_build_filename(PACKAGE_DATA_DIR, PACKAGE, G_DIR_SEPARATOR_S "plugins" G_DIR_SEPARATOR_S "flickr-logo.svg", NULL); GtkWidget *box = gtk_vbox_new(TRUE, 2); GtkWidget *logo = gtk_image_new_from_file(filename); g_free(filename); gtk_box_pack_start (GTK_BOX (box), logo, FALSE, FALSE, 2); return box; } rawstudio-2.0/plugins/meta-mrw/0000755000175000017500000000000011547430075013615 500000000000000rawstudio-2.0/plugins/meta-mrw/Makefile.am0000644000175000017500000000072411526533643015576 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = meta_mrw.la libdir = $(datadir)/rawstudio/plugins/ meta_mrw_la_LIBADD = @PACKAGE_LIBS@ meta_mrw_la_LDFLAGS = -module -avoid-version meta_mrw_la_SOURCES = mrw-meta.c rawstudio-2.0/plugins/meta-mrw/mrw-meta.c0000644000175000017500000000763711531305647015446 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include static void raw_mrw_walker(RAWFILE *rawfile, guint offset, RSMetadata *meta); static void raw_mrw_walker(RAWFILE *rawfile, guint offset, RSMetadata *meta) { guint rawstart=0; guint tag=0, len=0; gushort ushort_temp1=0; meta->make = MAKE_MINOLTA; raw_get_uint(rawfile, offset+4, &rawstart); rawstart += 8; offset += 8; while(offset < rawstart) { raw_get_uint(rawfile, offset, &tag); raw_get_uint(rawfile, offset+4, &len); offset += 8; switch (tag) { case 0x00545457: /* TTW */ rs_filetype_meta_load(".tiff", meta, rawfile, offset); raw_reset_base(rawfile); break; case 0x00574247: /* WBG */ /* rggb format */ raw_get_ushort(rawfile, offset+4, &ushort_temp1); meta->cam_mul[0] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, offset+6, &ushort_temp1); meta->cam_mul[1] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, offset+8, &ushort_temp1); meta->cam_mul[3] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, offset+10, &ushort_temp1); meta->cam_mul[2] = (gdouble) ushort_temp1; rs_metadata_normalize_wb(meta); break; } offset += (len); } return; } static gboolean mrw_load_meta(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta) { GdkPixbuf *pixbuf=NULL, *pixbuf2=NULL; guint start=0, length=0; raw_mrw_walker(rawfile, offset, meta); if ((meta->thumbnail_start>0) && (meta->thumbnail_length>0)) { start = meta->thumbnail_start; length = meta->thumbnail_length; } else if ((meta->preview_start>0) && (meta->preview_length>0)) { start = meta->preview_start; length = meta->preview_length; } if ((start>0) && (length>0)) { guchar *thumbbuffer; gdouble ratio; GdkPixbufLoader *pl; start++; /* stupid! */ length--; thumbbuffer = g_malloc(length+1); thumbbuffer[0] = '\xff'; raw_strcpy(rawfile, start, thumbbuffer+1, length); pl = gdk_pixbuf_loader_new(); gdk_pixbuf_loader_write(pl, thumbbuffer, length+1, NULL); pixbuf = gdk_pixbuf_loader_get_pixbuf(pl); gdk_pixbuf_loader_close(pl, NULL); g_free(thumbbuffer); if (pixbuf==NULL) return TRUE; ratio = ((gdouble) gdk_pixbuf_get_width(pixbuf))/((gdouble) gdk_pixbuf_get_height(pixbuf)); if (ratio>1.0) pixbuf2 = gdk_pixbuf_scale_simple(pixbuf, 128, (gint) (128.0/ratio), GDK_INTERP_BILINEAR); else pixbuf2 = gdk_pixbuf_scale_simple(pixbuf, (gint) (128.0*ratio), 128, GDK_INTERP_BILINEAR); g_object_unref(pixbuf); pixbuf = pixbuf2; switch (meta->orientation) { /* this is very COUNTER-intuitive - gdk_pixbuf_rotate_simple() is wierd */ case 90: pixbuf2 = gdk_pixbuf_rotate_simple(pixbuf, GDK_PIXBUF_ROTATE_CLOCKWISE); g_object_unref(pixbuf); pixbuf = pixbuf2; break; case 270: pixbuf2 = gdk_pixbuf_rotate_simple(pixbuf, GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE); g_object_unref(pixbuf); pixbuf = pixbuf2; break; } meta->thumbnail = pixbuf; } return TRUE; } G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_filetype_register_meta_loader(".mrw", "Minolta raw", mrw_load_meta, 10, RS_LOADER_FLAGS_RAW); } rawstudio-2.0/plugins/meta-mrw/Makefile.in0000644000175000017500000004206011547430040015574 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/meta-mrw DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) meta_mrw_la_DEPENDENCIES = am_meta_mrw_la_OBJECTS = mrw-meta.lo meta_mrw_la_OBJECTS = $(am_meta_mrw_la_OBJECTS) meta_mrw_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(meta_mrw_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(meta_mrw_la_SOURCES) DIST_SOURCES = $(meta_mrw_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = meta_mrw.la meta_mrw_la_LIBADD = @PACKAGE_LIBS@ meta_mrw_la_LDFLAGS = -module -avoid-version meta_mrw_la_SOURCES = mrw-meta.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/meta-mrw/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/meta-mrw/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done meta_mrw.la: $(meta_mrw_la_OBJECTS) $(meta_mrw_la_DEPENDENCIES) $(meta_mrw_la_LINK) -rpath $(libdir) $(meta_mrw_la_OBJECTS) $(meta_mrw_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mrw-meta.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/demosaic/0000755000175000017500000000000011547430074013647 500000000000000rawstudio-2.0/plugins/demosaic/Makefile.am0000644000175000017500000000072311526533642015627 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = demosaic.la libdir = $(datadir)/rawstudio/plugins/ demosaic_la_LIBADD = @PACKAGE_LIBS@ demosaic_la_LDFLAGS = -module -avoid-version demosaic_la_SOURCES = demosaic.c rawstudio-2.0/plugins/demosaic/demosaic.c0000644000175000017500000005166511526533642015536 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 4 */ #include #include #define RS_TYPE_DEMOSAIC (rs_demosaic_type) #define RS_DEMOSAIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_DEMOSAIC, RSDemosaic)) #define RS_DEMOSAIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_DEMOSAIC, RSDemosaicClass)) #define RS_IS_DEMOSAIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_DEMOSAIC)) typedef struct { gint start_y; gint end_y; RS_IMAGE16 *image; RS_IMAGE16 *output; guint filters; GThread *threadid; } ThreadInfo; typedef enum { RS_DEMOSAIC_NONE, RS_DEMOSAIC_BILINEAR, RS_DEMOSAIC_PPG, RS_DEMOSAIC_MAX, RS_DEMOSAIC_NONE_HALF } RS_DEMOSAIC; const static gchar *rs_demosaic_ascii[RS_DEMOSAIC_MAX] = { "none", "bilinear", "pixel-grouping" }; typedef struct _RSDemosaic RSDemosaic; typedef struct _RSDemosaicClass RSDemosaicClass; struct _RSDemosaic { RSFilter parent; RS_DEMOSAIC method; gboolean allow_half; }; struct _RSDemosaicClass { RSFilterClass parent_class; }; RS_DEFINE_FILTER(rs_demosaic, RSDemosaic) enum { PROP_0, PROP_METHOD, PROP_ALLOW_HALF, }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static RSFilterResponse *get_image(RSFilter *filter, const RSFilterRequest *request); static inline int fc_INDI (const unsigned int filters, const int row, const int col); static void border_interpolate_INDI (const ThreadInfo* t, int colors, int border); static void lin_interpolate_INDI(RS_IMAGE16 *image, RS_IMAGE16 *output, const unsigned int filters, const int colors); static void ppg_interpolate_INDI(RS_IMAGE16 *image, RS_IMAGE16 *output, const unsigned int filters, const int colors); static void none_interpolate_INDI(RS_IMAGE16 *in, RS_IMAGE16 *out, const unsigned int filters, const int colors, gboolean half_size); static void hotpixel_detect(const ThreadInfo* t); static void expand_cfa_data(const ThreadInfo* t); static RSFilterClass *rs_demosaic_parent_class = NULL; G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_demosaic_get_type(G_TYPE_MODULE(plugin)); } static void rs_demosaic_class_init(RSDemosaicClass *klass) { RSFilterClass *filter_class = RS_FILTER_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); rs_demosaic_parent_class = g_type_class_peek_parent (klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_METHOD, g_param_spec_string( "method", "demosaic method", "The demosaic algorithm to use (\"bilinear\" or \"pixel-grouping\")", rs_demosaic_ascii[RS_DEMOSAIC_PPG], G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_ALLOW_HALF, g_param_spec_boolean( "demosaic-allow-downscale", "demosaic-allow-downscale", "Allow demosaic to return half size image", FALSE, G_PARAM_READWRITE) ); filter_class->name = "Demosaic filter"; filter_class->get_image = get_image; } static void rs_demosaic_init(RSDemosaic *demosaic) { demosaic->method = RS_DEMOSAIC_PPG; } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSDemosaic *demosaic = RS_DEMOSAIC(object); switch (property_id) { case PROP_METHOD: g_value_set_string(value, rs_demosaic_ascii[demosaic->method]); break; case PROP_ALLOW_HALF: g_value_set_boolean(value, demosaic->allow_half); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { gint i; const gchar *str; RSDemosaic *demosaic = RS_DEMOSAIC(object); switch (property_id) { case PROP_METHOD: str = g_value_get_string(value); for(i=0;imethod = i; } break; case PROP_ALLOW_HALF: demosaic->allow_half = g_value_get_boolean(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } /* In order to inline this calculation, I make the risky assumption that all filter patterns can be described by a repeating pattern of eight rows and two columns Return values are either 0/1/2/3 = G/M/C/Y or 0/1/2/3 = R/G1/B/G2 */ #define FC(row,col) \ (int)(filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3) static RSFilterResponse * get_image(RSFilter *filter, const RSFilterRequest *request) { RSDemosaic *demosaic = RS_DEMOSAIC(filter); RSFilterResponse *previous_response; RSFilterResponse *response; RS_IMAGE16 *input; RS_IMAGE16 *output = NULL; guint filters; RS_DEMOSAIC method; previous_response = rs_filter_get_image(filter->previous, request); input = rs_filter_response_get_image(previous_response); if (!RS_IS_IMAGE16(input)) return previous_response; /* Just pass on output from previous filter if the image is not CFA */ if (input->filters == 0) { g_object_unref(input); return previous_response; } g_assert(input->channels == 1); g_assert(input->filters != 0); response = rs_filter_response_clone(previous_response); g_object_unref(previous_response); gint fuji_width; if (rs_filter_param_get_integer(RS_FILTER_PARAM(response), "fuji-width", &fuji_width) && (fuji_width > 0)) demosaic->allow_half = FALSE; method = demosaic->method; if (rs_filter_request_get_quick(request)) { method = RS_DEMOSAIC_NONE; rs_filter_response_set_quick(response); } /* Magic - Ask Dave ;) */ filters = input->filters; filters &= ~((filters & 0x55555555) << 1); /* Check if pattern is 2x2, otherwise we cannot do "none" demosaic */ if (method == RS_DEMOSAIC_NONE) if (! ( (filters & 0xff ) == ((filters >> 8) & 0xff) && ((filters >> 16) & 0xff) == ((filters >> 24) & 0xff) && (filters & 0xff) == ((filters >> 24) &0xff))) method = RS_DEMOSAIC_PPG; if (method == RS_DEMOSAIC_NONE) { if (demosaic->allow_half) { output = rs_image16_new(input->w/2, input->h/2, 3, 4); rs_filter_param_set_boolean(RS_FILTER_PARAM(response), "half-size", TRUE); method = RS_DEMOSAIC_NONE_HALF; } else { output = rs_image16_new(input->w, input->h, 3, 4); } } else output = rs_image16_new(input->w, input->h, 3, 4); rs_filter_response_set_image(response, output); g_object_unref(output); switch (method) { case RS_DEMOSAIC_BILINEAR: lin_interpolate_INDI(input, output, filters, 3); break; case RS_DEMOSAIC_PPG: ppg_interpolate_INDI(input,output, filters, 3); break; case RS_DEMOSAIC_NONE: none_interpolate_INDI(input, output, filters, 3, FALSE); break; case RS_DEMOSAIC_NONE_HALF: none_interpolate_INDI(input, output, filters, 3, TRUE); break; default: /* Do nothing */ break; } g_object_unref(input); return response; } /* The rest of this file is pretty much copied verbatim from dcraw/ufraw */ #define FORCC for (c=0; c < colors; c++) #define BAYER(row,col) \ image[((row) >> shrink)*iwidth + ((col) >> shrink)][FC(row,col)] static inline int fc_INDI (const unsigned int filters, const int row, const int col) { static const char filter[16][16] = { { 2,1,1,3,2,3,2,0,3,2,3,0,1,2,1,0 }, { 0,3,0,2,0,1,3,1,0,1,1,2,0,3,3,2 }, { 2,3,3,2,3,1,1,3,3,1,2,1,2,0,0,3 }, { 0,1,0,1,0,2,0,2,2,0,3,0,1,3,2,1 }, { 3,1,1,2,0,1,0,2,1,3,1,3,0,1,3,0 }, { 2,0,0,3,3,2,3,1,2,0,2,0,3,2,2,1 }, { 2,3,3,1,2,1,2,1,2,1,1,2,3,0,0,1 }, { 1,0,0,2,3,0,0,3,0,3,0,3,2,1,2,3 }, { 2,3,3,1,1,2,1,0,3,2,3,0,2,3,1,3 }, { 1,0,2,0,3,0,3,2,0,1,1,2,0,1,0,2 }, { 0,1,1,3,3,2,2,1,1,3,3,0,2,1,3,2 }, { 2,3,2,0,0,1,3,0,2,0,1,2,3,0,1,0 }, { 1,3,1,2,3,2,3,2,0,2,0,1,1,0,3,0 }, { 0,2,0,3,1,0,0,1,1,3,3,2,3,2,2,1 }, { 2,1,3,2,3,1,2,1,0,3,0,2,0,2,0,2 }, { 0,3,1,0,0,2,0,3,2,1,3,1,1,3,1,3 } }; if (filters != 1) return FC(row,col); /* Assume that we are handling the Leaf CatchLight with * top_margin = 8; left_margin = 18; */ // return filter[(row+top_margin) & 15][(col+left_margin) & 15]; return filter[(row+8) & 15][(col+18) & 15]; } static void border_interpolate_INDI (const ThreadInfo* t, int colors, int border) { int row, col, y, x, f, c, sum[8]; RS_IMAGE16* image = t->output; guint filters = t->filters; for (row=t->start_y; row < t->end_y; row++) for (col=0; col < image->w; col++) { if (col==border && row >= border && row < image->h-border) col = image->w-border; memset (sum, 0, sizeof sum); for (y=row-1; y != row+2; y++) for (x=col-1; x != col+2; x++) if (y >= 0 && y < image->h && x >= 0 && x < image->w) { f = FC(y, x); sum[f] += GET_PIXEL(image, x, y)[f]; sum[f+4]++; } f = FC(row,col); for (c=0; c < colors; c++) if (c != f && sum[c+4]) image->pixels[row*image->rowstride+col*4+c] = sum[c] / sum[c+4]; } } static void lin_interpolate_INDI(RS_IMAGE16 *input, RS_IMAGE16 *output, const unsigned int filters, const int colors) /*UF*/ { ThreadInfo *t = g_new(ThreadInfo, 1); t->image = input; t->output = output; t->filters = filters; t->start_y = 0; t->end_y = input->w; expand_cfa_data(t); RS_IMAGE16* image = output; int code[16][16][32], *ip, sum[4]; int c, i, x, y, row, col, shift, color; gushort *pix; border_interpolate_INDI(t, colors, 1); for (row=0; row < 16; row++) for (col=0; col < 16; col++) { ip = code[row][col]; memset (sum, 0, sizeof sum); for (y=-1; y <= 1; y++) for (x=-1; x <= 1; x++) { shift = (y==0) + (x==0); if (shift == 2) continue; color = fc_INDI(filters,row+y,col+x); *ip++ = (image->pitch*y + x)*4 + color; *ip++ = shift; *ip++ = color; sum[color] += 1 << shift; } FORCC if (c != fc_INDI(filters,row,col)) { *ip++ = c; *ip++ = 256 / sum[c]; } } for (row=1; row < image->h-1; row++) for (col=1; col < image->w-1; col++) { pix = GET_PIXEL(image, col, row); ip = code[row & 15][col & 15]; memset (sum, 0, sizeof sum); for (i=8; i--; ip+=3) sum[ip[2]] += pix[ip[0]] << ip[1]; for (i=colors; --i; ip+=2) pix[ip[0]] = sum[ip[0]] * ip[1] >> 8; } } static void expand_cfa_data(const ThreadInfo* t) { RS_IMAGE16* input = t->image; RS_IMAGE16* output = t->output; guint filters = t->filters; guint col, row; /* Populate new image with bayer data */ for(row=t->start_y; rowend_y; row++) { gushort* src = GET_PIXEL(input, 0, row); gushort* dest = GET_PIXEL(output, 0, row); for(col=0;colw;col++) { dest[fc_INDI(filters, row, col)] = *src; dest += output->pixelsize; src++; } } } /* Patterned Pixel Grouping Interpolation by Alain Desbiolles */ inline guint clampbits16(gint x) { guint32 _y_temp; if( (_y_temp=x>>16) ) x = ~_y_temp >> 16; return x;} #define CLIP(x) clampbits16(x) #define ULIM(x,y,z) ((y) < (z) ? CLAMP(x,y,z) : CLAMP(x,z,y)) static void interpolate_INDI_part(ThreadInfo *t) { RS_IMAGE16 *image = t->output; const unsigned int filters = t->filters; /* Subtract 3 from top and bottom */ const int start_y = MAX(3, t->start_y); const int end_y = MIN(image->h-3, t->end_y); int row, col, c, d; int diffA, diffB, guessA, guessB; int p = image->pitch; int p3 = p*3; gushort (*pix)[4]; { /* Fill in the green layer with gradients and pattern recognition: */ for (row=start_y; row < end_y; row++) for (col=3+(FC(row,3) & 1), c=FC(row,col); col < image->w-3; col+=2) { pix = (gushort (*)[4])GET_PIXEL(image, col, row); guessA = (pix[-1][1] + pix[0][c] + pix[1][1]) * 2 - pix[-2*1][c] - pix[2*1][c]; diffA = ( ABS(pix[-2*1][c] - pix[ 0][c]) + ABS(pix[ 2*1][c] - pix[ 0][c]) + ABS(pix[ -1][1] - pix[ 1][1]) ) * 3 + ( ABS(pix[ 3*1][1] - pix[ 1][1]) + ABS(pix[-3*1][1] - pix[-1][1]) ) * 2; guessB = (pix[-p][1] + pix[0][c] + pix[p][1]) * 2 - pix[-2*p][c] - pix[2*p][c]; diffB = ( ABS(pix[-2*p][c] - pix[ 0][c]) + ABS(pix[ 2*p][c] - pix[ 0][c]) + ABS(pix[ -p][1] - pix[ p][1]) ) * 3 + ( ABS(pix[ p3][1] - pix[ p][1]) + ABS(pix[-p3][1] - pix[-p][1]) ) * 2; if (diffA > diffB) pix[0][1] = ULIM(guessB >> 2, pix[p][1], pix[-p][1]); else pix[0][1] = ULIM(guessA >> 2, pix[1][1], pix[-1][1]); } /* Calculate red and blue for each green pixel: */ for (row=start_y-2; row < end_y+2; row++) for (col=1+(FC(row,2) & 1), c=FC(row,col+1); col < image->w-1; col+=2) { pix = (gushort (*)[4])GET_PIXEL(image, col, row); pix[0][c] = CLIP((pix[-1][c] + pix[1][c] + 2*pix[0][1] - pix[-1][1] - pix[1][1]) >> 1); c=2-c; pix[0][c] = CLIP((pix[-p][c] + pix[p][c] + 2*pix[0][1] - pix[-p][1] - pix[p][1]) >> 1); c=2-c; } /* Calculate blue for red pixels and vice versa: */ for (row=start_y-2; row < end_y+2; row++) for (col=1+(FC(row,1) & 1), c=2-FC(row,col); col < image->w-1; col+=2) { pix = (gushort (*)[4])GET_PIXEL(image, col, row); d = 1 + p; diffA = ABS(pix[-d][c] - pix[d][c]) + ABS(pix[-d][1] - pix[0][1]) + ABS(pix[ d][1] - pix[0][1]); guessA = pix[-d][c] + pix[d][c] + 2*pix[0][1] - pix[-d][1] - pix[d][1]; d = p - 1; diffB = ABS(pix[-d][c] - pix[d][c]) + ABS(pix[-d][1] - pix[0][1]) + ABS(pix[ d][1] - pix[0][1]); guessB = pix[-d][c] + pix[d][c] + 2*pix[0][1] - pix[-d][1] - pix[d][1]; if (diffA > diffB) pix[0][c] = CLIP(guessB >> 1); else pix[0][c] = CLIP(guessA >> 1); } } } gpointer start_interp_thread(gpointer _thread_info) { ThreadInfo* t = _thread_info; hotpixel_detect(t); expand_cfa_data(t); border_interpolate_INDI (t, 3, 3); interpolate_INDI_part(t); g_thread_exit(NULL); return NULL; /* Make the compiler shut up - we'll never return */ } static void ppg_interpolate_INDI(RS_IMAGE16 *image, RS_IMAGE16 *output, const unsigned int filters, const int colors) { guint i, y_offset, y_per_thread, threaded_h; const guint threads = rs_get_number_of_processor_cores(); ThreadInfo *t = g_new(ThreadInfo, threads); threaded_h = image->h; y_per_thread = (threaded_h + threads-1)/threads; y_offset = 0; for (i = 0; i < threads; i++) { t[i].image = image; t[i].output = output; t[i].filters = filters; t[i].start_y = y_offset; y_offset += y_per_thread; y_offset = MIN(image->h, y_offset); t[i].end_y = y_offset; t[i].threadid = g_thread_create(start_interp_thread, &t[i], TRUE, NULL); } /* Wait for threads to finish */ for(i = 0; i < threads; i++) g_thread_join(t[i].threadid); g_free(t); } gpointer start_none_thread(gpointer _thread_info) { gint row, col; gushort *src; gushort *dest; ThreadInfo* t = _thread_info; gint ops = t->output->pixelsize; gint ors = t->output->rowstride; guint filters = t->filters; for(row=t->start_y; row < t->end_y; row++) { src = GET_PIXEL(t->image, 0, row); dest = GET_PIXEL(t->output, 0, row); guint first = FC(row, 0); guint second = FC(row, 1); gint col_end = t->output->w & 0xfffe; /* Green first or second?*/ if (first == 1) { /* Green first, then red or blue */ /* Copy non-green to this and pixel below */ dest[second] = dest[second+ors] = src[1]; /* Copy green down */ dest[1+ors] = *src; for(col=0 ; col < col_end; col += 2) { dest[1] = dest[1+ops]= *src; /* Move to next pixel */ src++; dest += ops; dest[second] = dest[second+ops] = dest[second+ors] = dest[second+ops+ors] = *src; /* Move to next pixel */ dest += ops; src++; } /* If uneven pixel width, copy last pixel */ if (t->output->w & 1) { dest[0] = dest[-ops]; dest[1] = dest[-ops+1]; dest[2] = dest[-ops+2]; } } else { for(col=0 ; col < col_end; col += 2) { dest[first] = dest[first+ops] = dest[first+ors] = dest[first+ops+ors] = *src; dest += ops; src++; dest[1] = dest[1+ops]= *src; dest += ops; src++; } /* If uneven pixel width, copy last pixel */ if (t->output->w & 1) { dest[0] = dest[-ops]; dest[1] = dest[-ops+1]; dest[2] = dest[-ops+2]; } } /* Duplicate first & last line */ if (t->end_y == t->output->h - 1) { memcpy(GET_PIXEL(t->output, 0, t->end_y), GET_PIXEL(t->output, 0, t->end_y - 1), t->output->rowstride * 2); memcpy(GET_PIXEL(t->output, 0, 0), GET_PIXEL(t->output, 0, 1), t->output->rowstride * 2); } } g_thread_exit(NULL); return NULL; /* Make the compiler shut up - we'll never return */ } gpointer start_none_thread_half(gpointer _thread_info) { gint row, col, i, j; gushort *src; gushort *dest; ThreadInfo* t = _thread_info; guint filters = t->filters; gint col_end = t->output->w; for(row=t->start_y; row < t->end_y; row++) { gint src_row = row*2; src = GET_PIXEL(t->image, 0, src_row); dest = GET_PIXEL(t->output, 0, row); gushort *g_src = (FC(src_row, 0) == 1) ? &src[0] : &src[1]; gushort *r_src = NULL; gushort *b_src = NULL; for(i = src_row; i < src_row + 2; i++) { for( j = 0; j < 2; j ++) { if (FC(i, j) == 0) r_src = GET_PIXEL(t->image, j, i); if (FC(i, j) == 2) b_src = GET_PIXEL(t->image, j, i); } } g_assert(r_src); g_assert(b_src); for(col=0 ; col < col_end; col++) { *dest++ = *r_src; *dest++ = *g_src; *dest++ = *b_src; dest++; r_src+=2; g_src+=2; b_src+=2; } } g_thread_exit(NULL); return NULL; /* Make the compiler shut up - we'll never return */ } static void none_interpolate_INDI(RS_IMAGE16 *in, RS_IMAGE16 *out, const unsigned int filters, const int colors, gboolean half_size) { guint i, y_offset, y_per_thread, threaded_h; const guint threads = rs_get_number_of_processor_cores(); ThreadInfo *t = g_new(ThreadInfo, threads); /* Subtract 1 from bottom */ threaded_h = out->h-1; y_per_thread = (threaded_h + threads-1)/threads; y_offset = 0; for (i = 0; i < threads; i++) { t[i].image = in; t[i].filters = filters; t[i].start_y = y_offset; t[i].output = out; y_offset += y_per_thread; y_offset = MIN(out->h-1, y_offset); t[i].end_y = y_offset; if (half_size) t[i].threadid = g_thread_create(start_none_thread_half, &t[i], TRUE, NULL); else t[i].threadid = g_thread_create(start_none_thread, &t[i], TRUE, NULL); } /* Wait for threads to finish */ for(i = 0; i < threads; i++) g_thread_join(t[i].threadid); g_free(t); } static void hotpixel_detect(const ThreadInfo* t) { RS_IMAGE16 *image = t->image; gint x, y, end_y; y = MAX( 4, t->start_y); end_y = MIN(t->end_y, image->h - 4); for(; y < end_y; y++) { gint col_end = image->w - 4; gushort* img = GET_PIXEL(image, 0, y); gint p = image->rowstride * 2; gint p_one = image->rowstride; for (x = 4; x < col_end ; x++) { /* Calculate minimum difference to surrounding pixels */ gint left = (int)img[x - 2]; gint c = (int)img[x]; gint right = (int)img[x + 2]; gint up = (int)img[x - p]; gint down = (int)img[x + p]; gint d = ABS(c - left); d = MIN(d, ABS(c - right)); d = MIN(d, ABS(c - up)); d = MIN(d, ABS(c - down)); /* Also calculate maximum difference between surrounding pixels themselves */ gint d2 = ABS(left - right); d2 = MAX(d2, ABS(up - down)); /* If difference larger than surrounding pixels by a factor of 4, replace with left/right pixel interpolation */ if ((d > d2 * 8) && (d > 2000)) { /* Do extended test! */ left = (int)img[x - 4]; right = (int)img[x + 4]; up = (int)img[x - p * 2]; down = (int)img[x + p * 2]; d = MIN(d, ABS(c - left)); d = MIN(d, ABS(c - right)); d = MIN(d, ABS(c - up)); d = MIN(d, ABS(c - down)); /* Create threshold for surrounding pixels - also include other colors */ d2 = MAX(d2, ABS(left - right)); d2 = MAX(d2, ABS(up - down)); d = MIN(d, ABS(c - (int)img[x - 2 - p])); d = MIN(d, ABS(c - (int)img[x + 2 - p])); d = MIN(d, ABS(c - (int)img[x - 2 + p])); d = MIN(d, ABS(c - (int)img[x + 2 + p])); d2 = MAX(d2, ABS((int)img[x - 1] - (int)img[x + 1])); d2 = MAX(d2, ABS((int)img[x - p_one] - (int)img[x + p_one])); d2 = MAX(d2, ABS((int)img[x - 1 - p_one] - (int)img[x + 1 + p_one])); d2 = MAX(d2, ABS((int)img[x - 1 + p_one] - (int)img[x + 1 - p_one])); d2 = MAX(d2, ABS((int)img[x - 2 - p] - (int)img[x + 2 + p])); d2 = MAX(d2, ABS((int)img[x - 2 + p] - (int)img[x + 2 - p])); if ((d > d2 * 4) && (d > 1600)) { img[x] = (gushort)(((gint)img[x-2] + (gint)img[x+2] + 1) >> 1); } } } } } rawstudio-2.0/plugins/demosaic/Makefile.in0000644000175000017500000004206011547430035015633 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/demosaic DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) demosaic_la_DEPENDENCIES = am_demosaic_la_OBJECTS = demosaic.lo demosaic_la_OBJECTS = $(am_demosaic_la_OBJECTS) demosaic_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(demosaic_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(demosaic_la_SOURCES) DIST_SOURCES = $(demosaic_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = demosaic.la demosaic_la_LIBADD = @PACKAGE_LIBS@ demosaic_la_LDFLAGS = -module -avoid-version demosaic_la_SOURCES = demosaic.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/demosaic/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/demosaic/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done demosaic.la: $(demosaic_la_OBJECTS) $(demosaic_la_DEPENDENCIES) $(demosaic_la_LINK) -rpath $(libdir) $(demosaic_la_OBJECTS) $(demosaic_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/demosaic.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/dcp/0000755000175000017500000000000011547430074012631 500000000000000rawstudio-2.0/plugins/dcp/adobe-camera-raw-tone.c0000644000175000017500000003075311526533643016762 00000000000000/* Default tone curve from Adobe DNG SDK: */ /*****************************************************************************/ // Copyright 2006-2007 Adobe Systems Incorporated // All Rights Reserved. // // NOTICE: Adobe permits you to use, modify, and distribute this file in // accordance with the terms of the Adobe license agreement accompanying it. /*****************************************************************************/ /* $Id: //mondo/dng_sdk_1_3/dng_sdk/source/dng_render.cpp#1 $ */ /* $DateTime: 2009/06/22 05:04:49 $ */ /* $Change: 578634 $ */ /* $Author: tknoll $ */ /*****************************************************************************/ /* The MIT License specifies the terms and conditions of use for those Adobe Open Source libraries that it covers: Copyright (c) 2005 Adobe Systems Incorporated Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \endverbatim */ const float adobe_default_table [] = { 0.00000f, 0.00078f, 0.00160f, 0.00242f, 0.00314f, 0.00385f, 0.00460f, 0.00539f, 0.00623f, 0.00712f, 0.00806f, 0.00906f, 0.01012f, 0.01122f, 0.01238f, 0.01359f, 0.01485f, 0.01616f, 0.01751f, 0.01890f, 0.02033f, 0.02180f, 0.02331f, 0.02485f, 0.02643f, 0.02804f, 0.02967f, 0.03134f, 0.03303f, 0.03475f, 0.03648f, 0.03824f, 0.04002f, 0.04181f, 0.04362f, 0.04545f, 0.04730f, 0.04916f, 0.05103f, 0.05292f, 0.05483f, 0.05675f, 0.05868f, 0.06063f, 0.06259f, 0.06457f, 0.06655f, 0.06856f, 0.07057f, 0.07259f, 0.07463f, 0.07668f, 0.07874f, 0.08081f, 0.08290f, 0.08499f, 0.08710f, 0.08921f, 0.09134f, 0.09348f, 0.09563f, 0.09779f, 0.09996f, 0.10214f, 0.10433f, 0.10652f, 0.10873f, 0.11095f, 0.11318f, 0.11541f, 0.11766f, 0.11991f, 0.12218f, 0.12445f, 0.12673f, 0.12902f, 0.13132f, 0.13363f, 0.13595f, 0.13827f, 0.14061f, 0.14295f, 0.14530f, 0.14765f, 0.15002f, 0.15239f, 0.15477f, 0.15716f, 0.15956f, 0.16197f, 0.16438f, 0.16680f, 0.16923f, 0.17166f, 0.17410f, 0.17655f, 0.17901f, 0.18148f, 0.18395f, 0.18643f, 0.18891f, 0.19141f, 0.19391f, 0.19641f, 0.19893f, 0.20145f, 0.20398f, 0.20651f, 0.20905f, 0.21160f, 0.21416f, 0.21672f, 0.21929f, 0.22185f, 0.22440f, 0.22696f, 0.22950f, 0.23204f, 0.23458f, 0.23711f, 0.23963f, 0.24215f, 0.24466f, 0.24717f, 0.24967f, 0.25216f, 0.25465f, 0.25713f, 0.25961f, 0.26208f, 0.26454f, 0.26700f, 0.26945f, 0.27189f, 0.27433f, 0.27676f, 0.27918f, 0.28160f, 0.28401f, 0.28641f, 0.28881f, 0.29120f, 0.29358f, 0.29596f, 0.29833f, 0.30069f, 0.30305f, 0.30540f, 0.30774f, 0.31008f, 0.31241f, 0.31473f, 0.31704f, 0.31935f, 0.32165f, 0.32395f, 0.32623f, 0.32851f, 0.33079f, 0.33305f, 0.33531f, 0.33756f, 0.33981f, 0.34205f, 0.34428f, 0.34650f, 0.34872f, 0.35093f, 0.35313f, 0.35532f, 0.35751f, 0.35969f, 0.36187f, 0.36404f, 0.36620f, 0.36835f, 0.37050f, 0.37264f, 0.37477f, 0.37689f, 0.37901f, 0.38112f, 0.38323f, 0.38533f, 0.38742f, 0.38950f, 0.39158f, 0.39365f, 0.39571f, 0.39777f, 0.39982f, 0.40186f, 0.40389f, 0.40592f, 0.40794f, 0.40996f, 0.41197f, 0.41397f, 0.41596f, 0.41795f, 0.41993f, 0.42191f, 0.42388f, 0.42584f, 0.42779f, 0.42974f, 0.43168f, 0.43362f, 0.43554f, 0.43747f, 0.43938f, 0.44129f, 0.44319f, 0.44509f, 0.44698f, 0.44886f, 0.45073f, 0.45260f, 0.45447f, 0.45632f, 0.45817f, 0.46002f, 0.46186f, 0.46369f, 0.46551f, 0.46733f, 0.46914f, 0.47095f, 0.47275f, 0.47454f, 0.47633f, 0.47811f, 0.47989f, 0.48166f, 0.48342f, 0.48518f, 0.48693f, 0.48867f, 0.49041f, 0.49214f, 0.49387f, 0.49559f, 0.49730f, 0.49901f, 0.50072f, 0.50241f, 0.50410f, 0.50579f, 0.50747f, 0.50914f, 0.51081f, 0.51247f, 0.51413f, 0.51578f, 0.51742f, 0.51906f, 0.52069f, 0.52232f, 0.52394f, 0.52556f, 0.52717f, 0.52878f, 0.53038f, 0.53197f, 0.53356f, 0.53514f, 0.53672f, 0.53829f, 0.53986f, 0.54142f, 0.54297f, 0.54452f, 0.54607f, 0.54761f, 0.54914f, 0.55067f, 0.55220f, 0.55371f, 0.55523f, 0.55673f, 0.55824f, 0.55973f, 0.56123f, 0.56271f, 0.56420f, 0.56567f, 0.56715f, 0.56861f, 0.57007f, 0.57153f, 0.57298f, 0.57443f, 0.57587f, 0.57731f, 0.57874f, 0.58017f, 0.58159f, 0.58301f, 0.58443f, 0.58583f, 0.58724f, 0.58864f, 0.59003f, 0.59142f, 0.59281f, 0.59419f, 0.59556f, 0.59694f, 0.59830f, 0.59966f, 0.60102f, 0.60238f, 0.60373f, 0.60507f, 0.60641f, 0.60775f, 0.60908f, 0.61040f, 0.61173f, 0.61305f, 0.61436f, 0.61567f, 0.61698f, 0.61828f, 0.61957f, 0.62087f, 0.62216f, 0.62344f, 0.62472f, 0.62600f, 0.62727f, 0.62854f, 0.62980f, 0.63106f, 0.63232f, 0.63357f, 0.63482f, 0.63606f, 0.63730f, 0.63854f, 0.63977f, 0.64100f, 0.64222f, 0.64344f, 0.64466f, 0.64587f, 0.64708f, 0.64829f, 0.64949f, 0.65069f, 0.65188f, 0.65307f, 0.65426f, 0.65544f, 0.65662f, 0.65779f, 0.65897f, 0.66013f, 0.66130f, 0.66246f, 0.66362f, 0.66477f, 0.66592f, 0.66707f, 0.66821f, 0.66935f, 0.67048f, 0.67162f, 0.67275f, 0.67387f, 0.67499f, 0.67611f, 0.67723f, 0.67834f, 0.67945f, 0.68055f, 0.68165f, 0.68275f, 0.68385f, 0.68494f, 0.68603f, 0.68711f, 0.68819f, 0.68927f, 0.69035f, 0.69142f, 0.69249f, 0.69355f, 0.69461f, 0.69567f, 0.69673f, 0.69778f, 0.69883f, 0.69988f, 0.70092f, 0.70196f, 0.70300f, 0.70403f, 0.70506f, 0.70609f, 0.70711f, 0.70813f, 0.70915f, 0.71017f, 0.71118f, 0.71219f, 0.71319f, 0.71420f, 0.71520f, 0.71620f, 0.71719f, 0.71818f, 0.71917f, 0.72016f, 0.72114f, 0.72212f, 0.72309f, 0.72407f, 0.72504f, 0.72601f, 0.72697f, 0.72794f, 0.72890f, 0.72985f, 0.73081f, 0.73176f, 0.73271f, 0.73365f, 0.73460f, 0.73554f, 0.73647f, 0.73741f, 0.73834f, 0.73927f, 0.74020f, 0.74112f, 0.74204f, 0.74296f, 0.74388f, 0.74479f, 0.74570f, 0.74661f, 0.74751f, 0.74842f, 0.74932f, 0.75021f, 0.75111f, 0.75200f, 0.75289f, 0.75378f, 0.75466f, 0.75555f, 0.75643f, 0.75730f, 0.75818f, 0.75905f, 0.75992f, 0.76079f, 0.76165f, 0.76251f, 0.76337f, 0.76423f, 0.76508f, 0.76594f, 0.76679f, 0.76763f, 0.76848f, 0.76932f, 0.77016f, 0.77100f, 0.77183f, 0.77267f, 0.77350f, 0.77432f, 0.77515f, 0.77597f, 0.77680f, 0.77761f, 0.77843f, 0.77924f, 0.78006f, 0.78087f, 0.78167f, 0.78248f, 0.78328f, 0.78408f, 0.78488f, 0.78568f, 0.78647f, 0.78726f, 0.78805f, 0.78884f, 0.78962f, 0.79040f, 0.79118f, 0.79196f, 0.79274f, 0.79351f, 0.79428f, 0.79505f, 0.79582f, 0.79658f, 0.79735f, 0.79811f, 0.79887f, 0.79962f, 0.80038f, 0.80113f, 0.80188f, 0.80263f, 0.80337f, 0.80412f, 0.80486f, 0.80560f, 0.80634f, 0.80707f, 0.80780f, 0.80854f, 0.80926f, 0.80999f, 0.81072f, 0.81144f, 0.81216f, 0.81288f, 0.81360f, 0.81431f, 0.81503f, 0.81574f, 0.81645f, 0.81715f, 0.81786f, 0.81856f, 0.81926f, 0.81996f, 0.82066f, 0.82135f, 0.82205f, 0.82274f, 0.82343f, 0.82412f, 0.82480f, 0.82549f, 0.82617f, 0.82685f, 0.82753f, 0.82820f, 0.82888f, 0.82955f, 0.83022f, 0.83089f, 0.83155f, 0.83222f, 0.83288f, 0.83354f, 0.83420f, 0.83486f, 0.83552f, 0.83617f, 0.83682f, 0.83747f, 0.83812f, 0.83877f, 0.83941f, 0.84005f, 0.84069f, 0.84133f, 0.84197f, 0.84261f, 0.84324f, 0.84387f, 0.84450f, 0.84513f, 0.84576f, 0.84639f, 0.84701f, 0.84763f, 0.84825f, 0.84887f, 0.84949f, 0.85010f, 0.85071f, 0.85132f, 0.85193f, 0.85254f, 0.85315f, 0.85375f, 0.85436f, 0.85496f, 0.85556f, 0.85615f, 0.85675f, 0.85735f, 0.85794f, 0.85853f, 0.85912f, 0.85971f, 0.86029f, 0.86088f, 0.86146f, 0.86204f, 0.86262f, 0.86320f, 0.86378f, 0.86435f, 0.86493f, 0.86550f, 0.86607f, 0.86664f, 0.86720f, 0.86777f, 0.86833f, 0.86889f, 0.86945f, 0.87001f, 0.87057f, 0.87113f, 0.87168f, 0.87223f, 0.87278f, 0.87333f, 0.87388f, 0.87443f, 0.87497f, 0.87552f, 0.87606f, 0.87660f, 0.87714f, 0.87768f, 0.87821f, 0.87875f, 0.87928f, 0.87981f, 0.88034f, 0.88087f, 0.88140f, 0.88192f, 0.88244f, 0.88297f, 0.88349f, 0.88401f, 0.88453f, 0.88504f, 0.88556f, 0.88607f, 0.88658f, 0.88709f, 0.88760f, 0.88811f, 0.88862f, 0.88912f, 0.88963f, 0.89013f, 0.89063f, 0.89113f, 0.89163f, 0.89212f, 0.89262f, 0.89311f, 0.89360f, 0.89409f, 0.89458f, 0.89507f, 0.89556f, 0.89604f, 0.89653f, 0.89701f, 0.89749f, 0.89797f, 0.89845f, 0.89892f, 0.89940f, 0.89987f, 0.90035f, 0.90082f, 0.90129f, 0.90176f, 0.90222f, 0.90269f, 0.90316f, 0.90362f, 0.90408f, 0.90454f, 0.90500f, 0.90546f, 0.90592f, 0.90637f, 0.90683f, 0.90728f, 0.90773f, 0.90818f, 0.90863f, 0.90908f, 0.90952f, 0.90997f, 0.91041f, 0.91085f, 0.91130f, 0.91173f, 0.91217f, 0.91261f, 0.91305f, 0.91348f, 0.91392f, 0.91435f, 0.91478f, 0.91521f, 0.91564f, 0.91606f, 0.91649f, 0.91691f, 0.91734f, 0.91776f, 0.91818f, 0.91860f, 0.91902f, 0.91944f, 0.91985f, 0.92027f, 0.92068f, 0.92109f, 0.92150f, 0.92191f, 0.92232f, 0.92273f, 0.92314f, 0.92354f, 0.92395f, 0.92435f, 0.92475f, 0.92515f, 0.92555f, 0.92595f, 0.92634f, 0.92674f, 0.92713f, 0.92753f, 0.92792f, 0.92831f, 0.92870f, 0.92909f, 0.92947f, 0.92986f, 0.93025f, 0.93063f, 0.93101f, 0.93139f, 0.93177f, 0.93215f, 0.93253f, 0.93291f, 0.93328f, 0.93366f, 0.93403f, 0.93440f, 0.93478f, 0.93515f, 0.93551f, 0.93588f, 0.93625f, 0.93661f, 0.93698f, 0.93734f, 0.93770f, 0.93807f, 0.93843f, 0.93878f, 0.93914f, 0.93950f, 0.93986f, 0.94021f, 0.94056f, 0.94092f, 0.94127f, 0.94162f, 0.94197f, 0.94231f, 0.94266f, 0.94301f, 0.94335f, 0.94369f, 0.94404f, 0.94438f, 0.94472f, 0.94506f, 0.94540f, 0.94573f, 0.94607f, 0.94641f, 0.94674f, 0.94707f, 0.94740f, 0.94774f, 0.94807f, 0.94839f, 0.94872f, 0.94905f, 0.94937f, 0.94970f, 0.95002f, 0.95035f, 0.95067f, 0.95099f, 0.95131f, 0.95163f, 0.95194f, 0.95226f, 0.95257f, 0.95289f, 0.95320f, 0.95351f, 0.95383f, 0.95414f, 0.95445f, 0.95475f, 0.95506f, 0.95537f, 0.95567f, 0.95598f, 0.95628f, 0.95658f, 0.95688f, 0.95718f, 0.95748f, 0.95778f, 0.95808f, 0.95838f, 0.95867f, 0.95897f, 0.95926f, 0.95955f, 0.95984f, 0.96013f, 0.96042f, 0.96071f, 0.96100f, 0.96129f, 0.96157f, 0.96186f, 0.96214f, 0.96242f, 0.96271f, 0.96299f, 0.96327f, 0.96355f, 0.96382f, 0.96410f, 0.96438f, 0.96465f, 0.96493f, 0.96520f, 0.96547f, 0.96574f, 0.96602f, 0.96629f, 0.96655f, 0.96682f, 0.96709f, 0.96735f, 0.96762f, 0.96788f, 0.96815f, 0.96841f, 0.96867f, 0.96893f, 0.96919f, 0.96945f, 0.96971f, 0.96996f, 0.97022f, 0.97047f, 0.97073f, 0.97098f, 0.97123f, 0.97149f, 0.97174f, 0.97199f, 0.97223f, 0.97248f, 0.97273f, 0.97297f, 0.97322f, 0.97346f, 0.97371f, 0.97395f, 0.97419f, 0.97443f, 0.97467f, 0.97491f, 0.97515f, 0.97539f, 0.97562f, 0.97586f, 0.97609f, 0.97633f, 0.97656f, 0.97679f, 0.97702f, 0.97725f, 0.97748f, 0.97771f, 0.97794f, 0.97817f, 0.97839f, 0.97862f, 0.97884f, 0.97907f, 0.97929f, 0.97951f, 0.97973f, 0.97995f, 0.98017f, 0.98039f, 0.98061f, 0.98082f, 0.98104f, 0.98125f, 0.98147f, 0.98168f, 0.98189f, 0.98211f, 0.98232f, 0.98253f, 0.98274f, 0.98295f, 0.98315f, 0.98336f, 0.98357f, 0.98377f, 0.98398f, 0.98418f, 0.98438f, 0.98458f, 0.98478f, 0.98498f, 0.98518f, 0.98538f, 0.98558f, 0.98578f, 0.98597f, 0.98617f, 0.98636f, 0.98656f, 0.98675f, 0.98694f, 0.98714f, 0.98733f, 0.98752f, 0.98771f, 0.98789f, 0.98808f, 0.98827f, 0.98845f, 0.98864f, 0.98882f, 0.98901f, 0.98919f, 0.98937f, 0.98955f, 0.98973f, 0.98991f, 0.99009f, 0.99027f, 0.99045f, 0.99063f, 0.99080f, 0.99098f, 0.99115f, 0.99133f, 0.99150f, 0.99167f, 0.99184f, 0.99201f, 0.99218f, 0.99235f, 0.99252f, 0.99269f, 0.99285f, 0.99302f, 0.99319f, 0.99335f, 0.99351f, 0.99368f, 0.99384f, 0.99400f, 0.99416f, 0.99432f, 0.99448f, 0.99464f, 0.99480f, 0.99495f, 0.99511f, 0.99527f, 0.99542f, 0.99558f, 0.99573f, 0.99588f, 0.99603f, 0.99619f, 0.99634f, 0.99649f, 0.99664f, 0.99678f, 0.99693f, 0.99708f, 0.99722f, 0.99737f, 0.99751f, 0.99766f, 0.99780f, 0.99794f, 0.99809f, 0.99823f, 0.99837f, 0.99851f, 0.99865f, 0.99879f, 0.99892f, 0.99906f, 0.99920f, 0.99933f, 0.99947f, 0.99960f, 0.99974f, 0.99987f, 1.00000f }; const int adobe_default_table_size = sizeof (adobe_default_table) / sizeof (adobe_default_table [0]); rawstudio-2.0/plugins/dcp/dcp.c0000644000175000017500000011465211537764506013505 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 4 */ #include "config.h" #include /* pow() */ #include "dcp.h" #include "adobe-camera-raw-tone.h" #include /* memcpy */ #include /* posix_memalign() */ RS_DEFINE_FILTER(rs_dcp, RSDcp) enum { PROP_0, PROP_SETTINGS, PROP_PROFILE, PROP_USE_PROFILE, PROP_READ_OUT_CURVE }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static RSFilterResponse *get_image(RSFilter *filter, const RSFilterRequest *request); static void settings_changed(RSSettings *settings, RSSettingsMask mask, RSDcp *dcp); static void settings_weak_notify(gpointer data, GObject *where_the_object_was); static RS_xy_COORD neutral_to_xy(RSDcp *dcp, const RS_VECTOR3 *neutral); static RS_MATRIX3 find_xyz_to_camera(RSDcp *dcp, const RS_xy_COORD *white_xy, RS_MATRIX3 *forward_matrix); static void set_white_xy(RSDcp *dcp, const RS_xy_COORD *xy); static void precalc(RSDcp *dcp); static void pre_cache_tables(RSDcp *dcp); static void render(ThreadInfo* t); static void read_profile(RSDcp *dcp, RSDcpFile *dcp_file); static void free_dcp_profile(RSDcp *dcp); static void set_prophoto_wb(RSDcp *dcp, gfloat warmth, gfloat tint); static void calculate_huesat_maps(RSDcp *dcp, gfloat temp); G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_dcp_get_type(G_TYPE_MODULE(plugin)); } static void finalize(GObject *object) { RSDcp *dcp = RS_DCP(object); if (dcp->curve_samples) free(dcp->curve_samples); g_free(dcp->_huesatmap_precalc_unaligned); g_free(dcp->_looktable_precalc_unaligned); free_dcp_profile(dcp); if (dcp->settings_signal_id && dcp->settings) { g_signal_handler_disconnect(dcp->settings, dcp->settings_signal_id); g_object_weak_unref(G_OBJECT(dcp->settings), settings_weak_notify, dcp); } dcp->settings_signal_id = 0; dcp->settings = NULL; dcp->read_out_curve = NULL; } static void rs_dcp_class_init(RSDcpClass *klass) { RSFilterClass *filter_class = RS_FILTER_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = get_property; object_class->set_property = set_property; object_class->finalize = finalize; g_object_class_install_property(object_class, PROP_SETTINGS, g_param_spec_object( "settings", "Settings", "Settings to render from", RS_TYPE_SETTINGS, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_PROFILE, g_param_spec_object( "profile", "profile", "DCP Profile", RS_TYPE_DCP_FILE, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_USE_PROFILE, g_param_spec_boolean( "use-profile", "use-profile", "Use DCP profile", FALSE, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_READ_OUT_CURVE, g_param_spec_object( "read-out-curve", "read-out-curve", "Read out curve data and send to this widget", RS_CURVE_TYPE_WIDGET, G_PARAM_READWRITE) ); filter_class->name = "Adobe DNG camera profile filter"; filter_class->get_image = get_image; } static void settings_changed(RSSettings *settings, RSSettingsMask mask, RSDcp *dcp) { gboolean changed = FALSE; if (mask & MASK_EXPOSURE) { g_object_get(settings, "exposure", &dcp->exposure, NULL); changed = TRUE; } if (mask & MASK_SATURATION) { g_object_get(settings, "saturation", &dcp->saturation, NULL); changed = TRUE; } if (mask & MASK_CONTRAST) { g_object_get(settings, "contrast", &dcp->contrast, NULL); changed = TRUE; } if (mask & MASK_HUE) { g_object_get(settings, "hue", &dcp->hue, NULL); dcp->hue /= 60.0; changed = TRUE; } if (mask & MASK_CHANNELMIXER) { const gfloat channelmixer_red; const gfloat channelmixer_green; const gfloat channelmixer_blue; g_object_get(settings, "channelmixer_red", &channelmixer_red, "channelmixer_green", &channelmixer_green, "channelmixer_blue", &channelmixer_blue, NULL); dcp->channelmixer_red = channelmixer_red / 100.0f; dcp->channelmixer_green = channelmixer_green / 100.0f; dcp->channelmixer_blue = channelmixer_blue / 100.0f; changed = TRUE; } if (mask & MASK_WB) { dcp->warmth = -1.0; dcp->tint = -1.0; gfloat premul_warmth = -1.0; gfloat pre_mul_tint = -1.0; gboolean recalc = FALSE; g_object_get(settings, "dcp-temp", &dcp->warmth, "dcp-tint", &dcp->tint, "warmth", &premul_warmth, "tint", &pre_mul_tint, "recalc-temp", &recalc, NULL); RS_xy_COORD whitepoint; RS_VECTOR3 neutral; /* This is messy, but we're essentially converting from warmth/tint to cameraneutral */ dcp->pre_mul.x = (1.0+premul_warmth)*(2.0-pre_mul_tint); dcp->pre_mul.y = 1.0; dcp->pre_mul.z = (1.0-premul_warmth)*(2.0-pre_mul_tint); if (recalc) { neutral.x = 1.0 / CLAMP(dcp->pre_mul.x, 0.001, 100.00); neutral.y = 1.0 / CLAMP(dcp->pre_mul.y, 0.001, 100.00); neutral.z = 1.0 / CLAMP(dcp->pre_mul.z, 0.001, 100.00); gfloat max = vector3_max(&neutral); neutral.x = neutral.x / max; neutral.y = neutral.y / max; neutral.z = neutral.z / max; whitepoint = neutral_to_xy(dcp, &neutral); if (dcp->use_profile) { rs_color_whitepoint_to_temp(&whitepoint, &dcp->warmth, &dcp->tint); } else { dcp->warmth = 5000; dcp->tint = 0; } dcp->warmth = CLAMP(dcp->warmth, 2000, 12000); dcp->tint = CLAMP(dcp->tint, -150, 150); g_object_set(settings, "dcp-temp", dcp->warmth, "dcp-tint", dcp->tint, "recalc-temp", FALSE, NULL); g_signal_emit_by_name(settings, "wb-recalculated"); } if (dcp->use_profile) { whitepoint = rs_color_temp_to_whitepoint(dcp->warmth, dcp->tint); set_white_xy(dcp, &whitepoint); precalc(dcp); } else { set_prophoto_wb(dcp, dcp->warmth, dcp->tint); } changed = TRUE; } if (mask & MASK_CURVE) { const gint nknots = rs_settings_get_curve_nknots(settings); gint i; if (nknots > 1) { gfloat *knots = rs_settings_get_curve_knots(settings); if (knots) { dcp->nknots = nknots; dcp->curve_is_flat = FALSE; if (nknots == 2) if (ABS(knots[0]) < 0.0001 && ABS(knots[1]) < 0.0001) if (ABS(1.0 - knots[2]) < 0.0001 && ABS(1.0 - knots[3]) < 0.0001) dcp->curve_is_flat = TRUE; if (!dcp->curve_is_flat) { gfloat sampled[65537]; RSSpline *spline = rs_spline_new(knots, dcp->nknots, NATURAL); rs_spline_sample(spline, sampled, sizeof(sampled) / sizeof(gfloat)); g_object_unref(spline); /* Create extra entry */ sampled[65536] = sampled[65535]; for (i = 0; i < 256; i++) { gfloat value = (gfloat)i * (1.0 / 255.0f); /* Gamma correct value */ value = powf(value, 1.0f / 2.0f); /* Lookup curve corrected value */ gfloat lookup = (int)(value * 65535.0f); gfloat v0 = sampled[(int)lookup]; gfloat v1 = sampled[(int)lookup+1]; lookup -= (gfloat)(gint)lookup; value = v0 * (1.0f-lookup) + v1 * lookup; /* Convert from gamma 2.0 back to linear */ value = powf(value, 2.0f); /* Store in table */ if (i>0) dcp->curve_samples[i*2-1] = value; dcp->curve_samples[i*2] = value; } dcp->curve_samples[256*2-1] = dcp->curve_samples[256*2] = dcp->curve_samples[256*2+1] = dcp->curve_samples[255*2]; } } if (knots) g_free(knots); } else dcp->curve_is_flat = TRUE; for(i=0;i<257*2;i++) dcp->curve_samples[i] = MIN(1.0f, MAX(0.0f, dcp->curve_samples[i])); changed = TRUE; } if (changed) rs_filter_changed(RS_FILTER(dcp), RS_FILTER_CHANGED_PIXELDATA); } /* This will free all ressources that are related to a DCP profile */ static void free_dcp_profile(RSDcp *dcp) { if (dcp->tone_curve) g_object_unref(dcp->tone_curve); if (dcp->looktable) g_object_unref(dcp->looktable); if (dcp->huesatmap_interpolated) g_object_unref(dcp->huesatmap_interpolated); if (dcp->huesatmap1) g_object_unref(dcp->huesatmap1); if (dcp->huesatmap2) g_object_unref(dcp->huesatmap2); if (dcp->tone_curve_lut) free(dcp->tone_curve_lut); dcp->huesatmap1 = NULL; dcp->huesatmap2 = NULL; dcp->huesatmap_interpolated = NULL; dcp->tone_curve = NULL; dcp->looktable = NULL; dcp->looktable = NULL; dcp->tone_curve_lut = NULL; dcp->use_profile = FALSE; } #define ALIGNTO16(PTR) ((guintptr)PTR + ((16 - ((guintptr)PTR % 16)) % 16)) static void rs_dcp_init(RSDcp *dcp) { RSDcpClass *klass = RS_DCP_GET_CLASS(dcp); g_assert(0 == posix_memalign((void**)&dcp->curve_samples, 16, sizeof(gfloat)*2*257)); dcp->huesatmap_interpolated = NULL; dcp->use_profile = FALSE; dcp->curve_is_flat = TRUE; dcp->read_out_curve = NULL; /* Standard D65, this default should really not be used */ dcp->white_xy.x = 0.31271f; dcp->white_xy.y = 0.32902f; /* We cannot initialize this in class init, the RSProphoto plugin may not * be loaded yet at that time :( */ if (!klass->prophoto) klass->prophoto = rs_color_space_new_singleton("RSProphoto"); /* Allocate aligned precalc tables */ dcp->_huesatmap_precalc_unaligned = g_malloc(sizeof(PrecalcHSM)+16); dcp->_looktable_precalc_unaligned = g_malloc(sizeof(PrecalcHSM)+16); dcp->huesatmap_precalc = (PrecalcHSM*)ALIGNTO16(dcp->_huesatmap_precalc_unaligned); dcp->looktable_precalc = (PrecalcHSM*)ALIGNTO16(dcp->_looktable_precalc_unaligned); } #undef ALIGNTO16 static void init_exposure(RSDcp *dcp) { /* Adobe applies negative exposure to the tone curve instead */ /* Todo: Maybe enable shadow (black point) adjustment. */ gfloat shadow = 5.0; gfloat minBlack = shadow * 0.001f; gfloat white = 1.0 / pow (2.0, dcp->exposure); dcp->exposure_black = 0; dcp->exposure_slope = 1.0 / (white - dcp->exposure_black); const gfloat kMaxCurveX = 0.5; const gfloat kMaxCurveY = 1.0 / 16.0; dcp->exposure_radius = MIN (kMaxCurveX * minBlack, kMaxCurveY / dcp->exposure_slope); if (dcp->exposure_radius > 0.0) dcp->exposure_qscale = dcp->exposure_slope / (4.0 * dcp->exposure_radius); else dcp->exposure_qscale = 0.0; } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSDcp *dcp = RS_DCP(object); switch (property_id) { case PROP_SETTINGS: break; case PROP_USE_PROFILE: g_value_set_boolean(value, dcp->use_profile); break; case PROP_READ_OUT_CURVE: g_value_set_object(value, dcp->read_out_curve); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSDcp *dcp = RS_DCP(object); RSFilter *filter = RS_FILTER(dcp); gpointer temp; switch (property_id) { case PROP_SETTINGS: if (dcp->settings && dcp->settings_signal_id) { if (dcp->settings == g_value_get_object(value)) { settings_changed(dcp->settings, MASK_ALL, dcp); break; } g_signal_handler_disconnect(dcp->settings, dcp->settings_signal_id); g_object_weak_unref(G_OBJECT(dcp->settings), settings_weak_notify, dcp); } dcp->settings = g_value_get_object(value); dcp->settings_signal_id = g_signal_connect(dcp->settings, "settings-changed", G_CALLBACK(settings_changed), dcp); settings_changed(dcp->settings, MASK_ALL, dcp); g_object_weak_ref(G_OBJECT(dcp->settings), settings_weak_notify, dcp); break; case PROP_PROFILE: read_profile(dcp, g_value_get_object(value)); precalc(dcp); rs_filter_changed(filter, RS_FILTER_CHANGED_PIXELDATA); break; case PROP_READ_OUT_CURVE: temp = g_value_get_object(value); if (temp != dcp->read_out_curve) rs_filter_changed(RS_FILTER(dcp), RS_FILTER_CHANGED_PIXELDATA); dcp->read_out_curve = temp; break; case PROP_USE_PROFILE: dcp->use_profile = g_value_get_boolean(value); if (!dcp->use_profile) free_dcp_profile(dcp); else precalc(dcp); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void settings_weak_notify(gpointer data, GObject *where_the_object_was) { RSDcp *dcp = RS_DCP(data); dcp->settings = NULL; } gpointer start_single_dcp_thread(gpointer _thread_info) { ThreadInfo* t = _thread_info; RS_IMAGE16 *tmp = t->tmp; pre_cache_tables(t->dcp); if (tmp->pixelsize == 4 && (rs_detect_cpu_features() & RS_CPU_FLAG_SSE2) && !t->dcp->read_out_curve) { if (render_SSE2(t)) { /* SSE2 routine renders 4 pixels in parallel, but any remaining must be */ /* calculated using C routines */ if (tmp->w & 3) { t->start_x = tmp->w - (tmp->w & 3); render(t); } } else { /* Not SSE2 compiled, render using plain C */ render(t); } } else render(t); g_thread_exit(NULL); return NULL; /* Make the compiler shut up - we'll never return */ } static inline void bit_blt(char* dstp, int dst_pitch, const char* srcp, int src_pitch, int row_size, int height) { if (height == 1 || (dst_pitch == src_pitch && src_pitch == row_size)) { memcpy(dstp, srcp, row_size*height); return; } int y; for (y = height; y > 0; --y) { memcpy(dstp, srcp, row_size); dstp += dst_pitch; srcp += src_pitch; } } static RSFilterResponse * get_image(RSFilter *filter, const RSFilterRequest *request) { RSDcp *dcp = RS_DCP(filter); RSDcpClass *klass = RS_DCP_GET_CLASS(dcp); GdkRectangle *roi; RSFilterResponse *previous_response; RSFilterResponse *response; RS_IMAGE16 *input; RS_IMAGE16 *output; RS_IMAGE16 *tmp; gint j; RSFilterRequest *request_clone = rs_filter_request_clone(request); if (!dcp->use_profile) { gfloat premul[4] = {dcp->pre_mul.x, dcp->pre_mul.y, dcp->pre_mul.z, 1.0}; rs_filter_param_set_float4(RS_FILTER_PARAM(request_clone), "premul", premul); } rs_filter_param_set_object(RS_FILTER_PARAM(request_clone), "colorspace", klass->prophoto); previous_response = rs_filter_get_image(filter->previous, request_clone); g_object_unref(request_clone); if (!RS_IS_FILTER(filter->previous)) return previous_response; input = rs_filter_response_get_image(previous_response); if (!input) return previous_response; response = rs_filter_response_clone(previous_response); /* We always deliver in ProPhoto */ rs_filter_param_set_object(RS_FILTER_PARAM(response), "colorspace", klass->prophoto); g_object_unref(previous_response); if ((roi = rs_filter_request_get_roi(request))) { /* Align so we start at even pixel counts */ roi->width += (roi->x&1); roi->x -= (roi->x&1); roi->width = MIN(input->w - roi->x, roi->width); output = rs_image16_copy(input, FALSE); tmp = rs_image16_new_subframe(output, roi); bit_blt((char*)GET_PIXEL(tmp,0,0), tmp->rowstride * 2, (const char*)GET_PIXEL(input,roi->x,roi->y), input->rowstride * 2, tmp->w * tmp->pixelsize * 2, tmp->h); } else { output = rs_image16_copy(input, TRUE); tmp = g_object_ref(output); } g_object_unref(input); rs_filter_response_set_image(response, output); g_object_unref(output); init_exposure(dcp); guint i, y_offset, y_per_thread, threaded_h; const guint threads = rs_get_number_of_processor_cores(); ThreadInfo *t = g_new(ThreadInfo, threads); threaded_h = tmp->h; y_per_thread = (threaded_h + threads-1)/threads; y_offset = 0; for (i = 0; i < threads; i++) { t[i].tmp = tmp; t[i].start_y = y_offset; t[i].start_x = 0; t[i].dcp = dcp; y_offset += y_per_thread; y_offset = MIN(tmp->h, y_offset); t[i].end_y = y_offset; for(j = 0; j < 256; j++) t[i].curve_input_values[j] = 0; t[i].threadid = g_thread_create(start_single_dcp_thread, &t[i], TRUE, NULL); } /* Wait for threads to finish */ for(i = 0; i < threads; i++) g_thread_join(t[i].threadid); /* If we must deliver histogram data, do it now */ if (dcp->read_out_curve) { gint *values = g_malloc0(256*sizeof(gint)); for(i = 0; i < threads; i++) for(j = 0; j < 256; j++) values[j] += t[i].curve_input_values[j]; rs_curve_set_histogram_data(RS_CURVE_WIDGET(dcp->read_out_curve), values); g_free(values); } g_free(t); g_object_unref(tmp); return response; } /* dng_color_spec::NeutralToXY */ static RS_xy_COORD neutral_to_xy(RSDcp *dcp, const RS_VECTOR3 *neutral) { const guint max_passes = 30; guint pass; RS_xy_COORD last; last = XYZ_to_xy(&XYZ_WP_D50); for(pass = 0; pass < max_passes; pass++) { RS_MATRIX3 xyz_to_camera = find_xyz_to_camera(dcp, &last, NULL); RS_MATRIX3 camera_to_xyz = matrix3_invert(&xyz_to_camera); RS_XYZ_VECTOR tmp = vector3_multiply_matrix(neutral, &camera_to_xyz); RS_xy_COORD next = XYZ_to_xy(&tmp); if (ABS(next.x - last.x) + ABS(next.y - last.y) < 0.0000001) { last = next; break; } // If we reach the limit without converging, we are most likely // in a two value oscillation. So take the average of the last // two estimates and give up. if (pass == max_passes - 1) { next.x = (last.x + next.x) * 0.5; next.y = (last.y + next.y) * 0.5; } last = next; } return last; } inline void RGBtoHSV(gfloat r, gfloat g, gfloat b, gfloat *h, gfloat *s, gfloat *v) { *v = MAX(r, MAX (g, b)); gfloat gap = *v - MIN (r, MIN (g, b)); if (gap > 0.0f) { if (r == *v) { *h = (g - b) / gap; if (*h < 0.0f) *h += 6.0f; } else if (g == *v) *h = 2.0f + (b - r) / gap; else *h = 4.0f + (r - g) / gap; *s = gap / *v; } else { *h = 0.0f; *s = 0.0f; } } inline gfloat exposure_ramp (RSDcp *dcp, gfloat x) { if (x <= dcp->exposure_black - dcp->exposure_radius) return 0.0; if (x >= dcp->exposure_black + dcp->exposure_radius) return (x - dcp->exposure_black) * dcp->exposure_slope; gfloat y = x - (dcp->exposure_black - dcp->exposure_radius); return dcp->exposure_qscale * y * y; } inline void HSVtoRGB(gfloat h, gfloat s, gfloat v, gfloat *r, gfloat *g, gfloat *b) { if (s > 0.0f) { if (h < 0.0f) h += 6.0f; if (h >= 6.0f) h -= 6.0f; gint i = (gint) h; gfloat f = h - (gint) i; gfloat p = v * (1.0f - s); #define q (v * (1.0f - s * f)) #define t (v * (1.0f - s * (1.0f - f))) switch (i) { case 0: *r = v; *g = t; *b = p; break; case 1: *r = q; *g = v; *b = p; break; case 2: *r = p; *g = v; *b = t; break; case 3: *r = p; *g = q; *b = v; break; case 4: *r = t; *g = p; *b = v; break; case 5: *r = v; *g = p; *b = q; break; } #undef q #undef t } else { *r = v; *g = v; *b = v; } } #define _F(x) (x / 65535.0) #define _S(x) CLAMP(((gint) (x * 65535.0)), 0, 65535) static void huesat_map(RSHuesatMap *map, gfloat *h, gfloat *s, gfloat *v) { g_assert(RS_IS_HUESAT_MAP(map)); gfloat hScale = (map->hue_divisions < 2) ? 0.0f : (map->hue_divisions * (1.0f / 6.0f)); gfloat sScale = (gfloat) (map->sat_divisions - 1); gfloat vScale = (gfloat) (map->val_divisions - 1); gint maxHueIndex0 = map->hue_divisions - 1; gint maxSatIndex0 = map->sat_divisions - 2; gint maxValIndex0 = map->val_divisions - 2; const RS_VECTOR3 *tableBase = map->deltas; gint hueStep = map->sat_divisions; gint valStep = map->hue_divisions * hueStep; gfloat hueShift; gfloat satScale; gfloat valScale; if (map->val_divisions < 2) { gfloat hScaled = *h * hScale; gfloat sScaled = *s * sScale; gint hIndex0 = (gint) hScaled; gint sIndex0 = (gint) sScaled; sIndex0 = MIN(sIndex0, maxSatIndex0); gint hIndex1 = hIndex0 + 1; if (hIndex0 >= maxHueIndex0) { hIndex0 = maxHueIndex0; hIndex1 = 0; } gfloat hFract1 = hScaled - (gfloat) hIndex0; gfloat sFract1 = sScaled - (gfloat) sIndex0; gfloat hFract0 = 1.0f - hFract1; gfloat sFract0 = 1.0f - sFract1; const RS_VECTOR3 *entry00 = tableBase + hIndex0 * hueStep + sIndex0; const RS_VECTOR3 *entry01 = entry00 + (hIndex1 - hIndex0) * hueStep; gfloat hueShift0 = hFract0 * entry00->fHueShift + hFract1 * entry01->fHueShift; gfloat satScale0 = hFract0 * entry00->fSatScale + hFract1 * entry01->fSatScale; gfloat valScale0 = hFract0 * entry00->fValScale + hFract1 * entry01->fValScale; entry00++; entry01++; gfloat hueShift1 = hFract0 * entry00->fHueShift + hFract1 * entry01->fHueShift; gfloat satScale1 = hFract0 * entry00->fSatScale + hFract1 * entry01->fSatScale; gfloat valScale1 = hFract0 * entry00->fValScale + hFract1 * entry01->fValScale; hueShift = sFract0 * hueShift0 + sFract1 * hueShift1; satScale = sFract0 * satScale0 + sFract1 * satScale1; valScale = sFract0 * valScale0 + sFract1 * valScale1; } else { gfloat hScaled = *h * hScale; gfloat sScaled = *s * sScale; gfloat vScaled = *v * vScale; gint hIndex0 = (gint) hScaled; gint sIndex0 = (gint) sScaled; gint vIndex0 = (gint) vScaled; sIndex0 = MIN(sIndex0, maxSatIndex0); vIndex0 = MIN(vIndex0, maxValIndex0); gint hIndex1 = hIndex0 + 1; if (hIndex0 >= maxHueIndex0) { hIndex0 = maxHueIndex0; hIndex1 = 0; } gfloat hFract1 = hScaled - (gfloat) hIndex0; gfloat sFract1 = sScaled - (gfloat) sIndex0; gfloat vFract1 = vScaled - (gfloat) vIndex0; gfloat hFract0 = 1.0f - hFract1; gfloat sFract0 = 1.0f - sFract1; gfloat vFract0 = 1.0f - vFract1; const RS_VECTOR3 *entry00 = tableBase + vIndex0 * valStep + hIndex0 * hueStep + sIndex0; const RS_VECTOR3 *entry01 = entry00 + (hIndex1 - hIndex0) * hueStep; const RS_VECTOR3 *entry10 = entry00 + valStep; const RS_VECTOR3 *entry11 = entry01 + valStep; gfloat hueShift0 = vFract0 * (hFract0 * entry00->fHueShift + hFract1 * entry01->fHueShift) + vFract1 * (hFract0 * entry10->fHueShift + hFract1 * entry11->fHueShift); gfloat satScale0 = vFract0 * (hFract0 * entry00->fSatScale + hFract1 * entry01->fSatScale) + vFract1 * (hFract0 * entry10->fSatScale + hFract1 * entry11->fSatScale); gfloat valScale0 = vFract0 * (hFract0 * entry00->fValScale + hFract1 * entry01->fValScale) + vFract1 * (hFract0 * entry10->fValScale + hFract1 * entry11->fValScale); entry00++; entry01++; entry10++; entry11++; gfloat hueShift1 = vFract0 * (hFract0 * entry00->fHueShift + hFract1 * entry01->fHueShift) + vFract1 * (hFract0 * entry10->fHueShift + hFract1 * entry11->fHueShift); gfloat satScale1 = vFract0 * (hFract0 * entry00->fSatScale + hFract1 * entry01->fSatScale) + vFract1 * (hFract0 * entry10->fSatScale + hFract1 * entry11->fSatScale); gfloat valScale1 = vFract0 * (hFract0 * entry00->fValScale + hFract1 * entry01->fValScale) + vFract1 * (hFract0 * entry10->fValScale + hFract1 * entry11->fValScale); hueShift = sFract0 * hueShift0 + sFract1 * hueShift1; satScale = sFract0 * satScale0 + sFract1 * satScale1; valScale = sFract0 * valScale0 + sFract1 * valScale1; } hueShift *= (6.0f / 360.0f); *h += hueShift; *s = MIN(*s * satScale, 1.0); *v = MIN(*v * valScale, 1.0); } static inline gfloat lookup_tone(gfloat value, const gfloat * const tone_lut) { gfloat lookup = CLAMP(value * 1024.0f, 0.0f, 1023.9999f); gfloat v0 = tone_lut[(gint)lookup*2]; gfloat v1 = tone_lut[(gint)lookup*2 + 1]; lookup -= floorf(lookup); return v0 * (1.0f - lookup) + v1 * lookup; } /* RefBaselineRGBTone() */ void rgb_tone(gfloat *_r, gfloat *_g, gfloat *_b, const gfloat * const tone_lut) { gfloat r = *_r; gfloat g = *_g; gfloat b = *_b; gfloat rr; gfloat gg; gfloat bb; #define RGBTone(lg, md, sm, LG, MD, SM)\ {\ LG = lookup_tone(lg, tone_lut);\ SM = lookup_tone(sm, tone_lut);\ \ MD = SM + ((LG - SM) * (md - sm) / (lg - sm));\ \ } /* Tone curve is: 1. Lookup smallest and largest of R,G,B 2. Middle value is calculated as (CAPS is curve corrected) MD = SM + ((LG - SM) * (md - sm) / (lg - sm)) 3. Store. */ if (r >= g) { if (g > b) { // Case 1: r >= g > b; hue = 0-1 RGBTone (r, g, b, rr, gg, bb); } else if (b > r) { // Case 2: b > r >= g; hue = 4-5 RGBTone (b, r, g, bb, rr, gg); } else if (b > g) { // Case 3: r >= b > g; hue = 5-6 RGBTone (r, b, g, rr, bb, gg); } else { // Case 4: r >= g == b; s = 0; rr = lookup_tone(r, tone_lut); gg = lookup_tone(b, tone_lut); bb = gg; } } else // g > r { if (r >= b) { // Case 5: g > r >= b; hue = 1-2 RGBTone (g, r, b, gg, rr, bb); } else if (b > g) { // Case 6: b > g > r; hue = 3-4 RGBTone (b, g, r, bb, gg, rr); } else { // Case 7: g >= b > r; hue = 2-3 RGBTone (g, b, r, gg, bb, rr); } } #undef RGBTone *_r = rr; *_g = gg; *_b = bb; } static void pre_cache_tables(RSDcp *dcp) { int i; gfloat unused = 0; const int cache_line_bytes = 64; /* Preloads cache with lookup data */ if (!dcp->curve_is_flat) { for (i = 0; i < 514; i+=(cache_line_bytes/sizeof(gfloat))) unused = dcp->curve_samples[i]; } if (dcp->tone_curve_lut) { for (i = 0; i < 2050; i+=(cache_line_bytes/sizeof(gfloat))) unused = dcp->tone_curve_lut[i]; } if (dcp->huesatmap) { int num = dcp->huesatmap->hue_divisions * dcp->huesatmap->sat_divisions * dcp->huesatmap->val_divisions; num = num * sizeof(RS_VECTOR3) / sizeof(gfloat); gfloat *data = (gfloat*)dcp->huesatmap->deltas; for (i = 0; i < num; i+=(cache_line_bytes/sizeof(gfloat))) unused = data[i]; } if (dcp->looktable) { int num = dcp->looktable->hue_divisions * dcp->looktable->sat_divisions * dcp->looktable->val_divisions; num = num * sizeof(RS_VECTOR3) / sizeof(gfloat); gfloat *data = (gfloat*)dcp->looktable->deltas; for (i = 0; i < num; i+=(cache_line_bytes/sizeof(gfloat))) unused = data[i]; } /* This is needed so the optimizer doesn't believe the value is unused */ dcp->junk_value = unused; } static void render(ThreadInfo* t) { RS_IMAGE16 *image = t->tmp; RSDcp *dcp = t->dcp; gint x, y; gfloat h, s, v; gfloat r, g, b; RS_VECTOR3 pix; gboolean do_contrast = (dcp->contrast > 1.001f); gboolean do_highrec = (dcp->contrast < 0.999f); float contr_base = 0.5; float exposure_simple = MAX(1.0, powf(2.0f, dcp->exposure)); float recover_radius = 0.5 * exposure_simple; float inv_recover_radius = 1.0f / recover_radius; recover_radius = 1.0 - recover_radius; RS_VECTOR3 clip; if (dcp->use_profile) { clip.R = dcp->camera_white.R; clip.G = dcp->camera_white.G; clip.B = dcp->camera_white.B; } for(y = t->start_y ; y < t->end_y; y++) { for(x=t->start_x; x < image->w; x++) { gushort *pixel = GET_PIXEL(image, x, y); /* Convert to float */ r = _F(pixel[R]); g = _F(pixel[G]); b = _F(pixel[B]); if (dcp->use_profile) { r = MIN(clip.R, r); g = MIN(clip.G, g); b = MIN(clip.B, b); } pix.R = r; pix.G = g; pix.B = b; pix = vector3_multiply_matrix(&pix, &dcp->camera_to_prophoto); r = pix.R; g = pix.G; b = pix.B; r = CLAMP(r * dcp->channelmixer_red, 0.0, 1.0); g = CLAMP(g * dcp->channelmixer_green, 0.0, 1.0); b = CLAMP(b * dcp->channelmixer_blue, 0.0, 1.0); /* To HSV */ RGBtoHSV(r, g, b, &h, &s, &v); if (dcp->huesatmap) huesat_map(dcp->huesatmap, &h, &s, &v); /* Saturation */ if (dcp->saturation > 1.0) { /* Apply curved saturation, when we add saturation */ float sat_val = dcp->saturation - 1.0f; s = (sat_val * (s * 2.0f - (s * s))) + ((1.0f - sat_val) * s); s = MIN(s, 1.0); } else { s *= dcp->saturation; s = MIN(s, 1.0); } /* Hue */ h += dcp->hue; /* Back to RGB */ HSVtoRGB(h, s, v, &r, &g, &b); /* Exposure Compensation */ r = exposure_ramp(dcp, r); g = exposure_ramp(dcp, g); b = exposure_ramp(dcp, b); /* Contrast in gamma 2.0 */ if (do_contrast) { r = MAX((sqrtf(r) - contr_base) * dcp->contrast + contr_base, 0.0f); r *= r; g = MAX((sqrtf(g) - contr_base) * dcp->contrast + contr_base, 0.0f); g *= g; b = MAX((sqrtf(b) - contr_base) * dcp->contrast + contr_base, 0.0f); b *= b; } else if (do_highrec) { /* Distance from 1.0 - radius */ float dist = v - recover_radius; /* Scale so distance is normalized, clamp */ float dist_scaled = MIN(1.0, dist * inv_recover_radius); float mul_val = 1.0 - dist_scaled * (1.0 - dcp->contrast); r = r * mul_val; g = g * mul_val; b = b * mul_val; } /* To HSV */ r = MIN(r, 1.0f); g = MIN(g, 1.0f); b = MIN(b, 1.0f); RGBtoHSV(r, g, b, &h, &s, &v); /* Curve */ if (dcp->read_out_curve) { gfloat t1,t2,t3; if (dcp->tone_curve_lut) { t1 = t2 = t3 = v; rgb_tone(&t1, &t1, &t3, dcp->tone_curve_lut); } int input = (int)(CLAMP(sqrtf(t1) * 256.0f, 0.0f, 255.9999f)); t->curve_input_values[input]++; } if (!dcp->curve_is_flat) { gfloat lookup = CLAMP(v * 256.0f, 0.0f, 255.9999f); gfloat v0 = dcp->curve_samples[(gint)lookup*2]; gfloat v1 = dcp->curve_samples[(gint)lookup*2 + 1]; lookup -= floorf(lookup); v = v0 * (1.0f - lookup) + v1 * lookup; } if (dcp->looktable) huesat_map(dcp->looktable, &h, &s, &v); /* Back to RGB */ HSVtoRGB(h, s, v, &r, &g, &b); /* Apply tone curve */ if (dcp->tone_curve_lut) rgb_tone(&r, &g, &b, dcp->tone_curve_lut); /* Save as gushort */ pixel[R] = _S(r); pixel[G] = _S(g); pixel[B] = _S(b); } } } #undef _F #undef _S const static RS_MATRIX3 xyz_to_prophoto = {{ { 1.3459433, -0.2556075, -0.0511118 }, { -0.5445989, 1.5081673, 0.0205351 }, { 0.0000000, 0.0000000, 1.2118128 } }}; const static RS_MATRIX3 prophoto_to_xyz = {{ { 0.7976749, 0.1351917, 0.0313534}, { 0.2880402, 0.7118741, 0.0000857}, { 0.0000000, 0.0000000, 0.8252100} }}; /* dng_color_spec::FindXYZtoCamera */ static RS_MATRIX3 find_xyz_to_camera(RSDcp *dcp, const RS_xy_COORD *white_xy, RS_MATRIX3 *forward_matrix) { if (!dcp->use_profile) { return xyz_to_prophoto; } gfloat temp = 5000.0; rs_color_whitepoint_to_temp(white_xy, &temp, NULL); gfloat alpha = 0.0; if (temp <= dcp->temp1) alpha = 1.0; else if (temp >= dcp->temp2) alpha = 0.0; else if ((dcp->temp2 > 0.0) && (dcp->temp1 > 0.0) && (temp > 0.0)) { gdouble invT = 1.0 / temp; alpha = (invT - (1.0 / dcp->temp2)) / ((1.0 / dcp->temp1) - (1.0 / dcp->temp2)); } /* Interpolate if more than one color matrix */ RS_MATRIX3 color_matrix; if(dcp->has_color_matrix1 && dcp->has_color_matrix2) matrix3_interpolate(&dcp->color_matrix1, &dcp->color_matrix2, alpha, &color_matrix); else if (dcp->has_color_matrix1) color_matrix = dcp->color_matrix1; else if (dcp->has_color_matrix2) color_matrix = dcp->color_matrix2; if (forward_matrix) { if (dcp->has_forward_matrix1 && dcp->has_forward_matrix2) matrix3_interpolate(&dcp->forward_matrix1, &dcp->forward_matrix2, 1.0-alpha, forward_matrix); else if (dcp->has_forward_matrix1) *forward_matrix = dcp->forward_matrix1; else if (dcp->has_forward_matrix2) *forward_matrix = dcp->forward_matrix2; } calculate_huesat_maps(dcp, temp); return color_matrix; } static void calculate_huesat_maps(RSDcp *dcp, gfloat temp) { gfloat alpha = 0.0; if (temp <= dcp->temp1) alpha = 1.0; else if (temp >= dcp->temp2) alpha = 0.0; else if ((dcp->temp2 > 0.0) && (dcp->temp1 > 0.0) && (temp > 0.0)) { gdouble invT = 1.0 / temp; alpha = (invT - (1.0 / dcp->temp2)) / ((1.0 / dcp->temp1) - (1.0 / dcp->temp2)); } dcp->huesatmap = 0; if (dcp->huesatmap1 != NULL && dcp->huesatmap2 != NULL) { gint hd = dcp->huesatmap1->hue_divisions; gint sd = dcp->huesatmap1->sat_divisions; gint vd = dcp->huesatmap1->val_divisions; if (hd == dcp->huesatmap2->hue_divisions && sd == dcp->huesatmap2->sat_divisions && vd == dcp->huesatmap2->val_divisions) { if (temp > dcp->temp1 && temp < dcp->temp2) { if (dcp->huesatmap_interpolated) g_object_unref(dcp->huesatmap_interpolated); dcp->huesatmap_interpolated = rs_huesat_map_new(hd, sd, vd); float t1_weight = alpha; float t2_weight = 1.0f - alpha; int vals = hd * sd * vd; RS_VECTOR3 *t_out = dcp->huesatmap_interpolated->deltas; RS_VECTOR3 *t1 = dcp->huesatmap1->deltas; RS_VECTOR3 *t2 = dcp->huesatmap2->deltas; gint i; for (i = 0; i < vals; i++) { t_out[i].x = t1[i].x * t1_weight + t2[i].x * t2_weight; t_out[i].y = t1[i].y * t1_weight + t2[i].y * t2_weight; t_out[i].z = t1[i].z * t1_weight + t2[i].z * t2_weight; } // printf("T1:%f, T2:%f, Cam:%f, t1w:%f, t2w:%f, vals:%d\n",dcp->temp1, dcp->temp2, temp, t1_weight, t2_weight, vals ); } else if (temp <= dcp->temp1) dcp->huesatmap = dcp->huesatmap1; else dcp->huesatmap = dcp->huesatmap2; } } /* If we don't have two huesatmaps, it will still be 0. */ /* If that is the case, set it to the one that is present */ if (dcp->huesatmap == 0) { if (dcp->huesatmap1 != 0) dcp->huesatmap = dcp->huesatmap1; else dcp->huesatmap = dcp->huesatmap2; } } /* Verified to behave like dng_camera_profile::NormalizeForwardMatrix */ static void normalize_forward_matrix(RS_MATRIX3 *matrix) { RS_MATRIX3 tmp; RS_VECTOR3 camera_one = {{1.0}, {1.0}, {1.0} }; RS_MATRIX3 pcs_to_xyz_dia = vector3_as_diagonal(&XYZ_WP_D50); RS_VECTOR3 xyz = vector3_multiply_matrix(&camera_one, matrix); RS_MATRIX3 xyz_as_dia = vector3_as_diagonal(&xyz); RS_MATRIX3 xyz_as_dia_inv = matrix3_invert(&xyz_as_dia); matrix3_multiply(&pcs_to_xyz_dia, &xyz_as_dia_inv, &tmp); matrix3_multiply(&tmp, matrix, matrix); } static void set_prophoto_wb(RSDcp *dcp, gfloat warmth, gfloat tint) { RS_xy_COORD prophoto_white; prophoto_white.x = 0.3457; prophoto_white.y = 0.3585; RS_xy_COORD dest_xy = rs_color_temp_to_whitepoint(warmth, tint); RS_MATRIX3 map = rs_calculate_map_white_matrix(&dest_xy, &prophoto_white); RS_MATRIX3 pcs_to_camera; matrix3_multiply(&prophoto_to_xyz, &map, &pcs_to_camera); matrix3_multiply(&pcs_to_camera, &xyz_to_prophoto, &dcp->camera_to_prophoto); } /* dng_color_spec::SetWhiteXY */ static void set_white_xy(RSDcp *dcp, const RS_xy_COORD *xy) { RS_MATRIX3 color_matrix; RS_MATRIX3 forward_matrix; dcp->white_xy = *xy; color_matrix = find_xyz_to_camera(dcp, xy, &forward_matrix); RS_XYZ_VECTOR white = xy_to_XYZ(xy); dcp->camera_white = vector3_multiply_matrix(&white, &color_matrix); gfloat white_scale = 1.0 / vector3_max(&dcp->camera_white); dcp->camera_white.x = CLAMP(0.001, white_scale * dcp->camera_white.x, 1.0); dcp->camera_white.y = CLAMP(0.001, white_scale * dcp->camera_white.y, 1.0); dcp->camera_white.z = CLAMP(0.001, white_scale * dcp->camera_white.z, 1.0); if (dcp->has_forward_matrix1 || dcp->has_forward_matrix2) { /* verified by DNG SDK */ RS_MATRIX3 refCameraWhite_diagonal = vector3_as_diagonal(&dcp->camera_white); RS_MATRIX3 refCameraWhite_diagonal_inv = matrix3_invert(&refCameraWhite_diagonal); /* D */ matrix3_multiply(&forward_matrix, &refCameraWhite_diagonal_inv, &dcp->camera_to_pcs); } else { /* FIXME: test this */ RS_xy_COORD PCStoXY = {0.3457, 0.3585}; RS_MATRIX3 map = rs_calculate_map_white_matrix(&PCStoXY, xy); /* or &white?! */ RS_MATRIX3 pcs_to_camera; matrix3_multiply(&color_matrix, &map, &pcs_to_camera); RS_VECTOR3 tmp = vector3_multiply_matrix(&XYZ_WP_D50, &pcs_to_camera); gfloat scale = vector3_max(&tmp); matrix3_scale(&pcs_to_camera, 1.0 / scale, &pcs_to_camera); dcp->camera_to_pcs = matrix3_invert(&pcs_to_camera); } } static void precalc(RSDcp *dcp) { const static RS_MATRIX3 xyz_to_prophoto = {{ { 1.3459433, -0.2556075, -0.0511118 }, { -0.5445989, 1.5081673, 0.0205351 }, { 0.0000000, 0.0000000, 1.2118128 } }}; /* Camera to ProPhoto */ if (dcp->use_profile) matrix3_multiply(&xyz_to_prophoto, &dcp->camera_to_pcs, &dcp->camera_to_prophoto); /* verified by SDK */ if (dcp->huesatmap) calc_hsm_constants(dcp->huesatmap, dcp->huesatmap_precalc); if (dcp->looktable) calc_hsm_constants(dcp->looktable, dcp->looktable_precalc); } static void read_profile(RSDcp *dcp, RSDcpFile *dcp_file) { gint i; free_dcp_profile(dcp); /* ColorMatrix */ dcp->has_color_matrix1 = rs_dcp_file_get_color_matrix1(dcp_file, &dcp->color_matrix1); dcp->has_color_matrix2 = rs_dcp_file_get_color_matrix2(dcp_file, &dcp->color_matrix2); /* CalibrationIlluminant */ dcp->temp1 = rs_dcp_file_get_illuminant1(dcp_file); dcp->temp2 = rs_dcp_file_get_illuminant2(dcp_file); /* FIXME: If temp1 > temp2, swap them and data*/ /* ProfileToneCurve */ dcp->tone_curve = rs_dcp_file_get_tonecurve(dcp_file); if (!dcp->tone_curve) { gint num_knots = adobe_default_table_size; gfloat *knots = g_new0(gfloat, adobe_default_table_size * 2); for(i = 0; i < adobe_default_table_size; i++) { knots[i*2] = (gfloat)i / (gfloat)adobe_default_table_size; knots[i*2+1] = adobe_default_table[i]; } dcp->tone_curve = rs_spline_new(knots, num_knots, NATURAL); g_free(knots); } g_assert(0 == posix_memalign((void**)&dcp->tone_curve_lut, 16, sizeof(gfloat)*2*1025)); gfloat *tc = rs_spline_sample(dcp->tone_curve, NULL, 1024); for (i=0; i< 1024; i++) { if (i>0) dcp->tone_curve_lut[i*2-1] = tc[i]; dcp->tone_curve_lut[i*2] = tc[i]; } dcp->tone_curve_lut[1024*2-1] = dcp->tone_curve_lut[1024*2] = dcp->tone_curve_lut[1024*2+1] = tc[1023]; g_free(tc); /* ForwardMatrix */ dcp->has_forward_matrix1 = rs_dcp_file_get_forward_matrix1(dcp_file, &dcp->forward_matrix1); dcp->has_forward_matrix2 = rs_dcp_file_get_forward_matrix2(dcp_file, &dcp->forward_matrix2); if (dcp->has_forward_matrix1) normalize_forward_matrix(&dcp->forward_matrix1); if (dcp->has_forward_matrix2) normalize_forward_matrix(&dcp->forward_matrix2); dcp->looktable = rs_dcp_file_get_looktable(dcp_file); dcp->huesatmap1 = rs_dcp_file_get_huesatmap1(dcp_file); dcp->huesatmap2 = rs_dcp_file_get_huesatmap2(dcp_file); dcp->huesatmap = 0; dcp->use_profile = TRUE; set_white_xy(dcp, &dcp->white_xy); precalc(dcp); } /* + 0xc621 ColorMatrix1 (9 * SRATIONAL) + 0xc622 ColorMatrix2 (9 * SRATIONAL) + 0xc725 ReductionMatrix1 (9 * SRATIONAL) + 0xc726 ReductionMatrix2 (9 * SRATIONAL) + 0xc65a CalibrationIlluminant1 (1 * SHORT) + 0xc65b CalibrationIlluminant2 (1 * SHORT) • 0xc6f4 ProfileCalibrationSignature (ASCII or BYTE) • 0xc6f8 ProfileName (ASCII or BYTE) • 0xc6f9 ProfileHueSatMapDims (3 * LONG) • 0xc6fa ProfileHueSatMapData1 (FLOAT) • 0xc6fb ProfileHueSatMapData2 (FLOAT) • 0xc6fc ProfileToneCurve (FLOAT) • 0xc6fd ProfileEmbedPolicy (LONG) • 0xc6fe ProfileCopyright (ASCII or BYTE) + 0xc714 ForwardMatrix1 (SRATIONAL) + 0xc715 ForwardMatrix2 (SRATIONAL) • 0xc725 ProfileLookTableDims (3 * LONG) • 0xc726 ProfileLookTableData */ rawstudio-2.0/plugins/dcp/Makefile.am0000644000175000017500000000234111526533643014610 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = -O4 -Wall -ffast-math -ffinite-math-only \ -funsafe-math-optimizations -funroll-loops AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/plugins/dcp/ lib_LTLIBRARIES = dcp.la libdir = $(datadir)/rawstudio/plugins/ dcp_la_LIBADD = @PACKAGE_LIBS@ adobe-camera-raw-tone.lo dcp-sse2.lo dcp-sse4.lo dcp-c.lo dcp_la_LDFLAGS = -module -avoid-version dcp_la_SOURCES = EXTRA_DIST = dcp.c dcp.h dcp-sse2.c dcp-sse4.c adobe-camera-raw-tone.c adobe-camera-raw-tone.h adobe-camera-raw-tone.lo: adobe-camera-raw-tone.c adobe-camera-raw-tone.h $(LTCOMPILE) -c $(top_srcdir)/plugins/dcp/adobe-camera-raw-tone.c dcp-c.lo: dcp.c adobe-camera-raw-tone.h $(LTCOMPILE) -o dcp-c.o -c $(top_srcdir)/plugins/dcp/dcp.c if CAN_COMPILE_SSE4_1 SSE4_FLAG=-msse4.1 else SSE4_FLAG= endif if CAN_COMPILE_SSE2 SSE2_FLAG=-msse2 else SSE2_FLAG= endif dcp-sse2.lo: dcp-sse2.c dcp.h $(LTCOMPILE) $(SSE2_FLAG) -c $(top_srcdir)/plugins/dcp/dcp-sse2.c dcp-sse4.lo: dcp-sse4.c dcp.h $(LTCOMPILE) $(SSE4_FLAG) -c $(top_srcdir)/plugins/dcp/dcp-sse4.c rawstudio-2.0/plugins/dcp/dcp.h0000644000175000017500000000635111534730147013475 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 DCP_H #define DCP_H #include "config.h" #include #define RS_TYPE_DCP (rs_dcp_type) #define RS_DCP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_DCP, RSDcp)) #define RS_DCP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_DCP, RSDcpClass)) #define RS_IS_DCP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_DCP)) #define RS_DCP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_DCP, RSDcpClass)) typedef struct _RSDcp RSDcp; typedef struct _RSDcpClass RSDcpClass; typedef struct { /* Precalc: all sizes must be 16 byte aligned */ gfloat hScale[4]; gfloat sScale[4]; gfloat vScale[4]; gint maxHueIndex0[4]; gint maxSatIndex0[4]; gint maxValIndex0[4]; gint hueStep[4]; gint valStep[4]; } PrecalcHSM; struct _RSDcp { RSFilter parent; gulong settings_signal_id; RSSettings *settings; gfloat exposure; gfloat saturation; gfloat contrast; gfloat hue; gfloat channelmixer_red; gfloat channelmixer_green; gfloat channelmixer_blue; gfloat warmth, tint; RS_VECTOR3 pre_mul; RS_xy_COORD white_xy; gint nknots; gfloat *curve_samples; gboolean curve_is_flat; gfloat temp1; gfloat temp2; gboolean use_profile; RSSpline *tone_curve; gfloat *tone_curve_lut; gboolean has_color_matrix1; gboolean has_color_matrix2; RS_MATRIX3 color_matrix1; RS_MATRIX3 color_matrix2; gboolean has_forward_matrix1; gboolean has_forward_matrix2; RS_MATRIX3 forward_matrix1; RS_MATRIX3 forward_matrix2; RS_MATRIX3 forward_matrix; RSHuesatMap *looktable; RSHuesatMap *huesatmap; RSHuesatMap *huesatmap1; RSHuesatMap *huesatmap2; RSHuesatMap *huesatmap_interpolated; RS_MATRIX3 camera_to_pcs; RS_VECTOR3 camera_white; RS_MATRIX3 camera_to_prophoto; gfloat exposure_slope; gfloat exposure_black; gfloat exposure_radius; gfloat exposure_qscale; PrecalcHSM *huesatmap_precalc; PrecalcHSM *looktable_precalc; void* _huesatmap_precalc_unaligned; void* _looktable_precalc_unaligned; gfloat junk_value; RSCurveWidget* read_out_curve; }; struct _RSDcpClass { RSFilterClass parent_class; RSColorSpace *prophoto; RSIccProfile *prophoto_profile; }; typedef struct { RSDcp *dcp; GThread *threadid; gint start_x; gint start_y; gint end_y; RS_IMAGE16 *tmp; guint curve_input_values[256]; } ThreadInfo; gboolean render_SSE2(ThreadInfo* t); gboolean render_SSE4(ThreadInfo* t); void calc_hsm_constants(const RSHuesatMap *map, PrecalcHSM* table); #endif /* DCP_H */ rawstudio-2.0/plugins/dcp/adobe-camera-raw-tone.h0000644000175000017500000000364411526533643016766 00000000000000/* Default tone curve from Adobe DNG SDK: */ /*****************************************************************************/ // Copyright 2006-2007 Adobe Systems Incorporated // All Rights Reserved. // // NOTICE: Adobe permits you to use, modify, and distribute this file in // accordance with the terms of the Adobe license agreement accompanying it. /*****************************************************************************/ /* $Id: //mondo/dng_sdk_1_3/dng_sdk/source/dng_render.cpp#1 $ */ /* $DateTime: 2009/06/22 05:04:49 $ */ /* $Change: 578634 $ */ /* $Author: tknoll $ */ /*****************************************************************************/ /* The MIT License specifies the terms and conditions of use for those Adobe Open Source libraries that it covers: Copyright (c) 2005 Adobe Systems Incorporated Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. \endverbatim */ extern const float adobe_default_table[]; extern const int adobe_default_table_size; rawstudio-2.0/plugins/dcp/dcp-sse2.c0000644000175000017500000011170211534730147014337 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "dcp.h" #ifdef __SSE2__ #include #include /* powf() */ #pragma GCC diagnostic ignored "-Wstrict-aliasing" /* We ignore this pragma, because we are casting a pointer from float to int to pass a float using */ /* _mm_insert_epi32, since no-one was kind enough to include "insertps xmm, mem32, imm8" */ /* as a valid intrinsic. So we use the integer equivalent instead */ /* Regarding table lookups: */ /* We are using double sized tables to avoid cache-splits, */ /* when looking up curve and rgb_tone */ static gfloat _ones_ps[4] __attribute__ ((aligned (16))) = {1.0f, 1.0f, 1.0f, 1.0f}; static gfloat _two_ps[4] __attribute__ ((aligned (16))) = {2.0f, 2.0f, 2.0f, 2.0f}; static gfloat _six_ps[4] __attribute__ ((aligned (16))) = {6.0f-1e-15, 6.0f-1e-15, 6.0f-1e-15, 6.0f-1e-15}; static gfloat _very_small_ps[4] __attribute__ ((aligned (16))) = {1e-15, 1e-15, 1e-15, 1e-15}; static const gfloat _two_to_23_ps[4] __attribute__ ((aligned (16))) = { 0x1.0p23f, 0x1.0p23f, 0x1.0p23f, 0x1.0p23f }; static guint _ps_mask_sign[4] __attribute__ ((aligned (16))) = {0x7fffffff,0x7fffffff,0x7fffffff,0x7fffffff}; #define DW(A) _mm_castps_si128(A) #define PS(A) _mm_castsi128_ps(A) /* Floor for positive numbers */ static inline __m128 _mm_floor_positive_ps( __m128 v ) { __m128 two_to_23_ps = _mm_load_ps(_two_to_23_ps); return _mm_sub_ps( _mm_add_ps( v, two_to_23_ps ), two_to_23_ps ); } static inline void RGBtoHSV_SSE2(__m128 *c0, __m128 *c1, __m128 *c2) { __m128i zero_i = _mm_setzero_si128(); __m128 small_ps = _mm_load_ps(_very_small_ps); __m128 ones_ps = _mm_load_ps(_ones_ps); __m128i ps_mask_sign = _mm_load_si128((__m128i*)_ps_mask_sign); // Any number > 1 __m128 add_v = _mm_load_ps(_two_ps); __m128 r = *c0; __m128 g = *c1; __m128 b = *c2; /* Clamp */ r = _mm_min_ps(_mm_max_ps(r, small_ps),ones_ps); g = _mm_min_ps(_mm_max_ps(g, small_ps),ones_ps); b = _mm_min_ps(_mm_max_ps(b, small_ps),ones_ps); __m128 v = _mm_max_ps(b,_mm_max_ps(r,g)); __m128 m = _mm_min_ps(b,_mm_min_ps(r,g)); __m128 gap = _mm_sub_ps(v,m); __m128 v_mask = PS(_mm_cmpeq_epi32(_mm_and_si128(DW(gap), ps_mask_sign), zero_i)); v = _mm_add_ps(v, _mm_and_ps(add_v, v_mask)); /* Set gap to one where sat = 0, this will avoid divisions by zero, these values will not be used */ ones_ps = _mm_and_ps(ones_ps, v_mask); gap = _mm_or_ps(gap, ones_ps); /* gap_inv = 1.0 / gap */ __m128 gap_inv = _mm_rcp_ps(gap); /* if r == v */ /* h = (g - b) / gap; */ __m128i mask = _mm_cmpeq_epi32(DW(r), DW(v)); __m128 val = _mm_mul_ps(gap_inv, _mm_sub_ps(g, b)); /* fill h */ v = _mm_add_ps(v, _mm_and_ps(add_v, PS(mask))); __m128i h = _mm_and_si128(DW(val), mask); /* if g == v */ /* h = 2.0f + (b - r) / gap; */ __m128 two_ps = _mm_load_ps(_two_ps); mask = _mm_cmpeq_epi32(DW(g), DW(v)); val = _mm_sub_ps(b, r); val = _mm_mul_ps(val, gap_inv); val = _mm_add_ps(val, two_ps); v = _mm_add_ps(v, _mm_and_ps(add_v, PS(mask))); h = _mm_or_si128(h, _mm_and_si128(DW(val), mask)); /* If (b == v) */ /* h = 4.0f + (r - g) / gap; */ __m128 four_ps = _mm_add_ps(two_ps, two_ps); mask = _mm_cmpeq_epi32(DW(b), DW(v)); val = _mm_add_ps(four_ps, _mm_mul_ps(gap_inv, _mm_sub_ps(r, g))); h = _mm_or_si128(h, _mm_and_si128(DW(val), mask)); v = _mm_add_ps(v, _mm_and_ps(add_v, PS(mask))); __m128 s; /* Fill s, if gap > 0 */ v = _mm_sub_ps(v, add_v); val = _mm_mul_ps(gap,_mm_rcp_ps(v)); s = _mm_andnot_ps(v_mask, val ); /* Check if h < 0 */ zero_i = _mm_setzero_si128(); __m128i six_ps_i = _mm_load_si128((__m128i*)_six_ps); /* We can use integer comparision, since we are checking if h < 0, since the sign bit is same in integer */ mask = _mm_cmplt_epi32(h, zero_i); __m128 h2 = _mm_add_ps(PS(h), PS(_mm_and_si128(mask, six_ps_i))); *c0 = h2; *c1 = s; *c2 = v; } static inline void HSVtoRGB_SSE(__m128 *c0, __m128 *c1, __m128 *c2) { __m128 h = *c0; __m128 s = *c1; __m128 v = *c2; __m128 r, g, b; /* Convert get the fraction of h * h_fraction = h - floor(h) */ __m128 ones_ps = _mm_load_ps(_ones_ps); __m128 h_fraction = _mm_sub_ps(h,_mm_floor_positive_ps(h)); /* p = v * (1.0f - s) */ __m128 p = _mm_mul_ps(v, _mm_sub_ps(ones_ps, s)); /* q = (v * (1.0f - s * f)) */ __m128 q = _mm_mul_ps(v, _mm_sub_ps(ones_ps, _mm_mul_ps(s, h_fraction))); /* t = (v * (1.0f - s * (1.0f - f))) */ __m128 t = _mm_mul_ps(v, _mm_sub_ps(ones_ps, _mm_mul_ps(s, _mm_sub_ps(ones_ps, h_fraction)))); /* h < 1 (case 0)*/ /* case 0: *r = v; *g = t; *b = p; break; */ __m128 h_threshold = _mm_add_ps(ones_ps, ones_ps); __m128 out_mask = _mm_cmplt_ps(h, ones_ps); r = _mm_and_ps(v, out_mask); g = _mm_and_ps(t, out_mask); b = _mm_and_ps(p, out_mask); /* h < 2 (case 1) */ /* case 1: *r = q; *g = v; *b = p; break; */ __m128 m = _mm_cmplt_ps(h, h_threshold); h_threshold = _mm_add_ps(h_threshold, ones_ps); m = _mm_andnot_ps(out_mask, m); r = _mm_or_ps(r, _mm_and_ps(q, m)); g = _mm_or_ps(g, _mm_and_ps(v, m)); b = _mm_or_ps(b, _mm_and_ps(p, m)); out_mask = _mm_or_ps(out_mask, m); /* h < 3 (case 2)*/ /* case 2: *r = p; *g = v; *b = t; break; */ m = _mm_cmplt_ps(h, h_threshold); h_threshold = _mm_add_ps(h_threshold, ones_ps); m = _mm_andnot_ps(out_mask, m); r = _mm_or_ps(r, _mm_and_ps(p, m)); g = _mm_or_ps(g, _mm_and_ps(v, m)); b = _mm_or_ps(b, _mm_and_ps(t, m)); out_mask = _mm_or_ps(out_mask, m); /* h < 4 (case 3)*/ /* case 3: *r = p; *g = q; *b = v; break; */ m = _mm_cmplt_ps(h, h_threshold); h_threshold = _mm_add_ps(h_threshold, ones_ps); m = _mm_andnot_ps(out_mask, m); r = _mm_or_ps(r, _mm_and_ps(p, m)); g = _mm_or_ps(g, _mm_and_ps(q, m)); b = _mm_or_ps(b, _mm_and_ps(v, m)); out_mask = _mm_or_ps(out_mask, m); /* h < 5 (case 4)*/ /* case 4: *r = t; *g = p; *b = v; break; */ m = _mm_cmplt_ps(h, h_threshold); m = _mm_andnot_ps(out_mask, m); r = _mm_or_ps(r, _mm_and_ps(t, m)); g = _mm_or_ps(g, _mm_and_ps(p, m)); b = _mm_or_ps(b, _mm_and_ps(v, m)); out_mask = _mm_or_ps(out_mask, m); /* Remainder (case 5) */ /* case 5: *r = v; *g = p; *b = q; break; */ r = _mm_or_ps(r, _mm_andnot_ps(out_mask,v)); g = _mm_or_ps(g, _mm_andnot_ps(out_mask,p)); b = _mm_or_ps(b, _mm_andnot_ps(out_mask,q)); *c0 = r; *c1 = g; *c2 = b; } /* SSE2 implementation, matches the reference implementation pretty closely */ void calc_hsm_constants(const RSHuesatMap *map, PrecalcHSM* table) { g_assert(RS_IS_HUESAT_MAP(map)); int i; for (i = 0; i < 4; i++) { table->hScale[i] = (map->hue_divisions < 2) ? 0.0f : (map->hue_divisions * (1.0f / 6.0f)); table->sScale[i] = (gfloat) (map->sat_divisions - 1); table->vScale[i] = (gfloat) (map->val_divisions - 1); table->maxHueIndex0[i] = map->hue_divisions - 1; table->maxSatIndex0[i] = map->sat_divisions - 2; table->maxValIndex0[i] = map->val_divisions - 2; table->hueStep[i] = map->sat_divisions; table->valStep[i] = map->hue_divisions * map->sat_divisions; } } static gfloat _mul_hue_ps[4] __attribute__ ((aligned (16))) = {6.0f / 360.0f, 6.0f / 360.0f, 6.0f / 360.0f, 6.0f / 360.0f}; static gint _ones_epi32[4] __attribute__ ((aligned (16))) = {1,1,1,1}; static void huesat_map_SSE2(RSHuesatMap *map, const PrecalcHSM* precalc, __m128 *_h, __m128 *_s, __m128 *_v) { __m128 zero_ps = _mm_setzero_ps(); __m128 ones_ps = _mm_load_ps(_ones_ps); __m128 h = *_h; __m128 s = *_s; __m128 v = *_v; /* Clamp - H must be pre-clamped*/ s = _mm_min_ps(_mm_max_ps(s, zero_ps),ones_ps); v = _mm_min_ps(_mm_max_ps(v, zero_ps),ones_ps); gint xfer_0[4] __attribute__ ((aligned (16))); gint xfer_1[4] __attribute__ ((aligned (16))); const RS_VECTOR3 *tableBase = map->deltas; __m128 hueShift; __m128 satScale; __m128 valScale; if (map->val_divisions < 2) { __m128 hScaled = _mm_mul_ps(h, _mm_load_ps(precalc->hScale)); __m128 sScaled = _mm_mul_ps(s, _mm_load_ps(precalc->sScale)); __m128i maxHueIndex0 = _mm_load_si128((__m128i*)precalc->maxHueIndex0); __m128i maxSatIndex0 = _mm_load_si128((__m128i*)precalc->maxSatIndex0); __m128i hIndex0 = _mm_cvttps_epi32( hScaled ); __m128i sIndex0 = _mm_cvttps_epi32( sScaled ); sIndex0 = _mm_min_epi16(sIndex0, maxSatIndex0); __m128i ones_epi32 = _mm_load_si128((__m128i*)_ones_epi32); __m128i hIndex1 = _mm_add_epi32(hIndex0, ones_epi32); /* if (hIndex0 >= maxHueIndex0) */ __m128i hIndexMask = _mm_cmpgt_epi32( hIndex0, _mm_sub_epi32(maxHueIndex0, ones_epi32)); hIndex0 = _mm_andnot_si128(hIndexMask, hIndex0); /* hIndex1 = 0; */ hIndex1 = _mm_andnot_si128(hIndexMask, hIndex1); /* hIndex0 = maxHueIndex0 */ hIndex0 = _mm_or_si128(hIndex0, _mm_and_si128(hIndexMask, maxHueIndex0)); __m128 hFract1 = _mm_sub_ps( hScaled, _mm_cvtepi32_ps(hIndex0)); __m128 sFract1 = _mm_sub_ps( sScaled, _mm_cvtepi32_ps(sIndex0)); __m128 ones_ps = _mm_load_ps(_ones_ps); __m128 hFract0 = _mm_sub_ps(ones_ps, hFract1); __m128 sFract0 = _mm_sub_ps(ones_ps, sFract1); __m128i hueStep = _mm_load_si128((__m128i*)precalc->hueStep); __m128i table_offsets = _mm_add_epi32(sIndex0, _mm_mullo_epi16(hIndex0, hueStep)); __m128i next_offsets = _mm_add_epi32(sIndex0, _mm_mullo_epi16(hIndex1, hueStep)); _mm_store_si128((__m128i*)xfer_0, table_offsets); _mm_store_si128((__m128i*)xfer_1, next_offsets); const RS_VECTOR3 *entry00[4] = { tableBase + xfer_0[0], tableBase + xfer_0[1], tableBase + xfer_0[2], tableBase + xfer_0[3]}; const RS_VECTOR3 *entry01[4] = { tableBase + xfer_1[0], tableBase + xfer_1[1], tableBase + xfer_1[2], tableBase + xfer_1[3]}; __m128 hs0 = _mm_set_ps(entry00[3]->fHueShift, entry00[2]->fHueShift, entry00[1]->fHueShift, entry00[0]->fHueShift); __m128 hs1 = _mm_set_ps(entry01[3]->fHueShift, entry01[2]->fHueShift, entry01[1]->fHueShift, entry01[0]->fHueShift); __m128 hueShift0 = _mm_add_ps(_mm_mul_ps(hs0, hFract0), _mm_mul_ps(hs1, hFract1)); hueShift0 = _mm_mul_ps(hueShift0, sFract0); hs0 = _mm_set_ps(entry00[3][1].fHueShift, entry00[2][1].fHueShift, entry00[1][1].fHueShift, entry00[0][1].fHueShift); hs1 = _mm_set_ps(entry01[3][1].fHueShift, entry01[2][1].fHueShift, entry01[1][1].fHueShift, entry01[0][1].fHueShift); __m128 hueShift1 = _mm_add_ps(_mm_mul_ps(hs0, hFract0), _mm_mul_ps(hs1, hFract1)); hueShift = _mm_add_ps(hueShift0, _mm_mul_ps(hueShift1, sFract1)); __m128 ss0 = _mm_set_ps(entry00[3]->fSatScale, entry00[2]->fSatScale, entry00[1]->fSatScale, entry00[0]->fSatScale); __m128 ss1 = _mm_set_ps(entry01[3]->fSatScale, entry01[2]->fSatScale, entry01[1]->fSatScale, entry01[0]->fSatScale); __m128 satScale0 = _mm_add_ps(_mm_mul_ps(ss0, hFract0), _mm_mul_ps(ss1, hFract1)); satScale0 = _mm_mul_ps(satScale0, sFract0); ss0 = _mm_set_ps(entry00[3][1].fSatScale, entry00[2][1].fSatScale, entry00[1][1].fSatScale, entry00[0][1].fSatScale); ss1 = _mm_set_ps(entry01[3][1].fSatScale, entry01[2][1].fSatScale, entry01[1][1].fSatScale, entry01[0][1].fSatScale); __m128 satScale1 = _mm_add_ps(_mm_mul_ps(ss0, hFract0), _mm_mul_ps(ss1, hFract1)); satScale = _mm_add_ps(satScale0, _mm_mul_ps(satScale1, sFract1)); __m128 vs0 = _mm_set_ps(entry00[3]->fValScale, entry00[2]->fValScale, entry00[1]->fValScale, entry00[0]->fValScale); __m128 vs1 = _mm_set_ps(entry01[3]->fValScale, entry01[2]->fValScale, entry01[1]->fValScale, entry01[0]->fValScale); __m128 valScale0 = _mm_add_ps(_mm_mul_ps(vs0, hFract0), _mm_mul_ps(vs1, hFract1)); valScale0 = _mm_mul_ps(valScale0, sFract0); vs0 = _mm_set_ps(entry00[3][1].fValScale, entry00[2][1].fValScale, entry00[1][1].fValScale, entry00[0][1].fValScale); vs1 = _mm_set_ps(entry01[3][1].fValScale, entry01[2][1].fValScale, entry01[1][1].fValScale, entry01[0][1].fValScale); __m128 valScale1 = _mm_add_ps(_mm_mul_ps(vs0, hFract0), _mm_mul_ps(vs1, hFract1)); valScale = _mm_add_ps(valScale0, _mm_mul_ps(valScale1, sFract1)); } else { __m128 hScaled = _mm_mul_ps(h, _mm_load_ps(precalc->hScale)); __m128 sScaled = _mm_mul_ps(s, _mm_load_ps(precalc->sScale)); __m128 vScaled = _mm_mul_ps(v, _mm_load_ps(precalc->vScale)); __m128i maxHueIndex0 = _mm_load_si128((__m128i*)precalc->maxHueIndex0); __m128i maxSatIndex0 = _mm_load_si128((__m128i*)precalc->maxSatIndex0); __m128i maxValIndex0 = _mm_load_si128((__m128i*)precalc->maxValIndex0); __m128i hIndex0 = _mm_cvttps_epi32(hScaled); __m128i sIndex0 = _mm_cvttps_epi32(sScaled); __m128i vIndex0 = _mm_cvttps_epi32(vScaled); // Requires that maxSatIndex0 and sIndex0 can be contained within a 16 bit signed word. sIndex0 = _mm_min_epi16(sIndex0, maxSatIndex0); vIndex0 = _mm_min_epi16(vIndex0, maxValIndex0); __m128i ones_epi32 = _mm_load_si128((__m128i*)_ones_epi32); __m128i hIndex1 = _mm_add_epi32(hIndex0, ones_epi32); /* if (hIndex0 > (maxHueIndex0 - 1)) */ __m128i hIndexMask = _mm_cmpgt_epi32( hIndex0, _mm_sub_epi32(maxHueIndex0, ones_epi32)); /* Make room in hIndex0 */ hIndex0 = _mm_andnot_si128(hIndexMask, hIndex0); /* hIndex1 = 0; */ hIndex1 = _mm_andnot_si128(hIndexMask, hIndex1); /* hIndex0 = maxHueIndex0, where hIndex0 >= (maxHueIndex0) */ hIndex0 = _mm_or_si128(hIndex0, _mm_and_si128(hIndexMask, maxHueIndex0)); __m128 hFract1 = _mm_sub_ps( hScaled, _mm_cvtepi32_ps(hIndex0)); __m128 sFract1 = _mm_sub_ps( sScaled, _mm_cvtepi32_ps(sIndex0)); __m128 vFract1 = _mm_sub_ps( vScaled, _mm_cvtepi32_ps(vIndex0)); __m128 ones_ps = _mm_load_ps(_ones_ps); __m128 hFract0 = _mm_sub_ps(ones_ps, hFract1); __m128 sFract0 = _mm_sub_ps(ones_ps, sFract1); __m128 vFract0 = _mm_sub_ps(ones_ps, vFract1); __m128i hueStep = _mm_load_si128((__m128i*)precalc->hueStep); __m128i valStep = _mm_load_si128((__m128i*)precalc->valStep); // This requires that hueStep and valStep can be contained in a 16 bit signed integer. __m128i table_offsets = _mm_add_epi32(sIndex0, _mm_mullo_epi16(vIndex0, valStep)); __m128i next_offsets = _mm_mullo_epi16(hIndex1, hueStep); next_offsets = _mm_add_epi32(next_offsets, table_offsets); table_offsets = _mm_add_epi32(table_offsets, _mm_mullo_epi16(hIndex0, hueStep)); _mm_store_si128((__m128i*)xfer_0, table_offsets); _mm_store_si128((__m128i*)xfer_1, next_offsets); gint _valStep = precalc->valStep[0]; const RS_VECTOR3 *entry00[4] = { tableBase + xfer_0[0], tableBase + xfer_0[1], tableBase + xfer_0[2], tableBase + xfer_0[3]}; const RS_VECTOR3 *entry01[4] = { tableBase + xfer_1[0], tableBase + xfer_1[1], tableBase + xfer_1[2], tableBase + xfer_1[3]}; const RS_VECTOR3 *entry10[4] = { entry00[0] + _valStep, entry00[1] + _valStep, entry00[2] + _valStep, entry00[3] + _valStep}; const RS_VECTOR3 *entry11[4] = { entry01[0] + _valStep, entry01[1] + _valStep, entry01[2] + _valStep, entry01[3] + _valStep}; /* Hue first element */ __m128 hs00 = _mm_set_ps(entry00[3]->fHueShift, entry00[2]->fHueShift, entry00[1]->fHueShift, entry00[0]->fHueShift); __m128 hs01 = _mm_set_ps(entry01[3]->fHueShift, entry01[2]->fHueShift, entry01[1]->fHueShift, entry01[0]->fHueShift); __m128 hs10 = _mm_set_ps(entry10[3]->fHueShift, entry10[2]->fHueShift, entry10[1]->fHueShift, entry10[0]->fHueShift); __m128 hs11 = _mm_set_ps(entry11[3]->fHueShift, entry11[2]->fHueShift, entry11[1]->fHueShift, entry11[0]->fHueShift); __m128 hueShift0 = _mm_mul_ps(vFract0, _mm_add_ps(_mm_mul_ps(hs00, hFract0), _mm_mul_ps(hs01, hFract1))); __m128 hueShift1 = _mm_mul_ps(vFract1, _mm_add_ps(_mm_mul_ps(hs10, hFract0), _mm_mul_ps(hs11, hFract1))); hueShift = _mm_mul_ps(sFract0, _mm_add_ps(hueShift0, hueShift1)); /* Hue second element */ hs00 = _mm_set_ps(entry00[3][1].fHueShift, entry00[2][1].fHueShift, entry00[1][1].fHueShift, entry00[0][1].fHueShift); hs01 = _mm_set_ps(entry01[3][1].fHueShift, entry01[2][1].fHueShift, entry01[1][1].fHueShift, entry01[0][1].fHueShift); hs10 = _mm_set_ps(entry10[3][1].fHueShift, entry10[2][1].fHueShift, entry10[1][1].fHueShift, entry10[0][1].fHueShift); hs11 = _mm_set_ps(entry11[3][1].fHueShift, entry11[2][1].fHueShift, entry11[1][1].fHueShift, entry11[0][1].fHueShift); hueShift0 = _mm_mul_ps(vFract0, _mm_add_ps(_mm_mul_ps(hs00, hFract0), _mm_mul_ps(hs01, hFract1))); hueShift1 = _mm_mul_ps(vFract1, _mm_add_ps(_mm_mul_ps(hs10, hFract0), _mm_mul_ps(hs11, hFract1))); hueShift = _mm_add_ps(hueShift, _mm_mul_ps(sFract1, _mm_add_ps(hueShift0, hueShift1))); /* Sat first element */ __m128 ss00 = _mm_set_ps(entry00[3]->fSatScale, entry00[2]->fSatScale, entry00[1]->fSatScale, entry00[0]->fSatScale); __m128 ss01 = _mm_set_ps(entry01[3]->fSatScale, entry01[2]->fSatScale, entry01[1]->fSatScale, entry01[0]->fSatScale); __m128 ss10 = _mm_set_ps(entry10[3]->fSatScale, entry10[2]->fSatScale, entry10[1]->fSatScale, entry10[0]->fSatScale); __m128 ss11 = _mm_set_ps(entry11[3]->fSatScale, entry11[2]->fSatScale, entry11[1]->fSatScale, entry11[0]->fSatScale); __m128 satScale0 = _mm_mul_ps(vFract0, _mm_add_ps(_mm_mul_ps(ss00, hFract0), _mm_mul_ps(ss01, hFract1))); __m128 satScale1 = _mm_mul_ps(vFract1, _mm_add_ps(_mm_mul_ps(ss10, hFract0), _mm_mul_ps(ss11, hFract1))); satScale = _mm_mul_ps(sFract0, _mm_add_ps(satScale0, satScale1)); /* Sat second element */ ss00 = _mm_set_ps(entry00[3][1].fSatScale, entry00[2][1].fSatScale, entry00[1][1].fSatScale, entry00[0][1].fSatScale); ss01 = _mm_set_ps(entry01[3][1].fSatScale, entry01[2][1].fSatScale, entry01[1][1].fSatScale, entry01[0][1].fSatScale); ss10 = _mm_set_ps(entry10[3][1].fSatScale, entry10[2][1].fSatScale, entry10[1][1].fSatScale, entry10[0][1].fSatScale); ss11 = _mm_set_ps(entry11[3][1].fSatScale, entry11[2][1].fSatScale, entry11[1][1].fSatScale, entry11[0][1].fSatScale); satScale0 = _mm_mul_ps(vFract0, _mm_add_ps(_mm_mul_ps(ss00, hFract0), _mm_mul_ps(ss01, hFract1))); satScale1 = _mm_mul_ps(vFract1, _mm_add_ps(_mm_mul_ps(ss10, hFract0), _mm_mul_ps(ss11, hFract1))); satScale = _mm_add_ps(satScale, _mm_mul_ps(sFract1, _mm_add_ps(satScale0, satScale1))); /* Val first element */ __m128 vs00 = _mm_set_ps(entry00[3]->fValScale, entry00[2]->fValScale, entry00[1]->fValScale, entry00[0]->fValScale); __m128 vs01 = _mm_set_ps(entry01[3]->fValScale, entry01[2]->fValScale, entry01[1]->fValScale, entry01[0]->fValScale); __m128 vs10 = _mm_set_ps(entry10[3]->fValScale, entry10[2]->fValScale, entry10[1]->fValScale, entry10[0]->fValScale); __m128 vs11 = _mm_set_ps(entry11[3]->fValScale, entry11[2]->fValScale, entry11[1]->fValScale, entry11[0]->fValScale); __m128 valScale0 = _mm_mul_ps(vFract0, _mm_add_ps(_mm_mul_ps(vs00, hFract0), _mm_mul_ps(vs01, hFract1))); __m128 valScale1 = _mm_mul_ps(vFract1, _mm_add_ps(_mm_mul_ps(vs10, hFract0), _mm_mul_ps(vs11, hFract1))); valScale = _mm_mul_ps(sFract0, _mm_add_ps(valScale0, valScale1)); /* Val second element */ vs00 = _mm_set_ps(entry00[3][1].fValScale, entry00[2][1].fValScale, entry00[1][1].fValScale, entry00[0][1].fValScale); vs01 = _mm_set_ps(entry01[3][1].fValScale, entry01[2][1].fValScale, entry01[1][1].fValScale, entry01[0][1].fValScale); vs10 = _mm_set_ps(entry10[3][1].fValScale, entry10[2][1].fValScale, entry10[1][1].fValScale, entry10[0][1].fValScale); vs11 = _mm_set_ps(entry11[3][1].fValScale, entry11[2][1].fValScale, entry11[1][1].fValScale, entry11[0][1].fValScale); valScale0 = _mm_mul_ps(vFract0, _mm_add_ps(_mm_mul_ps(vs00, hFract0), _mm_mul_ps(vs01, hFract1))); valScale1 = _mm_mul_ps(vFract1, _mm_add_ps(_mm_mul_ps(vs10, hFract0), _mm_mul_ps(vs11, hFract1))); valScale = _mm_add_ps(valScale, _mm_mul_ps(sFract1, _mm_add_ps(valScale0, valScale1))); } __m128 mul_hue = _mm_load_ps(_mul_hue_ps); ones_ps = _mm_load_ps(_ones_ps); hueShift = _mm_mul_ps(hueShift, mul_hue); s = _mm_min_ps(ones_ps, _mm_mul_ps(s, satScale)); v = _mm_min_ps(ones_ps, _mm_mul_ps(v, valScale)); h = _mm_add_ps(h, hueShift); *_h = h; *_s = s; *_v = v; } static gfloat _16_bit_ps[4] __attribute__ ((aligned (16))) = {65535.0, 65535.0, 65535.0, 65535.0}; static gfloat _thousand_24_ps[4] __attribute__ ((aligned (16))) = {1023.99999f, 1023.99999f, 1023.99999f, 1023.99999f}; static inline __m128 curve_interpolate_lookup(__m128 value, const gfloat * const tone_lut) { int xfer[8] __attribute__ ((aligned (16))); /* Convert v to lookup values and interpolate */ __m128 mul = _mm_mul_ps(value, _mm_load_ps(_thousand_24_ps)); __m128i lookup = _mm_cvtps_epi32(mul); _mm_store_si128((__m128i*)&xfer[0], lookup); /* Calculate fractions */ __m128 frac = _mm_sub_ps(mul, _mm_floor_positive_ps(mul)); __m128 inv_frac = _mm_sub_ps(_mm_load_ps(_ones_ps), frac); /* Load two adjacent curve values and interpolate between them */ __m128 p0p1 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&tone_lut[xfer[0]*2])); __m128 p2p3 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&tone_lut[xfer[2]*2])); p0p1 = _mm_loadh_pi(p0p1, (__m64*)&tone_lut[xfer[1]*2]); p2p3 = _mm_loadh_pi(p2p3, (__m64*)&tone_lut[xfer[3]*2]); /* Pack all lower values in v0, high in v1 and interpolate */ __m128 v0 = _mm_shuffle_ps(p0p1, p2p3, _MM_SHUFFLE(2,0,2,0)); __m128 v1 = _mm_shuffle_ps(p0p1, p2p3, _MM_SHUFFLE(3,1,3,1)); return _mm_add_ps(_mm_mul_ps(inv_frac, v0), _mm_mul_ps(frac, v1)); } static inline void rgb_tone_sse2(__m128* _r, __m128* _g, __m128* _b, const gfloat * const tone_lut) { __m128 r = *_r; __m128 g = *_g; __m128 b = *_b; __m128 small_ps = _mm_load_ps(_very_small_ps); __m128 ones_ps = _mm_load_ps(_ones_ps); /* Clamp to avoid lookups out of table */ r = _mm_min_ps(_mm_max_ps(r, small_ps),ones_ps); g = _mm_min_ps(_mm_max_ps(g, small_ps),ones_ps); b = _mm_min_ps(_mm_max_ps(b, small_ps),ones_ps); /* Find largest and smallest values */ __m128 lg = _mm_max_ps(b, _mm_max_ps(r, g)); __m128 sm = _mm_min_ps(b, _mm_min_ps(r, g)); /* Lookup */ __m128 LG = curve_interpolate_lookup(lg, tone_lut); __m128 SM = curve_interpolate_lookup(sm, tone_lut); /* Create masks for largest, smallest and medium values */ /* This is done in integer SSE2, since they have double the throughput */ __m128i ones = _mm_cmpeq_epi32(DW(r), DW(r)); __m128i is_r_lg = _mm_cmpeq_epi32(DW(r), DW(lg)); __m128i is_g_lg = _mm_cmpeq_epi32(DW(g), DW(lg)); __m128i is_b_lg = _mm_cmpeq_epi32(DW(b), DW(lg)); __m128i is_r_sm = _mm_andnot_si128(is_r_lg, _mm_cmpeq_epi32(DW(r), DW(sm))); __m128i is_g_sm = _mm_andnot_si128(is_g_lg, _mm_cmpeq_epi32(DW(g), DW(sm))); __m128i is_b_sm = _mm_andnot_si128(is_b_lg, _mm_cmpeq_epi32(DW(b), DW(sm))); __m128i is_r_md = _mm_xor_si128(ones, _mm_or_si128(is_r_lg, is_r_sm)); __m128i is_g_md = _mm_xor_si128(ones, _mm_or_si128(is_g_lg, is_g_sm)); __m128i is_b_md = _mm_xor_si128(ones, _mm_or_si128(is_b_lg, is_b_sm)); /* Find all medium values based on masks */ __m128 md = PS(_mm_or_si128(_mm_or_si128( _mm_and_si128(DW(r), is_r_md), _mm_and_si128(DW(g), is_g_md)), _mm_and_si128(DW(b), is_b_md))); /* Calculate tone corrected medium value */ __m128 p = _mm_rcp_ps(_mm_sub_ps(lg, sm)); __m128 q = _mm_sub_ps(md, sm); __m128 o = _mm_sub_ps(LG, SM); __m128 MD = _mm_add_ps(SM, _mm_mul_ps(o, _mm_mul_ps(p, q))); /* Inserted here again, to lighten register presssure */ is_r_lg = _mm_cmpeq_epi32(DW(r), DW(lg)); is_g_lg = _mm_cmpeq_epi32(DW(g), DW(lg)); is_b_lg = _mm_cmpeq_epi32(DW(b), DW(lg)); /* Combine corrected values to output RGB */ r = PS(_mm_or_si128( _mm_or_si128( _mm_and_si128(DW(LG), is_r_lg), _mm_and_si128(DW(SM), is_r_sm)), _mm_and_si128(DW(MD), is_r_md))); g = PS(_mm_or_si128( _mm_or_si128( _mm_and_si128(DW(LG), is_g_lg), _mm_and_si128(DW(SM), is_g_sm)), _mm_and_si128(DW(MD), is_g_md))); b = PS(_mm_or_si128( _mm_or_si128( _mm_and_si128(DW(LG), is_b_lg), _mm_and_si128(DW(SM), is_b_sm)), _mm_and_si128(DW(MD), is_b_md))); *_r = r; *_g = g; *_b = b; } #undef DW #undef PS static inline __m128 sse_matrix3_mul(float* mul, __m128 a, __m128 b, __m128 c) { __m128 v = _mm_load_ps(mul); __m128 acc = _mm_mul_ps(a, v); v = _mm_load_ps(mul+4); acc = _mm_add_ps(acc, _mm_mul_ps(b, v)); v = _mm_load_ps(mul+8); acc = _mm_add_ps(acc, _mm_mul_ps(c, v)); return acc; } static gfloat _rgb_div_ps[4] __attribute__ ((aligned (16))) = {1.0/65535.0, 1.0/65535.0, 1.0/65535.0, 1.0/65535.0}; static gint _15_bit_epi32[4] __attribute__ ((aligned (16))) = { 32768, 32768, 32768, 32768}; static guint _16_bit_sign[4] __attribute__ ((aligned (16))) = {0x80008000,0x80008000,0x80008000,0x80008000}; static gfloat _twofiftysix_ps[4] __attribute__ ((aligned (16))) = {255.9999f,255.9999f,255.9999f,255.9999f}; #define SETFLOAT4(N, A, B, C, D) float N[4] __attribute__ ((aligned (16))); \ N[0] = D; N[1] = C; N[2] = B; N[3] = A; #define SETFLOAT4_SAME(N, A) float N[4] __attribute__ ((aligned (16))); \ N[0] = A; N[1] = A; N[2] = A; N[3] = A; gboolean render_SSE2(ThreadInfo* t) { RS_IMAGE16 *image = t->tmp; RSDcp *dcp = t->dcp; gint x, y; __m128 h, s, v; __m128i p1,p2; __m128 p1f, p2f, p3f, p4f; __m128 r, g, b, r2, g2, b2; __m128i zero; int _mm_rounding = _MM_GET_ROUNDING_MODE(); _MM_SET_ROUNDING_MODE(_MM_ROUND_DOWN); __m128 hue_add = _mm_set_ps(dcp->hue, dcp->hue, dcp->hue, dcp->hue); __m128 sat; if (dcp->saturation > 1.0) sat = _mm_set_ps(dcp->saturation-1.0f, dcp->saturation-1.0f, dcp->saturation-1.0f, dcp->saturation-1.0f); else sat = _mm_set_ps(dcp->saturation, dcp->saturation, dcp->saturation, dcp->saturation); gboolean do_contrast = (dcp->contrast > 1.001f); gboolean do_highrec = (dcp->contrast < 0.999f); float exposure_simple = MAX(1.0, powf(2.0f, dcp->exposure)); float __recover_radius = 0.5 * exposure_simple; SETFLOAT4_SAME(_inv_recover_radius, 1.0f / __recover_radius); SETFLOAT4_SAME(_recover_radius, 1.0 - __recover_radius); int xfer[4] __attribute__ ((aligned (16))); SETFLOAT4_SAME(_min_cam, 1.0); SETFLOAT4_SAME(_black_minus_radius, dcp->exposure_black - dcp->exposure_radius); SETFLOAT4_SAME(_black_plus_radius, dcp->exposure_black + dcp->exposure_radius); SETFLOAT4_SAME(_exposure_black, dcp->exposure_black); SETFLOAT4_SAME(_exposure_slope, dcp->exposure_slope); SETFLOAT4_SAME(_exposure_qscale, dcp->exposure_qscale); SETFLOAT4_SAME(_contrast, dcp->contrast); SETFLOAT4_SAME(_inv_contrast, 1.0f - dcp->contrast); SETFLOAT4_SAME(_cm_r, dcp->channelmixer_red); SETFLOAT4_SAME(_cm_g, dcp->channelmixer_green); SETFLOAT4_SAME(_cm_b, dcp->channelmixer_blue); SETFLOAT4_SAME(_contr_base, 0.5f); if (dcp->use_profile) { _min_cam[0] = dcp->camera_white.x; _min_cam[1] = dcp->camera_white.y; _min_cam[2] = dcp->camera_white.z; _min_cam[3] = 0.0; } float cam_prof[4*4*3] __attribute__ ((aligned (16))); for (x = 0; x < 4; x++ ) { cam_prof[x] = dcp->camera_to_prophoto.coeff[0][0] * dcp->channelmixer_red; cam_prof[x+4] = dcp->camera_to_prophoto.coeff[0][1] * dcp->channelmixer_red; cam_prof[x+8] = dcp->camera_to_prophoto.coeff[0][2] * dcp->channelmixer_red; cam_prof[12+x] = dcp->camera_to_prophoto.coeff[1][0] * dcp->channelmixer_green; cam_prof[12+x+4] = dcp->camera_to_prophoto.coeff[1][1] * dcp->channelmixer_green; cam_prof[12+x+8] = dcp->camera_to_prophoto.coeff[1][2] * dcp->channelmixer_green; cam_prof[24+x] = dcp->camera_to_prophoto.coeff[2][0] * dcp->channelmixer_blue; cam_prof[24+x+4] = dcp->camera_to_prophoto.coeff[2][1] * dcp->channelmixer_blue; cam_prof[24+x+8] = dcp->camera_to_prophoto.coeff[2][2]* dcp->channelmixer_blue; } gint end_x = image->w - (image->w & 3); for(y = t->start_y ; y < t->end_y; y++) { __m128i* pixel = (__m128i*)GET_PIXEL(image, 0, y); /* Prefetch next line */ _mm_prefetch((char*)(pixel)+image->rowstride*2, _MM_HINT_NTA); for(x=0; x < end_x; x+=4) { zero = _mm_setzero_si128(); /* Convert to float */ p1 = _mm_load_si128(pixel); p2 = _mm_load_si128(pixel + 1); _mm_prefetch((char*)(pixel+4), _MM_HINT_NTA); /* Unpack to R G B x */ p2f = _mm_cvtepi32_ps(_mm_unpackhi_epi16(p1, zero)); p4f = _mm_cvtepi32_ps(_mm_unpackhi_epi16(p2, zero)); p1f = _mm_cvtepi32_ps(_mm_unpacklo_epi16(p1, zero)); p3f = _mm_cvtepi32_ps(_mm_unpacklo_epi16(p2, zero)); /* Normalize to 0 to 1 range */ __m128 rgb_div = _mm_load_ps(_rgb_div_ps); p1f = _mm_mul_ps(p1f, rgb_div); p2f = _mm_mul_ps(p2f, rgb_div); p3f = _mm_mul_ps(p3f, rgb_div); p4f = _mm_mul_ps(p4f, rgb_div); if (dcp->use_profile) { /* Restric to camera white */ __m128 min_cam = _mm_load_ps(_min_cam); p1f = _mm_min_ps(p1f, min_cam); p2f = _mm_min_ps(p2f, min_cam); p3f = _mm_min_ps(p3f, min_cam); p4f = _mm_min_ps(p4f, min_cam); } /* Convert to planar */ __m128 g1g0r1r0 = _mm_unpacklo_ps(p1f, p2f); __m128 b1b0 = _mm_unpackhi_ps(p1f, p2f); __m128 g3g2r3r2 = _mm_unpacklo_ps(p3f, p4f); __m128 b3b2 = _mm_unpackhi_ps(p3f, p4f); r = _mm_movelh_ps(g1g0r1r0, g3g2r3r2); g = _mm_movehl_ps(g3g2r3r2, g1g0r1r0); b = _mm_movelh_ps(b1b0, b3b2); /* Convert to Prophoto */ r2 = sse_matrix3_mul(cam_prof, r, g, b); g2 = sse_matrix3_mul(&cam_prof[12], r, g, b); b2 = sse_matrix3_mul(&cam_prof[24], r, g, b); RGBtoHSV_SSE2(&r2, &g2, &b2); h = r2; s = g2; v = b2; if (dcp->huesatmap) { huesat_map_SSE2(dcp->huesatmap, dcp->huesatmap_precalc, &h, &s, &v); } /* Saturation */ __m128 max_val = _mm_load_ps(_ones_ps); __m128 min_val = _mm_load_ps(_very_small_ps); if (dcp->saturation > 1.0) { __m128 two_ps = _mm_load_ps(_two_ps); __m128 ones_ps = _mm_load_ps(_ones_ps); /* out = (sat) * (x*2-x^2.0) + ((1.0-sat)*x) */ __m128 s_curved = _mm_mul_ps(sat, _mm_sub_ps(_mm_mul_ps(s, two_ps), _mm_mul_ps(s,s))); s = _mm_min_ps(max_val, _mm_add_ps(s_curved, _mm_mul_ps(s, _mm_sub_ps(ones_ps, sat)))); } else { s = _mm_max_ps(min_val, _mm_min_ps(max_val, _mm_mul_ps(s, sat))); } /* Hue */ __m128 six_ps = _mm_load_ps(_six_ps); __m128 zero_ps = _mm_setzero_ps(); h = _mm_add_ps(h, hue_add); /* Check if hue >= 6 or < 0*/ __m128 h_mask_gt = _mm_cmpge_ps(h, six_ps); __m128 h_mask_lt = _mm_cmplt_ps(h, zero_ps); __m128 six_masked_gt = _mm_and_ps(six_ps, h_mask_gt); __m128 six_masked_lt = _mm_and_ps(six_ps, h_mask_lt); h = _mm_sub_ps(h, six_masked_gt); h = _mm_add_ps(h, six_masked_lt); __m128 v_stored = v; HSVtoRGB_SSE(&h, &s, &v); r = h; g = s; b = v; /* Exposure */ /* y = x - (dcp->exposure_black - dcp->exposure_radius); */ /* x = dcp->exposure_qscale * y * y; */ __m128 black_minus_radius = _mm_load_ps(_black_minus_radius); __m128 y_r = _mm_sub_ps(r, black_minus_radius); __m128 y_g = _mm_sub_ps(g, black_minus_radius); __m128 y_b = _mm_sub_ps(b, black_minus_radius); __m128 exposure_qscale = _mm_load_ps(_exposure_qscale); y_r = _mm_mul_ps(exposure_qscale,_mm_mul_ps(y_r, y_r)); y_g = _mm_mul_ps(exposure_qscale,_mm_mul_ps(y_g, y_g)); y_b = _mm_mul_ps(exposure_qscale,_mm_mul_ps(y_b, y_b)); /* if (x >= dcp->exposure_black + dcp->exposure_radius) */ /* x = (x - dcp->exposure_black) * dcp->exposure_slope; */ __m128 exposure_slope = _mm_load_ps(_exposure_slope); __m128 exposure_black = _mm_load_ps(_exposure_black); __m128 y2_r = _mm_mul_ps(exposure_slope, _mm_sub_ps(r, exposure_black)); __m128 y2_g = _mm_mul_ps(exposure_slope, _mm_sub_ps(g, exposure_black)); __m128 y2_b = _mm_mul_ps(exposure_slope, _mm_sub_ps(b, exposure_black)); __m128 black_plus_radius = _mm_load_ps(_black_plus_radius); __m128 r_mask = _mm_cmpgt_ps(r, black_plus_radius); __m128 g_mask = _mm_cmpgt_ps(g, black_plus_radius); __m128 b_mask = _mm_cmpgt_ps(b, black_plus_radius); y_r = _mm_andnot_ps(r_mask, y_r); y_g = _mm_andnot_ps(g_mask, y_g); y_b = _mm_andnot_ps(b_mask, y_b); y_r = _mm_or_ps(y_r, _mm_and_ps(r_mask, y2_r)); y_g = _mm_or_ps(y_g, _mm_and_ps(g_mask, y2_g)); y_b = _mm_or_ps(y_b, _mm_and_ps(b_mask, y2_b)); /* if (x <= dcp->exposure_black - dcp->exposure_radius) x = 0; */ black_minus_radius = _mm_load_ps(_black_minus_radius); r_mask = _mm_cmple_ps(r, black_minus_radius); g_mask = _mm_cmple_ps(g, black_minus_radius); b_mask = _mm_cmple_ps(b, black_minus_radius); r = _mm_andnot_ps(r_mask, y_r); g = _mm_andnot_ps(g_mask, y_g); b = _mm_andnot_ps(b_mask, y_b); /* Contrast in gamma 2.0 */ if (do_contrast) { __m128 contr_base = _mm_load_ps(_contr_base); __m128 contrast = _mm_load_ps(_contrast); min_val = _mm_load_ps(_very_small_ps); r = _mm_max_ps(r, min_val); g = _mm_max_ps(g, min_val); b = _mm_max_ps(b, min_val); r = _mm_add_ps(_mm_mul_ps(contrast, _mm_sub_ps(_mm_rcp_ps(_mm_rsqrt_ps(r)), contr_base)), contr_base); g = _mm_add_ps(_mm_mul_ps(contrast, _mm_sub_ps(_mm_rcp_ps(_mm_rsqrt_ps(g)), contr_base)), contr_base); b = _mm_add_ps(_mm_mul_ps(contrast, _mm_sub_ps(_mm_rcp_ps(_mm_rsqrt_ps(b)), contr_base)), contr_base); r = _mm_max_ps(r, min_val); g = _mm_max_ps(g, min_val); b = _mm_max_ps(b, min_val); r = _mm_mul_ps(r,r); g = _mm_mul_ps(g,g); b = _mm_mul_ps(b,b); } else if (do_highrec) { max_val = _mm_load_ps(_ones_ps); __m128 inv_contrast = _mm_load_ps(_inv_contrast); __m128 recover_radius = _mm_load_ps(_recover_radius); __m128 inv_recover_radius = _mm_load_ps(_inv_recover_radius); /* Distance from 1.0 - radius */ __m128 dist = _mm_sub_ps(v_stored, recover_radius); /* Scale so distance is normalized, clamp */ __m128 dist_scaled = _mm_min_ps(max_val, _mm_mul_ps(dist, inv_recover_radius)); __m128 mul_val = _mm_sub_ps(max_val, _mm_mul_ps(dist_scaled, inv_contrast)); r = _mm_mul_ps(r, mul_val); g = _mm_mul_ps(g, mul_val); b = _mm_mul_ps(b, mul_val); } /* Convert to HSV */ RGBtoHSV_SSE2(&r, &g, &b); h = r; s = g; v = b; if (!dcp->curve_is_flat) { /* Convert v to lookup values and interpolate */ __m128 v_mul = _mm_mul_ps(v, _mm_load_ps(_twofiftysix_ps)); __m128i lookup = _mm_cvtps_epi32(v_mul); _mm_store_si128((__m128i*)&xfer[0], lookup); /* Calculate fractions */ __m128 frac = _mm_sub_ps(v_mul, _mm_floor_positive_ps(v_mul)); __m128 inv_frac = _mm_sub_ps(_mm_load_ps(_ones_ps), frac); /* Load two adjacent curve values and interpolate between them */ __m128 p0p1 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&dcp->curve_samples[xfer[0]*2])); __m128 p2p3 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&dcp->curve_samples[xfer[2]*2])); p0p1 = _mm_loadh_pi(p0p1, (__m64*)&dcp->curve_samples[xfer[1]*2]); p2p3 = _mm_loadh_pi(p2p3, (__m64*)&dcp->curve_samples[xfer[3]*2]); /* Pack all lower values in v0, high in v1 and interpolate */ __m128 v0 = _mm_shuffle_ps(p0p1, p2p3, _MM_SHUFFLE(2,0,2,0)); __m128 v1 = _mm_shuffle_ps(p0p1, p2p3, _MM_SHUFFLE(3,1,3,1)); v = _mm_add_ps(_mm_mul_ps(inv_frac, v0), _mm_mul_ps(frac, v1)); } /* Apply looktable */ if (dcp->looktable) { huesat_map_SSE2(dcp->looktable, dcp->looktable_precalc, &h, &s, &v); } /* Ensure that hue is within range */ zero_ps = _mm_setzero_ps(); h_mask_gt = _mm_cmpge_ps(h, six_ps); h_mask_lt = _mm_cmplt_ps(h, zero_ps); six_masked_gt = _mm_and_ps(six_ps, h_mask_gt); six_masked_lt = _mm_and_ps(six_ps, h_mask_lt); h = _mm_sub_ps(h, six_masked_gt); h = _mm_add_ps(h, six_masked_lt); /* s always slightly > 0 when converting to RGB */ s = _mm_max_ps(s, min_val); HSVtoRGB_SSE(&h, &s, &v); r = h; g = s; b = v; /* Apply Tone Curve in RGB space*/ if (dcp->tone_curve_lut) { rgb_tone_sse2( &r, &g, &b, dcp->tone_curve_lut); } /* Convert to 16 bit */ __m128 rgb_mul = _mm_load_ps(_16_bit_ps); r = _mm_mul_ps(r, rgb_mul); g = _mm_mul_ps(g, rgb_mul); b = _mm_mul_ps(b, rgb_mul); __m128i r_i = _mm_cvtps_epi32(r); __m128i g_i = _mm_cvtps_epi32(g); __m128i b_i = _mm_cvtps_epi32(b); __m128i sub_32 = _mm_load_si128((__m128i*)_15_bit_epi32); __m128i signxor = _mm_load_si128((__m128i*)_16_bit_sign); /* Subtract 32768 to avoid saturation */ r_i = _mm_sub_epi32(r_i, sub_32); g_i = _mm_sub_epi32(g_i, sub_32); b_i = _mm_sub_epi32(b_i, sub_32); /* 32 bit signed -> 16 bit signed conversion, all in lower 64 bit */ r_i = _mm_packs_epi32(r_i, r_i); g_i = _mm_packs_epi32(g_i, g_i); b_i = _mm_packs_epi32(b_i, b_i); /* Interleave*/ __m128i rg_i = _mm_unpacklo_epi16(r_i, g_i); __m128i bb_i = _mm_unpacklo_epi16(b_i, b_i); p1 = _mm_unpacklo_epi32(rg_i, bb_i); p2 = _mm_unpackhi_epi32(rg_i, bb_i); /* Convert sign back */ p1 = _mm_xor_si128(p1, signxor); p2 = _mm_xor_si128(p2, signxor); /* Store processed pixel */ _mm_store_si128(pixel, p1); _mm_store_si128(pixel + 1, p2); pixel += 2; } } _MM_SET_ROUNDING_MODE(_mm_rounding); return TRUE; } #undef SETFLOAT4 #undef SETFLOAT4_SAME #else // if not __SSE2__ gboolean render_SSE2(ThreadInfo* t) { return FALSE; } void calc_hsm_constants(const RSHuesatMap *map, PrecalcHSM* table) { return; } #endif rawstudio-2.0/plugins/dcp/Makefile.in0000644000175000017500000003534111547430035014621 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/dcp DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) dcp_la_DEPENDENCIES = adobe-camera-raw-tone.lo dcp-sse2.lo dcp-sse4.lo \ dcp-c.lo am_dcp_la_OBJECTS = dcp_la_OBJECTS = $(am_dcp_la_OBJECTS) dcp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(dcp_la_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(dcp_la_SOURCES) DIST_SOURCES = $(dcp_la_SOURCES) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = -O4 -Wall -ffast-math -ffinite-math-only \ -funsafe-math-optimizations -funroll-loops AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/plugins/dcp/ lib_LTLIBRARIES = dcp.la dcp_la_LIBADD = @PACKAGE_LIBS@ adobe-camera-raw-tone.lo dcp-sse2.lo dcp-sse4.lo dcp-c.lo dcp_la_LDFLAGS = -module -avoid-version dcp_la_SOURCES = EXTRA_DIST = dcp.c dcp.h dcp-sse2.c dcp-sse4.c adobe-camera-raw-tone.c adobe-camera-raw-tone.h @CAN_COMPILE_SSE4_1_FALSE@SSE4_FLAG = @CAN_COMPILE_SSE4_1_TRUE@SSE4_FLAG = -msse4.1 @CAN_COMPILE_SSE2_FALSE@SSE2_FLAG = @CAN_COMPILE_SSE2_TRUE@SSE2_FLAG = -msse2 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/dcp/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/dcp/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done dcp.la: $(dcp_la_OBJECTS) $(dcp_la_DEPENDENCIES) $(dcp_la_LINK) -rpath $(libdir) $(dcp_la_OBJECTS) $(dcp_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool distclean distclean-compile \ distclean-generic distclean-libtool distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-libLTLIBRARIES adobe-camera-raw-tone.lo: adobe-camera-raw-tone.c adobe-camera-raw-tone.h $(LTCOMPILE) -c $(top_srcdir)/plugins/dcp/adobe-camera-raw-tone.c dcp-c.lo: dcp.c adobe-camera-raw-tone.h $(LTCOMPILE) -o dcp-c.o -c $(top_srcdir)/plugins/dcp/dcp.c dcp-sse2.lo: dcp-sse2.c dcp.h $(LTCOMPILE) $(SSE2_FLAG) -c $(top_srcdir)/plugins/dcp/dcp-sse2.c dcp-sse4.lo: dcp-sse4.c dcp.h $(LTCOMPILE) $(SSE4_FLAG) -c $(top_srcdir)/plugins/dcp/dcp-sse4.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/dcp/dcp-sse4.c0000644000175000017500000010151011526533643014340 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "dcp.h" #ifdef __SSE4_1__ #include #include /* powf() */ #pragma GCC diagnostic ignored "-Wstrict-aliasing" /* We ignore this pragma, because we are casting a pointer from float to int to pass a float using */ /* _mm_insert_epi32, since no-one was kind enough to include "insertps xmm, mem32, imm8" */ /* as a valid intrinsic. So we use the integer equivalent instead */ static gfloat _ones_ps[4] __attribute__ ((aligned (16))) = {1.0f, 1.0f, 1.0f, 1.0f}; static gfloat _two_ps[4] __attribute__ ((aligned (16))) = {2.0f, 2.0f, 2.0f, 2.0f}; static gfloat _six_ps[4] __attribute__ ((aligned (16))) = {6.0f-1e-15, 6.0f-1e-15, 6.0f-1e-15, 6.0f-1e-15}; static gfloat _very_small_ps[4] __attribute__ ((aligned (16))) = {1e-15, 1e-15, 1e-15, 1e-15}; static gfloat _mul_hue_ps[4] __attribute__ ((aligned (16))) = {6.0f / 360.0f, 6.0f / 360.0f, 6.0f / 360.0f, 6.0f / 360.0f}; static gint _ones_epi32[4] __attribute__ ((aligned (16))) = {1,1,1,1}; static gfloat _16_bit_ps[4] __attribute__ ((aligned (16))) = {65535.0, 65535.0, 65535.0, 65535.0}; static inline __m128 sse_matrix3_mul(float* mul, __m128 a, __m128 b, __m128 c) { __m128 v = _mm_load_ps(mul); __m128 acc = _mm_mul_ps(a, v); v = _mm_load_ps(mul+4); acc = _mm_add_ps(acc, _mm_mul_ps(b, v)); v = _mm_load_ps(mul+8); acc = _mm_add_ps(acc, _mm_mul_ps(c, v)); return acc; } static gfloat _rgb_div_ps[4] __attribute__ ((aligned (16))) = {1.0/65535.0, 1.0/65535.0, 1.0/65535.0, 1.0/65535.0}; static inline void RGBtoHSV_SSE4(__m128 *c0, __m128 *c1, __m128 *c2) { __m128 zero_ps = _mm_setzero_ps(); __m128 small_ps = _mm_load_ps(_very_small_ps); __m128 ones_ps = _mm_load_ps(_ones_ps); // Any number > 1 __m128 add_v = _mm_load_ps(_two_ps); __m128 r = *c0; __m128 g = *c1; __m128 b = *c2; /* Clamp */ r = _mm_min_ps(_mm_max_ps(r, small_ps),ones_ps); g = _mm_min_ps(_mm_max_ps(g, small_ps),ones_ps); b = _mm_min_ps(_mm_max_ps(b, small_ps),ones_ps); __m128 h, v; v = _mm_max_ps(b,_mm_max_ps(r,g)); __m128 m = _mm_min_ps(b,_mm_min_ps(r,g)); __m128 gap = _mm_sub_ps(v,m); __m128 v_mask = _mm_cmpeq_ps(gap, zero_ps); v = _mm_add_ps(v, _mm_and_ps(add_v, v_mask)); h = _mm_setzero_ps(); /* Set gap to one where sat = 0, this will avoid divisions by zero, these values will not be used */ ones_ps = _mm_and_ps(ones_ps, v_mask); gap = _mm_or_ps(gap, ones_ps); /* gap_inv = 1.0 / gap */ __m128 gap_inv = _mm_rcp_ps(gap); /* if r == v */ /* h = (g - b) / gap; */ __m128 mask = _mm_cmpeq_ps(r, v); __m128 val = _mm_mul_ps(gap_inv, _mm_sub_ps(g, b)); /* fill h */ v = _mm_add_ps(v, _mm_and_ps(add_v, mask)); h = _mm_blendv_ps(h, val, mask); /* if g == v */ /* h = 2.0f + (b - r) / gap; */ __m128 two_ps = _mm_load_ps(_two_ps); mask = _mm_cmpeq_ps(g, v); val = _mm_sub_ps(b, r); val = _mm_mul_ps(val, gap_inv); val = _mm_add_ps(val, two_ps); v = _mm_add_ps(v, _mm_and_ps(add_v, mask)); h = _mm_blendv_ps(h, val, mask); /* If (b == v) */ /* h = 4.0f + (r - g) / gap; */ __m128 four_ps = _mm_add_ps(two_ps, two_ps); mask = _mm_cmpeq_ps(b, v); val = _mm_add_ps(four_ps, _mm_mul_ps(gap_inv, _mm_sub_ps(r, g))); v = _mm_add_ps(v, _mm_and_ps(add_v, mask)); h = _mm_blendv_ps(h, val, mask); __m128 s; /* Fill s, if gap > 0 */ v = _mm_sub_ps(v, add_v); val = _mm_mul_ps(gap,_mm_rcp_ps(v)); s = _mm_andnot_ps(v_mask, val ); /* Check if h < 0 */ zero_ps = _mm_setzero_ps(); __m128 six_ps = _mm_load_ps(_six_ps); mask = _mm_cmplt_ps(h, zero_ps); h = _mm_add_ps(h, _mm_and_ps(mask, six_ps)); *c0 = h; *c1 = s; *c2 = v; } static inline void HSVtoRGB_SSE4(__m128 *c0, __m128 *c1, __m128 *c2) { __m128 h = *c0; __m128 s = *c1; __m128 v = *c2; __m128 r, g, b; /* Convert get the fraction of h * h_fraction = h - (float)(int)h */ __m128 ones_ps = _mm_load_ps(_ones_ps); __m128 h_fraction = _mm_sub_ps(h, _mm_floor_ps(h)); /* p = v * (1.0f - s) */ __m128 p = _mm_mul_ps(v, _mm_sub_ps(ones_ps, s)); /* q = (v * (1.0f - s * f)) */ __m128 q = _mm_mul_ps(v, _mm_sub_ps(ones_ps, _mm_mul_ps(s, h_fraction))); /* t = (v * (1.0f - s * (1.0f - f))) */ __m128 t = _mm_mul_ps(v, _mm_sub_ps(ones_ps, _mm_mul_ps(s, _mm_sub_ps(ones_ps, h_fraction)))); /* h < 1 (case 0)*/ /* case 0: *r = v; *g = t; *b = p; break; */ __m128 h_threshold = _mm_add_ps(ones_ps, ones_ps); __m128 out_mask = _mm_cmplt_ps(h, ones_ps); r = _mm_and_ps(v, out_mask); g = _mm_and_ps(t, out_mask); b = _mm_and_ps(p, out_mask); /* h < 2 (case 1) */ /* case 1: *r = q; *g = v; *b = p; break; */ __m128 m = _mm_cmplt_ps(h, h_threshold); h_threshold = _mm_add_ps(h_threshold, ones_ps); m = _mm_andnot_ps(out_mask, m); r = _mm_blendv_ps(r, q, m); g = _mm_blendv_ps(g, v, m); b = _mm_blendv_ps(b, p, m); out_mask = _mm_or_ps(out_mask, m); /* h < 3 (case 2)*/ /* case 2: *r = p; *g = v; *b = t; break; */ m = _mm_cmplt_ps(h, h_threshold); h_threshold = _mm_add_ps(h_threshold, ones_ps); m = _mm_andnot_ps(out_mask, m); r = _mm_blendv_ps(r, p, m); g = _mm_blendv_ps(g, v, m); b = _mm_blendv_ps(b, t, m); out_mask = _mm_or_ps(out_mask, m); /* h < 4 (case 3)*/ /* case 3: *r = p; *g = q; *b = v; break; */ m = _mm_cmplt_ps(h, h_threshold); h_threshold = _mm_add_ps(h_threshold, ones_ps); m = _mm_andnot_ps(out_mask, m); r = _mm_blendv_ps(r, p, m); g = _mm_blendv_ps(g, q, m); b = _mm_blendv_ps(b, v, m); out_mask = _mm_or_ps(out_mask, m); /* h < 5 (case 4)*/ /* case 4: *r = t; *g = p; *b = v; break; */ m = _mm_cmplt_ps(h, h_threshold); m = _mm_andnot_ps(out_mask, m); r = _mm_or_ps(r, _mm_and_ps(t, m)); g = _mm_or_ps(g, _mm_and_ps(p, m)); b = _mm_or_ps(b, _mm_and_ps(v, m)); out_mask = _mm_or_ps(out_mask, m); /* Remainder (case 5) */ /* case 5: *r = v; *g = p; *b = q; break; */ __m128 all_ones = _mm_cmpeq_ps(h,h); m = _mm_xor_ps(out_mask, all_ones); r = _mm_blendv_ps(r, v, m); g = _mm_blendv_ps(g, p, m); b = _mm_blendv_ps(b, q, m); *c0 = r; *c1 = g; *c2 = b; } #define DW(A) _mm_castps_si128(A) #define PS(A) _mm_castsi128_ps(A) /* TODO: Try if _mm_extract_ps() can be used below - should be faster on Nehalem*/ #define EXTRACT32BIT(XMM, N) _mm_extract_epi32(XMM, N) static void huesat_map_SSE4(RSHuesatMap *map, const PrecalcHSM* precalc, __m128 *_h, __m128 *_s, __m128 *_v) { __m128 zero_ps = _mm_setzero_ps(); __m128 ones_ps = _mm_load_ps(_ones_ps); __m128 h = *_h; __m128 s = *_s; __m128 v = *_v; /* Clamp - H must be pre-clamped*/ s = _mm_min_ps(_mm_max_ps(s, zero_ps),ones_ps); v = _mm_min_ps(_mm_max_ps(v, zero_ps),ones_ps); const RS_VECTOR3 *tableBase = map->deltas; __m128 hueShift; __m128 satScale; __m128 valScale; if (map->val_divisions < 2) { __m128 hScaled = _mm_mul_ps(h, _mm_load_ps(precalc->hScale)); __m128 sScaled = _mm_mul_ps(s, _mm_load_ps(precalc->sScale)); __m128i maxHueIndex0 = _mm_load_si128((__m128i*)precalc->maxHueIndex0); __m128i maxSatIndex0 = _mm_load_si128((__m128i*)precalc->maxSatIndex0); __m128i hIndex0 = _mm_cvttps_epi32( hScaled ); __m128i sIndex0 = _mm_cvttps_epi32( sScaled ); sIndex0 = _mm_min_epi16(sIndex0, maxSatIndex0); __m128i ones_epi32 = _mm_load_si128((__m128i*)_ones_epi32); __m128i hIndex1 = _mm_add_epi32(hIndex0, ones_epi32); /* if (hIndex0 >= maxHueIndex0) */ __m128i hIndexMask = _mm_cmpgt_epi32( hIndex0, _mm_sub_epi32(maxHueIndex0, ones_epi32)); hIndex0 = _mm_andnot_si128(hIndexMask, hIndex0); /* hIndex1 = 0; */ hIndex1 = _mm_andnot_si128(hIndexMask, hIndex1); /* hIndex0 = maxHueIndex0 */ hIndex0 = _mm_or_si128(hIndex0, _mm_and_si128(hIndexMask, maxHueIndex0)); __m128 hFract1 = _mm_sub_ps( hScaled, _mm_cvtepi32_ps(hIndex0)); __m128 sFract1 = _mm_sub_ps( sScaled, _mm_cvtepi32_ps(sIndex0)); __m128 ones_ps = _mm_load_ps(_ones_ps); __m128 hFract0 = _mm_sub_ps(ones_ps, hFract1); __m128 sFract0 = _mm_sub_ps(ones_ps, sFract1); __m128i hueStep = _mm_load_si128((__m128i*)precalc->hueStep); __m128i table_offsets = _mm_add_epi32(sIndex0, _mm_mullo_epi16(hIndex0, hueStep)); __m128i next_offsets = _mm_add_epi32(sIndex0, _mm_mullo_epi16(hIndex1, hueStep)); const RS_VECTOR3 *entry00[4] = { tableBase + EXTRACT32BIT(table_offsets,0), tableBase + EXTRACT32BIT(table_offsets,1), tableBase + EXTRACT32BIT(table_offsets,2), tableBase + EXTRACT32BIT(table_offsets,3) }; const RS_VECTOR3 *entry01[4] = { tableBase + EXTRACT32BIT(next_offsets,0), tableBase + EXTRACT32BIT(next_offsets,1), tableBase + EXTRACT32BIT(next_offsets,2), tableBase + EXTRACT32BIT(next_offsets,3)}; #define LOOK_SINGLE(A,B,C,D) A = _mm_insert_epi32( A, *(gint32*)&C[D]->B, D) #define LOOKUP_FOUR(A, B, C) A = DW(_mm_load_ss((float*)&C[0]->B));\ LOOK_SINGLE(A, B, C, 1);\ LOOK_SINGLE(A, B, C, 2);\ LOOK_SINGLE(A, B, C, 3); #define LOOK_SINGLE_ONE(A,B,C,D) A = _mm_insert_epi32( A, *(gint32*)&C[D][1].B, D) #define LOOKUP_FOUR_ONE(A, B, C) A = DW(_mm_load_ss((float*)&C[0][1].B));\ LOOK_SINGLE_ONE(A, B, C, 1);\ LOOK_SINGLE_ONE(A, B, C, 2);\ LOOK_SINGLE_ONE(A, B, C, 3); /* Initialize to something (will be overwritten) */ __m128i h00; __m128i h01; LOOKUP_FOUR(h00, fHueShift, entry00); LOOKUP_FOUR(h01, fHueShift, entry01); __m128 hueShift0 = _mm_add_ps(_mm_mul_ps(PS(h00), hFract0), _mm_mul_ps(PS(h01), hFract1)); hueShift0 = _mm_mul_ps(hueShift0, sFract0); LOOKUP_FOUR_ONE(h00, fHueShift, entry00); LOOKUP_FOUR_ONE(h01, fHueShift, entry01); __m128 hueShift1 = _mm_add_ps(_mm_mul_ps(PS(h00), hFract0), _mm_mul_ps(PS(h01), hFract1)); hueShift = _mm_add_ps(hueShift0, _mm_mul_ps(hueShift1, sFract1)); __m128i s00; __m128i s01; LOOKUP_FOUR(s00, fSatScale, entry00); LOOKUP_FOUR(s01, fSatScale, entry01); __m128 satScale0 = _mm_add_ps(_mm_mul_ps(PS(s00), hFract0), _mm_mul_ps(PS(s01), hFract1)); satScale0 = _mm_mul_ps(satScale0, sFract0); LOOKUP_FOUR_ONE(s00, fSatScale, entry00); LOOKUP_FOUR_ONE(s01, fSatScale, entry01); __m128 satScale1 = _mm_add_ps(_mm_mul_ps(PS(s00), hFract0), _mm_mul_ps(PS(s01), hFract1)); satScale = _mm_add_ps(satScale0, _mm_mul_ps(satScale1, sFract1)); __m128i v00; __m128i v01; LOOKUP_FOUR(v00, fValScale, entry00); LOOKUP_FOUR(v01, fValScale, entry01); __m128 valScale0 = _mm_add_ps(_mm_mul_ps(PS(v00), hFract0), _mm_mul_ps(PS(v01), hFract1)); valScale0 = _mm_mul_ps(valScale0, sFract0); LOOKUP_FOUR_ONE(v00, fValScale, entry00); LOOKUP_FOUR_ONE(v01, fValScale, entry01); __m128 valScale1 = _mm_add_ps(_mm_mul_ps(PS(v00), hFract0), _mm_mul_ps(PS(v01), hFract1)); valScale = _mm_add_ps(valScale0, _mm_mul_ps(valScale1, sFract1)); } else { __m128 hScaled = _mm_mul_ps(h, _mm_load_ps(precalc->hScale)); __m128 sScaled = _mm_mul_ps(s, _mm_load_ps(precalc->sScale)); __m128 vScaled = _mm_mul_ps(v, _mm_load_ps(precalc->vScale)); __m128i maxHueIndex0 = _mm_load_si128((__m128i*)precalc->maxHueIndex0); __m128i maxSatIndex0 = _mm_load_si128((__m128i*)precalc->maxSatIndex0); __m128i maxValIndex0 = _mm_load_si128((__m128i*)precalc->maxValIndex0); __m128i hIndex0 = _mm_cvttps_epi32(hScaled); __m128i sIndex0 = _mm_cvttps_epi32(sScaled); __m128i vIndex0 = _mm_cvttps_epi32(vScaled); // Requires that maxSatIndex0 and sIndex0 can be contained within a 16 bit signed word. sIndex0 = _mm_min_epi16(sIndex0, maxSatIndex0); vIndex0 = _mm_min_epi16(vIndex0, maxValIndex0); __m128i ones_epi32 = _mm_load_si128((__m128i*)_ones_epi32); __m128i hIndex1 = _mm_add_epi32(hIndex0, ones_epi32); /* if (hIndex0 > (maxHueIndex0 - 1)) */ __m128i hIndexMask = _mm_cmpgt_epi32( hIndex0, _mm_sub_epi32(maxHueIndex0, ones_epi32)); /* Make room in hIndex0 */ hIndex0 = _mm_andnot_si128(hIndexMask, hIndex0); /* hIndex1 = 0; */ hIndex1 = _mm_andnot_si128(hIndexMask, hIndex1); /* hIndex0 = maxHueIndex0, where hIndex0 >= (maxHueIndex0) */ hIndex0 = _mm_or_si128(hIndex0, _mm_and_si128(hIndexMask, maxHueIndex0)); __m128 hFract1 = _mm_sub_ps( hScaled, _mm_cvtepi32_ps(hIndex0)); __m128 sFract1 = _mm_sub_ps( sScaled, _mm_cvtepi32_ps(sIndex0)); __m128 vFract1 = _mm_sub_ps( vScaled, _mm_cvtepi32_ps(vIndex0)); __m128 ones_ps = _mm_load_ps(_ones_ps); __m128 hFract0 = _mm_sub_ps(ones_ps, hFract1); __m128 sFract0 = _mm_sub_ps(ones_ps, sFract1); __m128 vFract0 = _mm_sub_ps(ones_ps, vFract1); __m128i hueStep = _mm_load_si128((__m128i*)precalc->hueStep); __m128i valStep = _mm_load_si128((__m128i*)precalc->valStep); // This requires that hueStep and valStep can be contained in a 16 bit signed integer. __m128i table_offsets = _mm_add_epi32(sIndex0, _mm_mullo_epi16(vIndex0, valStep)); __m128i next_offsets = _mm_mullo_epi16(hIndex1, hueStep); next_offsets = _mm_add_epi32(next_offsets, table_offsets); table_offsets = _mm_add_epi32(table_offsets, _mm_mullo_epi16(hIndex0, hueStep)); gint _valStep = precalc->valStep[0]; const RS_VECTOR3 *entry00[4] = { tableBase + EXTRACT32BIT(table_offsets,0), tableBase + EXTRACT32BIT(table_offsets,1), tableBase + EXTRACT32BIT(table_offsets,2), tableBase + EXTRACT32BIT(table_offsets,3) }; const RS_VECTOR3 *entry10[4] = { entry00[0] + _valStep, entry00[1] + _valStep, entry00[2] + _valStep, entry00[3] + _valStep}; const RS_VECTOR3 *entry01[4] = { tableBase + EXTRACT32BIT(next_offsets,0), tableBase + EXTRACT32BIT(next_offsets,1), tableBase + EXTRACT32BIT(next_offsets,2), tableBase + EXTRACT32BIT(next_offsets,3)}; const RS_VECTOR3 *entry11[4] = { entry01[0] + _valStep, entry01[1] + _valStep, entry01[2] + _valStep, entry01[3] + _valStep}; __m128i temp_00; __m128i temp_01; __m128i temp_10; __m128i temp_11; /* Hue first element */ LOOKUP_FOUR(temp_00, fHueShift, entry00); LOOKUP_FOUR(temp_01, fHueShift, entry01); LOOKUP_FOUR(temp_10, fHueShift, entry10); LOOKUP_FOUR(temp_11, fHueShift, entry11); __m128 hueShift0 = _mm_mul_ps(vFract0, _mm_add_ps(_mm_mul_ps(PS(temp_00), hFract0), _mm_mul_ps(PS(temp_01), hFract1))); __m128 hueShift1 = _mm_mul_ps(vFract1, _mm_add_ps(_mm_mul_ps(PS(temp_10), hFract0), _mm_mul_ps(PS(temp_11), hFract1))); hueShift = _mm_mul_ps(sFract0, _mm_add_ps(hueShift0, hueShift1)); /* Hue second element */ LOOKUP_FOUR_ONE(temp_00, fHueShift, entry00); LOOKUP_FOUR_ONE(temp_01, fHueShift, entry01); LOOKUP_FOUR_ONE(temp_10, fHueShift, entry10); LOOKUP_FOUR_ONE(temp_11, fHueShift, entry11); hueShift0 = _mm_mul_ps(vFract0, _mm_add_ps(_mm_mul_ps(PS(temp_00), hFract0), _mm_mul_ps(PS(temp_01), hFract1))); hueShift1 = _mm_mul_ps(vFract1, _mm_add_ps(_mm_mul_ps(PS(temp_10), hFract0), _mm_mul_ps(PS(temp_11), hFract1))); hueShift = _mm_add_ps(hueShift, _mm_mul_ps(sFract1, _mm_add_ps(hueShift0, hueShift1))); /* Sat first element */ LOOKUP_FOUR(temp_00, fSatScale, entry00); LOOKUP_FOUR(temp_01, fSatScale, entry01); LOOKUP_FOUR(temp_10, fSatScale, entry10); LOOKUP_FOUR(temp_11, fSatScale, entry11); __m128 satScale0 = _mm_mul_ps(vFract0, _mm_add_ps(_mm_mul_ps(PS(temp_00), hFract0), _mm_mul_ps(PS(temp_01), hFract1))); __m128 satScale1 = _mm_mul_ps(vFract1, _mm_add_ps(_mm_mul_ps(PS(temp_10), hFract0), _mm_mul_ps(PS(temp_11), hFract1))); satScale = _mm_mul_ps(sFract0, _mm_add_ps(satScale0, satScale1)); /* Sat second element */ LOOKUP_FOUR_ONE(temp_00, fSatScale, entry00); LOOKUP_FOUR_ONE(temp_01, fSatScale, entry01); LOOKUP_FOUR_ONE(temp_10, fSatScale, entry10); LOOKUP_FOUR_ONE(temp_11, fSatScale, entry11); satScale0 = _mm_mul_ps(vFract0, _mm_add_ps(_mm_mul_ps(PS(temp_00), hFract0), _mm_mul_ps(PS(temp_01), hFract1))); satScale1 = _mm_mul_ps(vFract1, _mm_add_ps(_mm_mul_ps(PS(temp_10), hFract0), _mm_mul_ps(PS(temp_11), hFract1))); satScale = _mm_add_ps(satScale, _mm_mul_ps(sFract1, _mm_add_ps(satScale0, satScale1))); /* Val first element */ LOOKUP_FOUR(temp_00, fValScale, entry00); LOOKUP_FOUR(temp_01, fValScale, entry01); LOOKUP_FOUR(temp_10, fValScale, entry10); LOOKUP_FOUR(temp_11, fValScale, entry11); __m128 valScale0 = _mm_mul_ps(vFract0, _mm_add_ps(_mm_mul_ps(PS(temp_00), hFract0), _mm_mul_ps(PS(temp_01), hFract1))); __m128 valScale1 = _mm_mul_ps(vFract1, _mm_add_ps(_mm_mul_ps(PS(temp_10), hFract0), _mm_mul_ps(PS(temp_11), hFract1))); valScale = _mm_mul_ps(sFract0, _mm_add_ps(valScale0, valScale1)); /* Val second element */ LOOKUP_FOUR_ONE(temp_00, fValScale, entry00); LOOKUP_FOUR_ONE(temp_01, fValScale, entry01); LOOKUP_FOUR_ONE(temp_10, fValScale, entry10); LOOKUP_FOUR_ONE(temp_11, fValScale, entry11); valScale0 = _mm_mul_ps(vFract0, _mm_add_ps(_mm_mul_ps(PS(temp_00), hFract0), _mm_mul_ps(PS(temp_01), hFract1))); valScale1 = _mm_mul_ps(vFract1, _mm_add_ps(_mm_mul_ps(PS(temp_10), hFract0), _mm_mul_ps(PS(temp_11), hFract1))); valScale = _mm_add_ps(valScale, _mm_mul_ps(sFract1, _mm_add_ps(valScale0, valScale1))); } __m128 mul_hue = _mm_load_ps(_mul_hue_ps); ones_ps = _mm_load_ps(_ones_ps); hueShift = _mm_mul_ps(hueShift, mul_hue); s = _mm_min_ps(ones_ps, _mm_mul_ps(s, satScale)); v = _mm_min_ps(ones_ps, _mm_mul_ps(v, valScale)); h = _mm_add_ps(h, hueShift); *_h = h; *_s = s; *_v = v; } static gfloat _thousand_24_ps[4] __attribute__ ((aligned (16))) = {1023.99999f, 1023.99999f, 1023.99999f, 1023.99999f}; static inline __m128 curve_interpolate_lookup(__m128 value, const gfloat * const tone_lut) { /* Convert v to lookup values and interpolate */ __m128 mul = _mm_mul_ps(value, _mm_load_ps(_thousand_24_ps)); __m128i lookup = _mm_cvtps_epi32(mul); /* Calculate fractions */ __m128 frac = _mm_sub_ps(mul, _mm_floor_ps(mul)); __m128 inv_frac = _mm_sub_ps(_mm_load_ps(_ones_ps), frac); /* Load two adjacent curve values and interpolate between them */ __m128 p0p1 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&tone_lut[_mm_extract_epi32(lookup,0)*2])); __m128 p2p3 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&tone_lut[_mm_extract_epi32(lookup,2)*2])); p0p1 = _mm_loadh_pi(p0p1, (__m64*)&tone_lut[_mm_extract_epi32(lookup,1)*2]); p2p3 = _mm_loadh_pi(p2p3, (__m64*)&tone_lut[_mm_extract_epi32(lookup,3)*2]); /* Pack all lower values in v0, high in v1 and interpolate */ __m128 v0 = _mm_shuffle_ps(p0p1, p2p3, _MM_SHUFFLE(2,0,2,0)); __m128 v1 = _mm_shuffle_ps(p0p1, p2p3, _MM_SHUFFLE(3,1,3,1)); return _mm_add_ps(_mm_mul_ps(inv_frac, v0), _mm_mul_ps(frac, v1)); } /* TODO: Possibly use blend_ps instead of masking and or'ing */ static void rgb_tone_sse4(__m128* _r, __m128* _g, __m128* _b, const gfloat * const tone_lut) { __m128 r = *_r; __m128 g = *_g; __m128 b = *_b; __m128 small_ps = _mm_load_ps(_very_small_ps); __m128 ones_ps = _mm_load_ps(_ones_ps); /* Clamp to avoid lookups out of table */ r = _mm_min_ps(_mm_max_ps(r, small_ps),ones_ps); g = _mm_min_ps(_mm_max_ps(g, small_ps),ones_ps); b = _mm_min_ps(_mm_max_ps(b, small_ps),ones_ps); /* Find largest and smallest values */ __m128 lg = _mm_max_ps(b, _mm_max_ps(r, g)); __m128 sm = _mm_min_ps(b, _mm_min_ps(r, g)); /* Lookup */ __m128 LG = curve_interpolate_lookup(lg, tone_lut); __m128 SM = curve_interpolate_lookup(sm, tone_lut); /* Create masks for largest, smallest and medium values */ /* This is done in integer SSE2, since they have double the throughput */ __m128i ones = _mm_cmpeq_epi32(DW(r), DW(r)); __m128i is_r_lg = _mm_cmpeq_epi32(DW(r), DW(lg)); __m128i is_g_lg = _mm_cmpeq_epi32(DW(g), DW(lg)); __m128i is_b_lg = _mm_cmpeq_epi32(DW(b), DW(lg)); __m128i is_r_sm = _mm_andnot_si128(is_r_lg, _mm_cmpeq_epi32(DW(r), DW(sm))); __m128i is_g_sm = _mm_andnot_si128(is_g_lg, _mm_cmpeq_epi32(DW(g), DW(sm))); __m128i is_b_sm = _mm_andnot_si128(is_b_lg, _mm_cmpeq_epi32(DW(b), DW(sm))); __m128i is_r_md = _mm_xor_si128(ones, _mm_or_si128(is_r_lg, is_r_sm)); __m128i is_g_md = _mm_xor_si128(ones, _mm_or_si128(is_g_lg, is_g_sm)); __m128i is_b_md = _mm_xor_si128(ones, _mm_or_si128(is_b_lg, is_b_sm)); /* Find all medium values based on masks */ __m128 md = PS(_mm_or_si128(_mm_or_si128( _mm_and_si128(DW(r), is_r_md), _mm_and_si128(DW(g), is_g_md)), _mm_and_si128(DW(b), is_b_md))); /* Calculate tone corrected medium value */ __m128 p = _mm_rcp_ps(_mm_sub_ps(lg, sm)); __m128 q = _mm_sub_ps(md, sm); __m128 o = _mm_sub_ps(LG, SM); __m128 MD = _mm_add_ps(SM, _mm_mul_ps(o, _mm_mul_ps(p, q))); /* Inserted here again, to lighten register presssure */ is_r_lg = _mm_cmpeq_epi32(DW(r), DW(lg)); is_g_lg = _mm_cmpeq_epi32(DW(g), DW(lg)); is_b_lg = _mm_cmpeq_epi32(DW(b), DW(lg)); /* Combine corrected values to output RGB */ r = PS(_mm_or_si128( _mm_or_si128( _mm_and_si128(DW(LG), is_r_lg), _mm_and_si128(DW(SM), is_r_sm)), _mm_and_si128(DW(MD), is_r_md))); g = PS(_mm_or_si128( _mm_or_si128( _mm_and_si128(DW(LG), is_g_lg), _mm_and_si128(DW(SM), is_g_sm)), _mm_and_si128(DW(MD), is_g_md))); b = PS(_mm_or_si128( _mm_or_si128( _mm_and_si128(DW(LG), is_b_lg), _mm_and_si128(DW(SM), is_b_sm)), _mm_and_si128(DW(MD), is_b_md))); *_r = r; *_g = g; *_b = b; } #define SETFLOAT4(N, A, B, C, D) float N[4] __attribute__ ((aligned (16))); \ N[0] = D; N[1] = C; N[2] = B; N[3] = A; #define SETFLOAT4_SAME(N, A) float N[4] __attribute__ ((aligned (16))); \ N[0] = A; N[1] = A; N[2] = A; N[3] = A; static gfloat _twofiftysix_ps[4] __attribute__ ((aligned (16))) = {255.9999f,255.9999f,255.9999f,255.9999f}; gboolean render_SSE4(ThreadInfo* t) { RS_IMAGE16 *image = t->tmp; RSDcp *dcp = t->dcp; gint x, y; __m128 h, s, v; __m128i p1,p2; __m128 p1f, p2f, p3f, p4f; __m128 r, g, b, r2, g2, b2; __m128i zero; gboolean do_contrast = (dcp->contrast > 1.001f); gboolean do_highrec = (dcp->contrast < 0.999f); __m128 hue_add = _mm_set_ps(dcp->hue, dcp->hue, dcp->hue, dcp->hue); __m128 sat; if (dcp->saturation > 1.0) sat = _mm_set_ps(dcp->saturation-1.0f, dcp->saturation-1.0f, dcp->saturation-1.0f, dcp->saturation-1.0f); else sat = _mm_set_ps(dcp->saturation, dcp->saturation, dcp->saturation, dcp->saturation); float exposure_simple = MAX(1.0, powf(2.0f, dcp->exposure)); float __recover_radius = 0.5 * exposure_simple; SETFLOAT4_SAME(_inv_recover_radius, 1.0f / __recover_radius); SETFLOAT4_SAME(_recover_radius, 1.0 - __recover_radius); SETFLOAT4_SAME(_contr_base, 0.5f); SETFLOAT4_SAME(_inv_contrast, 1.0f - dcp->contrast); int xfer[4] __attribute__ ((aligned (16))); SETFLOAT4(_min_cam, 0.0f, dcp->camera_white.z, dcp->camera_white.y, dcp->camera_white.x); SETFLOAT4_SAME(_black_minus_radius, dcp->exposure_black - dcp->exposure_radius); SETFLOAT4_SAME(_black_plus_radius, dcp->exposure_black + dcp->exposure_radius); SETFLOAT4_SAME(_exposure_black, dcp->exposure_black); SETFLOAT4_SAME(_exposure_slope, dcp->exposure_slope); SETFLOAT4_SAME(_exposure_qscale, dcp->exposure_qscale); SETFLOAT4_SAME(_contrast, dcp->contrast); SETFLOAT4_SAME(_cm_r, dcp->channelmixer_red); SETFLOAT4_SAME(_cm_g, dcp->channelmixer_green); SETFLOAT4_SAME(_cm_b, dcp->channelmixer_blue); float cam_prof[4*4*3] __attribute__ ((aligned (16))); for (x = 0; x < 4; x++ ) { cam_prof[x] = dcp->camera_to_prophoto.coeff[0][0] * dcp->channelmixer_red; cam_prof[x+4] = dcp->camera_to_prophoto.coeff[0][1] * dcp->channelmixer_red; cam_prof[x+8] = dcp->camera_to_prophoto.coeff[0][2] * dcp->channelmixer_red; cam_prof[12+x] = dcp->camera_to_prophoto.coeff[1][0] * dcp->channelmixer_green; cam_prof[12+x+4] = dcp->camera_to_prophoto.coeff[1][1] * dcp->channelmixer_green; cam_prof[12+x+8] = dcp->camera_to_prophoto.coeff[1][2] * dcp->channelmixer_green; cam_prof[24+x] = dcp->camera_to_prophoto.coeff[2][0] * dcp->channelmixer_blue; cam_prof[24+x+4] = dcp->camera_to_prophoto.coeff[2][1] * dcp->channelmixer_blue; cam_prof[24+x+8] = dcp->camera_to_prophoto.coeff[2][2]* dcp->channelmixer_blue; } gint end_x = image->w - (image->w & 3); for(y = t->start_y ; y < t->end_y; y++) { for(x=0; x < end_x; x+=4) { __m128i* pixel = (__m128i*)GET_PIXEL(image, x, y); zero = _mm_setzero_si128(); /* Convert to float */ p1 = _mm_load_si128(pixel); p2 = _mm_load_si128(pixel + 1); /* Unpack to R G B x */ p2f = _mm_cvtepi32_ps(_mm_unpackhi_epi16(p1, zero)); p4f = _mm_cvtepi32_ps(_mm_unpackhi_epi16(p2, zero)); p1f = _mm_cvtepi32_ps(_mm_unpacklo_epi16(p1, zero)); p3f = _mm_cvtepi32_ps(_mm_unpacklo_epi16(p2, zero)); /* Normalize to 0 to 1 range */ __m128 rgb_div = _mm_load_ps(_rgb_div_ps); p1f = _mm_mul_ps(p1f, rgb_div); p2f = _mm_mul_ps(p2f, rgb_div); p3f = _mm_mul_ps(p3f, rgb_div); p4f = _mm_mul_ps(p4f, rgb_div); if (dcp->use_profile) { /* Restric to camera white */ __m128 min_cam = _mm_load_ps(_min_cam); p1f = _mm_min_ps(p1f, min_cam); p2f = _mm_min_ps(p2f, min_cam); p3f = _mm_min_ps(p3f, min_cam); p4f = _mm_min_ps(p4f, min_cam); /* Convert to planar */ __m128 g1g0r1r0 = _mm_unpacklo_ps(p1f, p2f); __m128 b1b0 = _mm_unpackhi_ps(p1f, p2f); __m128 g3g2r3r2 = _mm_unpacklo_ps(p3f, p4f); __m128 b3b2 = _mm_unpackhi_ps(p3f, p4f); r = _mm_movelh_ps(g1g0r1r0, g3g2r3r2); g = _mm_movehl_ps(g3g2r3r2, g1g0r1r0); b = _mm_movelh_ps(b1b0, b3b2); /* Convert to Prophoto */ r2 = sse_matrix3_mul(cam_prof, r, g, b); g2 = sse_matrix3_mul(&cam_prof[12], r, g, b); b2 = sse_matrix3_mul(&cam_prof[24], r, g, b); } else { /* Convert to planar */ __m128 g1g0r1r0 = _mm_unpacklo_ps(p1f, p2f); __m128 b1b0 = _mm_unpackhi_ps(p1f, p2f); __m128 g3g2r3r2 = _mm_unpacklo_ps(p3f, p4f); __m128 b3b2 = _mm_unpackhi_ps(p3f, p4f); r = _mm_movelh_ps(g1g0r1r0, g3g2r3r2); g = _mm_movehl_ps(g3g2r3r2, g1g0r1r0); b = _mm_movelh_ps(b1b0, b3b2); /* Multiply channel mixer */ r2 = _mm_mul_ps(_mm_load_ps(_cm_r), r); g2 = _mm_mul_ps(_mm_load_ps(_cm_g), g); b2 = _mm_mul_ps(_mm_load_ps(_cm_b), b); } RGBtoHSV_SSE4(&r, &g, &b); h = r; s = g; v = b; if (dcp->huesatmap) { huesat_map_SSE4(dcp->huesatmap, dcp->huesatmap_precalc, &h, &s, &v); } __m128 max_val = _mm_load_ps(_ones_ps); __m128 min_val = _mm_load_ps(_very_small_ps); if (dcp->saturation > 1.0) { __m128 two_ps = _mm_load_ps(_two_ps); __m128 ones_ps = _mm_load_ps(_ones_ps); /* out = (sat) * (x*2-x^2.0) + ((1.0-sat)*x) */ __m128 s_curved = _mm_mul_ps(sat, _mm_sub_ps(_mm_mul_ps(s, two_ps), _mm_mul_ps(s,s))); s = _mm_min_ps(max_val, _mm_add_ps(s_curved, _mm_mul_ps(s, _mm_sub_ps(ones_ps, sat)))); } else { s = _mm_max_ps(min_val, _mm_min_ps(max_val, _mm_mul_ps(s, sat))); } /* Hue */ __m128 six_ps = _mm_load_ps(_six_ps); __m128 zero_ps = _mm_setzero_ps(); h = _mm_add_ps(h, hue_add); /* Check if hue > 6 or < 0*/ __m128 h_mask_gt = _mm_cmpgt_ps(h, six_ps); __m128 h_mask_lt = _mm_cmplt_ps(h, zero_ps); __m128 six_masked_gt = _mm_and_ps(six_ps, h_mask_gt); __m128 six_masked_lt = _mm_and_ps(six_ps, h_mask_lt); h = _mm_sub_ps(h, six_masked_gt); h = _mm_add_ps(h, six_masked_lt); __m128 v_stored = v; HSVtoRGB_SSE4(&h, &s, &v); r = h; g = s; b = v; /* Exposure */ __m128 black_minus_radius = _mm_load_ps(_black_minus_radius); __m128 y_r = _mm_sub_ps(r, black_minus_radius); __m128 y_g = _mm_sub_ps(g, black_minus_radius); __m128 y_b = _mm_sub_ps(b, black_minus_radius); __m128 exposure_qscale = _mm_load_ps(_exposure_qscale); y_r = _mm_mul_ps(exposure_qscale,_mm_mul_ps(y_r, y_r)); y_g = _mm_mul_ps(exposure_qscale,_mm_mul_ps(y_g, y_g)); y_b = _mm_mul_ps(exposure_qscale,_mm_mul_ps(y_b, y_b)); __m128 exposure_slope = _mm_load_ps(_exposure_slope); __m128 exposure_black = _mm_load_ps(_exposure_black); __m128 y2_r = _mm_mul_ps(exposure_slope, _mm_sub_ps(r, exposure_black)); __m128 y2_g = _mm_mul_ps(exposure_slope, _mm_sub_ps(g, exposure_black)); __m128 y2_b = _mm_mul_ps(exposure_slope, _mm_sub_ps(b, exposure_black)); __m128 black_plus_radius = _mm_load_ps(_black_plus_radius); __m128 r_mask = _mm_cmpgt_ps(r, black_plus_radius); __m128 g_mask = _mm_cmpgt_ps(g, black_plus_radius); __m128 b_mask = _mm_cmpgt_ps(b, black_plus_radius); y_r = _mm_blendv_ps(y_r, y2_r, r_mask); y_g = _mm_blendv_ps(y_g, y2_g, g_mask); y_b = _mm_blendv_ps(y_b, y2_b, b_mask); black_minus_radius = _mm_load_ps(_black_minus_radius); r_mask = _mm_cmple_ps(r, black_minus_radius); g_mask = _mm_cmple_ps(g, black_minus_radius); b_mask = _mm_cmple_ps(b, black_minus_radius); r = _mm_andnot_ps(r_mask, y_r); g = _mm_andnot_ps(g_mask, y_g); b = _mm_andnot_ps(b_mask, y_b); /* Contrast in gamma 2.0 */ if (do_contrast) { __m128 contr_base = _mm_load_ps(_contr_base); __m128 contrast = _mm_load_ps(_contrast); min_val = _mm_load_ps(_very_small_ps); r = _mm_max_ps(r, min_val); g = _mm_max_ps(g, min_val); b = _mm_max_ps(b, min_val); r = _mm_add_ps(_mm_mul_ps(contrast, _mm_sub_ps(_mm_rcp_ps(_mm_rsqrt_ps(r)), contr_base)), contr_base); g = _mm_add_ps(_mm_mul_ps(contrast, _mm_sub_ps(_mm_rcp_ps(_mm_rsqrt_ps(g)), contr_base)), contr_base); b = _mm_add_ps(_mm_mul_ps(contrast, _mm_sub_ps(_mm_rcp_ps(_mm_rsqrt_ps(b)), contr_base)), contr_base); r = _mm_max_ps(r, min_val); g = _mm_max_ps(g, min_val); b = _mm_max_ps(b, min_val); r = _mm_mul_ps(r,r); g = _mm_mul_ps(g,g); b = _mm_mul_ps(b,b); } else if (do_highrec) { max_val = _mm_load_ps(_ones_ps); __m128 inv_contrast = _mm_load_ps(_inv_contrast); __m128 recover_radius = _mm_load_ps(_recover_radius); __m128 inv_recover_radius = _mm_load_ps(_inv_recover_radius); /* Distance from 1.0 - radius */ __m128 dist = _mm_sub_ps(v_stored, recover_radius); /* Scale so distance is normalized, clamp */ __m128 dist_scaled = _mm_min_ps(max_val, _mm_mul_ps(dist, inv_recover_radius)); __m128 mul_val = _mm_sub_ps(max_val, _mm_mul_ps(dist_scaled, inv_contrast)); r = _mm_mul_ps(r, mul_val); g = _mm_mul_ps(g, mul_val); b = _mm_mul_ps(b, mul_val); } /* Convert to HSV */ RGBtoHSV_SSE4(&r, &g, &b); h = r; s = g; v = b; if (!dcp->curve_is_flat) { /* Convert v to lookup values and interpolate */ __m128 v_mul = _mm_mul_ps(v, _mm_load_ps(_twofiftysix_ps)); __m128i lookup = _mm_cvtps_epi32(v_mul); _mm_store_si128((__m128i*)&xfer[0], lookup); /* Calculate fractions */ __m128 frac = _mm_sub_ps(v_mul, _mm_floor_ps(v_mul)); __m128 inv_frac = _mm_sub_ps(_mm_load_ps(_ones_ps), frac); /* Load two adjacent curve values and interpolate between them */ __m128 p0p1 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&dcp->curve_samples[xfer[0]*2])); __m128 p2p3 = _mm_castsi128_ps(_mm_loadl_epi64((__m128i*)&dcp->curve_samples[xfer[2]*2])); p0p1 = _mm_loadh_pi(p0p1, (__m64*)&dcp->curve_samples[xfer[1]*2]); p2p3 = _mm_loadh_pi(p2p3, (__m64*)&dcp->curve_samples[xfer[3]*2]); /* Pack all lower values in v0, high in v1 and interpolate */ __m128 v0 = _mm_shuffle_ps(p0p1, p2p3, _MM_SHUFFLE(2,0,2,0)); __m128 v1 = _mm_shuffle_ps(p0p1, p2p3, _MM_SHUFFLE(3,1,3,1)); v = _mm_add_ps(_mm_mul_ps(inv_frac, v0), _mm_mul_ps(frac, v1)); } /* Apply looktable */ if (dcp->looktable) { huesat_map_SSE4(dcp->looktable, dcp->looktable_precalc, &h, &s, &v); } /* Ensure that hue is within range */ zero_ps = _mm_setzero_ps(); h_mask_gt = _mm_cmpgt_ps(h, six_ps); h_mask_lt = _mm_cmplt_ps(h, zero_ps); six_masked_gt = _mm_and_ps(six_ps, h_mask_gt); six_masked_lt = _mm_and_ps(six_ps, h_mask_lt); h = _mm_sub_ps(h, six_masked_gt); h = _mm_add_ps(h, six_masked_lt); /* s always slightly > 0 when converting to RGB */ s = _mm_max_ps(s, min_val); HSVtoRGB_SSE4(&h, &s, &v); r = h; g = s; b = v; /* Apply Tone Curve in RGB space*/ if (dcp->tone_curve_lut) { rgb_tone_sse4( &r, &g, &b, dcp->tone_curve_lut); } /* Convert to 16 bit */ __m128 rgb_mul = _mm_load_ps(_16_bit_ps); r = _mm_mul_ps(r, rgb_mul); g = _mm_mul_ps(g, rgb_mul); b = _mm_mul_ps(b, rgb_mul); __m128i r_i = _mm_cvtps_epi32(r); __m128i g_i = _mm_cvtps_epi32(g); __m128i b_i = _mm_cvtps_epi32(b); /* Convert to 16 bit unsigned values */ r_i = _mm_packus_epi32(r_i, r_i); b_i = _mm_packus_epi32(b_i, b_i); g_i = _mm_packus_epi32(g_i, g_i); /* Interleave*/ __m128i rg_i = _mm_unpacklo_epi16(r_i, g_i); __m128i bb_i = _mm_unpacklo_epi16(b_i, b_i); p1 = _mm_unpacklo_epi32(rg_i, bb_i); p2 = _mm_unpackhi_epi32(rg_i, bb_i); /* Store processed pixel */ _mm_store_si128(pixel, p1); _mm_store_si128(pixel + 1, p2); } } return TRUE; } #undef DW #undef PS #undef SETFLOAT4 #undef SETFLOAT4_SAME #else // not defined __SSE4_1__ gboolean render_SSE4(ThreadInfo* t) { return FALSE; } #endif rawstudio-2.0/plugins/output-pngfile/0000755000175000017500000000000011547430076015047 500000000000000rawstudio-2.0/plugins/output-pngfile/Makefile.am0000644000175000017500000000076111526533642017027 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = output_pngfile.la libdir = $(datadir)/rawstudio/plugins/ output_pngfile_la_LIBADD = @PACKAGE_LIBS@ output_pngfile_la_LDFLAGS = -module -avoid-version output_pngfile_la_SOURCES = output-pngfile.c rawstudio-2.0/plugins/output-pngfile/Makefile.in0000644000175000017500000004230011547430041017023 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/output-pngfile DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) output_pngfile_la_DEPENDENCIES = am_output_pngfile_la_OBJECTS = output-pngfile.lo output_pngfile_la_OBJECTS = $(am_output_pngfile_la_OBJECTS) output_pngfile_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(output_pngfile_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(output_pngfile_la_SOURCES) DIST_SOURCES = $(output_pngfile_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = output_pngfile.la output_pngfile_la_LIBADD = @PACKAGE_LIBS@ output_pngfile_la_LDFLAGS = -module -avoid-version output_pngfile_la_SOURCES = output-pngfile.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/output-pngfile/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/output-pngfile/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done output_pngfile.la: $(output_pngfile_la_OBJECTS) $(output_pngfile_la_DEPENDENCIES) $(output_pngfile_la_LINK) -rpath $(libdir) $(output_pngfile_la_OBJECTS) $(output_pngfile_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output-pngfile.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/output-pngfile/output-pngfile.c0000644000175000017500000002013311543243335020110 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Output plugin tmpl version 1 */ #include #include #include "config.h" #include #define RS_TYPE_PNGFILE (rs_pngfile_type) #define RS_PNGFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_PNGFILE, RSPngfile)) #define RS_PNGFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_PNGFILE, RSPngfileClass)) #define RS_IS_PNGFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_PNGFILE)) typedef struct _RSPngfile RSPngfile; typedef struct _RSPngfileClass RSPngfileClass; struct _RSPngfile { RSOutput parent; gchar *filename; gint quality; RSColorSpace *color_space; gboolean save16bit; gboolean copy_metadata; }; struct _RSPngfileClass { RSOutputClass parent_class; }; RS_DEFINE_OUTPUT(rs_pngfile, RSPngfile) enum { PROP_0, PROP_FILENAME, PROP_16BIT, PROP_METADATA, PROP_COLORSPACE }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static gboolean execute(RSOutput *output, RSFilter *filter); G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_pngfile_get_type(G_TYPE_MODULE(plugin)); } static void rs_pngfile_class_init(RSPngfileClass *klass) { RSOutputClass *output_class = RS_OUTPUT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_FILENAME, g_param_spec_string( "filename", "filename", _("Full export path"), NULL, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_COLORSPACE, g_param_spec_object( "colorspace", "Output colorspace", _("Color space used for saving"), RS_TYPE_COLOR_SPACE, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_16BIT, g_param_spec_boolean( "save16bit", "16 bit PNG", _("Save 16 bit linear PNG"), FALSE, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_METADATA, g_param_spec_boolean( "copy-metadata", "Copy Metadata", _("Copy EXIF metadata to XMP"), TRUE, G_PARAM_READWRITE) ); output_class->execute = execute; output_class->extension = "png"; output_class->display_name = _("PNG (Portable Network Graphics)"); } static void rs_pngfile_init(RSPngfile *pngfile) { pngfile->filename = NULL; pngfile->color_space = rs_color_space_new_singleton("RSSrgb"); pngfile->save16bit = FALSE; pngfile->copy_metadata = TRUE; } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSPngfile *pngfile = RS_PNGFILE(object); switch (property_id) { case PROP_FILENAME: g_value_set_string(value, pngfile->filename); break; case PROP_COLORSPACE: g_value_set_object(value, pngfile->color_space); break; case PROP_16BIT: g_value_set_boolean(value, pngfile->save16bit); break; case PROP_METADATA: g_value_set_boolean(value, pngfile->copy_metadata); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSPngfile *pngfile = RS_PNGFILE(object); switch (property_id) { case PROP_FILENAME: pngfile->filename = g_value_dup_string(value); break; case PROP_COLORSPACE: if (pngfile->color_space) g_object_unref(pngfile->color_space); pngfile->color_space = g_value_get_object(value); break; case PROP_16BIT: pngfile->save16bit = g_value_get_boolean(value); break; case PROP_METADATA: pngfile->copy_metadata = g_value_get_boolean(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static gboolean execute(RSOutput *output, RSFilter *filter) { RSPngfile *pngfile = RS_PNGFILE(output); png_bytep *row_pointers; FILE *fp = fopen(pngfile->filename, "wb"); if (!fp) return FALSE; png_structp png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, (png_voidp)NULL, NULL, NULL); if (!png_ptr) return FALSE; png_infop info_ptr = png_create_info_struct(png_ptr); if (!info_ptr) { png_destroy_write_struct(&png_ptr,(png_infopp)NULL); return FALSE; } png_init_io(png_ptr, fp); /* set the zlib compression level */ png_set_compression_level(png_ptr, Z_DEFAULT_COMPRESSION); if (pngfile->color_space == rs_color_space_new_singleton("RSSrgb") && !pngfile->save16bit) { png_set_sRGB_gAMA_and_cHRM(png_ptr, info_ptr, PNG_sRGB_INTENT_PERCEPTUAL); } else { gchar *data; gsize data_length; const RSIccProfile *profile = rs_color_space_get_icc_profile(pngfile->color_space, pngfile->save16bit); rs_icc_profile_get_data(profile, &data, &data_length); // FIXME: Insert correct profile name png_set_iCCP(png_ptr, info_ptr, "Profile name", PNG_COMPRESSION_TYPE_BASE, data, data_length); if (pngfile->save16bit) png_set_gAMA(png_ptr, info_ptr, 1.0); } RSFilterResponse *response; RSFilterRequest *request = rs_filter_request_new(); rs_filter_request_set_quick(RS_FILTER_REQUEST(request), FALSE); rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", pngfile->color_space); if (pngfile->save16bit) { response = rs_filter_get_image(filter, request); RS_IMAGE16 *image = rs_filter_response_get_image(response); gint n_channels = image->pixelsize; gint width = image->w; gint height = image->h; png_set_IHDR(png_ptr, info_ptr, width, height, 16, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); png_write_info(png_ptr, info_ptr); row_pointers = g_malloc(sizeof(png_bytep*)*height); gint i; for( i = 0; i < height; i++) row_pointers[i] = (png_bytep)GET_PIXEL(image, 0, i); if (n_channels == 4) png_set_filler(png_ptr, 0, PNG_FILLER_AFTER); #ifdef G_BIG_ENDIAN png_set_swap(png_ptr); #endif rs_io_lock(); png_write_image(png_ptr, row_pointers); g_object_unref(image); } else // 8 bit { response = rs_filter_get_image8(filter, request); GdkPixbuf *pixbuf = rs_filter_response_get_image8(response); gint n_channels = gdk_pixbuf_get_n_channels (pixbuf); gint width = gdk_pixbuf_get_width (pixbuf); gint height = gdk_pixbuf_get_height (pixbuf); gint rowstride = gdk_pixbuf_get_rowstride (pixbuf); guchar* pixels = gdk_pixbuf_get_pixels (pixbuf); png_set_IHDR(png_ptr, info_ptr, width, height, 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE, PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT); png_write_info(png_ptr, info_ptr); row_pointers = g_malloc(sizeof(png_bytep*)*height); gint i; for( i = 0; i < height; i++) row_pointers[i] = (png_bytep)(pixels + i * rowstride); if (n_channels == 4) png_set_filler(png_ptr, 0, PNG_FILLER_AFTER); rs_io_lock(); png_write_image(png_ptr, row_pointers); g_object_unref(pixbuf); } png_write_end(png_ptr, NULL); png_destroy_write_struct(&png_ptr, &info_ptr); fclose(fp); g_object_unref(request); g_object_unref(response); g_free(row_pointers); gchar *input_filename = NULL; rs_filter_get_recursive(filter, "filename", &input_filename, NULL); if (pngfile->copy_metadata) rs_exif_copy(input_filename, pngfile->filename, G_OBJECT_TYPE_NAME(pngfile->color_space), RS_EXIF_FILE_TYPE_PNG); rs_io_unlock(); g_free(input_filename); return TRUE; } rawstudio-2.0/plugins/meta-ciff/0000755000175000017500000000000011547430075013717 500000000000000rawstudio-2.0/plugins/meta-ciff/Makefile.am0000644000175000017500000000073111526533643015676 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = meta_ciff.la libdir = $(datadir)/rawstudio/plugins/ meta_ciff_la_LIBADD = @PACKAGE_LIBS@ meta_ciff_la_LDFLAGS = -module -avoid-version meta_ciff_la_SOURCES = ciff-meta.c rawstudio-2.0/plugins/meta-ciff/Makefile.in0000644000175000017500000004211011547430037015700 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/meta-ciff DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) meta_ciff_la_DEPENDENCIES = am_meta_ciff_la_OBJECTS = ciff-meta.lo meta_ciff_la_OBJECTS = $(am_meta_ciff_la_OBJECTS) meta_ciff_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(meta_ciff_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(meta_ciff_la_SOURCES) DIST_SOURCES = $(meta_ciff_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = meta_ciff.la meta_ciff_la_LIBADD = @PACKAGE_LIBS@ meta_ciff_la_LDFLAGS = -module -avoid-version meta_ciff_la_SOURCES = ciff-meta.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/meta-ciff/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/meta-ciff/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done meta_ciff.la: $(meta_ciff_la_OBJECTS) $(meta_ciff_la_DEPENDENCIES) $(meta_ciff_la_LINK) -rpath $(libdir) $(meta_ciff_la_OBJECTS) $(meta_ciff_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ciff-meta.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/meta-ciff/ciff-meta.c0000644000175000017500000002170311531305647015640 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include static gboolean raw_crw_walker(RAWFILE *rawfile, guint offset, guint length, RSMetadata *meta); static gboolean raw_crw_walker(RAWFILE *rawfile, guint offset, guint length, RSMetadata *meta) { guint valuedata=0; gushort records=0; guint blockstart = offset; raw_get_uint(rawfile, offset+length-4, &valuedata); valuedata += offset; raw_get_ushort(rawfile, valuedata, &records); offset = valuedata+2; while (records--) { gushort type=0; guint size=0; guint absoffset=0; guint reloffset=0; guint uint_temp1=0; gushort ushort_temp1=0; gushort wbi=0; gshort temp; raw_get_ushort(rawfile, offset, &type); raw_get_uint(rawfile, offset+2, &size); raw_get_uint(rawfile, offset+6, &reloffset); if ((type & 0xC000) == 0x4000) absoffset = offset + 2; else absoffset = blockstart + reloffset; switch (type & 0x3fff) { case 0x1029: /* FocalLength */ raw_get_short(rawfile, absoffset+2, &meta->focallength); break; case 0x102d: /* CanonCameraSettings */ raw_get_short(rawfile, absoffset+26, &temp); /* contrast */ switch(temp) { case -2: meta->contrast = 0.8; break; case -1: meta->contrast = 0.9; break; case 0: meta->contrast = 1.0; break; case 1: meta->contrast = 1.1; break; case 2: meta->contrast = 1.2; break; default: meta->contrast = 1.0; break; } raw_get_short(rawfile, absoffset+28, &temp); /* saturation */ switch(temp) { case -2: meta->saturation = 0.4; break; case -1: meta->saturation = 0.7; break; case 0: meta->saturation = 1.0; break; case 1: meta->saturation = 1.3; break; case 2: meta->saturation = 1.6; break; default: meta->saturation = 1.0; break; } raw_get_short(rawfile, absoffset+30, &temp); /* sharpness */ raw_get_short(rawfile, absoffset+84, &temp); /* color_tone */ gshort temp, focalunits; /* Lens ID */ raw_get_short(rawfile, absoffset+44, &temp); gfloat lens_id = (gfloat) temp; /* Focalunits */ raw_get_short(rawfile, absoffset+50, &focalunits); /* Max Focal */ raw_get_short(rawfile, absoffset+46, &temp); meta->lens_max_focal = (gfloat) temp * (gfloat) focalunits; /* Min Focal */ raw_get_short(rawfile, absoffset+48, &temp); meta->lens_min_focal = (gfloat) temp * (gfloat) focalunits; /* Max Aperture */ raw_get_short(rawfile, absoffset+52, &temp); meta->lens_max_aperture = (gfloat) exp(CanonEv(temp)*log(2)/2); /* Min Aperture */ raw_get_short(rawfile, absoffset+54, &temp); meta->lens_min_aperture = (gfloat) exp(CanonEv(temp)*log(2)/2); rs_lens_fix(meta); /* Build identifier string */ GString *identifier = g_string_new(""); if (lens_id > 0) g_string_append_printf(identifier, "ID:%.1f ",lens_id); if (meta->lens_max_focal > 0) g_string_append_printf(identifier, "maxF:%.0f ",meta->lens_max_focal); if (meta->lens_min_focal > 0) g_string_append_printf(identifier, "minF:%.0f ",meta->lens_min_focal); if (meta->lens_max_aperture > 0) g_string_append_printf(identifier, "maxF:%.1f ",meta->lens_max_aperture); if (meta->lens_min_aperture > 0) g_string_append_printf(identifier, "minF:%.0f ",meta->lens_min_aperture); meta->lens_identifier = g_strdup(identifier->str); g_string_free(identifier, TRUE); break; case 0x2007: /* Preview image */ meta->preview_start = absoffset; meta->preview_length = size; break; case 0x2008: /* Thumbnail image */ meta->thumbnail_start = absoffset; meta->thumbnail_length = size; break; case 0x1810: /* ImageInfo */ raw_get_uint(rawfile, absoffset+12, &uint_temp1); /* Orientation */ meta->orientation = uint_temp1; break; case 0x180e: /* TimeStamp */ if (!meta->time_ascii) { raw_get_uint(rawfile, absoffset, &uint_temp1); meta->time_ascii = rs_unixtime_to_exiftime(uint_temp1); meta->timestamp = (GTime) uint_temp1; } break; case 0x10a9: /* white balance for D60, 10D, 300D */ if (size > 66) wbi = "0134567028"[wbi]-'0'; absoffset += 2+wbi*8; raw_get_ushort(rawfile, absoffset, &ushort_temp1); /* R */ meta->cam_mul[0] = ushort_temp1; raw_get_ushort(rawfile, absoffset+2, &ushort_temp1); /* G */ meta->cam_mul[1] = ushort_temp1; raw_get_ushort(rawfile, absoffset+4, &ushort_temp1); /* G */ meta->cam_mul[3] = ushort_temp1; raw_get_ushort(rawfile, absoffset+6, &ushort_temp1); /* B */ meta->cam_mul[2] = ushort_temp1; break; case 0x102a: /* CanonShotInfo */ raw_get_ushort(rawfile, absoffset+4, &ushort_temp1); /* iso */ meta->iso = pow(2, ushort_temp1/32.0 - 4) * 50; raw_get_ushort(rawfile, absoffset+8, &ushort_temp1); /* aperture */ meta->aperture = pow(2, ushort_temp1/64.0); raw_get_ushort(rawfile, absoffset+10, &ushort_temp1); /* shutter */ meta->shutterspeed = 1.0/pow(2,-((short)ushort_temp1)/32.0); raw_get_ushort(rawfile, absoffset+14, &wbi); if (wbi > 17) wbi = 0; break; case 0x080a: /* make / model */ { gchar makemodel[32]; raw_strcpy(rawfile, absoffset, makemodel, 32); meta->make_ascii = g_strdup(makemodel); meta->model_ascii = g_strdup(makemodel + strlen(makemodel) +1); if (raw_strcmp(rawfile, absoffset, "Canon", 5)) meta->make = MAKE_CANON; } break; default: if (type >> 8 == 0x28 || type >> 8 == 0x30) raw_crw_walker(rawfile, absoffset, size, meta); break; } offset+=10; } return(TRUE); } static gboolean ciff_load_meta(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta) { guint root=0; GdkPixbuf *pixbuf = NULL, *pixbuf2 = NULL; gdouble ratio; guint start=0, length=0;//, root=0; raw_init_file_tiff(rawfile, offset); if (!raw_strcmp(rawfile, 6, "HEAPCCDR", 8)) return FALSE; raw_get_uint(rawfile, 2, &root); raw_crw_walker(rawfile, root, raw_get_filesize(rawfile)-root, meta); if ((meta->thumbnail_start>0) && (meta->thumbnail_length>0)) { start = meta->thumbnail_start; length = meta->thumbnail_length; } else if ((meta->preview_start>0) && (meta->preview_length>0)) { start = meta->preview_start; length = meta->preview_length; } if ((start>0) && (length>0)) { pixbuf = raw_get_pixbuf(rawfile, start, length); ratio = ((gdouble) gdk_pixbuf_get_width(pixbuf))/((gdouble) gdk_pixbuf_get_height(pixbuf)); if (ratio>1.0) pixbuf2 = gdk_pixbuf_scale_simple(pixbuf, 128, (gint) (128.0/ratio), GDK_INTERP_BILINEAR); else pixbuf2 = gdk_pixbuf_scale_simple(pixbuf, (gint) (128.0*ratio), 128, GDK_INTERP_BILINEAR); g_object_unref(pixbuf); pixbuf = pixbuf2; switch (meta->orientation) { /* this is very COUNTER-intuitive - gdk_pixbuf_rotate_simple() is wierd */ case 90: pixbuf2 = gdk_pixbuf_rotate_simple(pixbuf, GDK_PIXBUF_ROTATE_CLOCKWISE); g_object_unref(pixbuf); pixbuf = pixbuf2; break; case 270: pixbuf2 = gdk_pixbuf_rotate_simple(pixbuf, GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE); g_object_unref(pixbuf); pixbuf = pixbuf2; break; } meta->thumbnail = pixbuf; return TRUE; } return FALSE; } G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_filetype_register_meta_loader(".crw", "Canon raw", ciff_load_meta, 10, RS_LOADER_FLAGS_RAW); } rawstudio-2.0/plugins/cache/0000755000175000017500000000000011547430073013125 500000000000000rawstudio-2.0/plugins/cache/Makefile.am0000644000175000017500000000070411526533643015106 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = cache.la libdir = $(datadir)/rawstudio/plugins/ cache_la_LIBADD = @PACKAGE_LIBS@ cache_la_LDFLAGS = -module -avoid-version cache_la_SOURCES = cache.c rawstudio-2.0/plugins/cache/cache.c0000644000175000017500000003112011545163733014255 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 4 */ #include #if 0 /* Change to 1 to enable debugging info */ #define filter_debug g_debug #else #define filter_debug(...) #endif #define RS_TYPE_CACHE (rs_cache_type) #define RS_CACHE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_CACHE, RSCache)) #define RS_CACHE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_CACHE, RSCacheClass)) #define RS_IS_CACHE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_CACHE)) typedef struct _RSCache RSCache; typedef struct _RSCacheClass RSCacheClass; struct _RSCache { RSFilter parent; RSFilterResponse *cached_image; gboolean ignore_changed; RSFilterChangedMask mask; gboolean ignore_roi; gint latency; }; struct _RSCacheClass { RSFilterClass parent_class; }; RS_DEFINE_FILTER(rs_cache, RSCache) enum { PROP_0, PROP_LATENCY, PROP_IGNORE_ROI }; static void finalize(GObject *object); static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static RSFilterResponse *get_image(RSFilter *filter, const RSFilterRequest *request); static RSFilterResponse *get_image8(RSFilter *filter, const RSFilterRequest *request); static void flush(RSCache *cache); static void previous_changed(RSFilter *filter, RSFilter *parent, RSFilterChangedMask mask); G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_cache_get_type(G_TYPE_MODULE(plugin)); } static void rs_cache_class_init(RSCacheClass *klass) { RSFilterClass *filter_class = RS_FILTER_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = get_property; object_class->set_property = set_property; object_class->finalize = finalize; g_object_class_install_property(object_class, PROP_LATENCY, g_param_spec_int( "latency", "latency", "Signal propagation latency in milliseconds, this can be used to reduce signals from \"noisy\" filters.", 0, 10000, 0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_IGNORE_ROI, g_param_spec_boolean( "ignore-roi", "ignore-roi", "Ignore ROI parameter from request", FALSE, G_PARAM_READWRITE) ); filter_class->name = "Listen for changes and caches image data"; filter_class->get_image = get_image; filter_class->get_image8 = get_image8; filter_class->previous_changed = previous_changed; } static void rs_cache_init(RSCache *cache) { cache->ignore_changed = FALSE; cache->ignore_roi = FALSE; cache->latency = 0; cache->cached_image = rs_filter_response_new(); } static void finalize(GObject *object) { RSCache *cache = RS_CACHE(object); flush(cache); } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSCache *cache = RS_CACHE(object); switch (property_id) { case PROP_LATENCY: g_value_set_int(value, cache->latency); break; case PROP_IGNORE_ROI: g_value_set_boolean(value, cache->ignore_roi); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSCache *cache = RS_CACHE(object); switch (property_id) { case PROP_LATENCY: cache->latency = g_value_get_int(value); break; case PROP_IGNORE_ROI: cache->ignore_roi = g_value_get_boolean(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static gboolean rectangle_is_inside(GdkRectangle *outer_rect, GdkRectangle *inner_rect) { return inner_rect->x >= outer_rect->x && inner_rect->x + inner_rect->width <= outer_rect->x + outer_rect->width && inner_rect->y >= outer_rect->y && inner_rect->y + inner_rect->height <= outer_rect->y + outer_rect->height; } static gint get_cached_width(RSCache *cache) { gint ret = -1; if (rs_filter_response_has_image(cache->cached_image)) { RS_IMAGE16 *img = rs_filter_response_get_image(cache->cached_image); ret = img->w; g_object_unref(img); } if (rs_filter_response_has_image8(cache->cached_image)) { GdkPixbuf *img = rs_filter_response_get_image8(cache->cached_image); ret = gdk_pixbuf_get_width(img); g_object_unref(img); } return ret; } static gint get_cached_height(RSCache *cache) { gint ret = -1; if (rs_filter_response_has_image(cache->cached_image)) { RS_IMAGE16 *img = rs_filter_response_get_image(cache->cached_image); ret = img->h; g_object_unref(img); } if (rs_filter_response_has_image8(cache->cached_image)) { GdkPixbuf *img = rs_filter_response_get_image8(cache->cached_image); ret = gdk_pixbuf_get_height(img); g_object_unref(img); } return ret; } static void set_roi_to_full(RSCache *cache) { GdkRectangle *r = g_new(GdkRectangle, 1); r->x = 0; r->y = 0; if (rs_filter_response_has_image(cache->cached_image)) { RS_IMAGE16 *img = rs_filter_response_get_image(cache->cached_image); r->width = img->w; r->height = img->h; rs_filter_response_set_roi(cache->cached_image,r); g_object_unref(img); } if (rs_filter_response_has_image8(cache->cached_image)) { GdkPixbuf *img = rs_filter_response_get_image8(cache->cached_image); r->width = gdk_pixbuf_get_width(img); r->height = gdk_pixbuf_get_height(img); rs_filter_response_set_roi(cache->cached_image,r); g_object_unref(img); } filter_debug("Cache[%p]: Setting request ROI to full from cache!", cache); filter_debug("Cache[%p]: Saved ROI x:%d, y:%d, w:%d, h:%d", cache, r->x, r->y, r->width, r->height); } static RSFilterResponse * get_image(RSFilter *filter, const RSFilterRequest *_request) { RSCache *cache = RS_CACHE(filter); RSFilterRequest *request = rs_filter_request_clone(_request); GdkRectangle *roi = rs_filter_request_get_roi(request); filter_debug("Cache[%p]: getimage() called", filter); if (roi && cache->ignore_roi) { roi = NULL; rs_filter_request_set_roi(request, NULL); filter_debug("Cache[%p]: Disabling ROI for upward calls", filter); } if (rs_filter_response_has_image(cache->cached_image)) { if (rs_filter_response_get_quick(cache->cached_image) && !rs_filter_request_get_quick(request)) { filter_debug("Cache[%p]: Cached image is quick and requested image is not!", filter); flush(cache); } if (!rs_filter_response_get_roi(cache->cached_image) && roi) set_roi_to_full(cache); if (!roi && rs_filter_response_get_roi(cache->cached_image)) { roi = g_new(GdkRectangle, 1); roi->x = 0; roi->y = 0; roi->width = get_cached_width(cache); roi->height = get_cached_height(cache); rs_filter_request_set_roi(request, roi); filter_debug("Cache[%p]: Setting request ROI from cache!", filter); } if (rs_filter_response_get_roi(cache->cached_image) && roi) { roi->x = MAX(0, roi->x); roi->y = MAX(0, roi->y); roi->width = MIN(roi->width, get_cached_width(cache)); roi->height = MIN(roi->height, get_cached_height(cache)); } if (!cache->ignore_roi && roi) { if (rs_filter_response_get_roi(cache->cached_image)) if (!rectangle_is_inside(rs_filter_response_get_roi(cache->cached_image), roi)) { filter_debug("Cache[%p]: Cached image ROI does not cover requested ROI!", filter); #if 0 GdkRectangle *r = rs_filter_response_get_roi(cache->cached_image); filter_debug("Cache[%p]: Request ROI x:%d, y:%d, w:%d, h:%d", filter, roi->x, roi->y, roi->width, roi->height); filter_debug("Cache[%p]: Cached ROI x:%d, y:%d, w:%d, h:%d", filter, r->x, r->y, r->width, r->height); #endif flush(cache); } } } if (!rs_filter_response_has_image(cache->cached_image)) { filter_debug("Cache[%p]: Cached image NOT found", filter); g_object_unref(cache->cached_image); cache->cached_image = rs_filter_get_image(filter->previous, request); if (cache->cached_image && !roi) set_roi_to_full(cache); else { rs_filter_response_set_roi(cache->cached_image, roi); if (roi) filter_debug("Cache[%p]: Saved ROI x:%d, y:%d, w:%d, h:%d", filter, roi->x, roi->y, roi->width, roi->height); } if (rs_filter_request_get_quick(request)) { rs_filter_response_set_quick(cache->cached_image); filter_debug("Cache[%p]: Setting image as quick", filter); } } RSFilterResponse *fr = rs_filter_response_clone(cache->cached_image); RS_IMAGE16* img = rs_filter_response_get_image(cache->cached_image); rs_filter_response_set_image(fr, img); if (img) g_object_unref(img); g_object_unref(request); return fr; } static RSFilterResponse * get_image8(RSFilter *filter, const RSFilterRequest *_request) { RSCache *cache = RS_CACHE(filter); RSFilterRequest *request = rs_filter_request_clone(_request); GdkRectangle *roi = rs_filter_request_get_roi(request); filter_debug("Cache[%p]: getimage8() called", filter); if (roi && cache->ignore_roi) { roi = NULL; rs_filter_request_set_roi(request, NULL); filter_debug("Cache[%p]: Disabling ROI for upward calls", filter); } if (rs_filter_response_has_image8(cache->cached_image)) { if (rs_filter_response_get_quick(cache->cached_image) && !rs_filter_request_get_quick(request)) { filter_debug("Cache[%p]: Cached image is quick and requested image is not!", filter); flush(cache); } if (!rs_filter_response_get_roi(cache->cached_image) && roi) { set_roi_to_full(cache); } if (!cache->ignore_roi && roi) if (rs_filter_response_get_roi(cache->cached_image)) if (!rectangle_is_inside(rs_filter_response_get_roi(cache->cached_image), roi)) { filter_debug("Cache[%p]: Cached image ROI does not cover requested ROI!", filter); flush(cache); } if (!roi && rs_filter_response_get_roi(cache->cached_image)) { filter_debug("Cache[%p]: Cached image has ROI, but request does not.", filter); flush(cache); } RSColorSpace *cached_space = NULL; if (cache->cached_image) cached_space = rs_filter_param_get_object_with_type(RS_FILTER_PARAM(cache->cached_image), "colorspace", RS_TYPE_COLOR_SPACE); RSColorSpace *requested_space = rs_filter_param_get_object_with_type(RS_FILTER_PARAM(request), "colorspace", RS_TYPE_COLOR_SPACE); if (cached_space && requested_space) if (cached_space != requested_space) { filter_debug("Cache[%p]: Colorspace does not match Cached:%s vs Requested:%s.", filter, rs_color_space_get_name(cached_space), rs_color_space_get_name(requested_space)); flush(cache); } } if (!rs_filter_response_has_image8(cache->cached_image)) { filter_debug("Cache[%p]: Cached image8 NOT found", filter); g_object_unref(cache->cached_image); cache->cached_image = rs_filter_get_image8(filter->previous, request); rs_filter_response_set_roi(cache->cached_image, roi); if (rs_filter_request_get_quick(request)) rs_filter_response_set_quick(cache->cached_image); } RSFilterResponse *fr = rs_filter_response_clone(cache->cached_image); GdkPixbuf* img = rs_filter_response_get_image8(cache->cached_image); rs_filter_response_set_image8(fr, img); if (img) g_object_unref(img); g_object_unref(request); return fr; } static gboolean previous_changed_timeout_func(gpointer data) { RS_CACHE(data)->ignore_changed = FALSE; rs_filter_changed(RS_FILTER(data), RS_CACHE(data)->mask); return FALSE; } static void flush(RSCache *cache) { filter_debug("Cache[%p]: Cache flushed", cache); g_object_unref(cache->cached_image); cache->cached_image = rs_filter_response_new(); } static void previous_changed(RSFilter *filter, RSFilter *parent, RSFilterChangedMask mask) { RSCache *cache = RS_CACHE(filter); filter_debug("Cache[%p]: Previous Changed (%x)", filter, mask); if (mask & RS_FILTER_CHANGED_PIXELDATA) flush(cache); if (cache->latency > 0) { cache->mask = mask; if (!cache->ignore_changed) { cache->ignore_changed = TRUE; g_timeout_add(cache->latency, previous_changed_timeout_func, cache); filter_debug("Cache[%p]: Delaying change.", filter); } } else rs_filter_changed(filter, mask); } rawstudio-2.0/plugins/cache/Makefile.in0000644000175000017500000004175011547430034015116 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/cache DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) cache_la_DEPENDENCIES = am_cache_la_OBJECTS = cache.lo cache_la_OBJECTS = $(am_cache_la_OBJECTS) cache_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(cache_la_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(cache_la_SOURCES) DIST_SOURCES = $(cache_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = cache.la cache_la_LIBADD = @PACKAGE_LIBS@ cache_la_LDFLAGS = -module -avoid-version cache_la_SOURCES = cache.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/cache/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/cache/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done cache.la: $(cache_la_OBJECTS) $(cache_la_DEPENDENCIES) $(cache_la_LINK) -rpath $(libdir) $(cache_la_OBJECTS) $(cache_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cache.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/fuji-rotate/0000755000175000017500000000000011547430074014314 500000000000000rawstudio-2.0/plugins/fuji-rotate/Makefile.am0000644000175000017500000000074211526533643016276 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = fuji_rotate.la libdir = $(datadir)/rawstudio/plugins/ fuji_rotate_la_LIBADD = @PACKAGE_LIBS@ fuji_rotate_la_LDFLAGS = -module -avoid-version fuji_rotate_la_SOURCES = fuji-rotate.c rawstudio-2.0/plugins/fuji-rotate/fuji-rotate.c0000644000175000017500000001417311526533643016642 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 5 */ #include #include #define RS_TYPE_FUJI_ROTATE (rs_fuji_rotate_type) #define RS_FUJI_ROTATE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_FUJI_ROTATE, RSFujiRotate)) #define RS_FUJI_ROTATE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_FUJI_ROTATE, RSFujiRotateClass)) #define RS_IS_FUJI_ROTATE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_FUJI_ROTATE)) typedef struct _RSFujiRotate RSFujiRotate; typedef struct _RSFujiRotateClass RSFujiRotateClass; struct _RSFujiRotate { RSFilter parent; gchar *changeme; gint fuji_width; }; struct _RSFujiRotateClass { RSFilterClass parent_class; }; RS_DEFINE_FILTER(rs_fuji_rotate, RSFujiRotate) enum { PROP_0, PROP_CHANGEME }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static RSFilterResponse *get_image(RSFilter *filter, const RSFilterRequest *request); static RSFilterResponse *get_size(RSFilter *filter, const RSFilterRequest *request); static RSFilterClass *rs_fuji_rotate_parent_class = NULL; G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_fuji_rotate_get_type(G_TYPE_MODULE(plugin)); } static void rs_fuji_rotate_class_init(RSFujiRotateClass *klass) { RSFilterClass *filter_class = RS_FILTER_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); rs_fuji_rotate_parent_class = g_type_class_peek_parent (klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_CHANGEME, g_param_spec_string ( "changeme", "Changeme nick", "Changeme blurb", NULL, G_PARAM_READWRITE) ); filter_class->name = "FujiRotate filter"; filter_class->get_image = get_image; filter_class->get_size = get_size; } static void rs_fuji_rotate_init(RSFujiRotate *fuji_rotate) { fuji_rotate->changeme = NULL; fuji_rotate->fuji_width = 0; } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { // RSFujiRotate *fuji_rotate = RS_FUJI_ROTATE(object); switch (property_id) { case PROP_CHANGEME: g_value_get_string (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSFujiRotate *fuji_rotate = RS_FUJI_ROTATE(object); switch (property_id) { case PROP_CHANGEME: g_free(fuji_rotate->changeme); fuji_rotate->changeme = g_value_dup_string(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } RS_IMAGE16 * do_rotate(RS_IMAGE16 *input, gint fuji_width) { const gint colors = 3; gint height = input->h; gint width = input->w; gint i, row, col; gfloat r, c, fr, fc; gint ur, uc; gushort wide, high; if (!fuji_width) return g_object_ref(input); fuji_width = (fuji_width - 1); const gdouble step = sqrt(0.5); wide = fuji_width / step; high = (height - fuji_width) / step; RS_IMAGE16 *output = rs_image16_new(wide, high, 3, 4); for (row=0; row < high; row++) { for (col=0; col < wide; col++) { ur = r = fuji_width + (row-col)*step; uc = c = (row+col)*step; if (ur > height-2 || uc > width-2) continue; fr = r - ur; fc = c - uc; gushort *out = GET_PIXEL(output, col, row); gushort *top = GET_PIXEL(input, uc, ur); gushort *bottom = GET_PIXEL(input, uc, ur+1); for (i=0; i < colors; i++) { out[i] = (top[i] * (1-fc) + top[input->pixelsize+i] * fc) * (1-fr) + (bottom[i] * (1-fc) + bottom[input->pixelsize+i] * fc) * fr; } } } return output; } static RSFilterResponse * get_image(RSFilter *filter, const RSFilterRequest *request) { RSFujiRotate *fuji_rotate = RS_FUJI_ROTATE(filter); RSFilterResponse *previous_response; RSFilterResponse *response; RS_IMAGE16 *input; RS_IMAGE16 *output = NULL; previous_response = rs_filter_get_image(filter->previous, request); if (!rs_filter_param_get_integer(RS_FILTER_PARAM(previous_response), "fuji-width", &fuji_rotate->fuji_width) || (fuji_rotate->fuji_width == 0)) return previous_response; input = rs_filter_response_get_image(previous_response); if (!RS_IS_IMAGE16(input)) return previous_response; response = rs_filter_response_clone(previous_response); g_object_unref(previous_response); output = do_rotate(input, fuji_rotate->fuji_width); rs_filter_response_set_image(response, output); g_object_unref(output); g_object_unref(input); return response; } static RSFilterResponse * get_size(RSFilter *filter, const RSFilterRequest *request) { gint fuji_width = 0; RSFilterResponse *previous_response = rs_filter_get_size(filter->previous, request); /* If we have no specific fuji-width, just return previous response */ if (!rs_filter_param_get_integer(RS_FILTER_PARAM(previous_response), "fuji-width", &fuji_width) || (fuji_width == 0)) return previous_response; RSFilterResponse *response = rs_filter_response_clone(previous_response); rs_filter_response_set_width(response, fuji_width / sqrt(0.5)); rs_filter_response_set_height(response, (rs_filter_response_get_height(previous_response) - fuji_width) / sqrt(0.5)); g_object_unref(previous_response); return response; } rawstudio-2.0/plugins/fuji-rotate/Makefile.in0000644000175000017500000004217011547430036016303 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/fuji-rotate DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) fuji_rotate_la_DEPENDENCIES = am_fuji_rotate_la_OBJECTS = fuji-rotate.lo fuji_rotate_la_OBJECTS = $(am_fuji_rotate_la_OBJECTS) fuji_rotate_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(fuji_rotate_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(fuji_rotate_la_SOURCES) DIST_SOURCES = $(fuji_rotate_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = fuji_rotate.la fuji_rotate_la_LIBADD = @PACKAGE_LIBS@ fuji_rotate_la_LDFLAGS = -module -avoid-version fuji_rotate_la_SOURCES = fuji-rotate.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/fuji-rotate/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/fuji-rotate/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done fuji_rotate.la: $(fuji_rotate_la_OBJECTS) $(fuji_rotate_la_DEPENDENCIES) $(fuji_rotate_la_LINK) -rpath $(libdir) $(fuji_rotate_la_OBJECTS) $(fuji_rotate_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fuji-rotate.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/input-image16/0000755000175000017500000000000011547430074014451 500000000000000rawstudio-2.0/plugins/input-image16/Makefile.am0000644000175000017500000000075511526533643016437 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = input_image16.la libdir = $(datadir)/rawstudio/plugins/ input_image16_la_LIBADD = @PACKAGE_LIBS@ input_image16_la_LDFLAGS = -module -avoid-version input_image16_la_SOURCES = input-image16.c rawstudio-2.0/plugins/input-image16/Makefile.in0000644000175000017500000004225011547430036016437 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/input-image16 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) input_image16_la_DEPENDENCIES = am_input_image16_la_OBJECTS = input-image16.lo input_image16_la_OBJECTS = $(am_input_image16_la_OBJECTS) input_image16_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(input_image16_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(input_image16_la_SOURCES) DIST_SOURCES = $(input_image16_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = input_image16.la input_image16_la_LIBADD = @PACKAGE_LIBS@ input_image16_la_LDFLAGS = -module -avoid-version input_image16_la_SOURCES = input-image16.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/input-image16/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/input-image16/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done input_image16.la: $(input_image16_la_OBJECTS) $(input_image16_la_DEPENDENCIES) $(input_image16_la_LINK) -rpath $(libdir) $(input_image16_la_OBJECTS) $(input_image16_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/input-image16.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/input-image16/input-image16.c0000644000175000017500000001474711526533643017143 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 4 */ #include #define RS_TYPE_INPUT_IMAGE16 (rs_input_image16_type) #define RS_INPUT_IMAGE16(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_INPUT_IMAGE16, RSInputImage16)) #define RS_INPUT_IMAGE16_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_INPUT_IMAGE16, RSInputImage16Class)) #define RS_IS_INPUT_IMAGE16(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_INPUT_IMAGE16)) typedef struct _RSInputImage16 RSInputImage16; typedef struct _RSInputImage16Class RSInputImage16Class; struct _RSInputImage16 { RSFilter parent; RSFilterResponse *image_response; RS_IMAGE16 *image; gchar *filename; RSColorSpace *colorspace; }; struct _RSInputImage16Class { RSFilterClass parent_class; }; RS_DEFINE_FILTER(rs_input_image16, RSInputImage16) enum { PROP_0, PROP_IMAGE, PROP_FILENAME, PROP_COLOR_SPACE }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static RSFilterResponse *get_image(RSFilter *filter, const RSFilterRequest *request); static RSFilterResponse *get_size(RSFilter *filter, const RSFilterRequest *request); static void dispose (GObject *object); static RSFilterClass *rs_input_image16_parent_class = NULL; G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { /* Let the GType system register our type */ rs_input_image16_get_type(G_TYPE_MODULE(plugin)); } static void rs_input_image16_class_init (RSInputImage16Class *klass) { RSFilterClass *filter_class = RS_FILTER_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); rs_input_image16_parent_class = g_type_class_peek_parent (klass); object_class->get_property = get_property; object_class->set_property = set_property; object_class->dispose = dispose; g_object_class_install_property(object_class, PROP_IMAGE, g_param_spec_object ( "image", "image", "RSFilterResponse to use as input", RS_TYPE_FILTER_RESPONSE, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_FILENAME, g_param_spec_string( "filename", "filename", "filename", NULL, G_PARAM_READWRITE)); g_object_class_install_property(object_class, PROP_COLOR_SPACE, g_param_spec_object( "color-space", "color-space", "A colorspace to assign input", RS_TYPE_COLOR_SPACE, G_PARAM_READWRITE)); filter_class->name = "Import a RS_IMAGE16 into a RSFilter chain"; filter_class->get_image = get_image; filter_class->get_size = get_size; } static void rs_input_image16_init (RSInputImage16 *input_image16) { input_image16->image = NULL; input_image16->image_response = NULL; } static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSInputImage16 *input_image16 = RS_INPUT_IMAGE16(object); switch (property_id) { case PROP_IMAGE: g_value_set_object(value, input_image16->image_response); break; case PROP_FILENAME: g_value_set_string(value, input_image16->filename); break; case PROP_COLOR_SPACE: g_value_set_object(value, input_image16->colorspace); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSInputImage16 *input_image16 = RS_INPUT_IMAGE16(object); switch (property_id) { case PROP_IMAGE: /* Clean up */ if (input_image16->image) g_object_unref(input_image16->image); input_image16->image = NULL; if (input_image16->image_response) g_object_unref(input_image16->image_response); input_image16->image_response = g_object_ref(g_value_get_object(value)); input_image16->image = rs_filter_response_get_image(input_image16->image_response); rs_filter_changed(RS_FILTER(input_image16), RS_FILTER_CHANGED_DIMENSION); break; case PROP_FILENAME: g_free(input_image16->filename); input_image16->filename = g_value_dup_string(value); break; case PROP_COLOR_SPACE: if (input_image16->colorspace) g_object_unref(input_image16->colorspace); input_image16->colorspace = g_object_ref(g_value_get_object(value)); rs_filter_changed(RS_FILTER(input_image16), RS_FILTER_CHANGED_DIMENSION); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void dispose (GObject *object) { RSInputImage16 *input_image16 = RS_INPUT_IMAGE16(object); if (input_image16->image_response) g_object_unref(input_image16->image_response); if (input_image16->image) g_object_unref(input_image16->image); /* Chain up */ G_OBJECT_CLASS (rs_input_image16_parent_class)->dispose (object); } static RSFilterResponse * get_image(RSFilter *filter, const RSFilterRequest *request) { RSInputImage16 *input_image16 = RS_INPUT_IMAGE16(filter); if (RS_IS_FILTER_RESPONSE(input_image16->image_response)) { RSFilterResponse *response; response = rs_filter_response_clone(RS_FILTER_RESPONSE(input_image16->image_response)); rs_filter_response_set_image(response, input_image16->image); if (RS_IS_COLOR_SPACE(input_image16->colorspace)) rs_filter_param_set_object(RS_FILTER_PARAM(response), "colorspace", input_image16->colorspace); return response; } return rs_filter_response_new(); } static RSFilterResponse * get_size(RSFilter *filter, const RSFilterRequest *request) { RSInputImage16 *input_image16 = RS_INPUT_IMAGE16(filter); RSFilterResponse *response = rs_filter_response_clone(RS_FILTER_RESPONSE(input_image16->image_response)); if (input_image16->image) { rs_filter_response_set_width(response, input_image16->image->w); rs_filter_response_set_height(response, input_image16->image->h); } return response; } rawstudio-2.0/plugins/load-rawspeed/0000755000175000017500000000000011547430075014613 500000000000000rawstudio-2.0/plugins/load-rawspeed/Makefile.am0000644000175000017500000000570211541412536016567 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O3 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ \ -I$(top_srcdir)/plugins/load-rawspeed/rawspeed/ lib_LTLIBRARIES = load_rawspeed.la libdir = $(datadir)/rawstudio/plugins/ load_rawspeed_la_LIBADD = @PACKAGE_LIBS@ load_rawspeed_la_LDFLAGS = -module -avoid-version load_rawspeed_la_SOURCES = rawstudio-plugin-api.cpp rawstudio-plugin-api.h \ rawstudio-plugin.c \ rawspeed/ArwDecoder.cpp rawspeed/ArwDecoder.h \ rawspeed/BitPumpJPEG.cpp rawspeed/BitPumpJPEG.h \ rawspeed/BitPumpMSB.cpp rawspeed/BitPumpMSB.h \ rawspeed/BitPumpMSB32.cpp rawspeed/BitPumpMSB32.h \ rawspeed/BitPumpPlain.cpp rawspeed/BitPumpPlain.h \ rawspeed/BlackArea.cpp rawspeed/BlackArea.h \ rawspeed/ByteStream.cpp rawspeed/ByteStream.h \ rawspeed/ByteStreamSwap.cpp rawspeed/ByteStreamSwap.h \ rawspeed/Camera.cpp rawspeed/Camera.h \ rawspeed/CameraMetaData.cpp rawspeed/CameraMetaData.h \ rawspeed/CameraMetadataException.cpp rawspeed/CameraMetadataException.h \ rawspeed/ColorFilterArray.cpp rawspeed/ColorFilterArray.h \ rawspeed/Common.cpp rawspeed/Common.h \ rawspeed/Cr2Decoder.cpp rawspeed/Cr2Decoder.h \ rawspeed/DngDecoder.cpp rawspeed/DngDecoder.h \ rawspeed/DngDecoderSlices.cpp rawspeed/DngDecoderSlices.h \ rawspeed/FileIOException.cpp rawspeed/FileIOException.h \ rawspeed/FileMap.cpp rawspeed/FileMap.h \ rawspeed/FileReader.cpp rawspeed/FileReader.h \ rawspeed/IOException.cpp rawspeed/IOException.h \ rawspeed/LJpegDecompressor.cpp rawspeed/LJpegDecompressor.h \ rawspeed/LJpegPlain.cpp rawspeed/LJpegPlain.h \ rawspeed/NefDecoder.cpp rawspeed/NefDecoder.h \ rawspeed/NikonDecompressor.cpp rawspeed/NikonDecompressor.h \ rawspeed/OrfDecoder.cpp rawspeed/OrfDecoder.h \ rawspeed/PefDecoder.cpp rawspeed/PefDecoder.h \ rawspeed/PentaxDecompressor.cpp rawspeed/PentaxDecompressor.h \ rawspeed/Point.h \ rawspeed/RawDecoder.cpp rawspeed/RawDecoder.h \ rawspeed/RawDecoderException.cpp rawspeed/RawDecoderException.h \ rawspeed/RawImage.cpp rawspeed/RawImage.h \ rawspeed/RawImageDataU16.cpp rawspeed/RawImage.h \ rawspeed/RawImageDataFloat.cpp rawspeed/RawImage.h \ rawspeed/Rw2Decoder.cpp rawspeed/Rw2Decoder.h \ rawspeed/StdAfx.cpp rawspeed/StdAfx.h \ rawspeed/SrwDecoder.cpp rawspeed/SrwDecoder.h \ rawspeed/TiffEntryBE.cpp rawspeed/TiffEntryBE.h \ rawspeed/TiffEntry.cpp rawspeed/TiffEntry.h \ rawspeed/TiffIFDBE.cpp rawspeed/TiffIFDBE.h \ rawspeed/TiffIFD.cpp rawspeed/TiffIFD.h \ rawspeed/TiffParser.cpp rawspeed/TiffParser.h \ rawspeed/TiffParserException.cpp rawspeed/TiffParserException.h \ rawspeed/TiffParserHeaderless.cpp rawspeed/TiffParserHeaderless.h \ rawspeed/TiffParserOlympus.cpp rawspeed/TiffParserOlympus.h \ rawspeed/TiffTag.h rawspeeddir = $(datadir)/rawspeed rawspeed_DATA = data/cameras.xml EXTRA_DIST = $(rawspeed_DATA)rawstudio-2.0/plugins/load-rawspeed/data/0000755000175000017500000000000011547430075015524 500000000000000rawstudio-2.0/plugins/load-rawspeed/data/cameras.xml0000644000175000017500000017652411547155615017624 00000000000000 ]> RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE Canon EOS DIGITAL REBEL XT Canon EOS Kiss Digital N Canon EOS 350D RED GREEN GREEN BLUE RED GREEN GREEN BLUE Canon EOS DIGITAL REBEL XSi Canon EOS Kiss Digital X2 GREEN BLUE RED GREEN GREEN BLUE RED GREEN RED GREEN GREEN BLUE Canon EOS REBEL T1i Canon EOS Kiss X3 BLUE GREEN GREEN RED Canon EOS REBEL T2i Canon EOS Kiss X4 GREEN BLUE RED GREEN Canon EOS REBEL T3i Canon EOS Kiss X5 RED GREEN GREEN BLUE GREEN BLUE RED GREEN GREEN BLUE RED GREEN RED GREEN GREEN BLUE Canon EOS DIGITAL REBEL XS Canon EOS Kiss Digital F RED GREEN GREEN BLUE Canon EOS REBEL T3 RED GREEN GREEN BLUE Canon EOS DIGITAL REBEL XTi Canon EOS Kiss Digital X RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE GREEN BLUE RED GREEN GREEN BLUE RED GREEN RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE GREEN BLUE RED GREEN RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE REDGREEN GREENBLUE GREEN RED BLUE GREEN BLUE GREEN GREEN RED BLUE GREEN GREEN RED BLUE GREEN GREEN RED GREEN RED BLUE GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE GREEN BLUE RED GREEN RED GREEN GREEN BLUE GREEN BLUE RED GREEN BLUE GREEN GREEN RED GREEN BLUE RED GREEN BLUE GREEN GREEN RED GREEN BLUE RED GREEN GREEN BLUE RED GREEN BLUE GREEN GREEN RED RED GREEN GREEN BLUE RED GREEN GREEN BLUE BLUE GREEN GREEN RED GREEN BLUE RED GREEN GREEN BLUE RED GREEN BLUE GREEN GREEN RED GREEN UNKNOWN UNKNOWN UNKNOWN GREEN UNKNOWN UNKNOWN UNKNOWN RED GREEN GREEN BLUE RED GREEN GREEN BLUE BLUE GREEN GREEN RED BLUE GREEN GREEN RED GREEN RED BLUE GREEN RED GREEN GREEN BLUE RED GREEN GREEN BLUE BLUE GREEN GREEN RED RED GREEN GREEN BLUE RED GREEN GREEN BLUE GREEN RED BLUE GREEN RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE BLUE GREEN GREEN RED RED GREEN GREEN BLUE GREEN BLUE RED GREEN BLUE GREEN GREEN RED RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE BLUEGREEN GREENRED BLUEGREEN GREENRED BLUEGREEN GREENRED GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN GREENBLUE REDGREEN BLUEGREEN GREENRED DMC-FZ38 BLUEGREEN GREENRED DMC-FZ38 BLUEGREEN GREENRED DMC-FZ38 GREENBLUE REDGREEN DMC-FZ40 BLUEGREEN GREENRED GREENBLUE REDGREEN BLUEGREEN GREENRED BLUEGREEN GREENRED BLUEGREEN GREENRED GREENRED BLUEGREEN RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE BLUE GREEN GREEN RED BLUE GREEN GREEN RED RED GREEN GREEN BLUE BLUE GREEN GREEN RED BLUE GREEN GREEN RED RED GREEN GREEN BLUE BLUE GREEN GREEN RED BLUE GREEN GREEN RED RED GREEN GREEN BLUE RED GREEN GREEN BLUE REDGREEN GREENBLUE BLUEGREEN GREENRED BLUEGREEN GREENRED BLUEGREEN GREENRED REDGREEN GREENBLUE GREEN RED BLUE GREEN RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE BLUE GREEN GREEN RED BLUE GREEN GREEN RED BLUE GREEN GREEN RED BLUE GREEN GREEN RED BLUE GREEN GREEN RED BLUE GREEN GREEN RED RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE RED GREEN GREEN BLUE rawstudio-2.0/plugins/load-rawspeed/rawstudio-plugin-api.cpp0000644000175000017500000001147011541412536021322 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include "StdAfx.h" #include "FileReader.h" #include "TiffParser.h" #include "RawDecoder.h" #include "CameraMetaData.h" #include "rawstudio-plugin-api.h" #define TIME_LOAD 1 using namespace RawSpeed; extern "C" { RSFilterResponse* load_rawspeed(const gchar *filename) { static CameraMetaData *c = NULL; if (!c) { gchar *path; path = g_strdup_printf("%s/cameras.xml", rs_confdir_get()); FILE *fp = fopen(path,"r"); if (!fp) { g_free(path); path = g_build_filename(PACKAGE_DATA_DIR, "rawspeed/cameras.xml", NULL); } else RS_DEBUG(PLUGINS, "RawSpeed: Using custom camera metadata information at %s.", path); try { c = new CameraMetaData(path); } catch (CameraMetadataException e) { g_warning("RawSpeed: Could not open camera metadata information.\n%s\nRawSpeed will not be used!", e.what()); return rs_filter_response_new(); } g_free(path); } RS_IMAGE16 *image = NULL; FileReader f((LPCWSTR) filename); RawDecoder *d = 0; FileMap* m = 0; #ifdef TIME_LOAD GTimer *gt = g_timer_new(); #endif try { rs_io_lock(); m = f.readFile(); rs_io_unlock(); } catch (FileIOException e) { rs_io_unlock(); printf("RawSpeed: File IO Exception: %s\n", e.what()); return rs_filter_response_new(); } catch (...) { rs_io_unlock(); printf("RawSpeed: Exception when reading file\n"); return rs_filter_response_new(); } try { #ifdef TIME_LOAD RS_DEBUG(PERFORMANCE, "RawSpeed Open %s: %.03fs", filename, g_timer_elapsed(gt, NULL)); g_timer_destroy(gt); #endif try { TiffParser t(m); t.parseData(); d = t.getDecoder(); gint col, row; gint cpp; #ifdef TIME_LOAD gt = g_timer_new(); #endif d->checkSupport(c); d->decodeRaw(); d->decodeMetaData(c); for (guint i = 0; i < d->errors.size(); i++) g_warning("RawSpeed: Error Encountered:%s\n", d->errors[i]); RawImage r = d->mRaw; r->scaleBlackWhite(); #ifdef TIME_LOAD RS_DEBUG(PERFORMANCE, "RawSpeed Decode %s: %.03fs\n", filename, g_timer_elapsed(gt, NULL)); g_timer_destroy(gt); #endif cpp = r->getCpp(); if (cpp == 1) image = rs_image16_new(r->dim.x, r->dim.y, cpp, cpp); else if (cpp == 3) image = rs_image16_new(r->dim.x, r->dim.y, 3, 4); else { if (d) delete d; if (m) delete m; g_warning("RawSpeed: Unsupported component per pixel count\n"); return rs_filter_response_new(); } if (r->getDataType() != TYPE_USHORT16) { g_warning("RawSpeed: Unsupported data type\n"); if (d) delete d; if (m) delete m; return rs_filter_response_new(); } if (r->isCFA) image->filters = r->cfa.getDcrawFilter(); if (cpp == 1) { BitBlt((uchar8 *)(GET_PIXEL(image,0,0)),image->pitch*2, r->getData(0,0), r->pitch, r->getBpp()*r->dim.x, r->dim.y); } else { for(row=0;rowh;row++) { gushort *inpixel = (gushort*)&r->getData()[row*r->pitch]; gushort *outpixel = GET_PIXEL(image, 0, row); for(col=0;colw;col++) { *outpixel++ = *inpixel++; *outpixel++ = *inpixel++; *outpixel++ = *inpixel++; outpixel++; } } } } catch (RawDecoderException e) { g_warning("RawSpeed: RawDecoderException: %s", e.what()); } } catch (TiffParserException e) { g_warning("RawSpeed: TiffParserException: %s", e.what()); } catch (IOException e) { g_warning("RawSpeed: IOException: %s", e.what()); } catch (FileIOException e) { g_warning("RawSpeed: File IO Exception: %s", e.what()); } if (d) delete d; if (m) delete m; RSFilterResponse* response = rs_filter_response_new(); if (image) { rs_filter_response_set_image(response, image); rs_filter_response_set_width(response, image->w); rs_filter_response_set_height(response, image->h); g_object_unref(image); } return response; } } /* extern "C" */ int rawspeed_get_number_of_processor_cores() { return rs_get_number_of_processor_cores(); } rawstudio-2.0/plugins/load-rawspeed/rawspeed/0000755000175000017500000000000011547430075016425 500000000000000rawstudio-2.0/plugins/load-rawspeed/rawspeed/Common.cpp0000644000175000017500000000213011526533650020275 00000000000000#include "StdAfx.h" #include "Common.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #if defined(__unix__) || defined(__MINGW32__) void* _aligned_malloc(size_t bytes, size_t alignment) { void* ret= NULL; if (0==posix_memalign(&ret, alignment, bytes)) return ret; else return NULL; } #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/PefDecoder.h0000644000175000017500000000244111542726010020507 00000000000000#ifndef PEF_DECODER_H #define PEF_DECODER_H #include "RawDecoder.h" #include "TiffIFD.h" #include "PentaxDecompressor.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class PefDecoder : public RawDecoder { public: PefDecoder(TiffIFD *rootIFD, FileMap* file); virtual ~PefDecoder(void); virtual RawImage decodeRaw(); virtual void decodeMetaData(CameraMetaData *meta); virtual void checkSupport(CameraMetaData *meta); TiffIFD *mRootIFD; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/Camera.h0000644000175000017500000000367611542726010017712 00000000000000#ifndef CAMERA_H #define CAMERA_H #include "ColorFilterArray.h" #include #include "BlackArea.h" #include "CameraMetadataException.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class Camera { public: Camera(xmlDocPtr doc, xmlNodePtr cur); Camera(const Camera* camera, uint32 alias_num); void parseCameraChild(xmlDocPtr doc, xmlNodePtr cur); virtual ~Camera(void); string make; string model; string mode; vector aliases; ColorFilterArray cfa; uint32 black; uint32 white; bool supported; iPoint2D cropSize; iPoint2D cropPos; vector blackAreas; int decoderVersion; map hints; private: int StringToInt(const xmlChar *in, const xmlChar *tag, const char* attribute); int getAttributeAsInt( xmlNodePtr cur , const xmlChar *tag, const char* attribute); protected: void parseCFA( xmlDocPtr doc, xmlNodePtr cur ); void parseAlias( xmlDocPtr doc, xmlNodePtr cur ); void parseHint( xmlDocPtr doc, xmlNodePtr cur ); void parseBlackAreas( xmlDocPtr doc, xmlNodePtr cur ); }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffParserException.h0000644000175000017500000000213611542726010022434 00000000000000/* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #ifndef TIFF_PARSER_EXCEPTION_H #define TIFF_PARSER_EXCEPTION_H namespace RawSpeed { void ThrowTPE(const char* fmt, ...); class TiffParserException : public std::runtime_error { public: TiffParserException(const string _msg); }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/Rw2Decoder.h0000644000175000017500000000340711542726010020452 00000000000000#ifndef RW2_DECODER_H #define RW2_DECODER_H #include "RawDecoder.h" #include "TiffIFD.h" #include "BitPumpPlain.h" #include "TiffParser.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class PanaBitpump { public: PanaBitpump(ByteStream* input); virtual ~PanaBitpump(); ByteStream* input; uchar8 buf[0x4000]; int vbits; uint32 load_flags; uint32 getBits(int nbits); void skipBytes(int bytes); }; class Rw2Decoder : public RawDecoder { public: Rw2Decoder(TiffIFD *rootIFD, FileMap* file); virtual ~Rw2Decoder(void); RawImage decodeRaw(); virtual void decodeMetaData(CameraMetaData *meta); virtual void checkSupport(CameraMetaData *meta); TiffIFD *mRootIFD; protected: virtual void decodeThreaded(RawDecoderThread* t); private: string getMode(const string model); void DecodeRw2(); bool almostEqualRelative(float A, float B, float maxRelativeError); ByteStream* input_start; uint32 load_flags; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffParser.h0000644000175000017500000000324211542726010020554 00000000000000/* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #ifndef TIFF_PARSER_H #define TIFF_PARSER_H #include "FileMap.h" #include "TiffIFD.h" #include "TiffIFDBE.h" #include "TiffParserException.h" #include "RawDecoder.h" #include "DngDecoder.h" #include "Cr2Decoder.h" #include "ArwDecoder.h" #include "PefDecoder.h" #include "NefDecoder.h" #include "OrfDecoder.h" #include "Rw2Decoder.h" #include "SrwDecoder.h" namespace RawSpeed { class TiffParser { public: TiffParser(FileMap* input); virtual ~TiffParser(void); virtual void parseData(); virtual RawDecoder* getDecoder(); Endianness tiff_endian; TiffIFD* RootIFD() const { return mRootIFD; } RawSpeed::Endianness getHostEndian() const { return host_endian; } protected: FileMap *mInput; TiffIFD* mRootIFD; Endianness host_endian; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/BlackArea.cpp0000644000175000017500000000216111542740622020653 00000000000000#include "StdAfx.h" #include "BlackArea.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { BlackArea::BlackArea( int _offset, int _size, bool _isVertical ) : offset(_offset), size(_size), isVertical(_isVertical) { } BlackArea::~BlackArea(void) { } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/CameraMetaData.h0000644000175000017500000000260511542726010021302 00000000000000#ifndef CAMERA_META_DATA_H #define CAMERA_META_DATA_H #include #include #include #include "Camera.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class CameraMetaData { public: CameraMetaData(char *docname); virtual ~CameraMetaData(void); xmlDocPtr doc; xmlParserCtxtPtr ctxt; /* the parser context */ map cameras; Camera* getCamera(string make, string model, string mode); protected: void addCamera(Camera* cam); }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/ColorFilterArray.h0000644000175000017500000000401011542726010021724 00000000000000#ifndef COLOR_FILTER_ARRAY_H #define COLOR_FILTER_ARRAY_H #include "RawDecoderException.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { typedef enum { CFA_COLOR_MIN = 0, CFA_RED = 0, CFA_GREEN = 1, CFA_BLUE = 2, CFA_GREEN2 = 3, CFA_CYAN = 4, CFA_MAGENTA = 5, CFA_YELLOW = 6, CFA_WHITE = 7, CFA_COLOR_MAX = 8, CFA_UNKNOWN = 255 } CFAColor; typedef enum { CFA_POS_UPPERLEFT, CFA_POS_UPPERRIGHT, CFA_POS_LOWERLEFT, CFA_POS_LOWERRIGHT } CFAPos; class ColorFilterArray { public: ColorFilterArray(void); ColorFilterArray(CFAColor up_left, CFAColor up_right, CFAColor down_left, CFAColor down_right); virtual ~ColorFilterArray(void); void setCFA(CFAColor up_left, CFAColor up_right, CFAColor down_left, CFAColor down_right); void setColorAt(iPoint2D pos, CFAColor c); void setCFA(uchar8 dcrawCode); __inline CFAColor getColorAt(uint32 x, uint32 y) {return cfa[(x&1)+((y&1)<<1)];} uint32 toDcrawColor(CFAColor c); uint32 getDcrawFilter(); void shiftLeft(); void shiftDown(); std::string asString(); static std::string colorToString(CFAColor c); private: CFAColor cfa[4]; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/NefDecoder.h0000644000175000017500000000330011542726010020500 00000000000000#ifndef NEF_DECODER_H #define NEF_DECODER_H #include "RawDecoder.h" #include "LJpegPlain.h" #include "TiffIFD.h" #include "BitPumpPlain.h" #include "TiffParser.h" #include "NikonDecompressor.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class NefDecoder : public RawDecoder { public: NefDecoder(TiffIFD *rootIFD, FileMap* file); virtual ~NefDecoder(void); virtual RawImage decodeRaw(); virtual void decodeMetaData(CameraMetaData *meta); virtual void checkSupport(CameraMetaData *meta); TiffIFD *mRootIFD; private: bool D100IsCompressed(uint32 offset); void DecodeUncompressed(); void DecodeD100Uncompressed(); void readCoolpixMangledRaw(ByteStream &input, iPoint2D& size, iPoint2D& offset, int inputPitch); }; class NefSlice { public: NefSlice() { h = offset = count = 0;}; ~NefSlice() {}; uint32 h; uint32 offset; uint32 count; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffIFD.cpp0000644000175000017500000002064011526533650020266 00000000000000#include "StdAfx.h" #include "TiffIFD.h" #include "TiffParser.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { #ifdef CHECKSIZE #undef CHECKSIZE #endif #define CHECKSIZE(A) if (A >= size) ThrowTPE("Error reading TIFF structure (invalid size). File Corrupt") TiffIFD::TiffIFD() { nextIFD = 0; endian = little; } TiffIFD::TiffIFD(FileMap* f, uint32 offset) { uint32 size = f->getSize(); uint32 entries; endian = little; CHECKSIZE(offset); entries = *(unsigned short*)f->getData(offset); // Directory entries in this IFD CHECKSIZE(offset + 2 + entries*4); for (uint32 i = 0; i < entries; i++) { TiffEntry *t = new TiffEntry(f, offset + 2 + i*12); if (t->tag == SUBIFDS || t->tag == EXIFIFDPOINTER || t->tag == DNGPRIVATEDATA || t->tag == MAKERNOTE || t->tag == 0x2e) { // subIFD tag if (t->tag == DNGPRIVATEDATA) { try { TiffIFD *maker_ifd = parseDngPrivateData(t); mSubIFD.push_back(maker_ifd); delete(t); } catch (TiffParserException e) { // Unparsable private data are added as entries mEntry[t->tag] = t; } } else if (t->tag == MAKERNOTE || t->tag == 0x2e) { try { mSubIFD.push_back(parseMakerNote(f, t->getDataOffset(), endian)); delete(t); } catch (TiffParserException e) { // Unparsable makernotes are added as entries mEntry[t->tag] = t; } } else { const unsigned int* sub_offsets = t->getIntArray(); try { for (uint32 j = 0; j < t->count; j++) { mSubIFD.push_back(new TiffIFD(f, sub_offsets[j])); } delete(t); } catch (TiffParserException e) { // Unparsable subifds are added as entries mEntry[t->tag] = t; } } } else { // Store as entry mEntry[t->tag] = t; } } nextIFD = *(int*)f->getData(offset + 2 + entries * 12); } TiffIFD* TiffIFD::parseDngPrivateData(TiffEntry *t) { /* 1. Six bytes containing the zero-terminated string "Adobe". (The DNG specification calls for the DNGPrivateData tag to start with an ASCII string identifying the creator/format). 2. 4 bytes: an ASCII string ("MakN" for a Makernote), indicating what sort of data is being stored here. Note that this is not zero-terminated. 3. A four-byte count (number of data bytes following); this is the length of the original MakerNote data. (This is always in "most significant byte first" format). 4. 2 bytes: the byte-order indicator from the original file (the usual 'MM'/4D4D or 'II'/4949). 5. 4 bytes: the original file offset for the MakerNote tag data (stored according to the byte order given above). 6. The contents of the MakerNote tag. This is a simple byte-for-byte copy, with no modification. */ uint32 size = t->count; const uchar8 *data = t->getData(); string id((const char*)data); if (id.compare("Adobe")) ThrowTPE("Not Adobe Private data"); data+=6; if (!(data[0] == 'M' && data[1] == 'a' && data[2] == 'k' &&data[3] == 'N' )) ThrowTPE("Not Makernote"); data+=4; uint32 count; if (big == getHostEndianness()) count = *(uint32*)data; else count = (unsigned int)data[0] << 24 | (unsigned int)data[1] << 16 | (unsigned int)data[2] << 8 | (unsigned int)data[3]; data+=4; CHECKSIZE(count); Endianness makernote_endian = unknown; if (data[0] == 0x49 && data[1] == 0x49) makernote_endian = little; else if (data[0] == 0x4D && data[1] == 0x4D) makernote_endian = big; else ThrowTPE("Cannot determine endianess of DNG makernote"); data+=2; uint32 org_offset; if (big == getHostEndianness()) org_offset = *(uint32*)data; else org_offset = (unsigned int)data[0] << 24 | (unsigned int)data[1] << 16 | (unsigned int)data[2] << 8 | (unsigned int)data[3]; data+=4; /* We don't parse original makernotes that are placed after 300MB mark in the original file */ if (org_offset+count > 300*1024*1024) ThrowTPE("Adobe Private data: original offset of makernote is past 300MB offset"); /* Create fake tiff with original offsets */ uchar8* maker_data = new uchar8[org_offset+count]; memcpy(&maker_data[org_offset],data, count); FileMap *maker_map = new FileMap(maker_data, org_offset+count); TiffIFD *maker_ifd; try { maker_ifd = parseMakerNote(maker_map, org_offset, makernote_endian); } catch (TiffParserException e) { delete[] maker_data; delete maker_map; throw e; } delete[] maker_data; delete maker_map; return maker_ifd; } /* This will attempt to parse makernotes and return it as an IFD */ TiffIFD* TiffIFD::parseMakerNote(FileMap *f, uint32 offset, Endianness parent_end) { uint32 size = f->getSize(); CHECKSIZE(offset + 20); TiffIFD *maker_ifd = NULL; const uchar8* data = f->getData(offset); // Pentax makernote starts with AOC\0 - If it's there, skip it if (data[0] == 0x41 && data[1] == 0x4f && data[2] == 0x43 && data[3] == 0) { data +=4; offset +=4; } // Panasonic has the word Exif at byte 6, a complete Tiff header starts at byte 12 // This TIFF is 0 offset based if (data[6] == 0x45 && data[7] == 0x78 && data[8] == 0x69 && data[9] == 0x66) { parent_end = getTiffEndianness((const ushort16*)&data[12]); if (parent_end == unknown) ThrowTPE("Cannot determine Panasonic makernote endianness"); data +=20; offset +=20; } // Some have MM or II to indicate endianness - read that if (data[0] == 0x49 && data[1] == 0x49) { offset +=2; parent_end = little; } else if (data[0] == 0x4D && data[1] == 0x4D) { parent_end = big; offset +=2; } // Attempt to parse the rest as an IFD if (parent_end == getHostEndianness()) maker_ifd = new TiffIFD(f, offset); else maker_ifd = new TiffIFDBE(f, offset); // If the structure cannot be read, a TiffParserException will be thrown. return maker_ifd; } TiffIFD::~TiffIFD(void) { for (map::iterator i = mEntry.begin(); i != mEntry.end(); ++i) { delete((*i).second); } mEntry.clear(); for (vector::iterator i = mSubIFD.begin(); i != mSubIFD.end(); ++i) { delete(*i); } mSubIFD.clear(); } bool TiffIFD::hasEntryRecursive(TiffTag tag) { if (mEntry.find(tag) != mEntry.end()) return TRUE; for (vector::iterator i = mSubIFD.begin(); i != mSubIFD.end(); ++i) { if ((*i)->hasEntryRecursive(tag)) return TRUE; } return false; } vector TiffIFD::getIFDsWithTag(TiffTag tag) { vector matchingIFDs; if (mEntry.find(tag) != mEntry.end()) { matchingIFDs.push_back(this); } for (vector::iterator i = mSubIFD.begin(); i != mSubIFD.end(); ++i) { vector t = (*i)->getIFDsWithTag(tag); for (uint32 j = 0; j < t.size(); j++) { matchingIFDs.push_back(t[j]); } } return matchingIFDs; } TiffEntry* TiffIFD::getEntryRecursive(TiffTag tag) { if (mEntry.find(tag) != mEntry.end()) { return mEntry[tag]; } for (vector::iterator i = mSubIFD.begin(); i != mSubIFD.end(); ++i) { TiffEntry* entry = (*i)->getEntryRecursive(tag); if (entry) return entry; } return NULL; } TiffEntry* TiffIFD::getEntry(TiffTag tag) { if (mEntry.find(tag) != mEntry.end()) { return mEntry[tag]; } ThrowTPE("TiffIFD: TIFF Parser entry 0x%x not found.", tag); return 0; } bool TiffIFD::hasEntry(TiffTag tag) { return mEntry.find(tag) != mEntry.end(); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/FileReader.cpp0000644000175000017500000000544111541412541021047 00000000000000#include "StdAfx.h" #include "FileReader.h" #ifdef __unix__ #include #include #include #include //#include #endif // __unix__ /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { FileReader::FileReader(LPCWSTR _filename) : mFilename(_filename) { } FileMap* FileReader::readFile() { #ifdef __unix__ int bytes_read = 0; FILE *file; char *dest; long size; file = fopen(mFilename, "rb"); if (file == NULL) throw FileIOException("Could not open file."); fseek(file, 0, SEEK_END); size = ftell(file); if (size <= 0) { fclose(file); throw FileIOException("File is 0 bytes."); } fseek(file, 0, SEEK_SET); #if 0 // Not used, as it is slower than sync read uchar8* pa = (uchar8*)mmap(0, size, PROT_READ | PROT_WRITE, MAP_PRIVATE, fd, 0); FileMap *fileData = new FileMap(pa, size); #else FileMap *fileData = new FileMap(size); dest = (char *)fileData->getDataWrt(0); bytes_read = fread(dest, 1, size, file); fclose(file); if (size != bytes_read) { delete fileData; throw FileIOException("Could not read file."); } #endif #else // __unix__ HANDLE file_h; // File handle file_h = CreateFile(mFilename, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_FLAG_SEQUENTIAL_SCAN, NULL); if (file_h == INVALID_HANDLE_VALUE) { throw FileIOException("Could not open file."); } LARGE_INTEGER f_size; GetFileSizeEx(file_h , &f_size); if (!f_size.LowPart) throw FileIOException("File is 0 bytes."); FileMap *fileData = new FileMap(f_size.LowPart); DWORD bytes_read; if (! ReadFile(file_h, fileData->getDataWrt(0), fileData->getSize(), &bytes_read, NULL)) { CloseHandle(file_h); delete fileData; throw FileIOException("Could not read file."); } CloseHandle(file_h); #endif // __unix__ return fileData; } FileReader::~FileReader(void) { } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/IOException.cpp0000644000175000017500000000304611526533650021242 00000000000000#include "StdAfx.h" #include "IOException.h" #if !defined(WIN32) || defined(__MINGW32__) #include #define vsprintf_s(...) vsnprintf(__VA_ARGS__) #endif /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { void ThrowIOE(const char* fmt, ...) { va_list val; va_start(val, fmt); char buf[8192]; vsprintf_s(buf, 8192, fmt, val); va_end(val); _RPT1(0, "IO EXCEPTION: %s\n", buf); throw IOException(buf); } IOException::IOException( const char* _msg ) : std::runtime_error(string(_msg)) { _RPT1(0, "IO Exception: %s\n", _msg); } IOException::IOException( const string _msg ) : std::runtime_error(_msg) { _RPT1(0, "IO Exception: %s\n", _msg.c_str()); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/Cr2Decoder.h0000644000175000017500000000325211542726010020424 00000000000000#ifndef CR2_DECODER_H #define CR2_DECODER_H #include "RawDecoder.h" #include "LJpegPlain.h" #include "TiffIFD.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class Cr2Decoder : public RawDecoder { public: Cr2Decoder(TiffIFD *rootIFD, FileMap* file); virtual RawImage decodeRaw(); virtual void checkSupport(CameraMetaData *meta); virtual void decodeMetaData(CameraMetaData *meta); virtual ~Cr2Decoder(void); protected: int sraw_coeffs[3]; void sRawInterpolate(); void interpolate_420(int w, int h, int start_h , int end_h); void interpolate_422(int w, int h, int start_h , int end_h); void interpolate_422_old(int w, int h, int start_h , int end_h); TiffIFD *mRootIFD; }; class Cr2Slice { public: Cr2Slice() { w = h = offset = count = 0;}; ~Cr2Slice() {}; uint32 w; uint32 h; uint32 offset; uint32 count; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/DngDecoderSlices.cpp0000644000175000017500000000632611526533650022221 00000000000000#include "StdAfx.h" #include "DngDecoderSlices.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { void *DecodeThread(void *_this) { DngDecoderThread* me = (DngDecoderThread*)_this; DngDecoderSlices* parent = me->parent; try { parent->decodeSlice(me); } catch (...) { parent->setError("DNGDEcodeThread: Caught exception."); } pthread_exit(NULL); return NULL; } DngDecoderSlices::DngDecoderSlices(FileMap* file, RawImage img) : mFile(file), mRaw(img) { mFixLjpeg = false; } DngDecoderSlices::~DngDecoderSlices(void) { } void DngDecoderSlices::addSlice(DngSliceElement slice) { slices.push(slice); } void DngDecoderSlices::startDecoding() { // Create threads nThreads = getThreadCount(); int slicesPerThread = ((int)slices.size() + nThreads - 1) / nThreads; // decodedSlices = 0; pthread_attr_t attr; /* Initialize and set thread detached attribute */ pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); pthread_mutex_init(&errMutex, NULL); for (uint32 i = 0; i < nThreads; i++) { DngDecoderThread* t = new DngDecoderThread(); for (int j = 0; j < slicesPerThread ; j++) { if (!slices.empty()) { t->slices.push(slices.front()); slices.pop(); } } t->parent = this; pthread_create(&t->threadid, &attr, DecodeThread, t); threads.push_back(t); } pthread_attr_destroy(&attr); void *status; for (uint32 i = 0; i < nThreads; i++) { pthread_join(threads[i]->threadid, &status); delete(threads[i]); } pthread_mutex_destroy(&errMutex); } void DngDecoderSlices::decodeSlice(DngDecoderThread* t) { while (!t->slices.empty()) { LJpegPlain l(mFile, mRaw); l.mDNGCompatible = mFixLjpeg; DngSliceElement e = t->slices.front(); l.mUseBigtable = e.mUseBigtable; t->slices.pop(); try { l.startDecoder(e.byteOffset, e.byteCount, e.offX, e.offY); } catch (RawDecoderException err) { setError(err.what()); } catch (IOException err) { setError("DngDecoderSlices::decodeSlice: IO error occurred."); } } } int DngDecoderSlices::size() { return (int)slices.size(); } void DngDecoderSlices::setError( const char* err ) { pthread_mutex_lock(&errMutex); errors.push_back(_strdup(err)); pthread_mutex_unlock(&errMutex); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/IOException.h0000644000175000017500000000217611542726010020702 00000000000000#include "RawDecoderException.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #ifndef IOEXCEPTION_H #define IOEXCEPTION_H namespace RawSpeed { void ThrowIOE(const char* fmt, ...); class IOException : public std::runtime_error { public: IOException(const char* _msg); IOException(const string _msg); }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/DngDecoderSlices.h0000644000175000017500000000414511542726010021653 00000000000000#ifndef DNG_DECODER_SLICES_H #define DNG_DECODER_SLICES_H #include "RawDecoder.h" #include #include "LJpegPlain.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class DngSliceElement { public: DngSliceElement(uint32 off, uint32 count, uint32 offsetX, uint32 offsetY) : byteOffset(off), byteCount(count), offX(offsetX), offY(offsetY), mUseBigtable(false) {}; ~DngSliceElement(void) {}; const uint32 byteOffset; const uint32 byteCount; const uint32 offX; const uint32 offY; bool mUseBigtable; }; class DngDecoderSlices; class DngDecoderThread { public: DngDecoderThread(void) {} ~DngDecoderThread(void) {} pthread_t threadid; queue slices; DngDecoderSlices* parent; }; class DngDecoderSlices { public: DngDecoderSlices(FileMap* file, RawImage img ); ~DngDecoderSlices(void); void addSlice(DngSliceElement slice); void startDecoding(); void decodeSlice(DngDecoderThread* t); void setError(const char* err); int size(); queue slices; vector threads; FileMap *mFile; RawImage mRaw; vector errors; pthread_mutex_t errMutex; // Mutex for above bool mFixLjpeg; uint32 nThreads; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/Camera.cpp0000644000175000017500000002076311526533650020251 00000000000000#include "StdAfx.h" #include "Camera.h" #include /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { Camera::Camera(xmlDocPtr doc, xmlNodePtr cur) { xmlChar *key; key = xmlGetProp(cur, (const xmlChar *)"make"); if (!key) ThrowCME("Camera XML Parser: \"make\" attribute not found."); make = string((const char*)key); xmlFree(key); key = xmlGetProp(cur, (const xmlChar *)"model"); if (!key) ThrowCME("Camera XML Parser: \"model\" attribute not found."); model = string((const char*)key); xmlFree(key); supported = true; key = xmlGetProp(cur, (const xmlChar *)"supported"); if (key) { string s = string((const char*)key); if (s.compare("no") == 0) supported = false; xmlFree(key); } key = xmlGetProp(cur, (const xmlChar *)"mode"); if (key) { mode = string((const char*)key); xmlFree(key); } else { mode = string(""); } key = xmlGetProp(cur, (const xmlChar *)"decoder_version"); if (key) { decoderVersion = getAttributeAsInt(cur, cur->name, "decoder_version"); } else { decoderVersion = 0; } cur = cur->xmlChildrenNode; while (cur != NULL) { parseCameraChild(doc, cur); cur = cur->next; } } Camera::Camera( const Camera* camera, uint32 alias_num) { if (alias_num >= camera->aliases.size()) ThrowCME("Camera: Internal error, alias number out of range specified."); make = camera->make; model = camera->aliases[alias_num]; mode = camera->mode; cfa = camera->cfa; black = camera->black; white = camera->white; supported = camera->supported; cropSize = camera->cropSize; cropPos = camera->cropPos; decoderVersion = camera->decoderVersion; for (uint32 i = 0; i < camera->blackAreas.size(); i++) { blackAreas.push_back(camera->blackAreas[i]); } map::const_iterator mi = camera->hints.begin(); for (; mi != camera->hints.end(); ++mi) { hints.insert(make_pair((*mi).first, (*mi).second)); } } Camera::~Camera(void) { } void Camera::parseCameraChild(xmlDocPtr doc, xmlNodePtr cur) { if (!xmlStrcmp(cur->name, (const xmlChar *) "CFA")) { if (2 != getAttributeAsInt(cur, cur->name, "width")) ThrowCME("Unsupported CFA size in camera %s %s", make.c_str(), model.c_str()); if (2 != getAttributeAsInt(cur, cur->name, "height")) ThrowCME("Unsupported CFA size in camera %s %s", make.c_str(), model.c_str()); cur = cur->xmlChildrenNode; while (cur != NULL) { parseCFA(doc, cur); cur = cur->next; } return; } if (!xmlStrcmp(cur->name, (const xmlChar *) "Crop")) { cropPos.x = getAttributeAsInt(cur, cur->name, "x"); cropPos.y = getAttributeAsInt(cur, cur->name, "y"); if (cropPos.x < 0) ThrowCME("Negative X axis crop specified in camera %s %s", make.c_str(), model.c_str()); if (cropPos.y < 0) ThrowCME("Negative Y axis crop specified in camera %s %s", make.c_str(), model.c_str()); cropSize.x = getAttributeAsInt(cur, cur->name, "width"); cropSize.y = getAttributeAsInt(cur, cur->name, "height"); return; } if (!xmlStrcmp(cur->name, (const xmlChar *) "Sensor")) { black = getAttributeAsInt(cur, cur->name, "black"); white = getAttributeAsInt(cur, cur->name, "white"); return; } if (!xmlStrcmp(cur->name, (const xmlChar *) "BlackAreas")) { cur = cur->xmlChildrenNode; while (cur != NULL) { parseBlackAreas(doc, cur); cur = cur->next; } return; } if (!xmlStrcmp(cur->name, (const xmlChar *) "Aliases")) { cur = cur->xmlChildrenNode; while (cur != NULL) { parseAlias(doc, cur); cur = cur->next; } return; } if (!xmlStrcmp(cur->name, (const xmlChar *) "Hints")) { cur = cur->xmlChildrenNode; while (cur != NULL) { parseHint(doc, cur); cur = cur->next; } return; } } void Camera::parseCFA(xmlDocPtr doc, xmlNodePtr cur) { xmlChar *key; if (!xmlStrcmp(cur->name, (const xmlChar *) "Color")) { int x = getAttributeAsInt(cur, cur->name, "x"); if (x < 0 || x > 1) { ThrowCME("Invalid x coordinate in CFA array of in camera %s %s", make.c_str(), model.c_str()); } int y = getAttributeAsInt(cur, cur->name, "y"); if (y < 0 || y > 1) { ThrowCME("Invalid y coordinate in CFA array of in camera %s %s", make.c_str(), model.c_str()); } key = xmlNodeListGetString(doc, cur->children, 1); if (!xmlStrcmp(key, (const xmlChar *) "GREEN")) cfa.setColorAt(iPoint2D(x, y), CFA_GREEN); else if (!xmlStrcmp(key, (const xmlChar *) "RED")) cfa.setColorAt(iPoint2D(x, y), CFA_RED); else if (!xmlStrcmp(key, (const xmlChar *) "BLUE")) cfa.setColorAt(iPoint2D(x, y), CFA_BLUE); xmlFree(key); } } void Camera::parseBlackAreas(xmlDocPtr doc, xmlNodePtr cur) { if (!xmlStrcmp(cur->name, (const xmlChar *) "Vertical")) { int x = getAttributeAsInt(cur, cur->name, "x"); if (x < 0) { ThrowCME("Invalid x coordinate in vertical BlackArea of in camera %s %s", make.c_str(), model.c_str()); } int w = getAttributeAsInt(cur, cur->name, "width"); if (w < 0) { ThrowCME("Invalid width in vertical BlackArea of in camera %s %s", make.c_str(), model.c_str()); } blackAreas.push_back(BlackArea(x, w, true)); } else if (!xmlStrcmp(cur->name, (const xmlChar *) "Horizontal")) { int y = getAttributeAsInt(cur, cur->name, "y"); if (y < 0) { ThrowCME("Invalid y coordinate in horizontal BlackArea of in camera %s %s", make.c_str(), model.c_str()); } int h = getAttributeAsInt(cur, cur->name, "height"); if (h < 0) { ThrowCME("Invalid width in horizontal BlackArea of in camera %s %s", make.c_str(), model.c_str()); } blackAreas.push_back(BlackArea(y, h, false)); } } int Camera::StringToInt(const xmlChar *in, const xmlChar *tag, const char* attribute) { int i; #if defined(__unix__) || defined(__MINGW32__) if (EOF == sscanf((const char*)in, "%d", &i)) #else if (EOF == sscanf_s((const char*)in, "%d", &i)) #endif ThrowCME("Error parsing attribute %s in tag %s, in camera %s %s.", attribute, tag, make.c_str(), model.c_str()); return i; } int Camera::getAttributeAsInt(xmlNodePtr cur , const xmlChar *tag, const char* attribute) { xmlChar *key = xmlGetProp(cur, (const xmlChar *)attribute); if (!key) ThrowCME("Could not find attribute %s in tag %s, in camera %s %s.", attribute, tag, make.c_str(), model.c_str()); int i = StringToInt(key, tag, attribute); return i; } void Camera::parseAlias( xmlDocPtr doc, xmlNodePtr cur ) { if (!xmlStrcmp(cur->name, (const xmlChar *) "Alias")) { cur = cur->xmlChildrenNode; while (NULL != cur) { if (cur && !xmlStrcmp(cur->name, (const xmlChar *) "text")) aliases.push_back(string((const char*)cur->content)); cur = cur->next; } } } void Camera::parseHint( xmlDocPtr doc, xmlNodePtr cur ) { if (!xmlStrcmp(cur->name, (const xmlChar *) "Hint")) { xmlChar *key; string hint_name, hint_value; key = xmlGetProp(cur, (const xmlChar *)"name"); if (key) hint_name = string((const char*)key); else ThrowCME("CameraMetadata: Could not find name for hint for %s %s camera.", make.c_str(), model.c_str()); key = xmlGetProp(cur, (const xmlChar *)"value"); if (key) hint_value = string((const char*)key); else ThrowCME("CameraMetadata: Could not find value for hint %s for %s %s camera.", hint_name.c_str(), make.c_str(), model.c_str()); hints.insert(make_pair(hint_name, hint_value)); } } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/ArwDecoder.cpp0000644000175000017500000001617311541412541021070 00000000000000#include "StdAfx.h" #include "ArwDecoder.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { ArwDecoder::ArwDecoder(TiffIFD *rootIFD, FileMap* file) : RawDecoder(file), mRootIFD(rootIFD) { } ArwDecoder::~ArwDecoder(void) { } RawImage ArwDecoder::decodeRaw() { vector data = mRootIFD->getIFDsWithTag(STRIPOFFSETS); if (data.empty()) ThrowRDE("ARW Decoder: No image data found"); TiffIFD* raw = data[0]; int compression = raw->getEntry(COMPRESSION)->getInt(); if (32767 != compression) ThrowRDE("ARW Decoder: Unsupported compression"); TiffEntry *offsets = raw->getEntry(STRIPOFFSETS); TiffEntry *counts = raw->getEntry(STRIPBYTECOUNTS); if (offsets->count != 1) { ThrowRDE("ARW Decoder: Multiple Strips found: %u", offsets->count); } if (counts->count != offsets->count) { ThrowRDE("ARW Decoder: Byte count number does not match strip size: count:%u, strips:%u ", counts->count, offsets->count); } uint32 width = raw->getEntry(IMAGEWIDTH)->getInt(); uint32 height = raw->getEntry(IMAGELENGTH)->getInt(); uint32 bitPerPixel = raw->getEntry(BITSPERSAMPLE)->getInt(); // Sony E-550 marks compressed 8bpp ARW with 12 bit per pixel // this makes the compression detect it as a ARW v1. // This camera has however another MAKER entry, so we MAY be able // to detect it this way in the future. data = mRootIFD->getIFDsWithTag(MAKE); string make = data[0]->getEntry(MAKE)->getString(); if (!make.compare("SONY")) bitPerPixel = 8; bool arw1 = counts->getInt() * 8 != width * height * bitPerPixel; if (arw1) height += 8; mRaw->dim = iPoint2D(width, height); mRaw->createData(); const ushort16* c = raw->getEntry(SONY_CURVE)->getShortArray(); uint32 sony_curve[] = { 0, 0, 0, 0, 0, 4095 }; for (uint32 i = 0; i < 4; i++) sony_curve[i+1] = (c[i] >> 2) & 0xfff; for (uint32 i = 0; i < 0x4001; i++) curve[i] = i; for (uint32 i = 0; i < 5; i++) for (uint32 j = sony_curve[i] + 1; j <= sony_curve[i+1]; j++) curve[j] = curve[j-1] + (1 << i); uint32 c2 = counts->getInt(); uint32 off = offsets->getInt(); if (!mFile->isValid(off)) ThrowRDE("Sony ARW decoder: Data offset after EOF, file probably truncated"); if (!mFile->isValid(off + c2)) c2 = mFile->getSize() - off; ByteStream input(mFile->getData(off), c2); try { if (arw1) DecodeARW(input, width, height); else DecodeARW2(input, width, height, bitPerPixel); } catch (IOException e) { errors.push_back(_strdup(e.what())); // Let's ignore it, it may have delivered somewhat useful data. } return mRaw; } void ArwDecoder::DecodeARW(ByteStream &input, uint32 w, uint32 h) { BitPumpMSB bits(&input); uchar8* data = mRaw->getData(); ushort16* dest = (ushort16*) & data[0]; uint32 pitch = mRaw->pitch / sizeof(ushort16); int sum = 0; for (uint32 x = w; x--;) for (uint32 y = 0; y < h + 1; y += 2) { bits.checkPos(); bits.fill(); if (y == h) y = 1; uint32 len = 4 - bits.getBitsNoFill(2); if (len == 3 && bits.getBitNoFill()) len = 0; if (len == 4) while (len < 17 && !bits.getBitNoFill()) len++; int diff = bits.getBits(len); if ((diff & (1 << (len - 1))) == 0) diff -= (1 << len) - 1; sum += diff; _ASSERTE(!(sum >> 12)); if (y < h) dest[x+y*pitch] = sum; } } void ArwDecoder::DecodeARW2(ByteStream &input, uint32 w, uint32 h, uint32 bpp) { if (bpp == 8) { in = &input; this->startThreads(); return; } // End bpp = 8 if (bpp == 12) { uchar8* data = mRaw->getData(); uint32 pitch = mRaw->pitch; const uchar8 *in = input.getData(); if (input.getRemainSize() < (w * 3 / 2)) ThrowRDE("Sony Decoder: Image data section too small, file probably truncated"); if (input.getRemainSize() < (w*h*3 / 2)) h = input.getRemainSize() / (w * 3 / 2) - 1; for (uint32 y = 0; y < h; y++) { ushort16* dest = (ushort16*) & data[y*pitch]; for (uint32 x = 0 ; x < w; x += 2) { uint32 g1 = *in++; uint32 g2 = *in++; // Shift up to match compressed precision dest[x] = (g1 | ((g2 & 0xf) << 8)) << 2; uint32 g3 = *in++; dest[x+1] = ((g2 >> 4) | (g3 << 4)) << 2; } } return; } ThrowRDE("Unsupported bit depth"); } void ArwDecoder::checkSupport(CameraMetaData *meta) { vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("ARW Support check: Model name found"); string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); this->checkCameraSupported(meta, make, model, ""); } void ArwDecoder::decodeMetaData(CameraMetaData *meta) { //Default mRaw->cfa.setCFA(CFA_RED, CFA_GREEN, CFA_GREEN2, CFA_BLUE); vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("ARW Meta Decoder: Model name found"); string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); setMetaData(meta, make, model, ""); } /* Since ARW2 compressed images have predictable offsets, we decode them threaded */ void ArwDecoder::decodeThreaded(RawDecoderThread * t) { uchar8* data = mRaw->getData(); uint32 pitch = mRaw->pitch; uint32 w = mRaw->dim.x; BitPumpPlain bits(in); for (uint32 y = t->start_y; y < t->end_y; y++) { ushort16* dest = (ushort16*) & data[y*pitch]; // Realign bits.setAbsoluteOffset((w*8*y) >> 3); // Process 32 pixels (16x2) per loop. for (uint32 x = 0; x < w - 30;) { bits.checkPos(); int _max = bits.getBits(11); int _min = bits.getBits(11); int _imax = bits.getBits(4); int _imin = bits.getBits(4); int sh; for (sh = 0; sh < 4 && 0x80 << sh <= _max - _min; sh++); for (int i = 0; i < 16; i++) { int p; if (i == _imax) p = _max; else if (i == _imin) p = _min; else { p = (bits.getBits(7) << sh) + _min; if (p > 0x7ff) p = 0x7ff; } dest[x+i*2] = curve[p << 1]; } x += x & 1 ? 31 : 1; // Skip to next 32 pixels } } } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/FileIOException.h0000644000175000017500000000215111542726010021473 00000000000000#include "RawDecoderException.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #ifndef FILE_IOEXCEPTION_H #define FILE_IOEXCEPTION_H namespace RawSpeed { void ThrowFIE(const char* fmt, ...); class FileIOException: public RawDecoderException { public: FileIOException(const string); }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/BitPumpPlain.cpp0000644000175000017500000000534111526533650021420 00000000000000#include "StdAfx.h" #include "BitPumpPlain.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { /*** Used for entropy encoded sections ***/ #define BITS_PER_LONG (8*sizeof(uint32)) #define MIN_GET_BITS (BITS_PER_LONG-7) /* max value for long getBuffer */ BitPumpPlain::BitPumpPlain(ByteStream *s): buffer(s->getData()), size(8*s->getRemainSize()), off(0) { } BitPumpPlain::BitPumpPlain(const uchar8* _buffer, uint32 _size) : buffer(_buffer), size(_size*8), off(0) { } uint32 BitPumpPlain::getBit() { uint32 v = *(uint32*) & buffer[off>>3] >> (off & 7) & 1; off++; return v; } uint32 BitPumpPlain::getBits(uint32 nbits) { uint32 v = *(uint32*) & buffer[off>>3] >> (off & 7) & ((1 << nbits) - 1); off += nbits; return v; } uint32 BitPumpPlain::peekBit() { return *(uint32*)&buffer[off>>3] >> (off&7) & 1; } uint32 BitPumpPlain::peekBits(uint32 nbits) { return *(uint32*)&buffer[off>>3] >> (off&7) & ((1 << nbits) - 1); } uint32 BitPumpPlain::peekByte() { return *(uint32*)&buffer[off>>3] >> (off&7) & 0xff; } uint32 BitPumpPlain::getBitSafe() { checkPos(); return *(uint32*)&buffer[off>>3] >> (off&7) & 1; } uint32 BitPumpPlain::getBitsSafe(unsigned int nbits) { checkPos(); return *(uint32*)&buffer[off>>3] >> (off&7) & ((1 << nbits) - 1); } void BitPumpPlain::skipBits(unsigned int nbits) { off += nbits; checkPos(); } uchar8 BitPumpPlain::getByte() { uint32 v = *(uint32*) & buffer[off>>3] >> (off & 7) & 0xff; off += 8; return v; } uchar8 BitPumpPlain::getByteSafe() { uint32 v = *(uint32*) & buffer[off>>3] >> (off & 7) & 0xff; off += 8; checkPos(); return v; } void BitPumpPlain::setAbsoluteOffset(unsigned int offset) { if (offset >= size) throw IOException("Offset set out of buffer"); off = offset * 8; } BitPumpPlain::~BitPumpPlain(void) { } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/BlackArea.h0000644000175000017500000000230611542726010020314 00000000000000#ifndef BLACK_AREA_H #define BLACK_AREA_H /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class BlackArea { public: BlackArea(int offset, int size, bool isVertical); virtual ~BlackArea(void); uint32 offset; // Offset in bayer pixels. uint32 size; // Size in bayer pixels. bool isVertical; // Otherwise horizontal }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffTag.h0000644000175000017500000002505011526533650020044 00000000000000// Authors: // Larry Ewing // // // Copyright (C) 2004 - 2006 Novell, Inc (http://www.novell.com) // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to // permit persons to whom the Software is furnished to do so, subject to // the following conditions: // The above copyright notice and this permission notice shall be // included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. namespace RawSpeed { typedef enum { INTEROPERABILITYINDEX = 0x0001, INTEROPERABILITYVERSION = 0x0002, NEWSUBFILETYPE = 0x00FE, SUBFILETYPE = 0x00FF, IMAGEWIDTH = 0x0100, IMAGELENGTH = 0x0101, BITSPERSAMPLE = 0x0102, COMPRESSION = 0x0103, PHOTOMETRICINTERPRETATION = 0x0106, FILLORDER = 0x010A, DOCUMENTNAME = 0x010D, IMAGEDESCRIPTION = 0x010E, MAKE = 0x010F, MODEL = 0x0110, STRIPOFFSETS = 0x0111, ORIENTATION = 0x0112, SAMPLESPERPIXEL = 0x0115, ROWSPERSTRIP = 0x0116, STRIPBYTECOUNTS = 0x0117, PANASONIC_STRIPOFFSET = 0x118, XRESOLUTION = 0x011A, YRESOLUTION = 0x011B, PLANARCONFIGURATION = 0x011C, T4OPTIONS = 0x0124, T6OPTIONS = 0x0125, RESOLUTIONUNIT = 0x0128, TRANSFERFUNCTION = 0x012D, SOFTWARE = 0x0131, DATETIME = 0x0132, ARTIST = 0x013B, WHITEPOINT = 0x013E, PRIMARYCHROMATICITIES = 0x013F, HALFTONEHINTS = 0x0141, // TILED IMAGES TILEWIDTH = 0x0142, TILELENGTH = 0x0143, TILEOFFSETS = 0x0144, TILEBYTECOUNTS = 0x0145, SUBIFDS = 0x014A, // TIFF-EP // CMYK IMAGES INKSET = 0x014C, NUMBEROFINKS = 0x014E, INKNAMES = 0x014D, DOTRANGE = 0x0150, TARGETPRINTER = 0x0151, EXTRASAMPLES = 0x0152, SAMPLEFORMAT = 0x0153, SMINSAMPLEVALUE = 0x0154, SMAXSAMPLEVALUE = 0x0155, TRANSFERRANGE = 0x0156, CLIPPATH = 0x0157, // TIFF PAGEMAKER TECHNOTE #2. JPEGTABLES = 0x015B, // TIFF-EP JPEGPROC = 0x0200, JPEGINTERCHANGEFORMAT = 0x0201, JPEGINTERCHANGEFORMATLENGTH = 0x0202, JPEGRESTARTINTERVAL = 0x0203, JPEGLOSSLESSPREDICTORS = 0x0205, JPEGPOINTTRANSFORMS = 0x0206, JPEGQTABLES = 0x0207, JPEGDCTABLES = 0x0208, JPEGACTABLES = 0x0209, YCBCRCOEFFICIENTS = 0x0211, YCBCRSUBSAMPLING = 0x0212, YCBCRPOSITIONING = 0x0213, REFERENCEBLACKWHITE = 0x0214, RELATEDIMAGEFILEFORMAT = 0x1000, RELATEDIMAGEWIDTH = 0x1001, RELATEDIMAGELENGTH = 0x1002, CFAREPEATPATTERNDIM = 0x828D, CFAPATTERN = 0x828E, BATTERYLEVEL = 0x828F, COPYRIGHT = 0x8298, EXPOSURETIME = 0x829A, FNUMBER = 0x829D, // THESE ARE FROM THE NIFF SPEC AND ONLY REALLY VALID WHEN THE HEADER BEGINS WITH IIN1 // SEE THE NIFFTAG ENUM FOR THE SPECIFCATION SPECIFIC NAMES ROTATION = 0x82B9, NAVYCOMPRESSION = 0x82BA, TILEINDEX = 0x82BB, // END NIFF SPECIFIC IPTCNAA = 0x83BB, PHOTOSHOPPRIVATE = 0x8649, EXIFIFDPOINTER = 0x8769, INTERCOLORPROFILE = 0x8773, EXPOSUREPROGRAM = 0x8822, SPECTRALSENSITIVITY = 0x8824, GPSINFOIFDPOINTER = 0x8825, ISOSPEEDRATINGS = 0x8827, OECF = 0x8828, EXIFVERSION = 0x9000, DATETIMEORIGINAL = 0x9003, DATETIMEDIGITIZED = 0x9004, COMPONENTSCONFIGURATION = 0x9101, COMPRESSEDBITSPERPIXEL = 0x9102, SHUTTERSPEEDVALUE = 0x9201, APERTUREVALUE = 0x9202, BRIGHTNESSVALUE = 0x9203, EXPOSUREBIASVALUE = 0x9204, MAXAPERTUREVALUE = 0x9205, SUBJECTDISTANCE = 0x9206, METERINGMODE = 0x9207, LIGHTSOURCE = 0x9208, FLASH = 0x9209, FOCALLENGTH = 0x920A, FLASHENERGY_TIFFEP = 0x920B,// TIFF-EP SPACIALFREQUENCYRESPONSE = 0x920C,// TIFF-EP NOISE = 0x920D,// TIFF-EP FOCALPLANEXRESOLUTION_TIFFEP = 0x920E,// TIFF-EP FOCALPLANEYRESOLUTION_TIFFEP = 0x920F,// TIFF-EP FOCALPLANERESOLUTIONUNIT_TIFFEP = 0x9210,// TIFF-EP IMAGENAME = 0x9211,// TIFF-EP SECURITYCLASSIFICATION = 0x9212,// TIFF-EP IMAGEHISTORY = 0x9213, // TIFF-EP NULL SEPARATED LIST SUBJECTAREA = 0x9214, EXPOSUREINDEX_TIFFEP = 0x9215, // TIFF-EP TIFFEPSTANDARDID = 0x9216, // TIFF-EP SENSINGMETHOD_TIFFEP = 0x9217, // TIFF-EP MAKERNOTE = 0x927C, USERCOMMENT = 0x9286, SUBSECTIME = 0x9290, SUBSECTIMEORIGINAL = 0x9291, SUBSECTIMEDIGITIZED = 0x9292, FLASHPIXVERSION = 0xA000, COLORSPACE = 0xA001, PIXELXDIMENSION = 0xA002, PIXELYDIMENSION = 0xA003, RELATEDSOUNDFILE = 0xA004, INTEROPERABILITYIFDPOINTER = 0xA005, FLASHENERGY = 0xA20B, SPATIALFREQUENCYRESPONSE = 0xA20C, FOCALPLANEXRESOLUTION = 0xA20E, FOCALPLANEYRESOLUTION = 0xA20F, FOCALPLANERESOLUTIONUNIT = 0xA210, SUBJECTLOCATION = 0xA214, EXPOSUREINDEX = 0xA215, SENSINGMETHOD = 0xA217, FILESOURCE = 0xA300, SCENETYPE = 0xA301, EXIFCFAPATTERN = 0xA302, CUSTOMRENDERED = 0xA401, EXPOSUREMODE = 0xA402, WHITEBALANCE = 0xA403, DIGITALZOOMRATIO = 0xA404, FOCALLENGTHIN35MMFILM = 0xA405, SCENECAPTURETYPE = 0xA406, GAINCONTROL = 0xA407, CONTRAST = 0xA408, SATURATION = 0xA409, SHARPNESS = 0xA40A, DEVICESETTINGDESCRIPTION = 0xA40B, SUBJECTDISTANCERANGE = 0xA40C, IMAGEUNIQUEID = 0xA420, // THE FOLLOWING IDS ARE NOT DESCRIBED THE EXIF SPEC #ifndef GAMMA GAMMA = 0xA500, #endif // THE XMP SPEC DECLARES THAT XMP DATA SHOULD LIVE 0x2BC WHEN // EMBEDDED IN TIFF IMAGES. XMP = 0x02BC, // Canon tag for uncompressed RGB preview CANON_UNCOMPRESSED = 0xC5D9, // FROM THE DNG SPEC DNGVERSION = 0xC612, // IFD0 DNGBACKWARDVERSION = 0xC613, // IFD0 UNIQUECAMERAMODEL = 0xC614, // IFD0 LOCALIZEDCAMERAMODEL = 0xC615, // IFD0 CFAPLANECOLOR = 0xC616, // RAWIFD CFALAYOUT = 0xC617, // RAWIFD LINEARIZATIONTABLE = 0xC618, // RAWIFD BLACKLEVELREPEATDIM = 0xC619, // RAWIFD BLACKLEVEL = 0xC61A, // RAWIFD BLACKLEVELDELTAH = 0xC61B, // RAWIFD BLACKLEVELDELTAV = 0xC61C, // RAWIFD WHITELEVEL = 0xC61D, // RAWIFD DEFAULTSCALE = 0xC61E, // RAWIFD DEFAULTCROPORIGIN = 0xC61F, // RAWIFD DEFAULTCROPSIZE = 0xC620, // RAWIFD COLORMATRIX1 = 0xC621, // IFD0 COLORMATRIX2 = 0xC622, // IFD0 CAMERACALIBRATION1 = 0xC623, // IFD0 CAMERACALIBRATION2 = 0xC624, // IFD0 REDUCTIONMATRIX1 = 0xC625, // IFD0 REDUCTIONMATRIX2 = 0xC626, // IFD0 ANALOGBALANCE = 0xC627, // IFD0 ASSHOTNETURAL = 0xC628, // IFD0 ASSHOTWHITEXY = 0xC629, // IFD0 BASELINEEXPOSURE = 0xC62A, // IFD0 BASELINENOISE = 0xC62B, // IFD0 BASELINESHARPNESS = 0xC62C, // IFD0 BAYERGREESPIT = 0xC62D, // IFD0 LINEARRESPONSELIMIT = 0xC62E, // IFD0 CAMERASERIALNUMBER = 0xC62F, // IFD0 LENSINFO = 0xC630, // IFD0 CHROMABLURRADIUS = 0xC631, // RAWIFD ANTIALIASSTRENGTH = 0xC632, // RAWIFD DNGPRIVATEDATA = 0xC634, // IFD0 MAKERNOTESAFETY = 0xC635, // IFD0 // THE SPEC SAYS BESTQUALITYSCALE IS 0xC635 BUT IT APPEARS TO BE WRONG //BESTQUALITYSCALE = 0xC635, // RAWIFD BESTQUALITYSCALE = 0xC65C, // RAWIFD THIS LOOKS LIKE THE CORRECT VALUE SHADOWSCALE = 50739, RAWDATAUNIQUEID = 50781, ORIGINALRAWFILENAME = 50827, ORIGINALRAWFILEDATA = 50828, ACTIVEAREA = 50829, MASKEDAREAS = 50830, ASSHOTICCPROFILE = 50831, ASSHOTPREPROFILEMATRIX = 50832, CURRENTICCPROFILE = 50833, CURRENTPREPROFILEMATRIX = 50834, COLORIMETRICREFERENCE = 50879, KODAKKDCPRIVATEIFD = 65024, CAMERACALIBRATIONSIGNATURE = 0xC6F3, PROFILECALIBRATIONSIGNATURE = 0xC6F4, EXTRACAMERAPROFILES = 0xC6F5, ASSHOTPROFILENAME = 0xC6F6, NOISEREDUCTIONAPPLIED = 0xC6F7, PROFILENAME = 0xC6F8, PROFILEHUESATMAPDIMS = 0xC6F9, PROFILEHUESATMAPDATA1 = 0xC6FA, PROFILEHUESATMAPDATA2 = 0xC6FB, PROFILETONECURVE = 0xC6FC, PROFILEEMBEDPOLICY = 0xC6FD, PROFILECOPYRIGHT = 0xC6FE, FORWARDMATRIX1 = 0xC714, FORWARDMATRIX2 = 0xC715, PREVIEWAPPLICATIONNAME = 0xC716, PREVIEWAPPLICATIONVERSION = 0xC717, PREVIEWSETTINGSNAME = 0xC718, PREVIEWSETTINGSDIGEST = 0xC719, PREVIEWCOLORSPACE = 0xC71A, PREVIEWDATETIME = 0xC71B, RAWIMAGEDIGEST = 0xC71C, ORIGINALRAWFILEDIGEST = 0xC71D, SUBTILEBLOCKSIZE = 0xC71E, ROWINTERLEAVEFACTOR = 0xC71F, PROFILELOOKTABLEDIMS = 0xC725, PROFILELOOKTABLEDATA = 0xC726, OPCODELIST1 = 0xC740, OPCODELIST2 = 0xC741, OPCODELIST3 = 0xC742, NOISEPROFILE = 0xC761, CANONCR2SLICE = 0xC640, // CANON CR2 CALIBRATIONILLUMINANT1 = 0xC65A, // IFD0 CALIBRATIONILLUMINANT2 = 0xC65B, // IFD0 SONY_CURVE = 28688, SONY_OFFSET = 29184, SONY_LENGTH = 29185, SONY_KEY = 29217, // PRINT IMAGE MATCHING DATA PIMIFDPOINTER = 0xC4A5 } TiffTag; } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/DngDecoder.cpp0000644000175000017500000004634111542727130021053 00000000000000#include "StdAfx.h" #include "DngDecoder.h" #include /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { DngDecoder::DngDecoder(TiffIFD *rootIFD, FileMap* file) : RawDecoder(file), mRootIFD(rootIFD) { vector data = mRootIFD->getIFDsWithTag(DNGVERSION); const uchar8* v = data[0]->getEntry(DNGVERSION)->getData(); if (v[0] != 1) ThrowRDE("Not a supported DNG image format: v%u.%u.%u.%u", (int)v[0], (int)v[1], (int)v[2], (int)v[3]); if (v[1] > 3) ThrowRDE("Not a supported DNG image format: v%u.%u.%u.%u", (int)v[0], (int)v[1], (int)v[2], (int)v[3]); if ((v[0] <= 1) && (v[1] < 1)) // Prior to v1.1.xxx fix LJPEG encoding bug mFixLjpeg = true; else mFixLjpeg = false; } DngDecoder::~DngDecoder(void) { } RawImage DngDecoder::decodeRaw() { vector data = mRootIFD->getIFDsWithTag(COMPRESSION); if (data.empty()) ThrowRDE("DNG Decoder: No image data found"); // Erase the ones not with JPEG compression for (vector::iterator i = data.begin(); i != data.end();) { int compression = (*i)->getEntry(COMPRESSION)->getShort(); bool isSubsampled = false; try { isSubsampled = (*i)->getEntry(NEWSUBFILETYPE)->getInt() & 1; // bit 0 is on if image is subsampled } catch (TiffParserException) {} if ((compression != 7 && compression != 1) || isSubsampled) { // Erase if subsampled, or not JPEG or uncompressed i = data.erase(i); } else { i++; } } if (data.empty()) ThrowRDE("DNG Decoder: No RAW chunks found"); if (data.size() > 1) { _RPT0(0, "Multiple RAW chunks found - using first only!"); } TiffIFD* raw = data[0]; uint32 sample_format = 1; uint32 bps = raw->getEntry(BITSPERSAMPLE)->getInt(); if (raw->hasEntry(SAMPLEFORMAT)) sample_format = raw->getEntry(SAMPLEFORMAT)->getInt(); if (sample_format == 1) mRaw = RawImage::create(TYPE_USHORT16); else if (sample_format == 3) mRaw = RawImage::create(TYPE_FLOAT32); else ThrowRDE("DNG Decoder: Only 16 bit unsigned or float point data supported."); mRaw->isCFA = (raw->getEntry(PHOTOMETRICINTERPRETATION)->getShort() == 32803); if (mRaw->isCFA) _RPT0(0, "This is a CFA image\n"); else _RPT0(0, "This is NOT a CFA image\n"); if (sample_format == 1 && bps > 16) ThrowRDE("DNG Decoder: Integer precision larger than 16 bits currently not supported."); if (sample_format == 3 && bps != 32) ThrowRDE("DNG Decoder: Float point must be 32 bits per sample."); try { mRaw->dim.x = raw->getEntry(IMAGEWIDTH)->getInt(); mRaw->dim.y = raw->getEntry(IMAGELENGTH)->getInt(); } catch (TiffParserException) { ThrowRDE("DNG Decoder: Could not read basic image information."); } try { int compression = raw->getEntry(COMPRESSION)->getShort(); if (mRaw->isCFA) { // Check if layout is OK, if present if (raw->hasEntry(CFALAYOUT)) if (raw->getEntry(CFALAYOUT)->getShort() != 1) ThrowRDE("DNG Decoder: Unsupported CFA Layout."); const unsigned short* pDim = raw->getEntry(CFAREPEATPATTERNDIM)->getShortArray(); // Get the size const uchar8* cPat = raw->getEntry(CFAPATTERN)->getData(); // Does NOT contain dimensions as some documents state /* if (raw->hasEntry(CFAPLANECOLOR)) { TiffEntry* e = raw->getEntry(CFAPLANECOLOR); const unsigned char* cPlaneOrder = e->getData(); // Map from the order in the image, to the position in the CFA printf("Planecolor: "); for (uint32 i = 0; i < e->count; i++) { printf("%u,",cPlaneOrder[i]); } printf("\n"); } */ iPoint2D cfaSize(pDim[1], pDim[0]); if (pDim[0] != 2) ThrowRDE("DNG Decoder: Unsupported CFA configuration."); if (pDim[1] != 2) ThrowRDE("DNG Decoder: Unsupported CFA configuration."); if (cfaSize.area() != raw->getEntry(CFAPATTERN)->count) ThrowRDE("DNG Decoder: CFA pattern dimension and pattern count does not match: %d."); for (int y = 0; y < cfaSize.y; y++) { for (int x = 0; x < cfaSize.x; x++) { uint32 c1 = cPat[x+y*cfaSize.x]; CFAColor c2; switch (c1) { case 0: c2 = CFA_RED; break; case 1: c2 = CFA_GREEN; break; case 2: c2 = CFA_BLUE; break; default: c2 = CFA_UNKNOWN; ThrowRDE("DNG Decoder: Unsupported CFA Color."); } mRaw->cfa.setColorAt(iPoint2D(x, y), c2); } } } // Now load the image if (compression == 1) { // Uncompressed. try { if (!mRaw->isCFA) { uint32 cpp = raw->getEntry(SAMPLESPERPIXEL)->getInt(); ThrowRDE("DNG Decoder: More than 4 samples per pixel is not supported."); mRaw->setCpp(cpp); } uint32 nslices = raw->getEntry(STRIPOFFSETS)->count; TiffEntry *TEoffsets = raw->getEntry(STRIPOFFSETS); TiffEntry *TEcounts = raw->getEntry(STRIPBYTECOUNTS); const uint32* offsets = TEoffsets->getIntArray(); const uint32* counts = TEcounts->getIntArray(); uint32 yPerSlice = raw->getEntry(ROWSPERSTRIP)->getInt(); uint32 width = raw->getEntry(IMAGEWIDTH)->getInt(); uint32 height = raw->getEntry(IMAGELENGTH)->getInt(); if (TEcounts->count != TEoffsets->count) { ThrowRDE("DNG Decoder: Byte count number does not match strip size: count:%u, strips:%u ", TEcounts->count, TEoffsets->count); } uint32 offY = 0; vector slices; for (uint32 s = 0; s < nslices; s++) { DngStrip slice; slice.offset = offsets[s]; slice.count = counts[s]; slice.offsetY = offY; if (offY + yPerSlice > height) slice.h = height - offY; else slice.h = yPerSlice; offY += yPerSlice; if (mFile->isValid(slice.offset + slice.count)) // Only decode if size is valid slices.push_back(slice); } mRaw->createData(); for (uint32 i = 0; i < slices.size(); i++) { DngStrip slice = slices[i]; ByteStream in(mFile->getData(slice.offset), slice.count); iPoint2D size(width, slice.h); iPoint2D pos(0, slice.offsetY); bool big_endian = (raw->endian == big); // DNG spec says that if not 8 or 16 bit/sample, always use big endian if (bps != 8 && bps != 16) big_endian = true; try { readUncompressedRaw(in, size, pos, width*bps / 8, bps, big_endian); } catch(IOException ex) { if (i > 0) errors.push_back(_strdup(ex.what())); else ThrowRDE("DNG decoder: IO error occurred in first slice, unable to decode more. Error is: %s", ex.what()); } } } catch (TiffParserException) { ThrowRDE("DNG Decoder: Unsupported format, uncompressed with no strips."); } } else if (compression == 7) { try { // Let's try loading it as tiles instead if (!mRaw->isCFA) { mRaw->setCpp(raw->getEntry(SAMPLESPERPIXEL)->getInt()); } mRaw->createData(); if (sample_format != 1) ThrowRDE("DNG Decoder: Only 16 bit unsigned data supported for compressed data."); DngDecoderSlices slices(mFile, mRaw); if (raw->hasEntry(TILEOFFSETS)) { uint32 tilew = raw->getEntry(TILEWIDTH)->getInt(); uint32 tileh = raw->getEntry(TILELENGTH)->getInt(); if (!tilew || !tileh) ThrowRDE("DNG Decoder: Invalid tile size"); uint32 tilesX = (mRaw->dim.x + tilew - 1) / tilew; uint32 tilesY = (mRaw->dim.y + tileh - 1) / tileh; uint32 nTiles = tilesX * tilesY; TiffEntry *TEoffsets = raw->getEntry(TILEOFFSETS); const uint32* offsets = TEoffsets->getIntArray(); TiffEntry *TEcounts = raw->getEntry(TILEBYTECOUNTS); const uint32* counts = TEcounts->getIntArray(); if (TEoffsets->count != TEcounts->count || TEoffsets->count != nTiles) ThrowRDE("DNG Decoder: Tile count mismatch: offsets:%u count:%u, calculated:%u", TEoffsets->count, TEcounts->count, nTiles); slices.mFixLjpeg = mFixLjpeg; for (uint32 y = 0; y < tilesY; y++) { for (uint32 x = 0; x < tilesX; x++) { DngSliceElement e(offsets[x+y*tilesX], counts[x+y*tilesX], tilew*x, tileh*y); e.mUseBigtable = tilew * tileh > 1024 * 1024; slices.addSlice(e); } } } else { // Strips TiffEntry *TEoffsets = raw->getEntry(STRIPOFFSETS); TiffEntry *TEcounts = raw->getEntry(STRIPBYTECOUNTS); const uint32* offsets = TEoffsets->getIntArray(); const uint32* counts = TEcounts->getIntArray(); uint32 yPerSlice = raw->getEntry(ROWSPERSTRIP)->getInt(); if (TEcounts->count != TEoffsets->count) { ThrowRDE("DNG Decoder: Byte count number does not match strip size: count:%u, stips:%u ", TEcounts->count, TEoffsets->count); } if (yPerSlice == 0 || yPerSlice > (uint32)mRaw->dim.y) ThrowRDE("DNG Decoder: Invalid y per slice"); uint32 offY = 0; for (uint32 s = 0; s < TEcounts->count; s++) { DngSliceElement e(offsets[s], counts[s], 0, offY); e.mUseBigtable = yPerSlice * mRaw->dim.y > 1024 * 1024; offY += yPerSlice; if (mFile->isValid(e.byteOffset + e.byteCount)) // Only decode if size is valid slices.addSlice(e); } } uint32 nSlices = slices.size(); if (!nSlices) ThrowRDE("DNG Decoder: No valid slices found."); slices.startDecoding(); if (!slices.errors.empty()) errors = slices.errors; if (errors.size() >= nSlices) ThrowRDE("DNG Decoding: Too many errors encountered. Giving up.\nFirst Error:%s", errors[0]); } catch (TiffParserException e) { ThrowRDE("DNG Decoder: Unsupported format, tried strips and tiles:\n%s", e.what()); } } else { ThrowRDE("DNG Decoder: Unknown compression: %u", compression); } } catch (TiffParserException e) { ThrowRDE("DNG Decoder: Image could not be read:\n%s", e.what()); } iPoint2D new_size(mRaw->dim.x, mRaw->dim.y); // Crop if (raw->hasEntry(ACTIVEAREA)) { const uint32 *corners = raw->getEntry(ACTIVEAREA)->getIntArray(); if (iPoint2D(corners[1], corners[0]).isThisInside(mRaw->dim)) { if (iPoint2D(corners[3], corners[2]).isThisInside(mRaw->dim)) { iPoint2D top_left(corners[1], corners[0]); new_size = iPoint2D(corners[3] - corners[1], corners[2] - corners[0]); mRaw->subFrame(top_left, new_size); } } } else if (raw->hasEntry(DEFAULTCROPORIGIN)) { iPoint2D top_left(0, 0); if (raw->getEntry(DEFAULTCROPORIGIN)->type == TIFF_LONG) { const uint32* tl = raw->getEntry(DEFAULTCROPORIGIN)->getIntArray(); const uint32* sz = raw->getEntry(DEFAULTCROPSIZE)->getIntArray(); if (iPoint2D(tl[0], tl[1]).isThisInside(mRaw->dim) && iPoint2D(sz[0], sz[1]).isThisInside(mRaw->dim)) { top_left = iPoint2D(tl[0], tl[1]); new_size = iPoint2D(sz[0], sz[1]); } } else if (raw->getEntry(DEFAULTCROPORIGIN)->type == TIFF_SHORT) { const ushort16* tl = raw->getEntry(DEFAULTCROPORIGIN)->getShortArray(); const ushort16* sz = raw->getEntry(DEFAULTCROPSIZE)->getShortArray(); if (iPoint2D(tl[0], tl[1]).isThisInside(mRaw->dim) && iPoint2D(sz[0], sz[1]).isThisInside(mRaw->dim)) { top_left = iPoint2D(tl[0], tl[1]); new_size = iPoint2D(sz[0], sz[1]); } } mRaw->subFrame(top_left, new_size); if (top_left.x %2 == 1) mRaw->cfa.shiftLeft(); if (top_left.y %2 == 1) mRaw->cfa.shiftDown(); } // Linearization if (raw->hasEntry(LINEARIZATIONTABLE)) { const ushort16* intable = raw->getEntry(LINEARIZATIONTABLE)->getShortArray(); uint32 len = raw->getEntry(LINEARIZATIONTABLE)->count; ushort16 table[65536]; for (uint32 i = 0; i < 65536 ; i++) { if (i < len) table[i] = intable[i]; else table[i] = intable[len-1]; } for (int y = 0; y < mRaw->dim.y; y++) { uint32 cw = mRaw->dim.x * mRaw->getCpp(); ushort16* pixels = (ushort16*)mRaw->getData(0, y); for (uint32 x = 0; x < cw; x++) { pixels[x] = table[pixels[x]]; } } } // Default white level is (2 ** BitsPerSample) - 1 mRaw->whitePoint = (1 >> raw->getEntry(BITSPERSAMPLE)->getShort()) - 1; if (raw->hasEntry(WHITELEVEL)) { TiffEntry *whitelevel = raw->getEntry(WHITELEVEL); if (whitelevel->isInt()) mRaw->whitePoint = whitelevel->getInt(); } // Set black setBlack(raw); return mRaw; } void DngDecoder::decodeMetaData(CameraMetaData *meta) { } void DngDecoder::checkSupport(CameraMetaData *meta) { vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("DNG Support check: Model name found"); // We set this, since DNG's are not explicitly added. failOnUnknown = FALSE; string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); this->checkCameraSupported(meta, make, model, "dng"); } /* Decodes DNG masked areas into blackareas in the image */ bool DngDecoder::decodeMaskedAreas(TiffIFD* raw) { TiffEntry *masked = raw->getEntry(MASKEDAREAS); int nrects = masked->count/4; if (0 == nrects) return FALSE; /* Since we may both have short or int, copy it to int array. */ int *rects = new int[nrects*4]; if (masked->type == TIFF_SHORT) { const ushort16* r = masked->getShortArray(); for (int i = 0; i< nrects*4; i++) rects[i] = r[i]; } else if (masked->type == TIFF_LONG) { const uint32* r = masked->getIntArray(); for (int i = 0; i< nrects*4; i++) rects[i] = r[i]; } else { delete[] rects; return FALSE; } iPoint2D top = mRaw->getCropOffset(); for (int i=0; i= (mRaw->dim.x+top.x)) mRaw->blackAreas.push_back(BlackArea(topleft.y, bottomright.y-topleft.y, FALSE)); // Is it a vertical box, only add it if it covers the active height of the image else if (topleft.y <= top.y && bottomright.y >= (mRaw->dim.y+top.y)) { mRaw->blackAreas.push_back(BlackArea(topleft.x, bottomright.x-topleft.x, TRUE)); } } delete[] rects; return !!mRaw->blackAreas.size(); } bool DngDecoder::decodeBlackLevels(TiffIFD* raw) { iPoint2D blackdim(1,1); if (raw->hasEntry(BLACKLEVELREPEATDIM)) { const ushort16 *dim = raw->getEntry(BLACKLEVELREPEATDIM)->getShortArray(); blackdim = iPoint2D(dim[0], dim[1]); } if (blackdim.x == 0 || blackdim.y == 0) return FALSE; if (!raw->hasEntry(BLACKLEVEL)) return TRUE; if (mRaw->getCpp() != 1) return FALSE; TiffEntry* black_entry = raw->getEntry(BLACKLEVEL); const uint32* iblackarray = NULL; const ushort16* sblackarray = NULL; if (black_entry->type == TIFF_SHORT) sblackarray = black_entry->getShortArray(); else iblackarray = black_entry->getIntArray(); if (blackdim.x < 2 || blackdim.y < 2) { // We so not have enough to fill all individually, read a single and copy it for (int y = 0; y < 2; y++) { for (int x = 0; x < 2; x++) { int offset = 0; if (black_entry->type == TIFF_RATIONAL) { if (iblackarray[offset*2+1]) mRaw->blackLevelSeparate[y*2+x] = iblackarray[offset*2] / iblackarray[offset*2+1]; else mRaw->blackLevelSeparate[y*2+x] = 0; } else if (black_entry->type == TIFF_LONG) { mRaw->blackLevelSeparate[y*2+x] = iblackarray[offset]; } else if (black_entry->type == TIFF_SHORT) { mRaw->blackLevelSeparate[y*2+x] = sblackarray[offset]; } } } } else { for (int y = 0; y < 2; y++) { for (int x = 0; x < 2; x++) { int offset = y*blackdim.x+x; if (black_entry->type == TIFF_RATIONAL) { if (iblackarray[offset*2+1]) mRaw->blackLevelSeparate[y*2+x] = iblackarray[offset*2] / iblackarray[offset*2+1]; else mRaw->blackLevelSeparate[y*2+x] = 0; } else if (black_entry->type == TIFF_LONG) { mRaw->blackLevelSeparate[y*2+x] = iblackarray[offset]; } else if (black_entry->type == TIFF_SHORT) { mRaw->blackLevelSeparate[y*2+x] = sblackarray[offset]; } } } } // DNG Spec says we must add black in deltav and deltah if (raw->hasEntry(BLACKLEVELDELTAV)) { const int *blackarrayv = (const int*)raw->getEntry(BLACKLEVELDELTAV)->getIntArray(); float black_sum[2] = {0.0f, 0.0f}; for (int i = 0; i < mRaw->dim.y; i++) if (blackarrayv[i*2+1]) black_sum[i&1] += blackarrayv[i*2] / blackarrayv[i*2+1]; for (int i = 0; i < 4; i++) mRaw->blackLevelSeparate[i] += (int)(black_sum[i>>1] / (float)mRaw->dim.y * 2.0f); } if (raw->hasEntry(BLACKLEVELDELTAH)){ const int *blackarrayh = (const int*)raw->getEntry(BLACKLEVELDELTAH)->getIntArray(); float black_sum[2] = {0.0f, 0.0f}; for (int i = 0; i < mRaw->dim.x; i++) if (blackarrayh[i*2+1]) black_sum[i&1] += blackarrayh[i*2] / blackarrayh[i*2+1]; for (int i = 0; i < 4; i++) mRaw->blackLevelSeparate[i] += (int)(black_sum[i&1] / (float)mRaw->dim.x * 2.0f); } return TRUE; } void DngDecoder::setBlack(TiffIFD* raw) { if (raw->hasEntry(MASKEDAREAS)) if (decodeMaskedAreas(raw)) return; // Black defaults to 0 memset(mRaw->blackLevelSeparate,0,sizeof(mRaw->blackLevelSeparate)); if (raw->hasEntry(BLACKLEVEL)) decodeBlackLevels(raw); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffIFDBE.h0000644000175000017500000000216111542726010020130 00000000000000#ifndef TIFF_IFDBE_H #define TIFF_IFDBE_H #include "TiffIFD.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class TiffIFDBE : public TiffIFD { public: TiffIFDBE(); TiffIFDBE(FileMap* f, uint32 offset); virtual ~TiffIFDBE(void); }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/ByteStream.cpp0000644000175000017500000000454411526533650021137 00000000000000#include "StdAfx.h" #include "ByteStream.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { ByteStream::ByteStream(const uchar8* _buffer, uint32 _size) : buffer(_buffer), size(_size), off(0) { } ByteStream::ByteStream(const ByteStream *b) : buffer(b->buffer), size(b->size), off(b->off) { } ByteStream::~ByteStream(void) { } uint32 ByteStream::peekByte() { return buffer[off]; } void ByteStream::skipBytes(uint32 nbytes) { off += nbytes; if (off > size) throw IOException("Skipped out of buffer"); } uchar8 ByteStream::getByte() { if (off >= size) throw IOException("getByte:Out of buffer read"); return buffer[off++]; } ushort16 ByteStream::getShort() { if (off + 1 >= size) throw IOException("getShort: Out of buffer read"); return *(ushort16*)&buffer[off+=4]; uint32 a = buffer[off++]; uint32 b = buffer[off++]; // !!! ENDIAN SWAP return (a << 8) | b; } int ByteStream::getInt() { if (off + 4 >= size) throw IOException("getInt:Out of buffer read"); return *(int*)&buffer[off+=4]; } void ByteStream::setAbsoluteOffset(uint32 offset) { if (offset >= size) throw IOException("setAbsoluteOffset:Offset set out of buffer"); off = offset; } void ByteStream::skipToMarker() { int c = 0; while (!(buffer[off] == 0xFF && buffer[off+1] != 0)) { off++; c++; if (off >= size) throw IOException("No marker found inside rest of buffer"); } // _RPT1(0,"Skipped %u bytes.\n", c); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/CameraMetaData.cpp0000644000175000017500000000617411526533650021652 00000000000000#include "StdAfx.h" #include "CameraMetaData.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { CameraMetaData::CameraMetaData(char *docname) { ctxt = xmlNewParserCtxt(); if (ctxt == NULL) { ThrowCME("CameraMetaData:Could not initialize context."); } xmlResetLastError(); doc = xmlCtxtReadFile(ctxt, docname, NULL, XML_PARSE_DTDVALID); if (doc == NULL) { ThrowCME("CameraMetaData: XML Document could not be parsed successfully. Error was: %s", ctxt->lastError.message); } if (ctxt->valid == 0) { if (ctxt->lastError.code == 0x5e) { printf("CameraMetaData: Unable to locate DTD, attempting to ignore."); } else { ThrowCME("CameraMetaData: XML file does not validate. DTD Error was: %s", ctxt->lastError.message); } } xmlNodePtr cur; cur = xmlDocGetRootElement(doc); if (xmlStrcmp(cur->name, (const xmlChar *) "Cameras")) { ThrowCME("CameraMetaData: XML document of the wrong type, root node is not cameras."); return; } cur = cur->xmlChildrenNode; while (cur != NULL) { if ((!xmlStrcmp(cur->name, (const xmlChar *)"Camera"))) { Camera *camera = new Camera(doc, cur); addCamera(camera); // Create cameras for aliases. for (uint32 i = 0; i < camera->aliases.size(); i++) { addCamera(new Camera(camera, i)); } } cur = cur->next; } if (doc) xmlFreeDoc(doc); doc = 0; if (ctxt) xmlFreeParserCtxt(ctxt); ctxt = 0; } CameraMetaData::~CameraMetaData(void) { map::iterator i = cameras.begin(); for (; i != cameras.end(); i++) { delete((*i).second); } if (doc) xmlFreeDoc(doc); doc = 0; if (ctxt) xmlFreeParserCtxt(ctxt); ctxt = 0; } Camera* CameraMetaData::getCamera(string make, string model, string mode) { string id = string(make).append(model).append(mode); if (cameras.end() == cameras.find(id)) return NULL; return cameras[id]; } void CameraMetaData::addCamera( Camera* cam ) { string id = string(cam->make).append(cam->model).append(cam->mode); if (cameras.end() != cameras.find(id)) printf("CameraMetaData: Duplicate entry found for camera: %s %s, Skipping!\n", cam->make.c_str(), cam->model.c_str()); else cameras[id] = cam; } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/LJpegDecompressor.cpp0000644000175000017500000004274111526533650022450 00000000000000#include "StdAfx.h" #include "LJpegDecompressor.h" #include "ByteStreamSwap.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ /* * Huffman table generation: * LJpegDecompressor::HuffDecode, * LJpegDecompressor::createHuffmanTable * and used data structures are originally grabbed from the IJG software, * and adapted by Hubert Figuiere. * * Copyright (C) 1991, 1992, Thomas G. Lane. * Part of the Independent JPEG Group's software. * See the file Copyright for more details. * * Copyright (c) 1993 Brian C. Smith, The Regents of the University * of California * All rights reserved. * * Copyright (c) 1994 Kongji Huang and Brian C. Smith. * Cornell University * All rights reserved. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose, without fee, and without written agreement is * hereby granted, provided that the above copyright notice and the following * two paragraphs appear in all copies of this software. * * IN NO EVENT SHALL CORNELL UNIVERSITY BE LIABLE TO ANY PARTY FOR * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT * OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF CORNELL * UNIVERSITY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * CORNELL UNIVERSITY SPECIFICALLY DISCLAIMS ANY WARRANTIES, * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS * ON AN "AS IS" BASIS, AND CORNELL UNIVERSITY HAS NO OBLIGATION TO * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. */ namespace RawSpeed { const uint32 bitMask[] = { 0xffffffff, 0x7fffffff, 0x3fffffff, 0x1fffffff, 0x0fffffff, 0x07ffffff, 0x03ffffff, 0x01ffffff, 0x00ffffff, 0x007fffff, 0x003fffff, 0x001fffff, 0x000fffff, 0x0007ffff, 0x0003ffff, 0x0001ffff, 0x0000ffff, 0x00007fff, 0x00003fff, 0x00001fff, 0x00000fff, 0x000007ff, 0x000003ff, 0x000001ff, 0x000000ff, 0x0000007f, 0x0000003f, 0x0000001f, 0x0000000f, 0x00000007, 0x00000003, 0x00000001 }; LJpegDecompressor::LJpegDecompressor(FileMap* file, RawImage img): mFile(file), mRaw(img) { input = 0; skipX = skipY = 0; for (int i = 0; i < 4; i++) { huff[i].initialized = false; huff[i].bigTable = 0; } mDNGCompatible = false; slicesW.clear(); mUseBigtable = false; } LJpegDecompressor::~LJpegDecompressor(void) { if (input) delete input; input = 0; for (int i = 0; i < 4; i++) { if (huff[i].bigTable) _aligned_free(huff[i].bigTable); } } void LJpegDecompressor::getSOF(SOFInfo* sof, uint32 offset, uint32 size) { if (!mFile->isValid(offset + size - 1)) ThrowRDE("LJpegDecompressor::getSOF: Start offset plus size is longer than file. Truncated file."); try { Endianness host_endian = getHostEndianness(); // JPEG is big endian if (host_endian == big) input = new ByteStream(mFile->getData(offset), size); else input = new ByteStreamSwap(mFile->getData(offset), size); if (getNextMarker(false) != M_SOI) ThrowRDE("LJpegDecompressor::getSOF: Image did not start with SOI. Probably not an LJPEG"); while (true) { JpegMarker m = getNextMarker(true); if (M_SOF3 == m) { parseSOF(sof); return; } if (M_EOI == m) { ThrowRDE("LJpegDecompressor: Could not locate Start of Frame."); return; } } } catch (IOException) { ThrowRDE("LJpegDecompressor: IO exception, read outside file. Corrupt File."); } } void LJpegDecompressor::startDecoder(uint32 offset, uint32 size, uint32 offsetX, uint32 offsetY) { if (!mFile->isValid(offset + size - 1)) ThrowRDE("LJpegDecompressor::startDecoder: Start offset plus size is longer than file. Truncated file."); if ((int)offsetX >= mRaw->dim.x) ThrowRDE("LJpegDecompressor::startDecoder: X offset outside of image"); if ((int)offsetY >= mRaw->dim.y) ThrowRDE("LJpegDecompressor::startDecoder: Y offset outside of image"); offX = offsetX; offY = offsetY; try { Endianness host_endian = getHostEndianness(); // JPEG is big endian if (host_endian == big) input = new ByteStream(mFile->getData(offset), size); else input = new ByteStreamSwap(mFile->getData(offset), size); if (getNextMarker(false) != M_SOI) ThrowRDE("LJpegDecompressor::startDecoder: Image did not start with SOI. Probably not an LJPEG"); // _RPT0(0,"Found SOI marker\n"); bool moreImage = true; while (moreImage) { JpegMarker m = getNextMarker(true); switch (m) { case M_SOS: // _RPT0(0,"Found SOS marker\n"); parseSOS(); break; case M_EOI: // _RPT0(0,"Found EOI marker\n"); moreImage = false; break; case M_DHT: // _RPT0(0,"Found DHT marker\n"); parseDHT(); break; case M_DQT: ThrowRDE("LJpegDecompressor: Not a valid RAW file."); break; case M_DRI: // _RPT0(0,"Found DRI marker\n"); break; case M_APP0: // _RPT0(0,"Found APP0 marker\n"); break; case M_SOF3: // _RPT0(0,"Found SOF 3 marker:\n"); parseSOF(&frame); break; default: // Just let it skip to next marker _RPT1(0, "Found marker:0x%x. Skipping\n", (int)m); break; } } } catch (IOException) { throw; } } void LJpegDecompressor::parseSOF(SOFInfo* sof) { uint32 headerLength = input->getShort(); sof->prec = input->getByte(); sof->h = input->getShort(); sof->w = input->getShort(); sof->cps = input->getByte(); if (sof->prec > 16) ThrowRDE("LJpegDecompressor: More than 16 bits per channel is not supported."); if (sof->cps > 4 || sof->cps < 2) ThrowRDE("LJpegDecompressor: Only from 2 to 4 components are supported."); if (headerLength != 8 + sof->cps*3) ThrowRDE("LJpegDecompressor: Header size mismatch."); for (uint32 i = 0; i < sof->cps; i++) { sof->compInfo[i].componentId = input->getByte(); uint32 subs = input->getByte(); frame.compInfo[i].superV = subs & 0xf; frame.compInfo[i].superH = subs >> 4; uint32 Tq = input->getByte(); if (Tq != 0) ThrowRDE("LJpegDecompressor: Quantized components not supported."); } sof->initialized = true; } void LJpegDecompressor::parseSOS() { if (!frame.initialized) ThrowRDE("LJpegDecompressor::parseSOS: Frame not yet initialized (SOF Marker not parsed)"); uint32 headerLength = input->getShort(); uint32 soscps = input->getByte(); if (frame.cps != soscps) ThrowRDE("LJpegDecompressor::parseSOS: Component number mismatch."); for (uint32 i = 0;i < frame.cps;i++) { uint32 cs = input->getByte(); uint32 count = 0; // Find the correct component while (frame.compInfo[count].componentId != cs) { if (count >= frame.cps) ThrowRDE("LJpegDecompressor::parseSOS: Invalid Component Selector"); count++; } uint32 b = input->getByte(); uint32 td = b >> 4; if (td > 3) ThrowRDE("LJpegDecompressor::parseSOS: Invalid Huffman table selection"); if (!huff[td].initialized) ThrowRDE("LJpegDecompressor::parseSOS: Invalid Huffman table selection, not defined."); frame.compInfo[count].dcTblNo = td; } // Get predictor pred = input->getByte(); if (pred > 7) ThrowRDE("LJpegDecompressor::parseSOS: Invalid predictor mode."); input->skipBytes(1); // Se + Ah Not used in LJPEG uint32 b = input->getByte(); Pt = b & 0xf; // Point Transform uint32 cheadersize = 3 + frame.cps * 2 + 3; _ASSERTE(cheadersize == headerLength); bits = new BitPumpJPEG(input); try { decodeScan(); } catch (...) { delete bits; throw; } input->skipBytes(bits->getOffset()); delete bits; } void LJpegDecompressor::parseDHT() { uint32 headerLength = input->getShort() - 2; // Subtract myself while (headerLength) { uint32 b = input->getByte(); uint32 Tc = (b >> 4); if (Tc != 0) ThrowRDE("LJpegDecompressor::parseDHT: Unsupported Table class."); uint32 Th = b & 0xf; if (Th > 3) ThrowRDE("LJpegDecompressor::parseDHT: Invalid huffman table destination id."); uint32 acc = 0; HuffmanTable* t = &huff[Th]; if (t->initialized) ThrowRDE("LJpegDecompressor::parseDHT: Duplicate table definition"); for (uint32 i = 0; i < 16 ;i++) { t->bits[i+1] = input->getByte(); acc += t->bits[i+1]; } t->bits[0] = 0; memset(t->huffval, 0, sizeof(t->huffval)); if (acc > 256) ThrowRDE("LJpegDecompressor::parseDHT: Invalid DHT table."); if (headerLength < 1 + 16 + acc) ThrowRDE("LJpegDecompressor::parseDHT: Invalid DHT table length."); for (uint32 i = 0 ; i < acc; i++) { t->huffval[i] = input->getByte(); } createHuffmanTable(t); headerLength -= 1 + 16 + acc; } } JpegMarker LJpegDecompressor::getNextMarker(bool allowskip) { if (!allowskip) { uchar8 id = input->getByte(); if (id != 0xff) ThrowRDE("LJpegDecompressor::getNextMarker: (Noskip) Expected marker not found. Propably corrupt file."); JpegMarker mark = (JpegMarker)input->getByte(); if (M_FILL == mark || M_STUFF == mark) ThrowRDE("LJpegDecompressor::getNextMarker: (Noskip) Expected marker, but found stuffed 00 or ff."); return mark; } input->skipToMarker(); uchar8 id = input->getByte(); _ASSERTE(0xff == id); JpegMarker mark = (JpegMarker)input->getByte(); return mark; } void LJpegDecompressor::createHuffmanTable(HuffmanTable *htbl) { int p, i, l, lastp, si; char huffsize[257]; ushort16 huffcode[257]; ushort16 code; int size; int value, ll, ul; /* * Figure C.1: make table of Huffman code length for each symbol * Note that this is in code-length order. */ p = 0; for (l = 1; l <= 16; l++) { for (i = 1; i <= (int)htbl->bits[l]; i++) { huffsize[p++] = (char)l; if (p > 256) ThrowRDE("LJpegDecompressor::createHuffmanTable: Code length too long. Corrupt data."); } } huffsize[p] = 0; lastp = p; /* * Figure C.2: generate the codes themselves * Note that this is in code-length order. */ code = 0; si = huffsize[0]; p = 0; while (huffsize[p]) { while (((int)huffsize[p]) == si) { huffcode[p++] = code; code++; } code <<= 1; si++; if (p > 256) ThrowRDE("createHuffmanTable: Code length too long. Corrupt data."); } /* * Figure F.15: generate decoding tables */ htbl->mincode[0] = 0; htbl->maxcode[0] = 0; p = 0; for (l = 1; l <= 16; l++) { if (htbl->bits[l]) { htbl->valptr[l] = p; htbl->mincode[l] = huffcode[p]; p += htbl->bits[l]; htbl->maxcode[l] = huffcode[p - 1]; } else { htbl->valptr[l] = 0xff; // This check must be present to avoid crash on junk htbl->maxcode[l] = -1; } if (p > 256) ThrowRDE("createHuffmanTable: Code length too long. Corrupt data."); } /* * We put in this value to ensure HuffDecode terminates. */ htbl->maxcode[17] = 0xFFFFFL; /* * Build the numbits, value lookup tables. * These table allow us to gather 8 bits from the bits stream, * and immediately lookup the size and value of the huffman codes. * If size is zero, it means that more than 8 bits are in the huffman * code (this happens about 3-4% of the time). */ memset(htbl->numbits, 0, sizeof(htbl->numbits)); for (p = 0; p < lastp; p++) { size = huffsize[p]; if (size <= 8) { value = htbl->huffval[p]; code = huffcode[p]; ll = code << (8 - size); if (size < 8) { ul = ll | bitMask[24+size]; } else { ul = ll; } if (ul > 256 || ll > ul) ThrowRDE("createHuffmanTable: Code length too long. Corrupt data."); for (i = ll; i <= ul; i++) { htbl->numbits[i] = size | (value << 4); } } } if (mUseBigtable) createBigTable(htbl); htbl->initialized = true; } /************************************ * Bitable creation * * This is expanding the concept of fast lookups * * A complete table for 14 arbitrary bits will be * created that enables fast lookup of number of bits used, * and final delta result. * Hit rate is about 90-99% for typical LJPEGS, usually about 98% * ************************************/ void LJpegDecompressor::createBigTable(HuffmanTable *htbl) { const uint32 bits = 14; // HuffDecode functions must be changed, if this is modified. const uint32 size = 1 << bits; int rv = 0; int temp; uint32 l; htbl->bigTable = (int*)_aligned_malloc(size * sizeof(int), 16); for (uint32 i = 0; i < size; i++) { ushort16 input = i << 2; // Calculate input value int code = input >> 8; // Get 8 bits uint32 val = htbl->numbits[code]; l = val & 15; if (l) { rv = val >> 4; } else { l = 8; while (code > htbl->maxcode[l]) { temp = input >> (15 - l) & 1; code = (code << 1) | temp; l++; } /* * With garbage input we may reach the sentinel value l = 17. */ if (l > frame.prec || htbl->valptr[l] == 0xff) { htbl->bigTable[i] = 0xff; continue; } else { rv = htbl->huffval[htbl->valptr[l] + ((int)(code - htbl->mincode[l]))]; } } if (rv == 16) { if (mDNGCompatible) htbl->bigTable[i] = (-32768 << 8) | (16 + l); else htbl->bigTable[i] = (-32768 << 8) | l; continue; } if (rv + l > bits) { htbl->bigTable[i] = 0xff; continue; } if (rv) { int x = input >> (16 - l - rv) & ((1 << rv) - 1); if ((x & (1 << (rv - 1))) == 0) x -= (1 << rv) - 1; htbl->bigTable[i] = (x << 8) | (l + rv); } else { htbl->bigTable[i] = l; } } } /* *-------------------------------------------------------------- * * HuffDecode -- * * Taken from Figure F.16: extract next coded symbol from * input stream. This should becode a macro. * * Results: * Next coded symbol * * Side effects: * Bitstream is parsed. * *-------------------------------------------------------------- */ int LJpegDecompressor::HuffDecode(HuffmanTable *htbl) { int rv; int temp; int code, val; uint32 l; /** * First attempt to do complete decode, by using the first 14 bits */ bits->fill(); code = bits->peekBitsNoFill(14); if (htbl->bigTable) { val = htbl->bigTable[code]; if ((val&0xff) != 0xff) { bits->skipBitsNoFill(val&0xff); return val >> 8; } } /* * If the huffman code is less than 8 bits, we can use the fast * table lookup to get its value. It's more than 8 bits about * 3-4% of the time. */ rv = 0; code = code>>6; val = htbl->numbits[code]; l = val & 15; if (l) { bits->skipBitsNoFill(l); rv = val >> 4; } else { bits->skipBitsNoFill(8); l = 8; while (code > htbl->maxcode[l]) { temp = bits->getBitNoFill(); code = (code << 1) | temp; l++; } /* * With garbage input we may reach the sentinel value l = 17. */ if (l > frame.prec || htbl->valptr[l] == 0xff) { ThrowIOE("Corrupt JPEG data: bad Huffman code:%u", l); } else { rv = htbl->huffval[htbl->valptr[l] + ((int)(code - htbl->mincode[l]))]; } } if (rv == 16) { if (mDNGCompatible) bits->skipBitsNoFill(16); return -32768; } // Ensure we have enough bits if ((rv + l) > 24) { if (rv > 16) // There is no values above 16 bits. ThrowIOE("Corrupt JPEG data: Too many bits requested."); else bits->fill(); } /* * Section F.2.2.1: decode the difference and * Figure F.12: extend sign bit */ if (rv) { int x = bits->getBitsNoFill(rv); if ((x & (1 << (rv - 1))) == 0) x -= (1 << rv) - 1; return x; } return 0; } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/LJpegPlain.h0000644000175000017500000000304011542726010020470 00000000000000#ifndef LJPEG_PLAIN_H #define LJPEG_PLAIN_H #include "LJpegDecompressor.h" #include "BitPumpMSB.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { /****************** * Decompresses Lossless non subsampled JPEGs, with 2-4 components *****************/ class LJpegPlain : public LJpegDecompressor { public: LJpegPlain(FileMap* file, RawImage img); virtual ~LJpegPlain(void); protected: virtual void decodeScan(); private: void decodeScanLeft4Comps(); void decodeScanLeft2Comps(); void decodeScanLeft3Comps(); void decodeScanLeftGeneric(); void decodeScanLeft4_2_0(); void decodeScanLeft4_2_2(); uint32 *offset; int* slice_width; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/PentaxDecompressor.cpp0000644000175000017500000001355411526533650022706 00000000000000#include "StdAfx.h" #include "PentaxDecompressor.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { PentaxDecompressor::PentaxDecompressor(FileMap* file, RawImage img) : LJpegDecompressor(file, img) { pentaxBits = 0; } PentaxDecompressor::~PentaxDecompressor(void) { if (pentaxBits) delete(pentaxBits); pentaxBits = 0; } void PentaxDecompressor::decodePentax(TiffIFD *root, uint32 offset, uint32 size) { // Prepare huffmann table 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 = 16 entries static const uchar8 pentax_tree[] = { 0, 2, 3, 1, 1, 1, 1, 1, 1, 2, 0, 0, 0, 0, 0, 0, 3, 4, 2, 5, 1, 6, 0, 7, 8, 9, 10, 11, 12 }; // 0 1 2 3 4 5 6 7 8 9 0 1 2 = 13 entries HuffmanTable *dctbl1 = &huff[0]; /* Attempt to read huffman table, if found in makernote */ if (root->hasEntryRecursive((TiffTag)0x220)) { TiffEntry *t = root->getEntryRecursive((TiffTag)0x220); if (t->type == TIFF_UNDEFINED) { const uchar8* data = t->getData(); uint32 depth = (data[1]+12)&0xf; data +=14; uint32 v0[16]; uint32 v1[16]; uint32 v2[16]; for (uint32 i = 0; i < depth; i++) v0[i] = (uint32)(data[i*2])<<8 | (uint32)(data[i*2+1]); data+=depth*2; for (uint32 i = 0; i < depth; i++) v1[i] = data[i]; /* Reset bits */ for (uint32 i = 0; i < 17; i++) dctbl1->bits[i] = 0; /* Calculate codes and store bitcounts */ for (uint32 c = 0; c < depth; c++) { v2[c] = v0[c]>>(12-v1[c]); dctbl1->bits[v1[c]]++; } /* Find smallest */ for (uint32 i = 0; i < depth; i++) { uint32 sm_val = 0xfffffff; uint32 sm_num = 0xff; for (uint32 j = 0; j < depth; j++) { if(v2[j]<=sm_val) { sm_num = j; sm_val = v2[j]; } } dctbl1->huffval[i] = sm_num; v2[sm_num]=0xffffffff; } } } else { /* Initialize with legacy data */ uint32 acc = 0; for (uint32 i = 0; i < 16 ;i++) { dctbl1->bits[i+1] = pentax_tree[i]; acc += dctbl1->bits[i+1]; } dctbl1->bits[0] = 0; for (uint32 i = 0 ; i < acc; i++) { dctbl1->huffval[i] = pentax_tree[i+16]; } } mUseBigtable = true; createHuffmanTable(dctbl1); pentaxBits = new BitPumpMSB(mFile->getData(offset), size); uchar8 *draw = mRaw->getData(); ushort16 *dest; uint32 w = mRaw->dim.x; uint32 h = mRaw->dim.y; int pUp1[2] = {0, 0}; int pUp2[2] = {0, 0}; int pLeft1 = 0; int pLeft2 = 0; for (uint32 y = 0;y < h;y++) { pentaxBits->checkPos(); dest = (ushort16*) & draw[y*mRaw->pitch]; // Adjust destination pUp1[y&1] += HuffDecodePentax(); pUp2[y&1] += HuffDecodePentax(); dest[0] = pLeft1 = pUp1[y&1]; dest[1] = pLeft2 = pUp2[y&1]; for (uint32 x = 2; x < w ; x += 2) { pLeft1 += HuffDecodePentax(); pLeft2 += HuffDecodePentax(); dest[x] = pLeft1; dest[x+1] = pLeft2; _ASSERTE(pLeft1 >= 0 && pLeft1 <= (65536)); _ASSERTE(pLeft2 >= 0 && pLeft2 <= (65536)); } } } /* *-------------------------------------------------------------- * * HuffDecode -- * * Taken from Figure F.16: extract next coded symbol from * input stream. This should becode a macro. * * Results: * Next coded symbol * * Side effects: * Bitstream is parsed. * *-------------------------------------------------------------- */ int PentaxDecompressor::HuffDecodePentax() { int rv; int l, temp; int code, val; HuffmanTable *dctbl1 = &huff[0]; /* * If the huffman code is less than 8 bits, we can use the fast * table lookup to get its value. It's more than 8 bits about * 3-4% of the time. */ pentaxBits->fill(); code = pentaxBits->peekBitsNoFill(14); val = dctbl1->bigTable[code]; if ((val&0xff) != 0xff) { pentaxBits->skipBitsNoFill(val&0xff); return val >> 8; } rv = 0; code = pentaxBits->peekByteNoFill(); val = dctbl1->numbits[code]; l = val & 15; if (l) { pentaxBits->skipBitsNoFill(l); rv = val >> 4; } else { pentaxBits->skipBits(8); l = 8; while (code > dctbl1->maxcode[l]) { temp = pentaxBits->getBitNoFill(); code = (code << 1) | temp; l++; } /* * With garbage input we may reach the sentinel value l = 17. */ if (l > 12) { ThrowIOE("Corrupt JPEG data: bad Huffman code:%u\n", l); } else { rv = dctbl1->huffval[dctbl1->valptr[l] + ((int)(code - dctbl1->mincode[l]))]; } } if (rv == 16) return -32768; /* * Section F.2.2.1: decode the difference and * Figure F.12: extend sign bit */ if (rv) { int x = pentaxBits->getBits(rv); if ((x & (1 << (rv - 1))) == 0) x -= (1 << rv) - 1; return x; } return 0; } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/ColorFilterArray.cpp0000644000175000017500000000741111526533650022277 00000000000000#include "StdAfx.h" #include "ColorFilterArray.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { ColorFilterArray::ColorFilterArray(void) { setCFA(CFA_UNKNOWN, CFA_UNKNOWN, CFA_UNKNOWN, CFA_UNKNOWN); } ColorFilterArray::ColorFilterArray(CFAColor up_left, CFAColor up_right, CFAColor down_left, CFAColor down_right) { cfa[0] = up_left; cfa[1] = up_right; cfa[2] = down_left; cfa[3] = down_right; } ColorFilterArray::~ColorFilterArray(void) { } void ColorFilterArray::setCFA(CFAColor up_left, CFAColor up_right, CFAColor down_left, CFAColor down_right) { cfa[0] = up_left; cfa[1] = up_right; cfa[2] = down_left; cfa[3] = down_right; } void ColorFilterArray::setCFA(uchar8 dcrawCode) { cfa[0] = (CFAColor)(dcrawCode & 0x3); cfa[1] = (CFAColor)((dcrawCode >> 2) & 0x3); cfa[2] = (CFAColor)((dcrawCode >> 4) & 0x3); cfa[3] = (CFAColor)((dcrawCode >> 6) & 0x3); } uint32 ColorFilterArray::getDcrawFilter() { if (cfa[0] > 3 || cfa[1] > 3 || cfa[2] > 3 || cfa[3] > 3) ThrowRDE("getDcrawFilter: Invalid colors defined."); uint32 v = cfa[0] | cfa[1] << 2 | cfa[2] << 4 | cfa[3] << 6; return v | (v << 8) | (v << 16) | (v << 24); } std::string ColorFilterArray::asString() { string s("Upper left:"); s += colorToString(cfa[0]); s.append(" * Upper right:"); s += colorToString(cfa[1]); s += ("\nLower left:"); s += colorToString(cfa[2]); s.append(" * Lower right:"); s += colorToString(cfa[3]); s.append("\n"); s += string("CFA_") + colorToString(cfa[0]) + string(", CFA_") + colorToString(cfa[1]); s += string(", CFA_") + colorToString(cfa[2]) + string(", CFA_") + colorToString(cfa[3]) + string("\n"); return s; } std::string ColorFilterArray::colorToString(CFAColor c) { switch (c) { case CFA_RED: return string("RED"); case CFA_GREEN: return string("GREEN"); case CFA_BLUE: return string("BLUE"); case CFA_GREEN2: return string("GREEN2"); case CFA_CYAN: return string("CYAN"); case CFA_MAGENTA: return string("MAGENTA"); case CFA_YELLOW: return string("YELLOW"); case CFA_WHITE: return string("WHITE"); default: return string("UNKNOWN"); } } void ColorFilterArray::setColorAt(iPoint2D pos, CFAColor c) { if (pos.x > 1 || pos.x < 0) ThrowRDE("ColorFilterArray::SetColor: position out of CFA pattern"); if (pos.y > 1 || pos.y < 0) ThrowRDE("ColorFilterArray::SetColor: position out of CFA pattern"); cfa[pos.x+pos.y*2] = c; // _RPT2(0, "cfa[%u] = %u\n",pos.x+pos.y*2, c); } void ColorFilterArray::shiftLeft() { CFAColor tmp1 = cfa[0]; CFAColor tmp2 = cfa[2]; cfa[0] = cfa[1]; cfa[2] = cfa[3]; cfa[1] = tmp1; cfa[3] = tmp2; } void ColorFilterArray::shiftDown() { CFAColor tmp1 = cfa[0]; CFAColor tmp2 = cfa[1]; cfa[0] = cfa[2]; cfa[1] = cfa[3]; cfa[2] = tmp1; cfa[3] = tmp2; } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/ByteStream.h0000644000175000017500000000311611542726010020566 00000000000000/* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #ifndef BYTE_STREAM_H #define BYTE_STREAM_H #include "IOException.h" namespace RawSpeed { class ByteStream { public: ByteStream(const uchar8* _buffer, uint32 _size); ByteStream(const ByteStream* b); ~ByteStream(void); uint32 peekByte(); uint32 getOffset() {return off;} void skipBytes(uint32 nbytes); uchar8 getByte(); void setAbsoluteOffset(uint32 offset); void skipToMarker(); uint32 getRemainSize() { return size-off;} const uchar8* getData() {return &buffer[off];} virtual ushort16 getShort(); virtual int getInt(); protected: const uchar8* buffer; const uint32 size; // This if the end of buffer. uint32 off; // Offset in bytes (this is next byte to deliver) }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffParserException.cpp0000644000175000017500000000267411526533650023006 00000000000000#include "StdAfx.h" #include "TiffParserException.h" #if !defined(WIN32) || defined(__MINGW32__) #include #define vsprintf_s(...) vsnprintf(__VA_ARGS__) #endif /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { TiffParserException::TiffParserException(const string _msg) : runtime_error(_msg) { _RPT1(0, "TIFF Exception: %s\n", _msg.c_str()); }; void ThrowTPE(const char* fmt, ...) { va_list val; va_start(val, fmt); char buf[8192]; vsprintf_s(buf, 8192, fmt, val); va_end(val); _RPT1(0, "EXCEPTION: %s\n", buf); throw TiffParserException(buf); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/BitPumpMSB.h0000644000175000017500000001001511542726010020425 00000000000000/* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #ifndef BIT_PUMP_MSB_H #define BIT_PUMP_MSB_H #include "ByteStream.h" #define BITS_PER_LONG (8*sizeof(uint32)) #define MIN_GET_BITS (BITS_PER_LONG-7) /* max value for long getBuffer */ namespace RawSpeed { // Note: Allocated buffer MUST be at least size+sizeof(uint32) large. class BitPumpMSB { public: BitPumpMSB(ByteStream *s); BitPumpMSB(const uchar8* _buffer, uint32 _size ); uint32 getBitsSafe(uint32 nbits); uint32 getBitSafe(); uchar8 getByteSafe(); void setAbsoluteOffset(uint32 offset); // Set offset in bytes __inline uint32 getOffset() { return off-(mLeft>>3);} __inline void checkPos() { if (off>size) throw IOException("Out of buffer read");}; // Check if we have a valid position __inline uint32 getBitNoFill() {return (mCurr >> (--mLeft)) & 1;} __inline uint32 peekByteNoFill() {return ((mCurr >> (mLeft-8))) & 0xff; } __inline uint32 getBitsNoFill(uint32 nbits) {return ((mCurr >> (mLeft -= (nbits)))) & ((1 << nbits) - 1);} __inline uint32 peekBitsNoFill(uint32 nbits) {return ((mCurr >> (mLeft-nbits))) & ((1 << nbits) - 1); } // Fill the buffer with at least 24 bits __inline void fill() { unsigned char c, c2, c3; int m = mLeft >> 3; if (mLeft > 23) return; if (m == 2) { // 16 to 23 bits left, we can add 1 byte c = buffer[off++]; mCurr = (mCurr << 8) | c; mLeft += 8; return; } if (m == 1) { // 8 to 15 bits left, we can add 2 bytes c = buffer[off++]; c2 = buffer[off++]; mCurr = (mCurr << 16) | (c<<8) | c2; mLeft += 16; return; } // 0 to 7 bits left, we can add 3 bytes c = buffer[off++]; c2 = buffer[off++]; c3 = buffer[off++]; mCurr = (mCurr << 24) | (c<<16) | (c2<<8) | c3; mLeft += 24; } __inline uint32 getBit() { if (!mLeft) fill(); return (mCurr >> (--mLeft)) & 1; } __inline uint32 getBits(uint32 nbits) { if (mLeft < nbits) { fill(); } return ((mCurr >> (mLeft -= (nbits)))) & ((1 << nbits) - 1); } __inline uint32 peekBit() { if (!mLeft) fill(); return (mCurr >> (mLeft - 1)) & 1; } __inline uint32 peekBits(uint32 nbits) { if (mLeft < nbits) { fill(); } return ((mCurr >> (mLeft - nbits))) & ((1 << nbits) - 1); } __inline uint32 peekByte() { if (mLeft < 8) { fill(); } if (off > size) throw IOException("Out of buffer read"); return ((mCurr >> (mLeft - 8))) & 0xff; } __inline void skipBits(unsigned int nbits) { while (nbits) { fill(); checkPos(); int n = MIN(nbits, mLeft); mLeft -= n; nbits -= n; } } __inline void skipBitsNoFill(unsigned int nbits) { mLeft -= nbits; } __inline unsigned char getByte() { if (mLeft < 8) { fill(); } return ((mCurr >> (mLeft -= 8))) & 0xff; } virtual ~BitPumpMSB(void); protected: void __inline init(); const uchar8* buffer; const uint32 size; // This if the end of buffer. uint32 mLeft; uint32 mCurr; uint32 off; // Offset in bytes private: }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/BitPumpMSB32.cpp0000644000175000017500000000426011526533650021142 00000000000000#include "StdAfx.h" #include "BitPumpMSB32.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { /*** Used for entropy encoded sections, for now only Nikon Coolpix ***/ BitPumpMSB32::BitPumpMSB32(ByteStream *s): buffer(s->getData()), size(s->getRemainSize() + sizeof(uint32)), mLeft(0), mCurr(0), off(0) { init(); } BitPumpMSB32::BitPumpMSB32(const uchar8* _buffer, uint32 _size) : buffer(_buffer), size(_size + sizeof(uint32)), mLeft(0), mCurr(0), off(0) { init(); } __inline void BitPumpMSB32::init() { fill(); } void BitPumpMSB32::fill() { uint32 c, c2, c3, c4; if (mLeft >= MIN_GET_BITS) return; c = buffer[off++]; c2 = buffer[off++]; c3 = buffer[off++]; c4 = buffer[off++]; mCurr <<= 32; mCurr |= (c4 << 24) | (c3<<16) | (c2<<8) | c; mLeft += 32; } uint32 BitPumpMSB32::getBitsSafe(unsigned int nbits) { if (nbits > MIN_GET_BITS) throw IOException("Too many bits requested"); if (mLeft < nbits) { fill(); checkPos(); } return (uint32)((mCurr >> (mLeft -= (nbits))) & ((1 << nbits) - 1)); } void BitPumpMSB32::setAbsoluteOffset(unsigned int offset) { if (offset >= size) throw IOException("Offset set out of buffer"); mLeft = 0; mCurr = 0; off = offset; fill(); } BitPumpMSB32::~BitPumpMSB32(void) { } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/FileIOException.cpp0000644000175000017500000000260211526533650022037 00000000000000#include "StdAfx.h" #include "FileIOException.h" #if !defined(WIN32) || defined(__MINGW32__) #include #define vsprintf_s(...) vsnprintf(__VA_ARGS__) #endif /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { FileIOException::FileIOException(const string error) : RawDecoderException(error) { } void ThrowFIE(const char* fmt, ...) { va_list val; va_start(val, fmt); char buf[8192]; vsprintf_s(buf, 8192, fmt, val); va_end(val); _RPT1(0, "EXCEPTION: %s\n", buf); throw FileIOException(buf); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/CameraMetadataException.h0000644000175000017500000000222311542726010023215 00000000000000/* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #ifndef CAMERA_METADATA_EXCEPTION_H #define CAMERA_METADATA_EXCEPTION_H namespace RawSpeed { void ThrowCME(const char* fmt, ...); class CameraMetadataException : public std::runtime_error { public: CameraMetadataException(const string _msg); }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/StdAfx.cpp0000644000175000017500000000207311526533650020244 00000000000000// stdafx.cpp : source file that includes just the standard includes // CR2-reader.pch will be the pre-compiled header // stdafx.obj will contain the pre-compiled type information #include "StdAfx.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ rawstudio-2.0/plugins/load-rawspeed/rawspeed/FileMap.cpp0000644000175000017500000000414311541412541020360 00000000000000#include "StdAfx.h" #include "FileMap.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { FileMap::FileMap(uint32 _size) : size(_size) { if (!size) throw FileIOException("Filemap of 0 bytes not possible"); data = (uchar8*)_aligned_malloc(size + 4, 16); if (!data) { throw FileIOException("Not enough memory to open file."); } mOwnAlloc = true; } FileMap::FileMap(uchar8* _data, uint32 _size): data(_data), size(_size) { mOwnAlloc = false; } FileMap::~FileMap(void) { if (data && mOwnAlloc) { _aligned_free(data); } data = 0; size = 0; } FileMap* FileMap::clone() { FileMap *new_map = new FileMap(size); memcpy(new_map->data, data, size); return new_map; } FileMap* FileMap::cloneRandomSize() { uint32 new_size = (rand() | (rand() << 15)) % size; FileMap *new_map = new FileMap(new_size); memcpy(new_map->data, data, new_size); return new_map; } void FileMap::corrupt(int errors) { for (int i = 0; i < errors; i++) { uint32 pos = (rand() | (rand() << 15)) % size; data[pos] = rand() & 0xff; } } const uchar8* FileMap::getData( uint32 offset ) { if (offset >= size) throw IOException("FileMap: Attempting to read out of file."); return &data[offset]; } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/NikonDecompressor.h0000644000175000017500000000401611542726010022153 00000000000000#ifndef NIKON_DECOMPRESSOR_H #define NIKON_DECOMPRESSOR_H #include "LJpegDecompressor.h" #include "BitPumpMSB.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class NikonDecompressor : public LJpegDecompressor { public: NikonDecompressor(FileMap* file, RawImage img ); public: virtual ~NikonDecompressor(void); void DecompressNikon(ByteStream *meta, uint32 w, uint32 h, uint32 bitsPS, uint32 offset, uint32 size); private: void initTable(uint32 huffSelect); int HuffDecodeNikon(); uint32 curve[0xffff]; BitPumpMSB *bits; }; static const uchar8 nikon_tree[][32] = { { 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0, /* 12-bit lossy */ 5,4,3,6,2,7,1,0,8,9,11,10,12 }, { 0,1,5,1,1,1,1,1,1,2,0,0,0,0,0,0, /* 12-bit lossy after split */ 0x39,0x5a,0x38,0x27,0x16,5,4,3,2,1,0,11,12,12 }, { 0,1,4,2,3,1,2,0,0,0,0,0,0,0,0,0, /* 12-bit lossless */ 5,4,6,3,7,2,8,1,9,0,10,11,12 }, { 0,1,4,3,1,1,1,1,1,2,0,0,0,0,0,0, /* 14-bit lossy */ 5,6,4,7,8,3,9,2,1,0,10,11,12,13,14 }, { 0,1,5,1,1,1,1,1,1,1,2,0,0,0,0,0, /* 14-bit lossy after split */ 8,0x5c,0x4b,0x3a,0x29,7,6,5,4,3,2,1,0,13,14 }, { 0,1,4,2,2,3,1,2,0,0,0,0,0,0,0,0, /* 14-bit lossless */ 7,6,8,5,9,4,10,3,11,12,2,0,1,13,14 } }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/SrwDecoder.h0000644000175000017500000000250211542726010020546 00000000000000#ifndef SRW_DECODER_H #define SRW_DECODER_H #include "RawDecoder.h" #include "LJpegPlain.h" #include "TiffIFD.h" #include "BitPumpPlain.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009-2010 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class SrwDecoder : public RawDecoder { public: SrwDecoder(TiffIFD *rootIFD, FileMap* file); virtual ~SrwDecoder(void); virtual RawImage decodeRaw(); virtual void decodeMetaData(CameraMetaData *meta); virtual void checkSupport(CameraMetaData *meta); private: TiffIFD *mRootIFD; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/RawDecoder.cpp0000644000175000017500000002270411542727130021071 00000000000000#include "StdAfx.h" #include "RawDecoder.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { RawDecoder::RawDecoder(FileMap* file) : mRaw(RawImage::create()), mFile(file) { decoderVersion = 0; failOnUnknown = FALSE; } RawDecoder::~RawDecoder(void) { for (uint32 i = 0 ; i < errors.size(); i++) { free((void*)errors[i]); } errors.clear(); } void RawDecoder::decodeUncompressed(TiffIFD *rawIFD, bool MSBOrder) { uint32 nslices = rawIFD->getEntry(STRIPOFFSETS)->count; const uint32 *offsets = rawIFD->getEntry(STRIPOFFSETS)->getIntArray(); const uint32 *counts = rawIFD->getEntry(STRIPBYTECOUNTS)->getIntArray(); uint32 yPerSlice = rawIFD->getEntry(ROWSPERSTRIP)->getInt(); uint32 width = rawIFD->getEntry(IMAGEWIDTH)->getInt(); uint32 height = rawIFD->getEntry(IMAGELENGTH)->getInt(); uint32 bitPerPixel = rawIFD->getEntry(BITSPERSAMPLE)->getInt(); vector slices; uint32 offY = 0; for (uint32 s = 0; s < nslices; s++) { RawSlice slice; slice.offset = offsets[s]; slice.count = counts[s]; if (offY + yPerSlice > height) slice.h = height - offY; else slice.h = yPerSlice; offY += yPerSlice; if (mFile->isValid(slice.offset + slice.count)) // Only decode if size is valid slices.push_back(slice); } if (0 == slices.size()) ThrowRDE("RAW Decoder: No valid slices found. File probably truncated."); mRaw->dim = iPoint2D(width, offY); mRaw->createData(); mRaw->whitePoint = (1<getData(slice.offset), slice.count); iPoint2D size(width, slice.h); iPoint2D pos(0, offY); bitPerPixel = (int)((uint64)(slice.count * 8) / (slice.h * width)); try { readUncompressedRaw(in, size, pos, width*bitPerPixel / 8, bitPerPixel, MSBOrder); } catch (RawDecoderException e) { if (i>0) errors.push_back(_strdup(e.what())); else throw; } catch (IOException e) { if (i>0) errors.push_back(_strdup(e.what())); else ThrowRDE("RAW decoder: IO error occurred in first slice, unable to decode more. Error is: %s", e.what()); } offY += slice.h; } } void RawDecoder::readUncompressedRaw(ByteStream &input, iPoint2D& size, iPoint2D& offset, int inputPitch, int bitPerPixel, bool MSBOrder) { uchar8* data = mRaw->getData(); uint32 outPitch = mRaw->pitch; uint32 w = size.x; uint32 h = size.y; uint32 cpp = mRaw->getCpp(); if (input.getRemainSize() < (inputPitch*h)) { if ((int)input.getRemainSize() > inputPitch) h = input.getRemainSize() / inputPitch - 1; else ThrowIOE("readUncompressedRaw: Not enough data to decode a single line. Image file truncated."); } if (bitPerPixel > 16 && mRaw->getDataType() == TYPE_USHORT16) ThrowRDE("readUncompressedRaw: Unsupported bit depth"); uint32 skipBits = inputPitch - w * bitPerPixel / 8; // Skip per line if (offset.y > mRaw->dim.y) ThrowRDE("readUncompressedRaw: Invalid y offset"); if (offset.x + size.x > mRaw->dim.x) ThrowRDE("readUncompressedRaw: Invalid x offset"); uint32 y = offset.y; h = MIN(h + (uint32)offset.y, (uint32)mRaw->dim.y); if (mRaw->getDataType() == TYPE_FLOAT32) { if (bitPerPixel != 32) ThrowRDE("readUncompressedRaw: Only 32 bit float point supported"); BitBlt(&data[offset.x*sizeof(float)*cpp+y*outPitch], outPitch, input.getData(), inputPitch, w*mRaw->getBpp(), h - y); return; } if (MSBOrder) { BitPumpMSB bits(&input); w *= cpp; for (; y < h; y++) { ushort16* dest = (ushort16*) & data[offset.x*sizeof(ushort16)*cpp+y*outPitch]; bits.checkPos(); for (uint32 x = 0 ; x < w; x++) { uint32 b = bits.getBits(bitPerPixel); dest[x] = b; } bits.skipBits(skipBits); } } else { if (bitPerPixel == 16 && getHostEndianness() == little) { BitBlt(&data[offset.x*sizeof(ushort16)*cpp+y*outPitch], outPitch, input.getData(), inputPitch, w*mRaw->getBpp(), h - y); return; } if (bitPerPixel == 12 && (int)w == inputPitch * 8 / 12 && getHostEndianness() == little) { Decode12BitRaw(input, w, h); return; } BitPumpPlain bits(&input); w *= cpp; for (; y < h; y++) { ushort16* dest = (ushort16*) & data[offset.x*sizeof(ushort16)+y*outPitch]; bits.checkPos(); for (uint32 x = 0 ; x < w; x++) { uint32 b = bits.getBits(bitPerPixel); dest[x] = b; } bits.skipBits(skipBits); } } } void RawDecoder::Decode12BitRaw(ByteStream &input, uint32 w, uint32 h) { uchar8* data = mRaw->getData(); uint32 pitch = mRaw->pitch; const uchar8 *in = input.getData(); if (input.getRemainSize() < ((w*12/8)*h)) { if ((uint32)input.getRemainSize() > (w*12/8)) h = input.getRemainSize() / (w*12/8) - 1; else ThrowIOE("readUncompressedRaw: Not enough data to decode a single line. Image file truncated."); } for (uint32 y = 0; y < h; y++) { ushort16* dest = (ushort16*) & data[y*pitch]; for (uint32 x = 0 ; x < w; x += 2) { uint32 g1 = *in++; uint32 g2 = *in++; dest[x] = g1 | ((g2 & 0xf) << 8); uint32 g3 = *in++; dest[x+1] = (g2 >> 4) | (g3 << 4); } } } bool RawDecoder::checkCameraSupported(CameraMetaData *meta, string make, string model, string mode) { TrimSpaces(make); TrimSpaces(model); Camera* cam = meta->getCamera(make, model, mode); if (!cam) { if (mode.length() == 0) printf("Unable to find camera in database: %s %s %s\n", make.c_str(), model.c_str(), mode.c_str()); if (failOnUnknown) ThrowRDE("Camera not supported, and not allowed to guess. Sorry."); // Assume the camera can be decoded, but return false, so decoders can see that we are unsure. return false; } if (!cam->supported) ThrowRDE("Camera not supported (explicit). Sorry."); if (cam->decoderVersion > decoderVersion) ThrowRDE("Camera not supported in this version. Update RawSpeed for support."); hints = cam->hints; return true; } void RawDecoder::setMetaData(CameraMetaData *meta, string make, string model, string mode) { TrimSpaces(make); TrimSpaces(model); Camera *cam = meta->getCamera(make, model, mode); if (!cam) { printf("Unable to find camera in database: %s %s %s\nPlease upload file to ftp.rawstudio.org, thanks!\n", make.c_str(), model.c_str(), mode.c_str()); return; } iPoint2D new_size = cam->cropSize; // If crop size is negative, use relative cropping if (new_size.x <= 0) new_size.x = mRaw->dim.x - cam->cropPos.x + new_size.x; if (new_size.y <= 0) new_size.y = mRaw->dim.y - cam->cropPos.y + new_size.y; mRaw->subFrame(cam->cropPos, new_size); mRaw->cfa = cam->cfa; // Shift CFA to match crop if (cam->cropPos.x & 1) mRaw->cfa.shiftLeft(); if (cam->cropPos.y & 1) mRaw->cfa.shiftDown(); mRaw->blackLevel = cam->black; mRaw->whitePoint = cam->white; mRaw->blackAreas = cam->blackAreas; } void *RawDecoderDecodeThread(void *_this) { RawDecoderThread* me = (RawDecoderThread*)_this; try { me->parent->decodeThreaded(me); } catch (RawDecoderException ex) { me->error = _strdup(ex.what()); } catch (IOException ex) { me->error = _strdup(ex.what()); } pthread_exit(NULL); return 0; } void RawDecoder::startThreads() { uint32 threads; threads = getThreadCount(); int y_offset = 0; int y_per_thread = (mRaw->dim.y + threads - 1) / threads; RawDecoderThread *t = new RawDecoderThread[threads]; pthread_attr_t attr; /* Initialize and set thread detached attribute */ pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); for (uint32 i = 0; i < threads; i++) { t[i].start_y = y_offset; t[i].end_y = MIN(y_offset + y_per_thread, mRaw->dim.y); t[i].parent = this; pthread_create(&t[i].threadid, &attr, RawDecoderDecodeThread, &t[i]); y_offset = t[i].end_y; } void *status; for (uint32 i = 0; i < threads; i++) { pthread_join(t[i].threadid, &status); if (t[i].error) { errors.push_back(t[i].error); } } if (errors.size() >= threads) ThrowRDE("RawDecoder::startThreads: All threads reported errors. Cannot load image."); delete[] t; } void RawDecoder::decodeThreaded(RawDecoderThread * t) { ThrowRDE("Internal Error: This class does not support threaded decoding"); } } // namespace RawSpeedrawstudio-2.0/plugins/load-rawspeed/rawspeed/OrfDecoder.cpp0000644000175000017500000001777411541412541021075 00000000000000#include "StdAfx.h" #include "OrfDecoder.h" #include "TiffParserOlympus.h" #ifdef __unix__ #include #endif /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { OrfDecoder::OrfDecoder(TiffIFD *rootIFD, FileMap* file): RawDecoder(file), mRootIFD(rootIFD) { } OrfDecoder::~OrfDecoder(void) { } RawImage OrfDecoder::decodeRaw() { vector data = mRootIFD->getIFDsWithTag(STRIPOFFSETS); if (data.empty()) ThrowRDE("ORF Decoder: No image data found"); TiffIFD* raw = data[0]; int compression = raw->getEntry(COMPRESSION)->getInt(); if (1 != compression) ThrowRDE("ORF Decoder: Unsupported compression"); TiffEntry *offsets = raw->getEntry(STRIPOFFSETS); TiffEntry *counts = raw->getEntry(STRIPBYTECOUNTS); if (offsets->count != 1) { ThrowRDE("ORF Decoder: Multiple Strips found: %u", offsets->count); } if (counts->count != offsets->count) { ThrowRDE("ORF Decoder: Byte count number does not match strip size: count:%u, strips:%u ", counts->count, offsets->count); } uint32 width = raw->getEntry(IMAGEWIDTH)->getInt(); uint32 height = raw->getEntry(IMAGELENGTH)->getInt(); if (!mFile->isValid(offsets->getInt() + counts->getInt())) ThrowRDE("ORF Decoder: Truncated file"); mRaw->dim = iPoint2D(width, height); mRaw->createData(); data = mRootIFD->getIFDsWithTag(MAKERNOTE); if (data.empty()) ThrowRDE("ORF Decoder: No Makernote found"); TiffIFD* exif = data[0]; TiffEntry *makernoteEntry = exif->getEntry(MAKERNOTE); const uchar8* makernote = makernoteEntry->getData(); FileMap makermap((uchar8*)&makernote[8], makernoteEntry->count - 8); TiffParserOlympus makertiff(&makermap); makertiff.parseData(); data = makertiff.RootIFD()->getIFDsWithTag((TiffTag)0x2010); if (data.empty()) ThrowRDE("ORF Decoder: Unsupported compression"); TiffEntry *oly = data[0]->getEntry((TiffTag)0x2010); if (oly->type == TIFF_UNDEFINED) ThrowRDE("ORF Decoder: Unsupported compression"); // We add 3 bytes slack, since the bitpump might be a few bytes ahead. ByteStream s(mFile->getData(offsets->getInt()), counts->getInt() + 3); try { decodeCompressed(s, width, height); } catch (IOException e) { errors.push_back(_strdup(e.what())); // Let's ignore it, it may have delivered somewhat useful data. } return mRaw; } /* This is probably the slowest decoder of them all. * I cannot see any way to effectively speed up the prediction * phase, which is by far the slowest part of this algorithm. * Also there is no way to multithread this code, since prediction * is based on the output of all previous pixel (bar the first four) */ void OrfDecoder::decodeCompressed(ByteStream& s, uint32 w, uint32 h) { int nbits, sign, low, high, i, wo0, n, nw0, wo1, nw1; int acarry0[3], acarry1[3], pred, diff; uchar8* data = mRaw->getData(); int pitch = mRaw->pitch; /* Build a table to quickly look up "high" value */ char bittable[4096]; for (i = 0; i < 4096; i++) { int b = i; for (high = 0; high < 12; high++) if ((b>>(11-high))&1) break; bittable[i] = high; } wo0 = nw0 = wo1 = nw1 = 0; s.skipBytes(7); BitPumpMSB bits(&s); for (uint32 y = 0; y < h; y++) { memset(acarry0, 0, sizeof acarry0); memset(acarry1, 0, sizeof acarry1); ushort16* dest = (ushort16*) & data[y*pitch]; for (uint32 x = 0; x < w; x++) { bits.checkPos(); bits.fill(); i = 2 * (acarry0[2] < 3); for (nbits = 2 + i; (ushort16) acarry0[0] >> (nbits + i); nbits++); int b = bits.peekBitsNoFill(15); sign = (b >> 14) * -1; low = (b >> 12) & 3; high = bittable[b&4095]; // Skip bits used above. bits.skipBitsNoFill(min(12+3, high + 1 + 3)); if (high == 12) high = bits.getBits(16 - nbits) >> 1; acarry0[0] = (high << nbits) | bits.getBits(nbits); diff = (acarry0[0] ^ sign) + acarry0[1]; acarry0[1] = (diff * 3 + acarry0[1]) >> 5; acarry0[2] = acarry0[0] > 16 ? 0 : acarry0[2] + 1; if (y < 2 || x < 2) { if (y < 2 && x < 2) pred = 0; else if (y < 2) pred = wo0; else { pred = dest[-pitch+((int)x)]; nw0 = pred; } dest[x] = pred + ((diff << 2) | low); // Set predictor wo0 = dest[x]; } else { n = dest[-pitch+((int)x)]; if (((wo0 < nw0) & (nw0 < n)) | ((n < nw0) & (nw0 < wo0))) { if (abs(wo0 - nw0) > 32 || abs(n - nw0) > 32) pred = wo0 + n - nw0; else pred = (wo0 + n) >> 1; } else pred = abs(wo0 - nw0) > abs(n - nw0) ? wo0 : n; dest[x] = pred + ((diff << 2) | low); // Set predictors wo0 = dest[x]; nw0 = n; } // _ASSERTE(0 == dest[x] >> 12) ; // ODD PIXELS x += 1; bits.checkPos(); bits.fill(); i = 2 * (acarry1[2] < 3); for (nbits = 2 + i; (ushort16) acarry1[0] >> (nbits + i); nbits++); b = bits.peekBitsNoFill(15); sign = (b >> 14) * -1; low = (b >> 12) & 3; high = bittable[b&4095]; // Skip bits used above. bits.skipBitsNoFill(min(12+3, high + 1 + 3)); if (high == 12) high = bits.getBits(16 - nbits) >> 1; acarry1[0] = (high << nbits) | bits.getBits(nbits); diff = (acarry1[0] ^ sign) + acarry1[1]; acarry1[1] = (diff * 3 + acarry1[1]) >> 5; acarry1[2] = acarry1[0] > 16 ? 0 : acarry1[2] + 1; if (y < 2 || x < 2) { if (y < 2 && x < 2) pred = 0; else if (y < 2) pred = wo1; else { pred = dest[-pitch+((int)x)]; nw1 = pred; } dest[x] = pred + ((diff << 2) | low); // Set predictor wo1 = dest[x]; } else { n = dest[-pitch+((int)x)]; if (((wo1 < nw1) & (nw1 < n)) | ((n < nw1) & (nw1 < wo1))) { if (abs(wo1 - nw1) > 32 || abs(n - nw1) > 32) pred = wo1 + n - nw1; else pred = (wo1 + n) >> 1; } else pred = abs(wo1 - nw1) > abs(n - nw1) ? wo1 : n; dest[x] = pred + ((diff << 2) | low); // Set predictors wo1 = dest[x]; nw1 = n; } // _ASSERTE(0 == dest[x] >> 12) ; } } } void OrfDecoder::checkSupport(CameraMetaData *meta) { vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("ORF Support check: Model name found"); string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); this->checkCameraSupported(meta, make, model, ""); } void OrfDecoder::decodeMetaData(CameraMetaData *meta) { mRaw->cfa.setCFA(CFA_RED, CFA_GREEN, CFA_GREEN2, CFA_BLUE); vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("ORF Meta Decoder: Model name found"); string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); setMetaData(meta, make, model, ""); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffParserHeaderless.cpp0000644000175000017500000000424411526533650023122 00000000000000#include "StdAfx.h" #include "TiffParserHeaderless.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { TiffParserHeaderless::TiffParserHeaderless(FileMap* input, Endianness _end) : TiffParser(input) { tiff_endian = _end; } TiffParserHeaderless::~TiffParserHeaderless(void) { } #ifdef CHECKSIZE #undef CHECKSIZE #endif #ifdef CHECKPTR #undef CHECKPTR #endif #define CHECKSIZE(A) if (A >= mInput->getSize()) throw TiffParserException("Error reading Headerless TIFF structure. File Corrupt") #define CHECKPTR(A) if ((int)A >= ((int)(mInput->data) + size))) throw TiffParserException("Error reading Headerless TIFF structure. File Corrupt") void TiffParserHeaderless::parseData() { parseData(0); } void TiffParserHeaderless::parseData(uint32 firstIfdOffset) { if (mInput->getSize() < 12) throw TiffParserException("Not a TIFF file (size too small)"); if (tiff_endian == host_endian) mRootIFD = new TiffIFD(); else mRootIFD = new TiffIFDBE(); uint32 nextIFD = firstIfdOffset; do { CHECKSIZE(nextIFD); if (tiff_endian == host_endian) mRootIFD->mSubIFD.push_back(new TiffIFD(mInput, nextIFD)); else mRootIFD->mSubIFD.push_back(new TiffIFDBE(mInput, nextIFD)); nextIFD = mRootIFD->mSubIFD.back()->getNextIFD(); } while (nextIFD); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/Rw2Decoder.cpp0000644000175000017500000001761711541412541021015 00000000000000#include "StdAfx.h" #include "Rw2Decoder.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { Rw2Decoder::Rw2Decoder(TiffIFD *rootIFD, FileMap* file) : RawDecoder(file), mRootIFD(rootIFD), input_start(0) { decoderVersion = 1; } Rw2Decoder::~Rw2Decoder(void) { if (input_start) delete input_start; input_start = 0; } RawImage Rw2Decoder::decodeRaw() { vector data = mRootIFD->getIFDsWithTag(PANASONIC_STRIPOFFSET); bool isOldPanasonic = FALSE; if (data.empty()) { if (!mRootIFD->hasEntryRecursive(STRIPOFFSETS)) ThrowRDE("RW2 Decoder: No image data found"); isOldPanasonic = TRUE; data = mRootIFD->getIFDsWithTag(STRIPOFFSETS); } TiffIFD* raw = data[0]; uint32 height = raw->getEntry((TiffTag)3)->getShort(); uint32 width = raw->getEntry((TiffTag)2)->getShort(); if (isOldPanasonic) { ThrowRDE("Cannot decoder old-style Panasonic RAW files"); TiffEntry *offsets = raw->getEntry(STRIPOFFSETS); TiffEntry *counts = raw->getEntry(STRIPBYTECOUNTS); if (offsets->count != 1) { ThrowRDE("RW2 Decoder: Multiple Strips found: %u", offsets->count); } int off = offsets->getInt(); if (!mFile->isValid(off)) ThrowRDE("Panasonic RAW Decoder: Invalid image data offset, cannot decode."); int count = counts->getInt(); if (count != (int)(width*height*2)) ThrowRDE("Panasonic RAW Decoder: Byte count is wrong."); if (!mFile->isValid(off+count)) ThrowRDE("Panasonic RAW Decoder: Invalid image data offset, cannot decode."); mRaw->dim = iPoint2D(width, height); mRaw->createData(); ByteStream input_start(mFile->getData(off), mFile->getSize() - off); iPoint2D pos(0, 0); readUncompressedRaw(input_start, mRaw->dim,pos, width*2, 16, FALSE); } else { mRaw->dim = iPoint2D(width, height); mRaw->createData(); TiffEntry *offsets = raw->getEntry(PANASONIC_STRIPOFFSET); if (offsets->count != 1) { ThrowRDE("RW2 Decoder: Multiple Strips found: %u", offsets->count); } load_flags = 0x2008; int off = offsets->getInt(); if (!mFile->isValid(off)) ThrowRDE("RW2 Decoder: Invalid image data offset, cannot decode."); input_start = new ByteStream(mFile->getData(off), mFile->getSize() - off); DecodeRw2(); } return mRaw; } void Rw2Decoder::DecodeRw2() { startThreads(); } void Rw2Decoder::decodeThreaded(RawDecoderThread * t) { int x, i, j, sh = 0, pred[2], nonz[2]; int w = mRaw->dim.x / 14; uint32 y; /* 9 + 1/7 bits per pixel */ int skip = w * 14 * t->start_y * 9; skip += w * 2 * t->start_y; skip /= 8; PanaBitpump bits(new ByteStream(input_start)); bits.load_flags = load_flags; bits.skipBytes(skip); for (y = t->start_y; y < t->end_y; y++) { ushort16* dest = (ushort16*)mRaw->getData(0, y); for (x = 0; x < w; x++) { pred[0] = pred[1] = nonz[0] = nonz[1] = 0; int u = 0; for (i = 0; i < 14; i++) { // Even pixels if (u == 2) { sh = 4 >> (3 - bits.getBits(2)); u = -1; } if (nonz[0]) { if ((j = bits.getBits(8))) { if ((pred[0] -= 0x80 << sh) < 0 || sh == 4) pred[0] &= ~(-1 << sh); pred[0] += j << sh; } } else if ((nonz[0] = bits.getBits(8)) || i > 11) pred[0] = nonz[0] << 4 | bits.getBits(4); *dest++ = pred[0]; // Odd pixels i++; u++; if (u == 2) { sh = 4 >> (3 - bits.getBits(2)); u = -1; } if (nonz[1]) { if ((j = bits.getBits(8))) { if ((pred[1] -= 0x80 << sh) < 0 || sh == 4) pred[1] &= ~(-1 << sh); pred[1] += j << sh; } } else if ((nonz[1] = bits.getBits(8)) || i > 11) pred[1] = nonz[1] << 4 | bits.getBits(4); *dest++ = pred[1]; u++; } } } } void Rw2Decoder::checkSupport(CameraMetaData *meta) { vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("RW2 Support check: Model name found"); string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); if (!this->checkCameraSupported(meta, make, model, getMode(model))) this->checkCameraSupported(meta, make, model, ""); } void Rw2Decoder::decodeMetaData(CameraMetaData *meta) { mRaw->cfa.setCFA(CFA_BLUE, CFA_GREEN, CFA_GREEN2, CFA_RED); vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("CR2 Meta Decoder: Model name not found"); string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); string mode = getMode(model); if (this->checkCameraSupported(meta, make, model, getMode(model))) setMetaData(meta, make, model, mode); else setMetaData(meta, make, model, ""); } bool Rw2Decoder::almostEqualRelative(float A, float B, float maxRelativeError) { if (A == B) return true; float relativeError = fabs((A - B) / B); if (relativeError <= maxRelativeError) return true; return false; } std::string Rw2Decoder::getMode(const string model) { float ratio = 3.0f / 2.0f; // Default if (mRaw->isAllocated()) { ratio = (float)mRaw->dim.x / (float)mRaw->dim.y; } if (almostEqualRelative(ratio, 16.0f / 9.0f, 0.02f)) return "16:9"; if (almostEqualRelative(ratio, 3.0f / 2.0f, 0.02f)) return "3:2"; if (almostEqualRelative(ratio, 4.0f / 3.0f, 0.02f)) return "4:3"; if (almostEqualRelative(ratio, 1.0f, 0.02f)) return "1:1"; return ""; } PanaBitpump::PanaBitpump(ByteStream* _input) : input(_input), vbits(0) { } PanaBitpump::~PanaBitpump() { if (input) delete input; input = 0; } void PanaBitpump::skipBytes(int bytes) { int blocks = (bytes / 0x4000) * 0x4000; input->skipBytes(blocks); for (int i = blocks; i < bytes; i++) getBits(8); } uint32 PanaBitpump::getBits(int nbits) { int byte; if (!vbits) { /* On truncated files this routine will just return just for the truncated * part of the file. Since there is no chance of affecting output buffer * size we allow the decoder to decode this */ if (input->getRemainSize() < 0x4000 - load_flags) { memcpy(buf + load_flags, input->getData(), input->getRemainSize()); input->skipBytes(input->getRemainSize()); } else { memcpy(buf + load_flags, input->getData(), 0x4000 - load_flags); input->skipBytes(0x4000 - load_flags); if (input->getRemainSize() < load_flags) { memcpy(buf, input->getData(), input->getRemainSize()); input->skipBytes(input->getRemainSize()); } else { memcpy(buf, input->getData(), load_flags); input->skipBytes(load_flags); } } } vbits = (vbits - nbits) & 0x1ffff; byte = vbits >> 3 ^ 0x3ff0; return (buf[byte] | buf[byte+1] << 8) >> (vbits & 7) & ~(-1 << nbits); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/RawImageDataU16.cpp0000644000175000017500000002351511541412541021631 00000000000000#include "StdAfx.h" #include "RawImage.h" #include "RawDecoder.h" // For exceptions /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #if defined(__SSE2__) #include #endif namespace RawSpeed { RawImageDataU16::RawImageDataU16(void) { dataType = TYPE_USHORT16; bpp = 2; } RawImageDataU16::RawImageDataU16(iPoint2D _dim, uint32 _cpp) : RawImageData(_dim, 2, _cpp) { dataType = TYPE_USHORT16; } void RawImageDataU16::calculateBlackAreas() { int* histogram = (int*)malloc(4*65536*sizeof(int)); memset(histogram, 0, 4*65536*sizeof(int)); int totalpixels = 0; for (uint32 i = 0; i < blackAreas.size(); i++) { BlackArea area = blackAreas[i]; /* Make sure area sizes are multiple of two, so we have the same amount of pixels for each CFA group */ area.size = area.size - (area.size&1); /* Process horizontal area */ if (!area.isVertical) { if ((int)area.offset+(int)area.size > uncropped_dim.y) ThrowRDE("RawImageData::calculateBlackAreas: Offset + size is larger than height of image"); for (uint32 y = area.offset; y < area.offset+area.size; y++) { ushort16 *pixel = (ushort16*)getDataUncropped(mOffset.x, y); int* localhist = &histogram[(y&1)*(65536*2)]; for (int x = mOffset.x; x < dim.x+mOffset.x; x++) { localhist[((x&1)<<16) + *pixel]++; } } totalpixels += area.size * dim.x; } /* Process vertical area */ if (area.isVertical) { if ((int)area.offset+(int)area.size > uncropped_dim.x) ThrowRDE("RawImageData::calculateBlackAreas: Offset + size is larger than width of image"); for (int y = mOffset.y; y < dim.y+mOffset.y; y++) { ushort16 *pixel = (ushort16*)getDataUncropped(area.offset, y); int* localhist = &histogram[(y&1)*(65536*2)]; for (uint32 x = area.offset; x < area.size+area.offset; x++) { localhist[((x&1)<<16) + *pixel]++; } } totalpixels += area.size * dim.y; } } if (!totalpixels) { for (int i = 0 ; i < 4; i++) blackLevelSeparate[i] = blackLevel; return; } /* Calculate median value of black areas for each component */ /* Adjust the number of total pixels so it is the same as the median of each histogram */ totalpixels /= 4*2; for (int i = 0 ; i < 4; i++) { int* localhist = &histogram[i*65536]; int acc_pixels = localhist[0]; int pixel_value = 0; while (acc_pixels <= totalpixels && pixel_value < 65535) { pixel_value++; acc_pixels += localhist[pixel_value]; } blackLevelSeparate[i] = pixel_value; } /* If this is not a CFA image, we do not use separate blacklevels, use average */ if (!isCFA) { int total = 0; for (int i = 0 ; i < 4; i++) total+=blackLevelSeparate[i]; for (int i = 0 ; i < 4; i++) blackLevelSeparate[i] = (total+2)>>2; } free(histogram); } void RawImageDataU16::scaleBlackWhite() { const int skipBorder = 150; int gw = (dim.x - skipBorder) * cpp; if ((blackAreas.empty() && blackLevelSeparate[0] < 0 && blackLevel < 0) || whitePoint == 65536) { // Estimate int b = 65536; int m = 0; for (int row = skipBorder*cpp;row < (dim.y - skipBorder);row++) { ushort16 *pixel = (ushort16*)getData(skipBorder, row); for (int col = skipBorder ; col < gw ; col++) { b = MIN(*pixel, b); m = MAX(*pixel, m); pixel++; } } if (blackLevel < 0) blackLevel = b; if (whitePoint == 65536) whitePoint = m; printf("Estimated black:%d, Estimated white: %d\n", blackLevel, whitePoint); } /* If filter has not set separate blacklevel, compute or fetch it */ if (blackLevelSeparate[0] < 0) calculateBlackAreas(); int threads = getThreadCount(); if (threads <= 1) scaleValues(0, dim.y); else { RawImageWorker **workers = new RawImageWorker*[threads]; int y_offset = 0; int y_per_thread = (dim.y + threads - 1) / threads; for (int i = 0; i < threads; i++) { int y_end = MIN(y_offset + y_per_thread, dim.y); workers[i] = new RawImageWorker(this, RawImageWorker::TASK_SCALE_VALUES, y_offset, y_end); y_offset = y_end; } for (int i = 0; i < threads; i++) { workers[i]->waitForThread(); delete workers[i]; } delete[] workers; } } #if _MSC_VER > 1399 || defined(__SSE2__) void RawImageDataU16::scaleValues(int start_y, int end_y) { bool use_sse2; #ifdef _MSC_VER int info[4]; __cpuid(info, 1); use_sse2 = !!(info[3]&(1 << 26)); #else use_sse2 = TRUE; #endif float app_scale = 65535.0f / (whitePoint - blackLevelSeparate[0]); // Check SSE2 if (use_sse2 && app_scale < 63) { __m128i sseround; __m128i ssesub2; __m128i ssesign; uint32* sub_mul = (uint32*)_aligned_malloc(16*4*2, 16); uint32 gw = pitch / 16; // 10 bit fraction uint32 mul = (int)(1024.0f * 65535.0f / (float)(whitePoint - blackLevelSeparate[mOffset.x&1])); mul |= ((int)(1024.0f * 65535.0f / (float)(whitePoint - blackLevelSeparate[(mOffset.x+1)&1])))<<16; uint32 b = blackLevelSeparate[mOffset.x&1] | (blackLevelSeparate[(mOffset.x+1)&1]<<16); for (int i = 0; i< 4; i++) { sub_mul[i] = b; // Subtract even lines sub_mul[4+i] = mul; // Multiply even lines } mul = (int)(1024.0f * 65535.0f / (float)(whitePoint - blackLevelSeparate[2+(mOffset.x&1)])); mul |= ((int)(1024.0f * 65535.0f / (float)(whitePoint - blackLevelSeparate[2+((mOffset.x+1)&1)])))<<16; b = blackLevelSeparate[2+(mOffset.x&1)] | (blackLevelSeparate[2+((mOffset.x+1)&1)]<<16); for (int i = 0; i< 4; i++) { sub_mul[8+i] = b; // Subtract odd lines sub_mul[12+i] = mul; // Multiply odd lines } sseround = _mm_set_epi32(512, 512, 512, 512); ssesub2 = _mm_set_epi32(32768, 32768, 32768, 32768); ssesign = _mm_set_epi32(0x80008000, 0x80008000, 0x80008000, 0x80008000); for (int y = start_y; y < end_y; y++) { __m128i* pixel = (__m128i*) & data[(mOffset.y+y)*pitch]; __m128i ssescale, ssesub; if (((y+mOffset.y)&1) == 0) { ssesub = _mm_load_si128((__m128i*)&sub_mul[0]); ssescale = _mm_load_si128((__m128i*)&sub_mul[4]); } else { ssesub = _mm_load_si128((__m128i*)&sub_mul[8]); ssescale = _mm_load_si128((__m128i*)&sub_mul[12]); } for (uint32 x = 0 ; x < gw; x++) { __m128i pix_high; __m128i temp; _mm_prefetch((char*)(pixel+1), _MM_HINT_T0); __m128i pix_low = _mm_load_si128(pixel); // Subtract black pix_low = _mm_subs_epu16(pix_low, ssesub); // Multiply the two unsigned shorts and combine it to 32 bit result pix_high = _mm_mulhi_epu16(pix_low, ssescale); temp = _mm_mullo_epi16(pix_low, ssescale); pix_low = _mm_unpacklo_epi16(temp, pix_high); pix_high = _mm_unpackhi_epi16(temp, pix_high); // Add rounder pix_low = _mm_add_epi32(pix_low, sseround); pix_high = _mm_add_epi32(pix_high, sseround); // Shift down pix_low = _mm_srai_epi32(pix_low, 10); pix_high = _mm_srai_epi32(pix_high, 10); // Subtract to avoid clipping pix_low = _mm_sub_epi32(pix_low, ssesub2); pix_high = _mm_sub_epi32(pix_high, ssesub2); // Pack pix_low = _mm_packs_epi32(pix_low, pix_high); // Shift sign off pix_low = _mm_xor_si128(pix_low, ssesign); _mm_store_si128(pixel, pix_low); pixel++; } } _aligned_free(sub_mul); } else { // Not SSE2 int gw = dim.x * cpp; int mul[4]; int sub[4]; for (int i = 0; i < 4; i++) { int v = i; if ((mOffset.x&1) != 0) v ^= 1; if ((mOffset.y&1) != 0) v ^= 2; mul[i] = (int)(16384.0f * 65535.0f / (float)(whitePoint - blackLevelSeparate[v])); sub[i] = blackLevelSeparate[v]; } for (int y = start_y; y < end_y; y++) { ushort16 *pixel = (ushort16*)getData(0, y); int *mul_local = &mul[2*(y&1)]; int *sub_local = &sub[2*(y&1)]; for (int x = 0 ; x < gw; x++) { pixel[x] = clampbits(((pixel[x] - sub_local[x&1]) * mul_local[x&1] + 8192) >> 14, 16); } } } } #else void RawImageDataU16::scaleValues(int start_y, int end_y) { int gw = dim.x * cpp; int mul[4]; int sub[4]; for (int i = 0; i < 4; i++) { int v = i; if ((mOffset.x&1) != 0) v ^= 1; if ((mOffset.y&1) != 0) v ^= 2; mul[i] = (int)(16384.0f * 65535.0f / (float)(whitePoint - blackLevelSeparate[v])); sub[i] = blackLevelSeparate[v]; } for (int y = start_y; y < end_y; y++) { ushort16 *pixel = (ushort16*)getData(0, y); int *mul_local = &mul[2*(y&1)]; int *sub_local = &sub[2*(y&1)]; for (int x = 0 ; x < gw; x++) { pixel[x] = clampbits(((pixel[x] - sub_local[x&1]) * mul_local[x&1] + 8192) >> 14, 16); } } } #endif } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffEntryBE.cpp0000644000175000017500000000753011526533650021177 00000000000000#include "StdAfx.h" #include "TiffEntryBE.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { TiffEntryBE::TiffEntryBE(FileMap* f, uint32 offset) : mDataSwapped(false) { type = TIFF_UNDEFINED; // We set type to undefined to avoid debug assertion errors. data = f->getDataWrt(offset); tag = (TiffTag)getShort(); data += 2; TiffDataType _type = (TiffDataType)getShort(); data += 2; count = getInt(); type = _type; //Now we can set it to the proper type if (type > 13) ThrowTPE("Error reading TIFF structure. Unknown Type 0x%x encountered.", type); uint32 bytesize = count << datashifts[type]; if (bytesize <= 4) { data = f->getDataWrt(offset + 8); } else { // offset data = f->getDataWrt(offset + 8); data_offset = (unsigned int)data[0] << 24 | (unsigned int)data[1] << 16 | (unsigned int)data[2] << 8 | (unsigned int)data[3]; CHECKSIZE(data_offset + bytesize); data = f->getDataWrt(data_offset); } #ifdef _DEBUG debug_intVal = 0xC0CAC01A; debug_floatVal = sqrtf(-1); if (type == TIFF_LONG || type == TIFF_SHORT) debug_intVal = getInt(); if (type == TIFF_FLOAT || type == TIFF_DOUBLE) debug_floatVal = getFloat(); #endif } TiffEntryBE::~TiffEntryBE(void) { } unsigned int TiffEntryBE::getInt() { if (!(type == TIFF_LONG || type == TIFF_SHORT || type == TIFF_UNDEFINED)) ThrowTPE("TIFF, getInt: Wrong type 0x%x encountered. Expected Int", type); if (type == TIFF_SHORT) return getShort(); return (unsigned int)data[0] << 24 | (unsigned int)data[1] << 16 | (unsigned int)data[2] << 8 | (unsigned int)data[3]; } unsigned short TiffEntryBE::getShort() { if (!(type == TIFF_SHORT || type == TIFF_UNDEFINED)) ThrowTPE("TIFF, getShort: Wrong type 0x%x encountered. Expected Short", type); return (unsigned short)data[0] << 8 | (unsigned short)data[1]; } const unsigned int* TiffEntryBE::getIntArray() { //TODO: Make critical section to avoid clashes. if (!(type == TIFF_LONG || type == TIFF_UNDEFINED || type == TIFF_RATIONAL || type == TIFF_SRATIONAL)) ThrowTPE("TIFF, getIntArray: Wrong type 0x%x encountered. Expected Int", type); if (mDataSwapped) return (unsigned int*)&data[0]; unsigned int* d = (unsigned int*) & data[0]; for (uint32 i = 0; i < count; i++) { d[i] = (unsigned int)data[i*4+0] << 24 | (unsigned int)data[i*4+1] << 16 | (unsigned int)data[i*4+2] << 8 | (unsigned int)data[i*4+3]; } mDataSwapped = true; return d; } const unsigned short* TiffEntryBE::getShortArray() { //TODO: Make critical section to avoid clashes. if (!(type == TIFF_SHORT || type == TIFF_UNDEFINED)) ThrowTPE("TIFF, getShortArray: Wrong type 0x%x encountered. Expected Short", type); if (mDataSwapped) return (unsigned short*)&data[0]; unsigned short* d = (unsigned short*) & data[0]; for (uint32 i = 0; i < count; i++) { d[i] = (unsigned short)data[i*2+0] << 8 | (unsigned short)data[i*2+1]; } mDataSwapped = true; return d; } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/ArwDecoder.h0000644000175000017500000000303211542726010020523 00000000000000/* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #ifndef ARW_DECODER_H #define ARW_DECODER_H #include "RawDecoder.h" #include "LJpegPlain.h" #include "TiffIFD.h" #include "BitPumpPlain.h" namespace RawSpeed { class ArwDecoder : public RawDecoder { public: ArwDecoder(TiffIFD *rootIFD, FileMap* file); virtual ~ArwDecoder(void); virtual RawImage decodeRaw(); virtual void checkSupport(CameraMetaData *meta); virtual void decodeMetaData(CameraMetaData *meta); virtual void decodeThreaded(RawDecoderThread* t); protected: void DecodeARW(ByteStream &input, uint32 w, uint32 h); void DecodeARW2(ByteStream &input, uint32 w, uint32 h, uint32 bpp); TiffIFD *mRootIFD; uint32 curve[0x4001]; ByteStream *in; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/RawDecoderException.h0000644000175000017500000000233411542726010022406 00000000000000#ifndef RAW_DECODER_EXCEPTION_H #define RAW_DECODER_EXCEPTION_H /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { void ThrowRDE(const char* fmt, ...); class RawDecoderException : public std::runtime_error { public: RawDecoderException(const string _msg) : runtime_error(_msg) { _RPT1(0, "RawDecompressor Exception: %s\n", _msg.c_str()); } }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/Point.h0000644000175000017500000000326311526533650017613 00000000000000/* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { #ifndef SS_Point_H #define SS_Point_H #ifdef __unix #include #endif class iPoint2D { public: iPoint2D() {x = y = 0; } iPoint2D( int a, int b) {x=a; y=b;} iPoint2D( const iPoint2D& pt) {x=pt.x; y=pt.y;} iPoint2D operator += (const iPoint2D& other) { x += other.x; y += other.y; return *this;} iPoint2D operator -= (const iPoint2D& other) { x -= other.x; y -= other.y; return *this;} iPoint2D operator - (const iPoint2D& b) { return iPoint2D(x-b.x,y-b.y); } iPoint2D operator + (const iPoint2D& b) { return iPoint2D(x+b.x,y+b.y); } iPoint2D operator = (const iPoint2D& b) { x = b.x; y = b.y; return *this;} ~iPoint2D() {}; uint32 area() {return abs(x*y);} bool isThisInside(const iPoint2D &otherPoint) {return (x<=otherPoint.x && y<=otherPoint.y); }; int x,y; }; } // namespace RawSpeed #endif // SS_Point_H rawstudio-2.0/plugins/load-rawspeed/rawspeed/RawDecoderException.cpp0000644000175000017500000000240411526533650022747 00000000000000#include "StdAfx.h" #include "RawDecoderException.h" #if !defined(WIN32) || defined(__MINGW32__) #include #define vsprintf_s(...) vsnprintf(__VA_ARGS__) #endif /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { void ThrowRDE(const char* fmt, ...) { va_list val; va_start(val, fmt); char buf[8192]; vsprintf_s(buf, 8192, fmt, val); va_end(val); _RPT1(0, "EXCEPTION: %s\n", buf); throw RawDecoderException(buf); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/PentaxDecompressor.h0000644000175000017500000000251411542726010022335 00000000000000#ifndef PENTAX_DECOMPRESSOR_H #define PENTAX_DECOMPRESSOR_H #include "LJpegDecompressor.h" #include "BitPumpMSB.h" #include "TiffIFD.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class PentaxDecompressor : public LJpegDecompressor { public: PentaxDecompressor(FileMap* file, RawImage img); virtual ~PentaxDecompressor(void); int HuffDecodePentax(); void decodePentax(TiffIFD *root, uint32 offset, uint32 size); BitPumpMSB *pentaxBits; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/RawImage.cpp0000644000175000017500000001440411541412541020540 00000000000000#include "StdAfx.h" #include "RawImage.h" #include "RawDecoder.h" // For exceptions /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #if defined(__SSE2__) #include #endif namespace RawSpeed { RawImageData::RawImageData(void): dim(0, 0), isCFA(true), blackLevel(-1), whitePoint(65536), dataRefCount(0), data(0), cpp(1), bpp(0), uncropped_dim(0, 0) { blackLevelSeparate[0] = blackLevelSeparate[1] = blackLevelSeparate[2] = blackLevelSeparate[3] = -1; pthread_mutex_init(&mymutex, NULL); subsampling.x = subsampling.y = 1; } RawImageData::RawImageData(iPoint2D _dim, uint32 _bpc, uint32 _cpp) : dim(_dim), blackLevel(-1), whitePoint(65536), dataRefCount(0), data(0), cpp(cpp), bpp(_bpc), uncropped_dim(0, 0) { blackLevelSeparate[0] = blackLevelSeparate[1] = blackLevelSeparate[2] = blackLevelSeparate[3] = -1; subsampling.x = subsampling.y = 1; createData(); pthread_mutex_init(&mymutex, NULL); } RawImageData::~RawImageData(void) { _ASSERTE(dataRefCount == 0); if (data) _aligned_free(data); data = 0; mOffset = iPoint2D(0, 0); pthread_mutex_destroy(&mymutex); } void RawImageData::createData() { if (dim.x > 65535 || dim.y > 65535) ThrowRDE("RawImageData: Dimensions too large for allocation."); if (dim.x <= 0 || dim.y <= 0) ThrowRDE("RawImageData: Dimension of one sides is less than 1 - cannot allocate image."); if (data) ThrowRDE("RawImageData: Duplicate data allocation in createData."); pitch = (((dim.x * bpp) + 15) / 16) * 16; data = (uchar8*)_aligned_malloc(pitch * dim.y, 16); if (!data) ThrowRDE("RawImageData::createData: Memory Allocation failed."); uncropped_dim = dim; } void RawImageData::destroyData() { if (data) _aligned_free(data); data = 0; } void RawImageData::setCpp(uint32 val) { if (data) ThrowRDE("RawImageData: Attempted to set Components per pixel after data allocation"); if (val > 4) ThrowRDE("RawImageData: Only up to 4 components per pixel is support - attempted to set: %d", val); bpp /= cpp; cpp = val; bpp *= val; } uchar8* RawImageData::getData() { if (!data) ThrowRDE("RawImageData::getData - Data not yet allocated."); return &data[mOffset.y*pitch+mOffset.x*bpp]; } uchar8* RawImageData::getData(uint32 x, uint32 y) { if ((int)x >= dim.x) ThrowRDE("RawImageData::getData - X Position outside image requested."); if ((int)y >= dim.y) { ThrowRDE("RawImageData::getData - Y Position outside image requested."); } x += mOffset.x; y += mOffset.y; if (!data) ThrowRDE("RawImageData::getData - Data not yet allocated."); return &data[y*pitch+x*bpp]; } uchar8* RawImageData::getDataUncropped(uint32 x, uint32 y) { if ((int)x >= uncropped_dim.x) ThrowRDE("RawImageData::getDataUncropped - X Position outside image requested."); if ((int)y >= uncropped_dim.y) { ThrowRDE("RawImageData::getDataUncropped - Y Position outside image requested."); } if (!data) ThrowRDE("RawImageData::getDataUncropped - Data not yet allocated."); return &data[y*pitch+x*bpp]; } iPoint2D RawImageData::getUncroppedDim() { return uncropped_dim; } iPoint2D RawImageData::getCropOffset() { return mOffset; } void RawImageData::subFrame(iPoint2D offset, iPoint2D new_size) { if (!new_size.isThisInside(dim - offset)) { printf("WARNING: RawImageData::subFrame - Attempted to create new subframe larger than original size. Crop skipped.\n"); return; } if (offset.x < 0 || offset.y < 0) { printf("WARNING: RawImageData::subFrame - Negative crop offset. Crop skipped.\n"); return; } mOffset += offset; dim = new_size; } RawImage::RawImage(RawImageData* p) : p_(p) { pthread_mutex_lock(&p_->mymutex); ++p_->dataRefCount; pthread_mutex_unlock(&p_->mymutex); } RawImage::RawImage(const RawImage& p) : p_(p.p_) { pthread_mutex_lock(&p_->mymutex); ++p_->dataRefCount; pthread_mutex_unlock(&p_->mymutex); } RawImage::~RawImage() { pthread_mutex_lock(&p_->mymutex); if (--p_->dataRefCount == 0) { pthread_mutex_unlock(&p_->mymutex); delete p_; return; } pthread_mutex_unlock(&p_->mymutex); } RawImageData* RawImage::operator->() { return p_; } RawImageData& RawImage::operator*() { return *p_; } RawImage& RawImage::operator=(const RawImage & p) { RawImageData* const old = p_; p_ = p.p_; ++p_->dataRefCount; if (--old->dataRefCount == 0) delete old; return *this; } void *RawImageWorkerThread(void *_this) { RawImageWorker* me = (RawImageWorker*)_this; me->_performTask(); pthread_exit(NULL); return 0; } RawImageWorker::RawImageWorker( RawImageData *_img, RawImageWorkerTask _task, int _start_y, int _end_y ) { data = _img; start_y = _start_y; end_y = _end_y; task = _task; startThread(); } void RawImageWorker::startThread() { /* Initialize and set thread detached attribute */ pthread_attr_t attr; pthread_attr_init(&attr); pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_JOINABLE); pthread_create(&threadid, &attr, RawImageWorkerThread, this); } void RawImageWorker::waitForThread() { void *status; pthread_join(threadid, &status); } void RawImageWorker::_performTask() { switch(task) { case TASK_SCALE_VALUES: data->scaleValues(start_y, end_y); break; default: _ASSERTE(false); } } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/BitPumpMSB.cpp0000644000175000017500000000416211526533650020776 00000000000000#include "StdAfx.h" #include "BitPumpMSB.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { /*** Used for entropy encoded sections ***/ BitPumpMSB::BitPumpMSB(ByteStream *s): buffer(s->getData()), size(s->getRemainSize() + sizeof(uint32)), mLeft(0), mCurr(0), off(0) { init(); } BitPumpMSB::BitPumpMSB(const uchar8* _buffer, uint32 _size) : buffer(_buffer), size(_size + sizeof(uint32)), mLeft(0), mCurr(0), off(0) { init(); } __inline void BitPumpMSB::init() { fill(); } uint32 BitPumpMSB::getBitSafe() { if (!mLeft) { fill(); checkPos(); } return (mCurr >> (--mLeft)) & 1; } uint32 BitPumpMSB::getBitsSafe(unsigned int nbits) { if (nbits > MIN_GET_BITS) throw IOException("Too many bits requested"); if (mLeft < nbits) { fill(); checkPos(); } return ((mCurr >> (mLeft -= (nbits)))) & ((1 << nbits) - 1); } uchar8 BitPumpMSB::getByteSafe() { if (mLeft < 8) { fill(); checkPos(); } return ((mCurr >> (mLeft -= 8))) & 0xff; } void BitPumpMSB::setAbsoluteOffset(unsigned int offset) { if (offset >= size) throw IOException("Offset set out of buffer"); mLeft = 0; mCurr = 0; off = offset; fill(); } BitPumpMSB::~BitPumpMSB(void) { } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/PefDecoder.cpp0000644000175000017500000000642411541412541021047 00000000000000#include "StdAfx.h" #include "PefDecoder.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { PefDecoder::PefDecoder(TiffIFD *rootIFD, FileMap* file) : RawDecoder(file), mRootIFD(rootIFD) { decoderVersion = 2; } PefDecoder::~PefDecoder(void) { } RawImage PefDecoder::decodeRaw() { vector data = mRootIFD->getIFDsWithTag(STRIPOFFSETS); if (data.empty()) ThrowRDE("PEF Decoder: No image data found"); TiffIFD* raw = data[0]; int compression = raw->getEntry(COMPRESSION)->getInt(); if (1 == compression) { decodeUncompressed(raw, true); return mRaw; } if (65535 != compression) ThrowRDE("PEF Decoder: Unsupported compression"); TiffEntry *offsets = raw->getEntry(STRIPOFFSETS); TiffEntry *counts = raw->getEntry(STRIPBYTECOUNTS); if (offsets->count != 1) { ThrowRDE("PEF Decoder: Multiple Strips found: %u", offsets->count); } if (counts->count != offsets->count) { ThrowRDE("PEF Decoder: Byte count number does not match strip size: count:%u, strips:%u ", counts->count, offsets->count); } if (!mFile->isValid(offsets->getInt() + counts->getInt())) ThrowRDE("PEF Decoder: Truncated file."); uint32 width = raw->getEntry(IMAGEWIDTH)->getInt(); uint32 height = raw->getEntry(IMAGELENGTH)->getInt(); mRaw->dim = iPoint2D(width, height); mRaw->createData(); try { PentaxDecompressor l(mFile, mRaw); l.decodePentax(mRootIFD, offsets->getInt(), counts->getInt()); } catch (IOException e) { errors.push_back(_strdup(e.what())); // Let's ignore it, it may have delivered somewhat useful data. } return mRaw; } void PefDecoder::checkSupport(CameraMetaData *meta) { vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("PEF Support check: Model name found"); string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); this->checkCameraSupported(meta, make, model, ""); } void PefDecoder::decodeMetaData(CameraMetaData *meta) { mRaw->cfa.setCFA(CFA_RED, CFA_GREEN, CFA_GREEN2, CFA_BLUE); vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("PEF Meta Decoder: Model name found"); TiffIFD* raw = data[0]; string make = raw->getEntry(MAKE)->getString(); string model = raw->getEntry(MODEL)->getString(); setMetaData(meta, make, model, ""); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/RawDecoder.h0000644000175000017500000001465111542726010020534 00000000000000#ifndef RAW_DECODER_H #define RAW_DECODER_H #include "RawDecoderException.h" #include "FileMap.h" #include "BitPumpJPEG.h" // Includes bytestream #include "RawImage.h" #include "BitPumpMSB.h" #include "BitPumpPlain.h" #include "CameraMetaData.h" #include "TiffIFD.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class RawDecoder; /* Class with information delivered to RawDecoder::decodeThreaded() */ class RawDecoderThread { public: RawDecoderThread() {error = 0;}; uint32 start_y; uint32 end_y; const char* error; pthread_t threadid; RawDecoder* parent; }; class RawDecoder { public: /* Construct decoder instance - FileMap is a filemap of the file to be decoded */ /* The FileMap is not owned by this class, will not be deleted, and must remain */ /* valid while this object exists */ RawDecoder(FileMap* file); virtual ~RawDecoder(void); /* Check if the decoder can decode the image from this camera */ /* A RawDecoderException will be thrown if the camera isn't supported */ /* Unknown cameras does NOT generate any specific feedback */ /* This function must be overridden by actual decoders */ virtual void checkSupport(CameraMetaData *meta) = 0; /* Attempt to decode the image */ /* A RawDecoderException will be thrown if the image cannot be decoded, */ /* and there will not be any data in the mRaw image. */ /* This function must be overridden by actual decoders. */ virtual RawImage decodeRaw() = 0; /* This will apply metadata information from the camera database, */ /* such as crop, black+white level, etc. */ /* This function is expected to use the protected "setMetaData" */ /* after retrieving make, model and mode if applicate. */ /* If meta-data is set during load, this function can be empty. */ /* The image is expected to be cropped after this, but black/whitelevel */ /* compensation is not expected to be applied to the image */ virtual void decodeMetaData(CameraMetaData *meta) = 0; /* Called function for filters that are capable of doing simple multi-threaded decode */ /* The delivered class gives information on what part of the image should be decoded. */ virtual void decodeThreaded(RawDecoderThread* t); /* The decoded image - undefined if image has not or could not be decoded. */ /* Remember this is automatically refcounted, so a reference is retained until this class is destroyed */ RawImage mRaw; /* You can set this if you do not want Rawspeed to attempt to decode images, */ /* where it does not have reliable information about CFA, cropping, black and white point */ /* It is pretty safe to leave this disabled (default behaviour), but if you do not want to */ /* support unknown cameras, you can enable this */ /* DNGs are always attempted to be decoded, so this variable has no effect on DNGs */ bool failOnUnknown; /* Vector containing silent errors that occurred doing decoding, that may have lead to */ /* an incomplete image. */ vector errors; protected: /* Helper function for decoders - splits the image vertically and starts of decoder threads */ /* The function returns when all threads are done */ /* All errors are silently pushed into the "errors" array.*/ /* If all threads report an error an exception will be thrown*/ void startThreads(); /* Check the camera and mode against the camera database. */ /* A RawDecoderException will be thrown if the camera isn't supported */ /* Unknown cameras does NOT generate any errors, but returns false */ bool checkCameraSupported(CameraMetaData *meta, string make, string model, string mode); /* Helper function for decodeMetaData(), that find the camera in the CameraMetaData DB */ /* and sets common settings such as crop, black- white level, and sets CFA information */ virtual void setMetaData(CameraMetaData *meta, string make, string model, string mode); /* Helper function for decoders, that will unpack uncompressed image data */ /* input: Input image, positioned at first pixel */ /* size: Size of the image to decode in pixels */ /* offset: offset to write the data into the final image */ /* inputPitch: Number of bytes between each line in the input image */ /* bitPerPixel: Number of bits to read for each input pixel. */ /* MSBOrder: true - bits are read from MSB (JPEG style) False: Read from LSB. */ void readUncompressedRaw(ByteStream &input, iPoint2D& size, iPoint2D& offset, int inputPitch, int bitPerPixel, bool MSBOrder); /* Faster version for unpacking 12 bit LSB data */ void Decode12BitRaw(ByteStream &input, uint32 w, uint32 h); /* Generic decompressor for uncompressed images */ /* MSBOrder: true - bits are read from MSB (JPEG style) False: Read from LSB. */ void decodeUncompressed(TiffIFD *rawIFD, bool MSBOrder); /* The Raw input file to be decoded */ FileMap *mFile; /* Decoder version - defaults to 0, but can be overridden by decoders */ /* This can be used to avoid newer version of an xml file to indicate that a file */ /* can be decoded, when a specific version of the code is needed */ /* Higher number in camera xml file: Files for this camera will not be decoded */ /* Higher number in code than xml: Image will be decoded. */ int decoderVersion; /* Hints set for the camera after checkCameraSupported has been called from the implementation*/ map hints; }; class RawSlice { public: RawSlice() { h = offset = count = 0;}; ~RawSlice() {}; uint32 h; uint32 offset; uint32 count; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/BitPumpJPEG.h0000644000175000017500000000670511542726010020544 00000000000000/* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #ifndef BIT_PUMP_JPEG_H #define BIT_PUMP_JPEG_H #include "ByteStream.h" #include "IOException.h" namespace RawSpeed { // Note: Allocated buffer MUST be at least size+sizeof(uint32) large. class BitPumpJPEG { public: BitPumpJPEG(ByteStream *s); BitPumpJPEG(const uchar8* _buffer, uint32 _size ); uint32 getBits(uint32 nbits); uint32 getBit(); uint32 getBitsSafe(uint32 nbits); uint32 getBitSafe(); uint32 peekBits(uint32 nbits); uint32 peekBit(); uint32 peekByte(); void skipBits(uint32 nbits); __inline void skipBitsNoFill(uint32 nbits){ mLeft -= nbits; } __inline void checkPos() { if (off>size) throw IOException("Out of buffer read");}; // Check if we have a valid position uchar8 getByte(); uchar8 getByteSafe(); void setAbsoluteOffset(uint32 offset); // Set offset in bytes uint32 getOffset() { return off-(mLeft>>3)+stuffed;} __inline uint32 getBitNoFill() {return (mCurr >> (--mLeft)) & 1;} __inline uint32 peekByteNoFill() {return ((mCurr >> (mLeft-8))) & 0xff; } __inline uint32 peekBitsNoFill(uint32 nbits) {return ((mCurr >> (mLeft-nbits))) & ((1 << nbits) - 1); } __inline uint32 getBitsNoFill(uint32 nbits) { return ((mCurr >> (mLeft -= (nbits)))) & ((1 << nbits) - 1);} #define TEST_IF_FF(VAL) if (VAL == 0xFF) {\ if (buffer[off] == 0)\ off++;\ else {\ VAL = 0;off--;stuffed++;\ }\ } // Fill the buffer with at least 24 bits __inline void fill() { uchar8 c, c2, c3; int m = mLeft >> 3; if (mLeft > 23) return; if (m == 2) { // 16 to 23 bits left, we can add 1 byte c = buffer[off++]; TEST_IF_FF(c); mCurr = (mCurr << 8) | c; mLeft += 8; return; } if (m == 1) { // 8 to 15 bits left, we can add 2 bytes c = buffer[off++]; TEST_IF_FF(c); c2 = buffer[off++]; TEST_IF_FF(c2); mCurr = (mCurr << 16) | (c<<8) | c2; mLeft += 16; return; } // 0 to 7 bits left, we can add 3 bytes c = buffer[off++]; TEST_IF_FF(c); c2 = buffer[off++]; TEST_IF_FF(c2); c3 = buffer[off++]; TEST_IF_FF(c3); mCurr = (mCurr << 24) | (c<<16) | (c2<<8) | c3; mLeft += 24; } #undef TEST_IF_FF virtual ~BitPumpJPEG(void); protected: void __inline init(); const uchar8* buffer; const uint32 size; // This if the end of buffer. uint32 mLeft; uint32 mCurr; uint32 off; // Offset in bytes uint32 stuffed; // How many bytes has been stuffed? private: }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/OrfDecoder.h0000644000175000017500000000257011542726010020526 00000000000000#ifndef ORF_DECODER_H #define ORF_DECODER_H #include "RawDecoder.h" #include "LJpegPlain.h" #include "TiffIFD.h" #include "BitPumpPlain.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class OrfDecoder : public RawDecoder { public: OrfDecoder(TiffIFD *rootIFD, FileMap* file); virtual ~OrfDecoder(void); virtual RawImage decodeRaw(); virtual void decodeMetaData(CameraMetaData *meta); virtual void checkSupport(CameraMetaData *meta); private: void decodeCompressed(ByteStream& s,uint32 w, uint32 h); TiffIFD *mRootIFD; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/FileReader.h0000644000175000017500000000241011542726010020505 00000000000000/* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #ifndef FILE_READER_H #define FILE_READER_H #include "FileIOException.h" #include "FileMap.h" namespace RawSpeed { class FileReader { public: FileReader(LPCWSTR filename); public: FileMap* readFile(); virtual ~FileReader(); LPCWSTR Filename() const { return mFilename; } // void Filename(LPCWSTR val) { mFilename = val; } private: LPCWSTR mFilename; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/NefDecoder.cpp0000644000175000017500000002307211541412541021043 00000000000000#include "StdAfx.h" #include "NefDecoder.h" #include "ByteStreamSwap.h" #include "BitPumpMSB32.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { NefDecoder::NefDecoder(TiffIFD *rootIFD, FileMap* file) : RawDecoder(file), mRootIFD(rootIFD) { decoderVersion = 2; } NefDecoder::~NefDecoder(void) { } RawImage NefDecoder::decodeRaw() { vector data = mRootIFD->getIFDsWithTag(CFAPATTERN); if (data.empty()) ThrowRDE("NEF Decoder: No image data found"); TiffIFD* raw = data[0]; int compression = raw->getEntry(COMPRESSION)->getInt(); data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("NEF Decoder: No model data found"); TiffEntry *offsets = raw->getEntry(STRIPOFFSETS); TiffEntry *counts = raw->getEntry(STRIPBYTECOUNTS); if (!data[0]->getEntry(MODEL)->getString().compare("NIKON D100 ")) { /**Sigh**/ if (!mFile->isValid(offsets->getInt())) ThrowRDE("NEF Decoder: Image data outside of file."); if (!D100IsCompressed(offsets->getInt())) { DecodeD100Uncompressed(); return mRaw; } } if (compression == 1) { DecodeUncompressed(); return mRaw; } if (offsets->count != 1) { ThrowRDE("NEF Decoder: Multiple Strips found: %u", offsets->count); } if (counts->count != offsets->count) { ThrowRDE("NEF Decoder: Byte count number does not match strip size: count:%u, strips:%u ", counts->count, offsets->count); } if (!mFile->isValid(offsets->getInt() + counts->getInt())) ThrowRDE("NEF Decoder: Invalid strip byte count. File probably truncated."); if (34713 != compression) ThrowRDE("NEF Decoder: Unsupported compression"); uint32 width = raw->getEntry(IMAGEWIDTH)->getInt(); uint32 height = raw->getEntry(IMAGELENGTH)->getInt(); uint32 bitPerPixel = raw->getEntry(BITSPERSAMPLE)->getInt(); mRaw->dim = iPoint2D(width, height); mRaw->createData(); data = mRootIFD->getIFDsWithTag(MAKERNOTE); if (data.empty()) ThrowRDE("NEF Decoder: No EXIF data found"); TiffIFD* exif = data[0]; TiffEntry *makernoteEntry = exif->getEntry(MAKERNOTE); const uchar8* makernote = makernoteEntry->getData(); FileMap makermap((uchar8*)&makernote[10], makernoteEntry->count - 10); TiffParser makertiff(&makermap); makertiff.parseData(); data = makertiff.RootIFD()->getIFDsWithTag((TiffTag)0x8c); if (data.empty()) ThrowRDE("NEF Decoder: Decompression info tag not found"); TiffEntry *meta; try { meta = data[0]->getEntry((TiffTag)0x96); } catch (TiffParserException) { meta = data[0]->getEntry((TiffTag)0x8c); // Fall back } try { NikonDecompressor decompressor(mFile, mRaw); // Nikon is JPEG (Big Endian) byte order ByteStream* metastream; if (getHostEndianness() == big) metastream = new ByteStream(meta->getData(), meta->count); else metastream = new ByteStreamSwap(meta->getData(), meta->count); decompressor.DecompressNikon(metastream, width, height, bitPerPixel, offsets->getInt(), counts->getInt()); delete metastream; } catch (IOException e) { errors.push_back(_strdup(e.what())); // Let's ignore it, it may have delivered somewhat useful data. } return mRaw; } /* Figure out if a NEF file is compressed. These fancy heuristics are only needed for the D100, thanks to a bug in some cameras that tags all images as "compressed". */ bool NefDecoder::D100IsCompressed(uint32 offset) { const uchar8 *test = mFile->getData(offset); int i; for (i = 15; i < 256; i += 16) if (test[i]) return true; return false; } void NefDecoder::DecodeUncompressed() { vector data = mRootIFD->getIFDsWithTag(CFAPATTERN); TiffIFD* raw = data[0]; uint32 nslices = raw->getEntry(STRIPOFFSETS)->count; const uint32 *offsets = raw->getEntry(STRIPOFFSETS)->getIntArray(); const uint32 *counts = raw->getEntry(STRIPBYTECOUNTS)->getIntArray(); uint32 yPerSlice = raw->getEntry(ROWSPERSTRIP)->getInt(); uint32 width = raw->getEntry(IMAGEWIDTH)->getInt(); uint32 height = raw->getEntry(IMAGELENGTH)->getInt(); uint32 bitPerPixel = raw->getEntry(BITSPERSAMPLE)->getInt(); vector slices; uint32 offY = 0; for (uint32 s = 0; s < nslices; s++) { NefSlice slice; slice.offset = offsets[s]; slice.count = counts[s]; if (offY + yPerSlice > height) slice.h = height - offY; else slice.h = yPerSlice; offY += yPerSlice; if (mFile->isValid(slice.offset + slice.count)) // Only decode if size is valid slices.push_back(slice); } if (0 == slices.size()) ThrowRDE("NEF Decoder: No valid slices found. File probably truncated."); mRaw->dim = iPoint2D(width, offY); mRaw->createData(); if (bitPerPixel == 14 && width*slices[0].h*2 == slices[0].count) bitPerPixel = 16; // D3 offY = 0; for (uint32 i = 0; i < slices.size(); i++) { NefSlice slice = slices[i]; ByteStream in(mFile->getData(slice.offset), slice.count); iPoint2D size(width, slice.h); iPoint2D pos(0, offY); try { if (hints.find(string("coolpixmangled")) == hints.end()) readUncompressedRaw(in, size, pos, width*bitPerPixel / 8, bitPerPixel, true); else readCoolpixMangledRaw(in, size, pos, width*bitPerPixel / 8); } catch (RawDecoderException e) { if (i>0) errors.push_back(_strdup(e.what())); else throw; } catch (IOException e) { if (i>0) errors.push_back(_strdup(e.what())); else ThrowRDE("NEF decoder: IO error occurred in first slice, unable to decode more. Error is: %s", e.what()); } offY += slice.h; } } void NefDecoder::readCoolpixMangledRaw(ByteStream &input, iPoint2D& size, iPoint2D& offset, int inputPitch) { uchar8* data = mRaw->getData(); uint32 outPitch = mRaw->pitch; uint32 w = size.x; uint32 h = size.y; uint32 cpp = mRaw->getCpp(); if (input.getRemainSize() < (inputPitch*h)) { if ((int)input.getRemainSize() > inputPitch) h = input.getRemainSize() / inputPitch - 1; else ThrowIOE("readUncompressedRaw: Not enough data to decode a single line. Image file truncated."); } if (offset.y > mRaw->dim.y) ThrowRDE("readUncompressedRaw: Invalid y offset"); if (offset.x + size.x > mRaw->dim.x) ThrowRDE("readUncompressedRaw: Invalid x offset"); uint32 y = offset.y; h = MIN(h + (uint32)offset.y, (uint32)mRaw->dim.y); w *= cpp; BitPumpMSB32 *in = new BitPumpMSB32(&input); for (; y < h; y++) { ushort16* dest = (ushort16*) & data[offset.x*sizeof(ushort16)*cpp+y*outPitch]; for (uint32 x = 0 ; x < w; x++) { dest[x] = in->getBits(12); } } } void NefDecoder::DecodeD100Uncompressed() { ThrowRDE("NEF DEcoder: D100 uncompressed not supported"); /* TiffIFD* raw = mRootIFD->getIFDsWithTag(CFAPATTERN)[0]; uint32 nslices = raw->getEntry(STRIPOFFSETS)->count; uint32 offset = raw->getEntry(STRIPOFFSETS)->getInt(); uint32 count = raw->getEntry(STRIPBYTECOUNTS)->getInt(); if (!mFile->isValid(offset+count)) ThrowRDE("DecodeD100Uncompressed: Truncated file"); const uchar8 *in = mFile->getData(offset); uint32 w = raw->getEntry(IMAGEWIDTH)->getInt(); uint32 h = raw->getEntry(IMAGELENGTH)->getInt(); mRaw->dim = iPoint2D(w, h); mRaw->bpp = 2; mRaw->createData(); uchar8* data = mRaw->getData(); uint32 outPitch = mRaw->pitch; BitPumpMSB bits(mFile->getData(offset),count); for (uint32 y = 0; y < h; y++) { ushort16* dest = (ushort16*)&data[y*outPitch]; for(uint32 x =0 ; x < w; x++) { uint32 b = bits.getBits(12); dest[x] = b; if ((x % 10) == 9) bits.skipBits(8); } }*/ } void NefDecoder::checkSupport(CameraMetaData *meta) { vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("NEF Support check: Model name found"); string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); this->checkCameraSupported(meta, make, model, ""); } void NefDecoder::decodeMetaData(CameraMetaData *meta) { mRaw->cfa.setCFA(CFA_RED, CFA_GREEN, CFA_GREEN2, CFA_BLUE); vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("NEF Meta Decoder: Model name found"); int white = mRaw->whitePoint; int black = mRaw->blackLevel; string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); setMetaData(meta, make, model, ""); if (white != 65536) mRaw->whitePoint = white; if (black >= 0) mRaw->blackLevel = black; } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/BitPumpMSB32.h0000644000175000017500000000443311542726010020601 00000000000000/* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #ifndef BIT_PUMP_MSB32_H #define BIT_PUMP_MSB32_H #include "ByteStream.h" #ifdef MIN_GET_BITS #undef MIN_GET_BITS #endif #define BITS_PER_LONG_LONG (8*sizeof(uint64)) #define MIN_GET_BITS (BITS_PER_LONG_LONG-33) /* max value for long getBuffer */ namespace RawSpeed { // Note: Allocated buffer MUST be at least size+sizeof(uint32) large. class BitPumpMSB32 { public: BitPumpMSB32(ByteStream *s); BitPumpMSB32(const uchar8* _buffer, uint32 _size ); uint32 getBitsSafe(uint32 nbits); uint32 getBitSafe(); uchar8 getByteSafe(); void setAbsoluteOffset(uint32 offset); // Set offset in bytes __inline uint32 getOffset() { return off-(mLeft>>3);} __inline void checkPos() { if (off>size) throw IOException("Out of buffer read");}; // Check if we have a valid position // Fill the buffer with at least 24 bits void fill(); __inline uint32 getBit() { if (!mLeft) fill(); return (uint32)((mCurr >> (--mLeft)) & 1); } __inline uint32 getBits(uint32 nbits) { if (mLeft < nbits) { fill(); } return (uint32)((mCurr >> (mLeft -= (nbits))) & ((1 << nbits) - 1)); } virtual ~BitPumpMSB32(void); protected: void __inline init(); const uchar8* buffer; const uint32 size; // This if the end of buffer. uint32 mLeft; uint64 mCurr; uint32 off; // Offset in bytes private: }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffEntry.h0000644000175000017500000000555411542726010020431 00000000000000#ifndef TIFF_ENTRY_H #define TIFF_ENTRY_H #include "TiffParserException.h" #include "FileMap.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { const uint32 datasizes[] = {0,1,1,2,4,8,1,1,2,4, 8, 4, 8, 4}; // 0-1-2-3-4-5-6-7-8-9-10-11-12-13 const uint32 datashifts[] = {0,0,0,1,2,3,0,0,1,2, 3, 2, 3, 2}; #ifdef CHECKSIZE #undef CHECKSIZE #endif #define CHECKSIZE(A) if (A >= f->getSize() || A < 1) throw TiffParserException("Error reading TIFF Entry structure size. File Corrupt") // 0-1-2-3-4-5-6-7-8-9-10-11-12-13 /* * Tag data type information. * * Note: RATIONALs are the ratio of two 32-bit integer values. */ typedef enum { TIFF_NOTYPE = 0, /* placeholder */ TIFF_BYTE = 1, /* 8-bit unsigned integer */ TIFF_ASCII = 2, /* 8-bit bytes w/ last byte null */ TIFF_SHORT = 3, /* 16-bit unsigned integer */ TIFF_LONG = 4, /* 32-bit unsigned integer */ TIFF_RATIONAL = 5, /* 64-bit unsigned fraction */ TIFF_SBYTE = 6, /* !8-bit signed integer */ TIFF_UNDEFINED = 7, /* !8-bit untyped data */ TIFF_SSHORT = 8, /* !16-bit signed integer */ TIFF_SLONG = 9, /* !32-bit signed integer */ TIFF_SRATIONAL = 10, /* !64-bit signed fraction */ TIFF_FLOAT = 11, /* !32-bit IEEE floating point */ TIFF_DOUBLE = 12 /* !64-bit IEEE floating point */ } TiffDataType; class TiffEntry { public: TiffEntry(); TiffEntry(FileMap* f, uint32 offset); virtual ~TiffEntry(void); virtual uint32 getInt(); float getFloat(); virtual ushort16 getShort(); virtual const uint32* getIntArray(); virtual const ushort16* getShortArray(); string getString(); uchar8 getByte(); const uchar8* getData() {return data;}; int getElementSize(); int getElementShift(); // variables: TiffTag tag; TiffDataType type; uint32 count; uint32 getDataOffset() const { return data_offset; } bool isFloat(); bool isInt(); protected: uchar8* data; uint32 data_offset; #ifdef _DEBUG int debug_intVal; float debug_floatVal; #endif }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffIFD.h0000644000175000017500000000410611542726010017722 00000000000000#ifndef TIFF_IFD_H #define TIFF_IFD_H #include "FileMap.h" #include "TiffEntry.h" #include "TiffParserException.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class TiffIFD { public: TiffIFD(); TiffIFD(FileMap* f, uint32 offset); virtual ~TiffIFD(void); vector mSubIFD; map mEntry; int getNextIFD() {return nextIFD;} vector getIFDsWithTag(TiffTag tag); TiffEntry* getEntry(TiffTag tag); bool hasEntry(TiffTag tag); bool hasEntryRecursive(TiffTag tag); TiffEntry* getEntryRecursive(TiffTag tag); TiffIFD* parseDngPrivateData(TiffEntry *t); TiffIFD* parseMakerNote(FileMap *f, uint32 offset, Endianness parent_end); Endianness endian; protected: int nextIFD; }; inline bool isTiffSameAsHost(const ushort16* tifftag) { Endianness host = getHostEndianness(); if (tifftag[0] == 0x4949) return little == host; if (tifftag[0] == 0x4d4d) return big == host; ThrowTPE("Unknown Tiff Byteorder :%x", tifftag[0]); return false; } inline Endianness getTiffEndianness(const ushort16* tifftag) { if (tifftag[0] == 0x4949) return little; if (tifftag[0] == 0x4d4d) return big; return unknown; } } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/Cr2Decoder.cpp0000644000175000017500000002724511541412541020767 00000000000000#include "StdAfx.h" #include "Cr2Decoder.h" #include "TiffParserHeaderless.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { Cr2Decoder::Cr2Decoder(TiffIFD *rootIFD, FileMap* file) : RawDecoder(file), mRootIFD(rootIFD) { } Cr2Decoder::~Cr2Decoder(void) { } RawImage Cr2Decoder::decodeRaw() { vector data = mRootIFD->getIFDsWithTag((TiffTag)0xc5d8); if (data.empty()) ThrowRDE("CR2 Decoder: No image data found"); TiffIFD* raw = data[0]; mRaw = RawImage::create(); mRaw->isCFA = true; vector slices; int completeH = 0; try { TiffEntry *offsets = raw->getEntry(STRIPOFFSETS); TiffEntry *counts = raw->getEntry(STRIPBYTECOUNTS); // Iterate through all slices for (uint32 s = 0; s < offsets->count; s++) { Cr2Slice slice; slice.offset = offsets[0].getInt(); slice.count = counts[0].getInt(); SOFInfo sof; LJpegPlain l(mFile, mRaw); l.getSOF(&sof, slice.offset, slice.count); slice.w = sof.w * sof.cps; slice.h = sof.h; if (!slices.empty()) if (slices[0].w != slice.w) ThrowRDE("CR2 Decoder: Slice width does not match."); if (mFile->isValid(slice.offset + slice.count)) // Only decode if size is valid slices.push_back(slice); completeH += slice.h; } } catch (TiffParserException) { ThrowRDE("CR2 Decoder: Unsupported format."); } if (slices.empty()) { ThrowRDE("CR2 Decoder: No Slices found."); } mRaw->dim = iPoint2D(slices[0].w, completeH); if (raw->hasEntry((TiffTag)0xc6c5)) { ushort16 ss = raw->getEntry((TiffTag)0xc6c5)->getInt(); // sRaw if (ss == 4) { mRaw->dim.x /= 3; mRaw->setCpp(3); mRaw->isCFA = false; } } mRaw->createData(); vector s_width; if (raw->hasEntry(CANONCR2SLICE)) { const ushort16 *ss = raw->getEntry(CANONCR2SLICE)->getShortArray(); for (int i = 0; i < ss[0]; i++) { s_width.push_back(ss[1]); } s_width.push_back(ss[2]); } else { s_width.push_back(slices[0].w); } uint32 offY = 0; if (s_width.size() > 15) ThrowRDE("CR2 Decoder: No more than 15 slices supported"); for (uint32 i = 0; i < slices.size(); i++) { Cr2Slice slice = slices[i]; try { LJpegPlain l(mFile, mRaw); l.addSlices(s_width); l.mUseBigtable = true; l.startDecoder(slice.offset, slice.count, 0, offY); } catch (RawDecoderException e) { if (i == 0) throw; // These may just be single slice error - store the error and move on errors.push_back(_strdup(e.what())); } catch (IOException e) { // Let's try to ignore this - it might be truncated data, so something might be useful. errors.push_back(_strdup(e.what())); } offY += slice.w; } if (mRaw->subsampling.x > 1 || mRaw->subsampling.y > 1) sRawInterpolate(); return mRaw; } void Cr2Decoder::checkSupport(CameraMetaData *meta) { vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("CR2 Support check: Model name found"); string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); this->checkCameraSupported(meta, make, model, ""); } void Cr2Decoder::decodeMetaData(CameraMetaData *meta) { mRaw->cfa.setCFA(CFA_RED, CFA_GREEN, CFA_GREEN2, CFA_BLUE); vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("CR2 Meta Decoder: Model name not found"); string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); string mode = ""; if (mRaw->subsampling.y == 2 && mRaw->subsampling.x == 2) mode = "sRaw1"; if (mRaw->subsampling.y == 1 && mRaw->subsampling.x == 2) mode = "sRaw2"; setMetaData(meta, make, model, mode); } // Interpolate and convert sRaw data. void Cr2Decoder::sRawInterpolate() { vector data = mRootIFD->getIFDsWithTag((TiffTag)0x4001); if (data.empty()) ThrowRDE("CR2 sRaw: Unable to locate WB info."); const ushort16 *wb_data = data[0]->getEntry((TiffTag)0x4001)->getShortArray(); // Offset to sRaw coefficients used to reconstruct uncorrected RGB data. wb_data = &wb_data[4+(126+22)/2]; sraw_coeffs[0] = wb_data[0]; sraw_coeffs[1] = (wb_data[1] + wb_data[2] + 1) >> 1; sraw_coeffs[2] = wb_data[3]; // Check if sRaw2 is using old coefficients data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("CR2 sRaw Decoder: Model name not found"); string model = data[0]->getEntry(MODEL)->getString(); bool isOldSraw = (model.compare("Canon EOS 40D") == 0); if (mRaw->subsampling.y == 1 && mRaw->subsampling.x == 2) { if (isOldSraw) interpolate_422_old(mRaw->dim.x / 2, mRaw->dim.y , 0, mRaw->dim.y); else interpolate_422(mRaw->dim.x / 2, mRaw->dim.y , 0, mRaw->dim.y); } else { interpolate_420(mRaw->dim.x / 2, mRaw->dim.y / 2 , 0 , mRaw->dim.y / 2); } } #define YUV_TO_RGB(Y, Cb, Cr) r = sraw_coeffs[0] * ((int)Y + (( 200*(int)Cb + 22929*(int)Cr) >> 12));\ g = sraw_coeffs[1] * ((int)Y + ((-5640*(int)Cb - 11751*(int)Cr) >> 12));\ b = sraw_coeffs[2] * ((int)Y + ((29040*(int)Cb - 101*(int)Cr) >> 12));\ r >>= 10; g >>=10; b >>=10; #define STORE_RGB(X,A,B,C) X[A] = clampbits(r,16); X[B] = clampbits(g,16); X[C] = clampbits(b,16); /* sRaw interpolators - ugly as sin, but does the job in reasonably speed */ // Note: Thread safe. void Cr2Decoder::interpolate_422(int w, int h, int start_h , int end_h) { // Last pixel should not be interpolated w--; // Current line ushort16* c_line; for (int y = start_h; y < end_h; y++) { c_line = (ushort16*)mRaw->getData(0, y); int r, g, b; int off = 0; for (int x = 0; x < w; x++) { int Y = c_line[off]; int Cb = c_line[off+1] - 16384; int Cr = c_line[off+2] - 16384; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(c_line, off, off + 1, off + 2); off += 3; Y = c_line[off]; int Cb2 = (Cb + c_line[off+1+3] - 16384) >> 1; int Cr2 = (Cr + c_line[off+2+3] - 16384) >> 1; YUV_TO_RGB(Y, Cb2, Cr2); STORE_RGB(c_line, off, off + 1, off + 2); off += 3; } // Last two pixels int Y = c_line[off]; int Cb = c_line[off+1] - 16384; int Cr = c_line[off+2] - 16384; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(c_line, off, off + 1, off + 2); Y = c_line[off+3]; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(c_line, off + 3, off + 4, off + 5); } } // Note: Not thread safe, since it writes inplace. void Cr2Decoder::interpolate_420(int w, int h, int start_h , int end_h) { // Last pixel should not be interpolated w--; bool atLastLine = FALSE; if (end_h == h) { end_h--; atLastLine = TRUE; } // Current line ushort16* c_line; // Next line ushort16* n_line; // Next line again ushort16* nn_line; int off; int r, g, b; for (int y = start_h; y < end_h; y++) { c_line = (ushort16*)mRaw->getData(0, y * 2); n_line = (ushort16*)mRaw->getData(0, y * 2 + 1); nn_line = (ushort16*)mRaw->getData(0, y * 2 + 2); off = 0; for (int x = 0; x < w; x++) { int Y = c_line[off]; int Cb = c_line[off+1] - 16384; int Cr = c_line[off+2] - 16384; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(c_line, off, off + 1, off + 2); Y = c_line[off+3]; int Cb2 = (Cb + c_line[off+1+6] - 16383) >> 1; int Cr2 = (Cr + c_line[off+2+6] - 16383) >> 1; YUV_TO_RGB(Y, Cb2, Cr2); STORE_RGB(c_line, off + 3, off + 4, off + 5); // Next line Y = n_line[off]; int Cb3 = (Cb + nn_line[off+1] - 16383) >> 1; int Cr3 = (Cr + nn_line[off+2] - 16383) >> 1; YUV_TO_RGB(Y, Cb3, Cr3); STORE_RGB(n_line, off, off + 1, off + 2); Y = n_line[off+3]; Cb = (Cb + Cb2 + Cb3 + nn_line[off+1+6] - 16382) >> 2; //Left + Above + Right +Below Cr = (Cr + Cr2 + Cr3 + nn_line[off+2+6] - 16382) >> 2; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(n_line, off + 3, off + 4, off + 5); off += 6; } int Y = c_line[off]; int Cb = c_line[off+1] - 16384; int Cr = c_line[off+2] - 16384; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(c_line, off, off + 1, off + 2); Y = c_line[off+3]; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(c_line, off + 3, off + 4, off + 5); // Next line Y = n_line[off]; Cb = (Cb + nn_line[off+1] - 16383) >> 1; Cr = (Cr + nn_line[off+2] - 16383) >> 1; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(n_line, off, off + 1, off + 2); Y = n_line[off+3]; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(n_line, off + 3, off + 4, off + 5); } if (atLastLine) { c_line = (ushort16*)mRaw->getData(0, end_h * 2); n_line = (ushort16*)mRaw->getData(0, end_h * 2 + 1); off = 0; // Last line for (int x = 0; x < w; x++) { int Y = c_line[off]; int Cb = c_line[off+1] - 16384; int Cr = c_line[off+2] - 16384; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(c_line, off, off + 1, off + 2); Y = c_line[off+3]; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(c_line, off + 3, off + 4, off + 5); // Next line Y = n_line[off]; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(n_line, off, off + 1, off + 2); Y = n_line[off+3]; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(n_line, off + 3, off + 4, off + 5); off += 6; } } } #undef YUV_TO_RGB #define YUV_TO_RGB(Y, Cb, Cr) r = sraw_coeffs[0] * (Y + Cr -512 );\ g = sraw_coeffs[1] * (Y + ((-778*Cb - (Cr << 11)) >> 12) - 512);\ b = sraw_coeffs[2] * (Y + (Cb - 512));\ r >>= 10; g >>=10; b >>=10; // Note: Thread safe. void Cr2Decoder::interpolate_422_old(int w, int h, int start_h , int end_h) { // Last pixel should not be interpolated w--; // Current line ushort16* c_line; for (int y = start_h; y < end_h; y++) { c_line = (ushort16*)mRaw->getData(0, y); int r, g, b; int off = 0; for (int x = 0; x < w; x++) { int Y = c_line[off]; int Cb = c_line[off+1] - 16384; int Cr = c_line[off+2] - 16384; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(c_line, off, off + 1, off + 2); off += 3; Y = c_line[off]; int Cb2 = (Cb + c_line[off+1+3] - 16384) >> 1; int Cr2 = (Cr + c_line[off+2+3] - 16384) >> 1; YUV_TO_RGB(Y, Cb2, Cr2); STORE_RGB(c_line, off, off + 1, off + 2); off += 3; } // Last two pixels int Y = c_line[off]; int Cb = c_line[off+1] - 16384; int Cr = c_line[off+2] - 16384; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(c_line, off, off + 1, off + 2); Y = c_line[off+3]; YUV_TO_RGB(Y, Cb, Cr); STORE_RGB(c_line, off + 3, off + 4, off + 5); } } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/NikonDecompressor.cpp0000644000175000017500000001260711526533650022523 00000000000000#include "StdAfx.h" #include "NikonDecompressor.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { NikonDecompressor::NikonDecompressor(FileMap* file, RawImage img) : LJpegDecompressor(file, img) { for (uint32 i = 0; i < 0xffff ; i++) { curve[i] = i; } bits = 0; } NikonDecompressor::~NikonDecompressor(void) { if (bits) delete(bits); bits = 0; } void NikonDecompressor::initTable(uint32 huffSelect) { HuffmanTable *dctbl1 = &huff[0]; uint32 acc = 0; for (uint32 i = 0; i < 16 ;i++) { dctbl1->bits[i+1] = nikon_tree[huffSelect][i]; acc += dctbl1->bits[i+1]; } dctbl1->bits[0] = 0; for (uint32 i = 0 ; i < acc; i++) { dctbl1->huffval[i] = nikon_tree[huffSelect][i+16]; } createHuffmanTable(dctbl1); } void NikonDecompressor::DecompressNikon(ByteStream *metadata, uint32 w, uint32 h, uint32 bitsPS, uint32 offset, uint32 size) { uint32 v0 = metadata->getByte(); uint32 v1 = metadata->getByte(); uint32 huffSelect = 0; uint32 split = 0; int pUp1[2]; int pUp2[2]; mUseBigtable = true; _RPT2(0, "Nef version v0:%u, v1:%u\n", v0, v1); if (v0 == 73 || v1 == 88) metadata->skipBytes(2110); if (v0 == 70) huffSelect = 2; if (bitsPS == 14) huffSelect += 3; pUp1[0] = metadata->getShort(); pUp1[1] = metadata->getShort(); pUp2[0] = metadata->getShort(); pUp2[1] = metadata->getShort(); int _max = 1 << bitsPS & 0x7fff; uint32 step = 0; uint32 csize = metadata->getShort(); if (csize > 1) step = _max / (csize - 1); if (v0 == 68 && v1 == 32 && step > 0) { for (uint32 i = 0; i < csize; i++) curve[i*step] = metadata->getShort(); for (int i = 0; i < _max; i++) curve[i] = (curve[i-i%step] * (step - i % step) + curve[i-i%step+step] * (i % step)) / step; metadata->setAbsoluteOffset(562); split = metadata->getShort(); } else if (v0 != 70 && csize <= 0x4001) { for (uint32 i = 0; i < csize; i++) { curve[i] = metadata->getShort(); } _max = csize; } while (curve[_max-2] == curve[_max-1]) _max--; initTable(huffSelect); mRaw->whitePoint = curve[_max-1]; mRaw->blackLevel = curve[0]; uint32 x, y; bits = new BitPumpMSB(mFile->getData(offset), size); uchar8 *draw = mRaw->getData(); uint32 *dest; uint32 pitch = mRaw->pitch; int pLeft1 = 0; int pLeft2 = 0; uint32 cw = w / 2; for (y = 0; y < h; y++) { if (split && y == split) { initTable(huffSelect + 1); } dest = (uint32*) & draw[y*pitch]; // Adjust destination pUp1[y&1] += HuffDecodeNikon(); pUp2[y&1] += HuffDecodeNikon(); pLeft1 = pUp1[y&1]; pLeft2 = pUp2[y&1]; dest[0] = curve[MIN(_max-1, MAX(0,pLeft1))] | (curve[MIN(_max-1, MAX(0,pLeft2))] << 16); for (x = 1; x < cw; x++) { bits->checkPos(); pLeft1 += HuffDecodeNikon(); pLeft2 += HuffDecodeNikon(); dest[x] = curve[MIN(_max-1, MAX(0,pLeft1))] | (curve[MIN(_max-1, MAX(0,pLeft2))] << 16); } } } /* *-------------------------------------------------------------- * * HuffDecode -- * * Taken from Figure F.16: extract next coded symbol from * input stream. This should becode a macro. * * Results: * Next coded symbol * * Side effects: * Bitstream is parsed. * *-------------------------------------------------------------- */ int NikonDecompressor::HuffDecodeNikon() { int rv; int l, temp; int code, val ; HuffmanTable *dctbl1 = &huff[0]; bits->fill(); code = bits->peekBitsNoFill(14); val = dctbl1->bigTable[code]; if ((val&0xff) != 0xff) { bits->skipBitsNoFill(val&0xff); return val >> 8; } rv = 0; code = bits->peekByteNoFill(); val = dctbl1->numbits[code]; l = val & 15; if (l) { bits->skipBitsNoFill(l); rv = val >> 4; } else { bits->skipBits(8); l = 8; while (code > dctbl1->maxcode[l]) { temp = bits->getBitNoFill(); code = (code << 1) | temp; l++; } if (l > 16) { ThrowIOE("Corrupt JPEG data: bad Huffman code:%u\n", l); } else { rv = dctbl1->huffval[dctbl1->valptr[l] + ((int)(code - dctbl1->mincode[l]))]; } } if (rv == 16) return -32768; /* * Section F.2.2.1: decode the difference and * Figure F.12: extend sign bit */ uint32 len = rv & 15; uint32 shl = rv >> 4; int diff = ((bits->getBits(len - shl) << 1) + 1) << shl >> 1; if ((diff & (1 << (len - 1))) == 0) diff -= (1 << len) - !shl; return diff; } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/DngDecoder.h0000644000175000017500000000317011542726010020505 00000000000000#ifndef DNG_DECODER_H #define DNG_DECODER_H #include "LJpegPlain.h" #include "TiffIFD.h" #include "DngDecoderSlices.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class DngDecoder : public RawDecoder { public: DngDecoder(TiffIFD *rootIFD, FileMap* file); virtual ~DngDecoder(void); virtual RawImage decodeRaw(); virtual void decodeMetaData(CameraMetaData *meta); virtual void checkSupport(CameraMetaData *meta); protected: TiffIFD *mRootIFD; bool mFixLjpeg; void printMetaData(); bool decodeMaskedAreas(TiffIFD* raw); bool decodeBlackLevels(TiffIFD* raw); void setBlack(TiffIFD* raw); }; class DngStrip { public: DngStrip() { h = offset = count = offsetY = 0;}; ~DngStrip() {}; uint32 h; uint32 offset; // Offset in bytes uint32 count; uint32 offsetY; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffEntry.cpp0000644000175000017500000001052211526533650020763 00000000000000#include "StdAfx.h" #include "TiffEntry.h" #include /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { TiffEntry::TiffEntry() { } TiffEntry::TiffEntry(FileMap* f, uint32 offset) { unsigned short* p = (unsigned short*)f->getData(offset); tag = (TiffTag)p[0]; type = (TiffDataType)p[1]; count = *(int*)f->getData(offset + 4); if (type > 13) ThrowTPE("Error reading TIFF structure. Unknown Type 0x%x encountered.", type); uint32 bytesize = count << datashifts[type]; if (bytesize <= 4) { data = f->getDataWrt(offset + 8); } else { // offset data_offset = *(uint32*)f->getData(offset + 8); CHECKSIZE(data_offset + bytesize); data = f->getDataWrt(data_offset); } #ifdef _DEBUG debug_intVal = 0xC0CAC01A; debug_floatVal = sqrtf(-1); if (type == TIFF_LONG || type == TIFF_SHORT) debug_intVal = getInt(); if (type == TIFF_FLOAT || type == TIFF_DOUBLE) debug_floatVal = getFloat(); #endif } TiffEntry::~TiffEntry(void) { } bool TiffEntry::isInt() { return (type == TIFF_LONG || type == TIFF_SHORT); } unsigned int TiffEntry::getInt() { if (!(type == TIFF_LONG || type == TIFF_SHORT)) ThrowTPE("TIFF, getInt: Wrong type 0x%x encountered. Expected Long", type); if (type == TIFF_SHORT) return getShort(); return *(unsigned int*)&data[0]; } unsigned short TiffEntry::getShort() { if (type != TIFF_SHORT) ThrowTPE("TIFF, getShort: Wrong type 0x%x encountered. Expected Short", type); return *(unsigned short*)&data[0]; } const unsigned int* TiffEntry::getIntArray() { if (type != TIFF_LONG && type != TIFF_RATIONAL && type != TIFF_SRATIONAL && type != TIFF_UNDEFINED ) ThrowTPE("TIFF, getIntArray: Wrong type 0x%x encountered. Expected Long", type); return (unsigned int*)&data[0]; } const unsigned short* TiffEntry::getShortArray() { if (type != TIFF_SHORT) ThrowTPE("TIFF, getShortArray: Wrong type 0x%x encountered. Expected Short", type); return (unsigned short*)&data[0]; } unsigned char TiffEntry::getByte() { if (type != TIFF_BYTE) ThrowTPE("TIFF, getByte: Wrong type 0x%x encountered. Expected Byte", type); return data[0]; } bool TiffEntry::isFloat() { return (type == TIFF_FLOAT || type == TIFF_DOUBLE || type == TIFF_RATIONAL || type == TIFF_SRATIONAL || type == TIFF_LONG || type == TIFF_SHORT); } float TiffEntry::getFloat() { if (!(type == TIFF_FLOAT || type == TIFF_DOUBLE || type == TIFF_RATIONAL || type == TIFF_SRATIONAL || type == TIFF_LONG || type == TIFF_SHORT)) ThrowTPE("TIFF, getFloat: Wrong type 0x%x encountered. Expected Float", type); if (type == TIFF_DOUBLE) { return (float)*(double*)&data[0]; } else if (type == TIFF_FLOAT) { return *(float*)&data[0]; } else if (type == TIFF_LONG || type == TIFF_SHORT) { return (float)getInt(); } else if (type == TIFF_RATIONAL) { const unsigned int* t = getIntArray(); if (t[1]) return (float)t[0]/t[1]; } else if (type == TIFF_SRATIONAL) { const int* t = (const int*)getIntArray(); if (t[1]) return (float)t[0]/t[1]; } return 0.0f; } string TiffEntry::getString() { if (type != TIFF_ASCII) ThrowTPE("TIFF, getString: Wrong type 0x%x encountered. Expected Ascii", type); data[count-1] = 0; // Ensure string is not larger than count defines return string((char*)&data[0]); } int TiffEntry::getElementSize() { return datasizes[type]; } int TiffEntry::getElementShift() { return datashifts[type]; } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/Common.h0000644000175000017500000000720611542726010017743 00000000000000/* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #ifndef COMMON_H #define COMMON_H #if !defined(__unix__) && !defined(__MINGW32__) #include #pragma intrinsic(_ReturnAddress) #define MIN(a,b) min(a,b) #define MAX(a,b) max(a,b) typedef unsigned __int64 uint64; #else // On linux #define _ASSERTE(a) void(a) #define _RPT0(a,b) #define _RPT1(a,b,c) #define _RPT2(a,b,c,d) #define _RPT3(a,b,c,d,e) #define _RPT4(a,b,c,d,e,f) #define __inline inline #define _strdup(a) strdup(a) void* _aligned_malloc(size_t bytes, size_t alignment); #define _aligned_free(a) do { free(a); } while (0) #ifndef MIN #define MIN(a, b) lmin(a,b) typedef unsigned long long uint64; #endif #ifndef MAX #define MAX(a, b) lmax(a,b) #endif #ifndef __MINGW32__ typedef char* LPCWSTR; #endif #endif // __unix__ #ifndef TRUE #define TRUE 1 #endif #ifndef FALSE #define FALSE 0 #endif int rawspeed_get_number_of_processor_cores(); namespace RawSpeed { typedef signed char char8; typedef unsigned char uchar8; typedef unsigned int uint32; typedef signed int int32; typedef unsigned short ushort16; typedef enum Endianness { big, little, unknown } Endianness; inline void BitBlt(uchar8* dstp, int dst_pitch, const uchar8* srcp, int src_pitch, int row_size, int height) { if (height == 1 || (dst_pitch == src_pitch && src_pitch == row_size)) { memcpy(dstp, srcp, row_size*height); return; } for (int y=height; y>0; --y) { memcpy(dstp, srcp, row_size); dstp += dst_pitch; srcp += src_pitch; } } inline bool isPowerOfTwo (int val) { return (val & (~val+1)) == val; } inline int lmin(int p0, int p1) { return p1 + ((p0 - p1) & ((p0 - p1) >> 31)); } inline int lmax(int p0, int p1) { return p0 - ((p0 - p1) & ((p0 - p1) >> 31)); } inline uint32 getThreadCount() { #ifdef WIN32 return pthread_num_processors_np(); #else return rawspeed_get_number_of_processor_cores(); #endif } inline Endianness getHostEndianness() { ushort16 testvar = 0xfeff; uint32 firstbyte = ((uchar8 *)&testvar)[0]; if (firstbyte == 0xff) return little; else if (firstbyte == 0xfe) return big; else _ASSERTE(FALSE); // Return something to make compilers happy return unknown; } inline uint32 clampbits(int x, uint32 n) { uint32 _y_temp; if( (_y_temp=x>>n) ) x = ~_y_temp >> (32-n); return x;} /* Remove all spaces at the end of a string */ inline void TrimSpaces(string& str) { // Trim Both leading and trailing spaces size_t startpos = str.find_first_not_of(" \t"); // Find the first character position after excluding leading blank spaces size_t endpos = str.find_last_not_of(" \t"); // Find the first character position from reverse af // if all spaces or empty return an empty string if ((string::npos == startpos) || (string::npos == endpos)) { str = ""; } else str = str.substr(startpos, endpos - startpos + 1); } } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/ByteStreamSwap.cpp0000644000175000017500000000151311526533650021763 00000000000000#include "StdAfx.h" #include "ByteStreamSwap.h" namespace RawSpeed { ByteStreamSwap::ByteStreamSwap( const uchar8* _buffer, uint32 _size ) : ByteStream(_buffer, _size) {} ByteStreamSwap::ByteStreamSwap( const ByteStreamSwap* b ) : ByteStream(b) {} ByteStreamSwap::~ByteStreamSwap(void) { } ushort16 ByteStreamSwap::getShort() { if (off + 1 >= size) throw IOException("getShort: Out of buffer read"); uint32 a = buffer[off++]; uint32 b = buffer[off++]; return (ushort16)((a << 8) | b); } /* NOTE: Actually unused, so not tested */ int ByteStreamSwap::getInt() { if (off + 4 >= size) throw IOException("getInt: Out of buffer read"); int r = (int)buffer[off] << 24 | (int)buffer[off] << 16 | (int)buffer[off] << 8 | (int)buffer[off]; off+=4; return r; } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffParserHeaderless.h0000644000175000017500000000235511542726010022560 00000000000000#ifndef TIFF_PARSER_HEADERLESS_H #define TIFF_PARSER_HEADERLESS_H #include "TiffParser.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class TiffParserHeaderless : public TiffParser { public: TiffParserHeaderless(FileMap* input, Endianness _end); virtual ~TiffParserHeaderless(void); void parseData(uint32 firstIfdOffset); virtual void parseData(); }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/SrwDecoder.cpp0000644000175000017500000000744111541412541021110 00000000000000#include "StdAfx.h" #include "SrwDecoder.h" #include "TiffParserOlympus.h" #ifdef __unix__ #include #endif /* RawSpeed - RAW file decoder. Copyright (C) 2009-2010 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { SrwDecoder::SrwDecoder(TiffIFD *rootIFD, FileMap* file): RawDecoder(file), mRootIFD(rootIFD) { } SrwDecoder::~SrwDecoder(void) { } RawImage SrwDecoder::decodeRaw() { vector data = mRootIFD->getIFDsWithTag(STRIPOFFSETS); if (data.empty()) ThrowRDE("Srw Decoder: No image data found"); TiffIFD* raw = data[0]; int compression = raw->getEntry(COMPRESSION)->getInt(); if (32769 != compression && 32770 != compression ) ThrowRDE("Srw Decoder: Unsupported compression"); if (32769 == compression) { this->decodeUncompressed(raw, false); return mRaw; } if (32770 == compression) { this->decodeUncompressed(raw, true); return mRaw; } ThrowRDE("Srw Decoder: Unsupported compression"); return mRaw; } void SrwDecoder::checkSupport(CameraMetaData *meta) { vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("Srw Support check: Model name found"); string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); this->checkCameraSupported(meta, make, model, ""); } void SrwDecoder::decodeMetaData(CameraMetaData *meta) { mRaw->cfa.setCFA(CFA_RED, CFA_GREEN, CFA_GREEN2, CFA_BLUE); vector data = mRootIFD->getIFDsWithTag(MODEL); if (data.empty()) ThrowRDE("SRW Meta Decoder: Model name found"); string make = data[0]->getEntry(MAKE)->getString(); string model = data[0]->getEntry(MODEL)->getString(); data = mRootIFD->getIFDsWithTag(CFAPATTERN); if (!this->checkCameraSupported(meta, make, model, "") && !data.empty() && data[0]->hasEntry(CFAREPEATPATTERNDIM)) { const unsigned short* pDim = data[0]->getEntry(CFAREPEATPATTERNDIM)->getShortArray(); iPoint2D cfaSize(pDim[1], pDim[0]); if (cfaSize.x != 2 && cfaSize.y != 2) ThrowRDE("SRW Decoder: Unsupported CFA pattern size"); const uchar8* cPat = data[0]->getEntry(CFAPATTERN)->getData(); if (cfaSize.area() != data[0]->getEntry(CFAPATTERN)->count) ThrowRDE("SRW Decoder: CFA pattern dimension and pattern count does not match: %d."); for (int y = 0; y < cfaSize.y; y++) { for (int x = 0; x < cfaSize.x; x++) { uint32 c1 = cPat[x+y*cfaSize.x]; CFAColor c2; switch (c1) { case 0: c2 = CFA_RED; break; case 1: c2 = CFA_GREEN; break; case 2: c2 = CFA_BLUE; break; default: c2 = CFA_UNKNOWN; ThrowRDE("SRW Decoder: Unsupported CFA Color."); } mRaw->cfa.setColorAt(iPoint2D(x, y), c2); } } printf("Camera CFA: %s\n", mRaw->cfa.asString().c_str()); } setMetaData(meta, make, model, ""); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/FileMap.h0000644000175000017500000000353111542726010020025 00000000000000#ifndef FILE_MAP_H #define FILE_MAP_H #include "FileIOException.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #include "IOException.h" namespace RawSpeed { /************************************************************************* * This is the basic file map * * It allows access to a file. * Base implementation is for a complete file that is already in memory. * This can also be done as a MemMap * *****************************/ class FileMap { public: FileMap(uint32 _size); // Allocates the data array itself FileMap(uchar8* _data, uint32 _size); // Data already allocated. ~FileMap(void); const uchar8* getData(uint32 offset); uchar8* getDataWrt(uint32 offset) {return &data[offset];} uint32 getSize() {return size;} bool isValid(uint32 offset) {return offset<=size;} FileMap* clone(); /* For testing purposes */ void corrupt(int errors); FileMap* cloneRandomSize(); private: uchar8* data; uint32 size; bool mOwnAlloc; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/LJpegPlain.cpp0000644000175000017500000006417611541412541021044 00000000000000#include "StdAfx.h" #include "LJpegPlain.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { LJpegPlain::LJpegPlain(FileMap* file, RawImage img) : LJpegDecompressor(file, img) { offset = 0; slice_width = 0; } LJpegPlain::~LJpegPlain(void) { if (offset) delete[](offset); offset = 0; if (slice_width) delete[](slice_width); slice_width = 0; } void LJpegPlain::decodeScan() { // If image attempts to decode beyond the image bounds, strip it. if ((frame.w * frame.cps + offX * mRaw->getCpp()) > mRaw->dim.x * mRaw->getCpp()) skipX = (((frame.w * frame.cps + offX * mRaw->getCpp())) - mRaw->dim.x * mRaw->getCpp()) / frame.cps; if (frame.h + offY > (uint32)mRaw->dim.y) skipY = frame.h + offY - mRaw->dim.y; if (slicesW.empty()) slicesW.push_back(frame.w*frame.cps); if ( 0 == frame.h || 0 == frame.w) ThrowRDE("LJpegPlain::decodeScan: Image width or height set to zero"); for (uint32 i = 0; i < frame.cps; i++) { if (frame.compInfo[i].superH != 1 || frame.compInfo[i].superV != 1) { if (mRaw->isCFA) ThrowRDE("LJpegDecompressor::decodeScan: Cannot decode subsampled image to CFA data"); if (mRaw->getCpp() != frame.cps) ThrowRDE("LJpegDecompressor::decodeScan: Subsampled component count does not match image."); if (pred == 1) { if (frame.compInfo[0].superH == 2 && frame.compInfo[0].superV == 2 && frame.compInfo[1].superH == 1 && frame.compInfo[1].superV == 1 && frame.compInfo[2].superH == 1 && frame.compInfo[2].superV == 1) { // Something like Cr2 sRaw1, use fast decoder decodeScanLeft4_2_0(); return; } else if (frame.compInfo[0].superH == 2 && frame.compInfo[0].superV == 1 && frame.compInfo[1].superH == 1 && frame.compInfo[1].superV == 1 && frame.compInfo[2].superH == 1 && frame.compInfo[2].superV == 1) { // Something like Cr2 sRaw2, use fast decoder decodeScanLeft4_2_2(); return; } else { decodeScanLeftGeneric(); return; } } else { ThrowRDE("LJpegDecompressor::decodeScan: Unsupported prediction direction."); } } } if (pred == 1) { if (frame.cps == 2) decodeScanLeft2Comps(); else if (frame.cps == 3) decodeScanLeft3Comps(); else if (frame.cps == 4) decodeScanLeft4Comps(); else ThrowRDE("LJpegDecompressor::decodeScan: Unsupported component direction count."); return; } ThrowRDE("LJpegDecompressor::decodeScan: Unsupported prediction direction."); } /** * CR2 Slice handling: * In the following code, canon slices are handled in-place, to avoid having to * copy the entire frame afterwards. * The "offset" array is created to easily map slice positions on to the output image. * The offset array size is the number of slices multiplied by height. * Each of these offsets are an offset into the destination image, and it also contains the * slice number (shifted up 28 bits), so it is possible to retrieve the width of each slice. * Every time "components" pixels has been processed the slice size is tested, and output offset * is adjusted if needed. This makes slice handling very "light", since it involves a single * counter, and a predictable branch. * For unsliced images, add one slice with the width of the image. **/ void LJpegPlain::decodeScanLeftGeneric() { _ASSERTE(slicesW.size() < 16); // We only have 4 bits for slice number. _ASSERTE(!(slicesW.size() > 1 && skipX)); // Check if this is a valid state uint32 comps = frame.cps; // Components HuffmanTable *dctbl[4]; // Tables for up to 4 components ushort16 *predict; // Prediction pointer /* Fast access to supersampling component settings * this is the number of components in a given block. */ uint32 samplesH[4]; uint32 samplesV[4]; uchar8 *draw = mRaw->getData(); uint32 maxSuperH = 1; uint32 maxSuperV = 1; uint32 samplesComp[4]; // How many samples per group does this component have uint32 pixGroup = 0; // How many pixels per group. for (uint32 i = 0; i < comps; i++) { dctbl[i] = &huff[frame.compInfo[i].dcTblNo]; samplesH[i] = frame.compInfo[i].superH; if (!isPowerOfTwo(samplesH[i])) ThrowRDE("LJpegPlain::decodeScanLeftGeneric: Horizontal sampling is not power of two."); maxSuperH = max(samplesH[i], maxSuperH); samplesV[i] = frame.compInfo[i].superV; if (!isPowerOfTwo(samplesV[i])) ThrowRDE("LJpegPlain::decodeScanLeftGeneric: Vertical sampling is not power of two."); maxSuperV = max(samplesV[i], maxSuperV); samplesComp[i] = samplesV[i] * samplesH[i]; pixGroup += samplesComp[i]; } mRaw->subsampling.x = maxSuperH; mRaw->subsampling.y = maxSuperV; //Prepare slices (for CR2) uint32 slices = (uint32)slicesW.size() * (frame.h - skipY) / maxSuperV; offset = new uint32[slices+1]; uint32 t_y = 0; uint32 t_x = 0; uint32 t_s = 0; uint32 slice = 0; uint32 pitch_s = mRaw->pitch / 2; // Pitch in shorts slice_width = new int[slices]; // This is divided by comps, since comps pixels are processed at the time for (uint32 i = 0 ; i < slicesW.size(); i++) slice_width[i] = slicesW[i] / pixGroup / maxSuperH; // This is a guess, but works for sRaw1+2. for (slice = 0; slice < slices; slice++) { offset[slice] = ((t_x + offX) * mRaw->getBpp() + ((offY + t_y) * mRaw->pitch)) | (t_s << 28); _ASSERTE((offset[slice]&0x0fffffff) < mRaw->pitch*mRaw->dim.y); t_y += maxSuperV; if (t_y >= (frame.h - skipY)) { t_y = 0; t_x += slice_width[t_s++]; } } offset[slices] = offset[slices-1]; // Extra offset to avoid branch in loop. if (skipX) ThrowRDE("LJpegPlain::decodeScanLeftGeneric: Cannot skip right border in subsampled mode"); // Predictors for components int p[4]; ushort16 *dest = (ushort16*) & draw[offset[0] & 0x0fffffff]; // Always points to next slice slice = 1; uint32 pixInSlice = slice_width[0]; // Initialize predictors and decode one group. uint32 x = 0; predict = dest; for (uint32 i = 0; i < comps; i++) { for (uint32 y2 = 0; y2 < samplesV[i]; y2++) { for (uint32 x2 = 0; x2 < samplesH[i]; x2++) { // First pixel is not predicted, all other are. if (y2 == 0 && x2 == 0) { *dest = p[i] = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl[i]); } else { p[i] += HuffDecode(dctbl[i]); _ASSERTE(p[i] >= 0 && p[i] < 65536); dest[x2*comps+y2*pitch_s] = p[i]; } } } // Set predictor for this component // Next component dest++; } // Increment destination to next group dest += (maxSuperH - 1) * comps; x = maxSuperH; pixInSlice -= maxSuperH; uint32 cw = (frame.w - skipX); for (uint32 y = 0;y < (frame.h - skipY);y += maxSuperV) { for (; x < cw ; x += maxSuperH) { if (0 == pixInSlice) { // Next slice if (slice > slices) ThrowRDE("LJpegPlain::decodeScanLeft: Ran out of slices"); uint32 o = offset[slice++]; dest = (ushort16*) & draw[o&0x0fffffff]; // Adjust destination for next pixel if((o&0x0fffffff) > mRaw->pitch*mRaw->dim.y) ThrowRDE("LJpegPlain::decodeScanLeft: Offset out of bounds"); pixInSlice = slice_width[o>>28]; // If new are at the start of a new line, also update predictors. if (x == 0) predict = dest; } for (uint32 i = 0; i < comps; i++) { for (uint32 y2 = 0; y2 < samplesV[i]; y2++) { for (uint32 x2 = 0; x2 < samplesH[i]; x2++) { p[i] += HuffDecode(dctbl[i]); _ASSERTE(p[i] >= 0 && p[i] < 65536); dest[x2*comps+y2*pitch_s] = p[i]; } } dest++; } dest += (maxSuperH * comps) - comps; pixInSlice -= maxSuperH; // Check if we are still within the file. bits->checkPos(); } // Update predictors for (uint32 i = 0; i < comps; i++) { p[i] = predict[i]; // Ensure, that there is a slice shift at new line if (!(pixInSlice == 0 || maxSuperV == 1)) ThrowRDE("LJpegPlain::decodeScanLeftGeneric: Slice not placed at new line"); } predict = dest; x = 0; } } #define COMPS 3 /*************************************************************************/ /* These are often used compression schemes, heavily optimized to decode */ /* that specfic kind of images. */ /*************************************************************************/ void LJpegPlain::decodeScanLeft4_2_0() { _ASSERTE(slicesW.size() < 16); // We only have 4 bits for slice number. _ASSERTE(!(slicesW.size() > 1 && skipX)); // Check if this is a valid state _ASSERTE(frame.compInfo[0].superH == 2); // Check if this is a valid state _ASSERTE(frame.compInfo[0].superV == 2); // Check if this is a valid state _ASSERTE(frame.compInfo[1].superH == 1); // Check if this is a valid state _ASSERTE(frame.compInfo[1].superV == 1); // Check if this is a valid state _ASSERTE(frame.compInfo[2].superH == 1); // Check if this is a valid state _ASSERTE(frame.compInfo[2].superV == 1); // Check if this is a valid state _ASSERTE(frame.cps == COMPS); _ASSERTE(skipX == 0); HuffmanTable *dctbl1 = &huff[frame.compInfo[0].dcTblNo]; HuffmanTable *dctbl2 = &huff[frame.compInfo[1].dcTblNo]; HuffmanTable *dctbl3 = &huff[frame.compInfo[2].dcTblNo]; ushort16 *predict; // Prediction pointer mRaw->subsampling.x = 2; mRaw->subsampling.y = 2; uchar8 *draw = mRaw->getData(); //Prepare slices (for CR2) uint32 slices = (uint32)slicesW.size() * (frame.h - skipY) / 2; offset = new uint32[slices+1]; uint32 t_y = 0; uint32 t_x = 0; uint32 t_s = 0; uint32 slice = 0; uint32 pitch_s = mRaw->pitch / 2; // Pitch in shorts slice_width = new int[slices]; // This is divided by comps, since comps pixels are processed at the time for (uint32 i = 0 ; i < slicesW.size(); i++) slice_width[i] = slicesW[i] / COMPS; for (slice = 0; slice < slices; slice++) { offset[slice] = ((t_x + offX) * mRaw->getBpp() + ((offY + t_y) * mRaw->pitch)) | (t_s << 28); _ASSERTE((offset[slice]&0x0fffffff) < mRaw->pitch*mRaw->dim.y); t_y += 2; if (t_y >= (frame.h - skipY)) { t_y = 0; t_x += slice_width[t_s++]; } } offset[slices] = offset[slices-1]; // Extra offset to avoid branch in loop. if (skipX) slice_width[slicesW.size()-1] -= skipX; // Predictors for components ushort16 *dest = (ushort16*) & draw[offset[0] & 0x0fffffff]; // Always points to next slice slice = 1; uint32 pixInSlice = slice_width[0]; // Initialize predictors and decode one group. uint32 x = 0; int p1; int p2; int p3; // First pixel is not predicted, all other are. *dest = p1 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl1); p1 = dest[COMPS] = p1 + HuffDecode(dctbl1); p1 = dest[pitch_s] = p1 + HuffDecode(dctbl1); p1 = dest[COMPS+pitch_s] = p1 + HuffDecode(dctbl1); predict = dest; dest[1] = p2 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl2); dest[2] = p3 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl3); // Skip next dest += COMPS * 2; x = 2; pixInSlice -= 2; uint32 cw = (frame.w - skipX); for (uint32 y = 0;y < (frame.h - skipY);y += 2) { for (; x < cw ; x += 2) { if (0 == pixInSlice) { // Next slice if (slice > slices) ThrowRDE("LJpegPlain::decodeScanLeft: Ran out of slices"); uint32 o = offset[slice++]; dest = (ushort16*) & draw[o&0x0fffffff]; // Adjust destination for next pixel _ASSERTE((o&0x0fffffff) < mRaw->pitch*mRaw->dim.y); if((o&0x0fffffff) > mRaw->pitch*mRaw->dim.y) ThrowRDE("LJpegPlain::decodeScanLeft: Offset out of bounds"); pixInSlice = slice_width[o>>28]; // If new are at the start of a new line, also update predictors. if (x == 0) { predict = dest; } } p1 += HuffDecode(dctbl1); *dest = p1; p1 += HuffDecode(dctbl1); dest[COMPS] = p1; p1 += HuffDecode(dctbl1); dest[pitch_s] = p1; p1 += HuffDecode(dctbl1); dest[pitch_s+COMPS] = p1; dest[1] = p2 = p2 + HuffDecode(dctbl2); dest[2] = p3 = p3 + HuffDecode(dctbl3); dest += COMPS * 2; pixInSlice -= 2; // Check if we are still within the file. bits->checkPos(); } // Update predictors p1 = predict[0]; p2 = predict[1]; p3 = predict[2]; _ASSERTE(pixInSlice == 0); // Ensure, that there is a slice shift at new line x = 0; } } void LJpegPlain::decodeScanLeft4_2_2() { _ASSERTE(slicesW.size() < 16); // We only have 4 bits for slice number. _ASSERTE(!(slicesW.size() > 1 && skipX)); // Check if this is a valid state _ASSERTE(frame.compInfo[0].superH == 2); // Check if this is a valid state _ASSERTE(frame.compInfo[0].superV == 1); // Check if this is a valid state _ASSERTE(frame.compInfo[1].superH == 1); // Check if this is a valid state _ASSERTE(frame.compInfo[1].superV == 1); // Check if this is a valid state _ASSERTE(frame.compInfo[2].superH == 1); // Check if this is a valid state _ASSERTE(frame.compInfo[2].superV == 1); // Check if this is a valid state _ASSERTE(frame.cps == COMPS); _ASSERTE(skipX == 0); HuffmanTable *dctbl1 = &huff[frame.compInfo[0].dcTblNo]; HuffmanTable *dctbl2 = &huff[frame.compInfo[1].dcTblNo]; HuffmanTable *dctbl3 = &huff[frame.compInfo[2].dcTblNo]; mRaw->subsampling.x = 2; mRaw->subsampling.y = 1; ushort16 *predict; // Prediction pointer uchar8 *draw = mRaw->getData(); //Prepare slices (for CR2) uint32 slices = (uint32)slicesW.size() * (frame.h - skipY); offset = new uint32[slices+1]; uint32 t_y = 0; uint32 t_x = 0; uint32 t_s = 0; uint32 slice = 0; slice_width = new int[slices]; // This is divided by comps, since comps pixels are processed at the time for (uint32 i = 0 ; i < slicesW.size(); i++) slice_width[i] = slicesW[i] / 2; for (slice = 0; slice < slices; slice++) { offset[slice] = ((t_x + offX) * mRaw->getBpp() + ((offY + t_y) * mRaw->pitch)) | (t_s << 28); _ASSERTE((offset[slice]&0x0fffffff) < mRaw->pitch*mRaw->dim.y); t_y ++; if (t_y >= (frame.h - skipY)) { t_y = 0; t_x += slice_width[t_s++]; } } offset[slices] = offset[slices-1]; // Extra offset to avoid branch in loop. if (skipX) slice_width[slicesW.size()-1] -= skipX; // Predictors for components ushort16 *dest = (ushort16*) & draw[offset[0] & 0x0fffffff]; // Always points to next slice slice = 1; uint32 pixInSlice = slice_width[0]; // Initialize predictors and decode one group. uint32 x = 0; int p1; int p2; int p3; // First pixel is not predicted, all other are. *dest = p1 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl1); p1 = dest[COMPS] = p1 + HuffDecode(dctbl1); predict = dest; dest[1] = p2 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl2); dest[2] = p3 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl3); // Skip to next dest += COMPS * 2; x = 2; pixInSlice -= 2; uint32 cw = (frame.w - skipX); for (uint32 y = 0;y < (frame.h - skipY);y++) { for (; x < cw ; x += 2) { if (0 == pixInSlice) { // Next slice if (slice > slices) ThrowRDE("LJpegPlain::decodeScanLeft: Ran out of slices"); uint32 o = offset[slice++]; dest = (ushort16*) & draw[o&0x0fffffff]; // Adjust destination for next pixel if((o&0x0fffffff) > mRaw->pitch*mRaw->dim.y) ThrowRDE("LJpegPlain::decodeScanLeft: Offset out of bounds"); pixInSlice = slice_width[o>>28]; // If new are at the start of a new line, also update predictors. if (x == 0) { predict = dest; } } p1 += HuffDecode(dctbl1); *dest = p1; p1 += HuffDecode(dctbl1); dest[COMPS] = p1; dest[1] = p2 = p2 + HuffDecode(dctbl2); dest[2] = p3 = p3 + HuffDecode(dctbl3); dest += COMPS * 2; pixInSlice -= 2; // Check if we are still within the file. bits->checkPos(); } // Update predictors p1 = predict[0]; p2 = predict[1]; p3 = predict[2]; predict = dest; x = 0; } } #undef COMPS #define COMPS 2 void LJpegPlain::decodeScanLeft2Comps() { _ASSERTE(slicesW.size() < 16); // We only have 4 bits for slice number. _ASSERTE(!(slicesW.size() > 1 && skipX)); // Check if this is a valid state uchar8 *draw = mRaw->getData(); // First line HuffmanTable *dctbl1 = &huff[frame.compInfo[0].dcTblNo]; HuffmanTable *dctbl2 = &huff[frame.compInfo[1].dcTblNo]; //Prepare slices (for CR2) uint32 slices = (uint32)slicesW.size() * (frame.h - skipY); offset = new uint32[slices+1]; uint32 t_y = 0; uint32 t_x = 0; uint32 t_s = 0; uint32 slice = 0; uint32 cw = (frame.w - skipX); for (slice = 0; slice < slices; slice++) { offset[slice] = ((t_x + offX) * mRaw->getBpp() + ((offY + t_y) * mRaw->pitch)) | (t_s << 28); _ASSERTE((offset[slice]&0x0fffffff) < mRaw->pitch*mRaw->dim.y); t_y++; if (t_y == (frame.h - skipY)) { t_y = 0; t_x += slicesW[t_s++]; } } offset[slices] = offset[slices-1]; // Extra offset to avoid branch in loop. slice_width = new int[slices]; // This is divided by comps, since comps pixels are processed at the time for (uint32 i = 0 ; i < slicesW.size(); i++) slice_width[i] = slicesW[i] / COMPS; if (skipX) slice_width[slicesW.size()-1] -= skipX; // First pixels are obviously not predicted int p1; int p2; ushort16 *dest = (ushort16*) & draw[offset[0] & 0x0fffffff]; ushort16 *predict = dest; *dest++ = p1 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl1); *dest++ = p2 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl2); slice = 1; // Always points to next slice uint32 pixInSlice = slice_width[0] - 1; // Skip first pixel uint32 x = 1; // Skip first pixels on first line. for (uint32 y = 0;y < (frame.h - skipY);y++) { for (; x < cw ; x++) { int diff = HuffDecode(dctbl1); p1 += diff; *dest++ = (ushort16)p1; // _ASSERTE(p1 >= 0 && p1 < 65536); diff = HuffDecode(dctbl2); p2 += diff; *dest++ = (ushort16)p2; // _ASSERTE(p2 >= 0 && p2 < 65536); if (0 == --pixInSlice) { // Next slice if (slice > slices) ThrowRDE("LJpegPlain::decodeScanLeft: Ran out of slices"); uint32 o = offset[slice++]; dest = (ushort16*) & draw[o&0x0fffffff]; // Adjust destination for next pixel if((o&0x0fffffff) > mRaw->pitch*mRaw->dim.y) ThrowRDE("LJpegPlain::decodeScanLeft: Offset out of bounds"); pixInSlice = slice_width[o>>28]; } bits->checkPos(); } if (skipX) { for (uint32 i = 0; i < skipX; i++) { HuffDecode(dctbl1); HuffDecode(dctbl2); } } p1 = predict[0]; // Predictors for next row p2 = predict[1]; predict = dest; // Adjust destination for next prediction x = 0; } } #undef COMPS #define COMPS 3 void LJpegPlain::decodeScanLeft3Comps() { uchar8 *draw = mRaw->getData(); // First line HuffmanTable *dctbl1 = &huff[frame.compInfo[0].dcTblNo]; HuffmanTable *dctbl2 = &huff[frame.compInfo[1].dcTblNo]; HuffmanTable *dctbl3 = &huff[frame.compInfo[2].dcTblNo]; //Prepare slices (for CR2) uint32 slices = (uint32)slicesW.size() * (frame.h - skipY); offset = new uint32[slices+1]; uint32 t_y = 0; uint32 t_x = 0; uint32 t_s = 0; uint32 slice = 0; for (slice = 0; slice < slices; slice++) { offset[slice] = ((t_x + offX) * mRaw->getBpp() + ((offY + t_y) * mRaw->pitch)) | (t_s << 28); _ASSERTE((offset[slice]&0x0fffffff) < mRaw->pitch*mRaw->dim.y); t_y++; if (t_y == (frame.h - skipY)) { t_y = 0; t_x += slicesW[t_s++]; } } offset[slices] = offset[slices-1]; // Extra offset to avoid branch in loop. slice_width = new int[slices]; // This is divided by comps, since comps pixels are processed at the time for (uint32 i = 0 ; i < slicesW.size(); i++) slice_width[i] = slicesW[i] / COMPS; if (skipX) slice_width[slicesW.size()-1] -= skipX; // First pixels are obviously not predicted int p1; int p2; int p3; ushort16 *dest = (ushort16*) & draw[offset[0] & 0x0fffffff]; ushort16 *predict = dest; *dest++ = p1 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl1); *dest++ = p2 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl2); *dest++ = p3 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl3); slice = 1; uint32 pixInSlice = slice_width[0] - 1; uint32 cw = (frame.w - skipX); uint32 x = 1; // Skip first pixels on first line. for (uint32 y = 0;y < (frame.h - skipY);y++) { for (; x < cw ; x++) { p1 += HuffDecode(dctbl1); *dest++ = (ushort16)p1; p2 += HuffDecode(dctbl2); *dest++ = (ushort16)p2; p3 += HuffDecode(dctbl3); *dest++ = (ushort16)p3; if (0 == --pixInSlice) { // Next slice if (slice > slices) ThrowRDE("LJpegPlain::decodeScanLeft: Ran out of slices"); uint32 o = offset[slice++]; dest = (ushort16*) & draw[o&0x0fffffff]; // Adjust destination for next pixel if((o&0x0fffffff) > mRaw->pitch*mRaw->dim.y) ThrowRDE("LJpegPlain::decodeScanLeft: Offset out of bounds"); _ASSERTE((o >> 28) < slicesW.size()); pixInSlice = slice_width[o>>28]; } bits->checkPos(); } if (skipX) { for (uint32 i = 0; i < skipX; i++) { HuffDecode(dctbl1); HuffDecode(dctbl2); HuffDecode(dctbl3); } } p1 = predict[0]; // Predictors for next row p2 = predict[1]; p3 = predict[2]; // Predictors for next row predict = dest; // Adjust destination for next prediction x = 0; } } #undef COMPS #define COMPS 4 void LJpegPlain::decodeScanLeft4Comps() { uchar8 *draw = mRaw->getData(); // First line HuffmanTable *dctbl1 = &huff[frame.compInfo[0].dcTblNo]; HuffmanTable *dctbl2 = &huff[frame.compInfo[1].dcTblNo]; HuffmanTable *dctbl3 = &huff[frame.compInfo[2].dcTblNo]; HuffmanTable *dctbl4 = &huff[frame.compInfo[3].dcTblNo]; //Prepare slices (for CR2) uint32 slices = (uint32)slicesW.size() * (frame.h - skipY); offset = new uint32[slices+1]; uint32 t_y = 0; uint32 t_x = 0; uint32 t_s = 0; uint32 slice = 0; for (slice = 0; slice < slices; slice++) { offset[slice] = ((t_x + offX) * mRaw->getBpp() + ((offY + t_y) * mRaw->pitch)) | (t_s << 28); _ASSERTE((offset[slice]&0x0fffffff) < mRaw->pitch*mRaw->dim.y); t_y++; if (t_y == (frame.h - skipY)) { t_y = 0; t_x += slicesW[t_s++]; } } offset[slices] = offset[slices-1]; // Extra offset to avoid branch in loop. slice_width = new int[slices]; // This is divided by comps, since comps pixels are processed at the time for (uint32 i = 0 ; i < slicesW.size(); i++) slice_width[i] = slicesW[i] / COMPS; if (skipX) slice_width[slicesW.size()-1] -= skipX; // First pixels are obviously not predicted int p1; int p2; int p3; int p4; ushort16 *dest = (ushort16*) & draw[offset[0] & 0x0fffffff]; ushort16 *predict = dest; *dest++ = p1 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl1); *dest++ = p2 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl2); *dest++ = p3 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl3); *dest++ = p4 = (1 << (frame.prec - Pt - 1)) + HuffDecode(dctbl4); slice = 1; uint32 pixInSlice = slice_width[0] - 1; uint32 cw = (frame.w - skipX); uint32 x = 1; // Skip first pixels on first line. for (uint32 y = 0;y < (frame.h - skipY);y++) { for (; x < cw ; x++) { p1 += HuffDecode(dctbl1); *dest++ = (ushort16)p1; p2 += HuffDecode(dctbl2); *dest++ = (ushort16)p2; p3 += HuffDecode(dctbl3); *dest++ = (ushort16)p3; p4 += HuffDecode(dctbl4); *dest++ = (ushort16)p4; if (0 == --pixInSlice) { // Next slice if (slice > slices) ThrowRDE("LJpegPlain::decodeScanLeft: Ran out of slices"); uint32 o = offset[slice++]; dest = (ushort16*) & draw[o&0x0fffffff]; // Adjust destination for next pixel if((o&0x0fffffff) > mRaw->pitch*mRaw->dim.y) ThrowRDE("LJpegPlain::decodeScanLeft: Offset out of bounds"); pixInSlice = slice_width[o>>28]; } bits->checkPos(); } if (skipX) { for (uint32 i = 0; i < skipX; i++) { HuffDecode(dctbl1); HuffDecode(dctbl2); HuffDecode(dctbl3); HuffDecode(dctbl4); } } p1 = predict[0]; // Predictors for next row p2 = predict[1]; p3 = predict[2]; // Predictors for next row p4 = predict[3]; predict = dest; // Adjust destination for next prediction x = 0; } } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/ByteStreamSwap.h0000644000175000017500000000063711542726010021426 00000000000000#ifndef BYTE_STREAM_SWAP_H #define BYTE_STREAM_SWAP_H #include "ByteStream.h" #include "IOException.h" namespace RawSpeed { class ByteStreamSwap : public ByteStream { public: ByteStreamSwap(const uchar8* _buffer, uint32 _size); ByteStreamSwap(const ByteStreamSwap* b); virtual ushort16 getShort(); virtual int getInt(); virtual ~ByteStreamSwap(void); }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffParserOlympus.h0000644000175000017500000000224311542726010022145 00000000000000#ifndef TIFF_PARSER_OLYMPUS_H #define TIFF_PARSER_OLYMPUS_H #include "TiffParser.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class TiffParserOlympus : public TiffParser { public: TiffParserOlympus(FileMap* input); virtual void parseData(); virtual ~TiffParserOlympus(void); }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/CameraMetadataException.cpp0000644000175000017500000000267111526533650023567 00000000000000#include "StdAfx.h" #include "CameraMetadataException.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { void ThrowCME(const char* fmt, ...) { va_list val; va_start(val, fmt); char buf[8192]; #if defined(__unix__) || defined(__MINGW32__) vsnprintf(buf, 8192, fmt, val); #else vsprintf_s(buf, 8192, fmt, val); #endif va_end(val); _RPT1(0, "EXCEPTION: %s\n", buf); throw CameraMetadataException(buf); } CameraMetadataException::CameraMetadataException(const string _msg): runtime_error(_msg) { _RPT1(0, "CameraMetadata Exception: %s\n", _msg.c_str()); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/RawImage.h0000644000175000017500000001070411542726010020204 00000000000000#ifndef RAW_IMAGE_H #define RAW_IMAGE_H #include "ColorFilterArray.h" #include "BlackArea.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class RawImage; class RawImageWorker; typedef enum {TYPE_USHORT16, TYPE_FLOAT32} RawImageType; class RawImageData { friend class RawImageWorker; public: virtual ~RawImageData(void); uint32 getCpp() const { return cpp; } uint32 getBpp() const { return bpp; } void setCpp(uint32 val); virtual void createData(); virtual void destroyData(); RawSpeed::RawImageType getDataType() const { return dataType; } uchar8* getData(); uchar8* getData(uint32 x, uint32 y); // Not super fast, but safe. Don't use per pixel. uchar8* getDataUncropped(uint32 x, uint32 y); virtual void subFrame( iPoint2D offset, iPoint2D new_size ); iPoint2D getUncroppedDim(); iPoint2D getCropOffset(); virtual void scaleBlackWhite() = 0; bool isAllocated() {return !!data;} iPoint2D dim; uint32 pitch; bool isCFA; ColorFilterArray cfa; int blackLevel; int blackLevelSeparate[4]; int whitePoint; vector blackAreas; iPoint2D subsampling; protected: RawImageType dataType; RawImageData(void); RawImageData(iPoint2D dim, uint32 bpp, uint32 cpp=1); virtual void calculateBlackAreas() = 0; virtual void scaleValues(int start_y, int end_y) = 0; uint32 dataRefCount; uchar8* data; uint32 cpp; // Components per pixel uint32 bpp; // Bytes per pixel. friend class RawImage; pthread_mutex_t mymutex; iPoint2D mOffset; iPoint2D uncropped_dim; }; class RawImageDataU16 : public RawImageData { public: virtual void scaleBlackWhite(); protected: virtual void calculateBlackAreas(); virtual void scaleValues(int start_y, int end_y); RawImageDataU16(void); RawImageDataU16(iPoint2D dim, uint32 cpp=1); friend class RawImage; }; class RawImageDataFloat : public RawImageData { public: virtual void scaleBlackWhite(); protected: virtual void calculateBlackAreas(); virtual void scaleValues(int start_y, int end_y); RawImageDataFloat(void); RawImageDataFloat(iPoint2D dim, uint32 cpp=1); friend class RawImage; }; class RawImageWorker { public: typedef enum {TASK_SCALE_VALUES} RawImageWorkerTask; RawImageWorker(RawImageData *img, RawImageWorkerTask task, int start_y, int end_y); void waitForThread(); void _performTask(); protected: void startThread(); pthread_t threadid; RawImageData* data; RawImageWorkerTask task; int start_y; int end_y; }; class RawImage { public: static RawImage create(RawImageType type = TYPE_USHORT16); static RawImage create(iPoint2D dim, RawImageType type = TYPE_USHORT16, uint32 componentsPerPixel = 1); RawImageData* operator-> (); RawImageData& operator* (); RawImage(RawImageData* p); // p must not be NULL ~RawImage(); RawImage(const RawImage& p); RawImage& operator= (const RawImage& p); private: RawImageData* p_; // p_ is never NULL }; inline RawImage RawImage::create(RawImageType type) { switch (type) { case TYPE_USHORT16: return new RawImageDataU16(); case TYPE_FLOAT32: return new RawImageDataFloat(); default: printf("RawImage::create: Unknown Image type!\n"); } return NULL; } inline RawImage RawImage::create(iPoint2D dim, RawImageType type, uint32 componentsPerPixel) { switch (type) { case TYPE_USHORT16: return new RawImageDataU16(dim, componentsPerPixel); default: printf("RawImage::create: Unknown Image type!\n"); } return NULL; } } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffParser.cpp0000644000175000017500000001110611541412541021105 00000000000000#include "StdAfx.h" #include "TiffParser.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { TiffParser::TiffParser(FileMap* inputData): mInput(inputData), mRootIFD(0) { host_endian = getHostEndianness(); } TiffParser::~TiffParser(void) { if (mRootIFD) delete mRootIFD; mRootIFD = NULL; } #ifdef CHECKSIZE #undef CHECKSIZE #endif #ifdef CHECKPTR #undef CHECKPTR #endif #define CHECKSIZE(A) if (A >= mInput->getSize()) throw TiffParserException("Error reading TIFF structure (size out of bounds). File Corrupt") #define CHECKPTR(A) if ((int)A >= ((int)(mInput->data) + size))) throw TiffParserException("Error reading TIFF structure (size out of bounds). File Corrupt") void TiffParser::parseData() { const unsigned char* data = mInput->getData(0); if (mInput->getSize() < 16) throw TiffParserException("Not a TIFF file (size too small)"); if (data[0] != 0x49 || data[1] != 0x49) { tiff_endian = big; if (data[0] != 0x4D || data[1] != 0x4D) throw TiffParserException("Not a TIFF file (ID)"); if (data[3] != 42) throw TiffParserException("Not a TIFF file (magic 42)"); } else { tiff_endian = little; if (data[2] != 42 && data[2] != 0x52 && data[2] != 0x55) // ORF has 0x52, RW2 0x55 - Brillant! throw TiffParserException("Not a TIFF file (magic 42)"); } if (tiff_endian == host_endian) mRootIFD = new TiffIFD(); else mRootIFD = new TiffIFDBE(); uint32 nextIFD; data = mInput->getData(4); if (tiff_endian == host_endian) { nextIFD = *(int*)data; } else { nextIFD = (unsigned int)data[0] << 24 | (unsigned int)data[1] << 16 | (unsigned int)data[2] << 8 | (unsigned int)data[3]; } while (nextIFD) { CHECKSIZE(nextIFD); if (tiff_endian == host_endian) mRootIFD->mSubIFD.push_back(new TiffIFD(mInput, nextIFD)); else mRootIFD->mSubIFD.push_back(new TiffIFDBE(mInput, nextIFD)); nextIFD = mRootIFD->mSubIFD.back()->getNextIFD(); } } RawDecoder* TiffParser::getDecoder() { vector potentials; potentials = mRootIFD->getIFDsWithTag(DNGVERSION); if (!potentials.empty()) { // We have a dng image entry TiffIFD *t = potentials[0]; const unsigned char* c = t->getEntry(DNGVERSION)->getData(); if (c[0] > 1) throw TiffParserException("DNG version too new."); if (c[1] > 2) throw TiffParserException("DNG version not supported."); return new DngDecoder(mRootIFD, mInput); } potentials = mRootIFD->getIFDsWithTag(MAKE); if (!potentials.empty()) { // We have make entry for (vector::iterator i = potentials.begin(); i != potentials.end(); ++i) { string make = (*i)->getEntry(MAKE)->getString(); TrimSpaces(make); if (!make.compare("Canon")) { return new Cr2Decoder(mRootIFD, mInput); } if (!make.compare("NIKON CORPORATION")) { return new NefDecoder(mRootIFD, mInput); } if (!make.compare("NIKON")) { return new NefDecoder(mRootIFD, mInput); } if (!make.compare("OLYMPUS IMAGING CORP.")) { return new OrfDecoder(mRootIFD, mInput); } if (!make.compare("SONY")) { return new ArwDecoder(mRootIFD, mInput); } if (!make.compare("PENTAX Corporation ")) { return new PefDecoder(mRootIFD, mInput); } if (!make.compare("PENTAX")) { return new PefDecoder(mRootIFD, mInput); } if (!make.compare("Panasonic")) { return new Rw2Decoder(mRootIFD, mInput); } if (!make.compare("SAMSUNG")) { return new SrwDecoder(mRootIFD, mInput); } } } throw TiffParserException("No decoder found. Sorry."); return NULL; } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffEntryBE.h0000644000175000017500000000247311542726010020635 00000000000000#ifndef TIFF_ENTRY_BE_H #define TIFF_ENTRY_BE_H #include "TiffEntry.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { class TiffEntryBE : public TiffEntry { public: // TiffEntryBE(void); TiffEntryBE(FileMap* f, uint32 offset); virtual ~TiffEntryBE(void); virtual uint32 getInt(); virtual ushort16 getShort(); virtual const uint32* getIntArray(); virtual const ushort16* getShortArray(); private: bool mDataSwapped; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffParserOlympus.cpp0000644000175000017500000000456211526533650022516 00000000000000#include "StdAfx.h" #include "TiffParserOlympus.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ // More relaxed Tiff parser for olympus makernote namespace RawSpeed { TiffParserOlympus::TiffParserOlympus(FileMap* input) : TiffParser(input) { } TiffParserOlympus::~TiffParserOlympus(void) { } #ifdef CHECKSIZE #undef CHECKSIZE #endif #ifdef CHECKPTR #undef CHECKPTR #endif #define CHECKSIZE(A) if (A >= mInput->getSize()) throw TiffParserException("Error reading Olympus Metadata TIFF structure. File Corrupt") #define CHECKPTR(A) if ((int)A >= ((int)(mInput->data) + size))) throw TiffParserException("Error reading Olympus Metadata TIFF structure. File Corrupt") void TiffParserOlympus::parseData() { const unsigned char* data = mInput->getData(0); if (mInput->getSize() < 16) throw TiffParserException("Not a TIFF file (size too small)"); if (data[0] != 0x49 || data[1] != 0x49) { tiff_endian = big; if (data[0] != 0x4D || data[1] != 0x4D) throw TiffParserException("Not a TIFF file (ID)"); } else { tiff_endian = little; } if (tiff_endian == host_endian) mRootIFD = new TiffIFD(); else mRootIFD = new TiffIFDBE(); uint32 nextIFD = 4; // Skip Endian and magic do { CHECKSIZE(nextIFD); if (tiff_endian == host_endian) mRootIFD->mSubIFD.push_back(new TiffIFD(mInput, nextIFD)); else mRootIFD->mSubIFD.push_back(new TiffIFDBE(mInput, nextIFD)); nextIFD = mRootIFD->mSubIFD.back()->getNextIFD(); } while (nextIFD); } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/BitPumpJPEG.cpp0000644000175000017500000000663411526533650021110 00000000000000#include "StdAfx.h" #include "BitPumpJPEG.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com This is based on code by Hubert Figuiere. Copyright (C) 2007 Hubert Figuiere, released under LGPL */ namespace RawSpeed { /*** Used for entropy encoded sections ***/ #define BITS_PER_LONG (8*sizeof(uint32)) #define MIN_GET_BITS (BITS_PER_LONG-7) /* max value for long getBuffer */ BitPumpJPEG::BitPumpJPEG(ByteStream *s): buffer(s->getData()), size(s->getRemainSize() + sizeof(uint32)), mLeft(0), mCurr(0), off(0) { init(); } BitPumpJPEG::BitPumpJPEG(const uchar8* _buffer, uint32 _size) : buffer(_buffer), size(_size + sizeof(uint32)), mLeft(0), mCurr(0), off(0) { init(); } void __inline BitPumpJPEG::init() { stuffed = 0; fill(); } uint32 BitPumpJPEG::getBit() { if (!mLeft) fill(); return (mCurr >> (--mLeft)) & 1; } uint32 BitPumpJPEG::getBits(uint32 nbits) { _ASSERTE(nbits < 24); if (mLeft < nbits) { fill(); } return ((mCurr >> (mLeft -= (nbits)))) & ((1 << nbits) - 1); } uint32 BitPumpJPEG::peekBit() { if (!mLeft) fill(); return (mCurr >> (mLeft - 1)) & 1; } uint32 BitPumpJPEG::peekBits(uint32 nbits) { if (mLeft < nbits) { fill(); } return ((mCurr >> (mLeft - nbits))) & ((1 << nbits) - 1); } uint32 BitPumpJPEG::peekByte() { if (mLeft < 8) { fill(); } if (off > size) throw IOException("Out of buffer read"); return ((mCurr >> (mLeft - 8))) & 0xff; } uint32 BitPumpJPEG::getBitSafe() { if (!mLeft) { fill(); if (off > size) throw IOException("Out of buffer read"); } return (mCurr >> (--mLeft)) & 1; } uint32 BitPumpJPEG::getBitsSafe(unsigned int nbits) { if (nbits > MIN_GET_BITS) throw IOException("Too many bits requested"); if (mLeft < nbits) { fill(); checkPos(); } return ((mCurr >> (mLeft -= (nbits)))) & ((1 << nbits) - 1); } void BitPumpJPEG::skipBits(unsigned int nbits) { _ASSERTE(nbits < 24); if (mLeft < nbits) { fill(); checkPos(); } mLeft -= nbits; } uchar8 BitPumpJPEG::getByte() { if (mLeft < 8) { fill(); } return ((mCurr >> (mLeft -= 8))) & 0xff; } uchar8 BitPumpJPEG::getByteSafe() { if (mLeft < 8) { fill(); checkPos(); } return ((mCurr >> (mLeft -= 8))) & 0xff; } void BitPumpJPEG::setAbsoluteOffset(unsigned int offset) { if (offset >= size) throw IOException("Offset set out of buffer"); mLeft = 0; off = offset; fill(); } BitPumpJPEG::~BitPumpJPEG(void) { } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/RawImageDataFloat.cpp0000644000175000017500000002346311541412541022325 00000000000000#include "StdAfx.h" #include "RawImage.h" #include "RawDecoder.h" // For exceptions /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #if defined(__SSE2__) #include #endif namespace RawSpeed { RawImageDataFloat::RawImageDataFloat(void) { bpp = 4; dataType = TYPE_FLOAT32; } RawImageDataFloat::RawImageDataFloat(iPoint2D _dim, uint32 _cpp) : RawImageData(_dim, 4, _cpp) { dataType = TYPE_FLOAT32; } void RawImageDataFloat::calculateBlackAreas() { float accPixels[4] = {0,0,0,0}; int totalpixels = 0; for (uint32 i = 0; i < blackAreas.size(); i++) { BlackArea area = blackAreas[i]; /* Make sure area sizes are multiple of two, so we have the same amount of pixels for each CFA group */ area.size = area.size - (area.size&1); /* Process horizontal area */ if (!area.isVertical) { if ((int)area.offset+(int)area.size > uncropped_dim.y) ThrowRDE("RawImageData::calculateBlackAreas: Offset + size is larger than height of image"); for (uint32 y = area.offset; y < area.offset+area.size; y++) { float *pixel = (float*)getDataUncropped(mOffset.x, y); for (int x = mOffset.x; x < dim.x+mOffset.x; x++) { accPixels[((y&1)<<1)|(x&1)] += *pixel++; } } totalpixels += area.size * dim.x; } /* Process vertical area */ if (area.isVertical) { if ((int)area.offset+(int)area.size > uncropped_dim.x) ThrowRDE("RawImageData::calculateBlackAreas: Offset + size is larger than width of image"); for (int y = mOffset.y; y < dim.y+mOffset.y; y++) { float *pixel = (float*)getDataUncropped(area.offset, y); for (uint32 x = area.offset; x < area.size+area.offset; x++) { accPixels[((y&1)<<1)|(x&1)] += *pixel++; } } totalpixels += area.size * dim.y; } } if (!totalpixels) { for (int i = 0 ; i < 4; i++) blackLevelSeparate[i] = blackLevel; return; } /* Calculate median value of black areas for each component */ /* Adjust the number of total pixels so it is the same as the median of each histogram */ totalpixels /= 4; for (int i = 0 ; i < 4; i++) { blackLevelSeparate[i] = (int)(65535.0f * accPixels[i]/totalpixels); } /* If this is not a CFA image, we do not use separate blacklevels, use average */ if (!isCFA) { int total = 0; for (int i = 0 ; i < 4; i++) total+=blackLevelSeparate[i]; for (int i = 0 ; i < 4; i++) blackLevelSeparate[i] = (total+2)>>2; } } void RawImageDataFloat::scaleBlackWhite() { const int skipBorder = 150; int gw = (dim.x - skipBorder) * cpp; if ((blackAreas.empty() && blackLevelSeparate[0] < 0 && blackLevel < 0) || whitePoint == 65536) { // Estimate float b = 100000000; float m = -10000000; for (int row = skipBorder*cpp;row < (dim.y - skipBorder);row++) { float *pixel = (float*)getData(skipBorder, row); for (int col = skipBorder ; col < gw ; col++) { b = MIN(*pixel, b); m = MAX(*pixel, m); pixel++; } } if (blackLevel < 0) blackLevel = (int)b; if (whitePoint == 65536) whitePoint = (int)m; printf("Estimated black:%d, Estimated white: %d\n", blackLevel, whitePoint); } /* If filter has not set separate blacklevel, compute or fetch it */ if (blackLevelSeparate[0] < 0) calculateBlackAreas(); int threads = getThreadCount(); if (threads <= 1) scaleValues(0, dim.y); else { RawImageWorker **workers = new RawImageWorker*[threads]; int y_offset = 0; int y_per_thread = (dim.y + threads - 1) / threads; for (int i = 0; i < threads; i++) { int y_end = MIN(y_offset + y_per_thread, dim.y); workers[i] = new RawImageWorker(this, RawImageWorker::TASK_SCALE_VALUES, y_offset, y_end); y_offset = y_end; } for (int i = 0; i < threads; i++) { workers[i]->waitForThread(); delete workers[i]; } delete[] workers; } } #if 0 // _MSC_VER > 1399 || defined(__SSE2__) void RawImageDataFloat::scaleValues(int start_y, int end_y) { bool use_sse2; #ifdef _MSC_VER int info[4]; __cpuid(info, 1); use_sse2 = !!(info[3]&(1 << 26)); #else use_sse2 = TRUE; #endif float app_scale = 65535.0f / (whitePoint - blackLevelSeparate[0]); // Check SSE2 if (use_sse2 && app_scale < 63) { __m128i sseround; __m128i ssesub2; __m128i ssesign; uint32* sub_mul = (uint32*)_aligned_malloc(16*4*2, 16); uint32 gw = pitch / 16; // 10 bit fraction uint32 mul = (int)(1024.0f * 65535.0f / (float)(whitePoint - blackLevelSeparate[mOffset.x&1])); mul |= ((int)(1024.0f * 65535.0f / (float)(whitePoint - blackLevelSeparate[(mOffset.x+1)&1])))<<16; uint32 b = blackLevelSeparate[mOffset.x&1] | (blackLevelSeparate[(mOffset.x+1)&1]<<16); for (int i = 0; i< 4; i++) { sub_mul[i] = b; // Subtract even lines sub_mul[4+i] = mul; // Multiply even lines } mul = (int)(1024.0f * 65535.0f / (float)(whitePoint - blackLevelSeparate[2+(mOffset.x&1)])); mul |= ((int)(1024.0f * 65535.0f / (float)(whitePoint - blackLevelSeparate[2+((mOffset.x+1)&1)])))<<16; b = blackLevelSeparate[2+(mOffset.x&1)] | (blackLevelSeparate[2+((mOffset.x+1)&1)]<<16); for (int i = 0; i< 4; i++) { sub_mul[8+i] = b; // Subtract odd lines sub_mul[12+i] = mul; // Multiply odd lines } sseround = _mm_set_epi32(512, 512, 512, 512); ssesub2 = _mm_set_epi32(32768, 32768, 32768, 32768); ssesign = _mm_set_epi32(0x80008000, 0x80008000, 0x80008000, 0x80008000); for (int y = start_y; y < end_y; y++) { __m128i* pixel = (__m128i*) & data[(mOffset.y+y)*pitch]; __m128i ssescale, ssesub; if (((y+mOffset.y)&1) == 0) { ssesub = _mm_load_si128((__m128i*)&sub_mul[0]); ssescale = _mm_load_si128((__m128i*)&sub_mul[4]); } else { ssesub = _mm_load_si128((__m128i*)&sub_mul[8]); ssescale = _mm_load_si128((__m128i*)&sub_mul[12]); } for (uint32 x = 0 ; x < gw; x++) { __m128i pix_high; __m128i temp; _mm_prefetch((char*)(pixel+1), _MM_HINT_T0); __m128i pix_low = _mm_load_si128(pixel); // Subtract black pix_low = _mm_subs_epu16(pix_low, ssesub); // Multiply the two unsigned shorts and combine it to 32 bit result pix_high = _mm_mulhi_epu16(pix_low, ssescale); temp = _mm_mullo_epi16(pix_low, ssescale); pix_low = _mm_unpacklo_epi16(temp, pix_high); pix_high = _mm_unpackhi_epi16(temp, pix_high); // Add rounder pix_low = _mm_add_epi32(pix_low, sseround); pix_high = _mm_add_epi32(pix_high, sseround); // Shift down pix_low = _mm_srai_epi32(pix_low, 10); pix_high = _mm_srai_epi32(pix_high, 10); // Subtract to avoid clipping pix_low = _mm_sub_epi32(pix_low, ssesub2); pix_high = _mm_sub_epi32(pix_high, ssesub2); // Pack pix_low = _mm_packs_epi32(pix_low, pix_high); // Shift sign off pix_low = _mm_xor_si128(pix_low, ssesign); _mm_store_si128(pixel, pix_low); pixel++; } } _aligned_free(sub_mul); } else { // Not SSE2 int gw = dim.x * cpp; int mul[4]; int sub[4]; for (int i = 0; i < 4; i++) { int v = i; if ((mOffset.x&1) != 0) v ^= 1; if ((mOffset.y&1) != 0) v ^= 2; mul[i] = (int)(16384.0f * 65535.0f / (float)(whitePoint - blackLevelSeparate[v])); sub[i] = blackLevelSeparate[v]; } for (int y = start_y; y < end_y; y++) { ushort16 *pixel = (ushort16*)getData(0, y); int *mul_local = &mul[2*(y&1)]; int *sub_local = &sub[2*(y&1)]; for (int x = 0 ; x < gw; x++) { pixel[x] = clampbits(((pixel[x] - sub_local[x&1]) * mul_local[x&1] + 8192) >> 14, 16); } } } } #else void RawImageDataFloat::scaleValues(int start_y, int end_y) { int gw = dim.x * cpp; float mul[4]; float sub[4]; for (int i = 0; i < 4; i++) { int v = i; if ((mOffset.x&1) != 0) v ^= 1; if ((mOffset.y&1) != 0) v ^= 2; mul[i] = 65535.0f / (float)(whitePoint - blackLevelSeparate[v]); sub[i] = (float)blackLevelSeparate[v]; } for (int y = start_y; y < end_y; y++) { float *pixel = (float*)getData(0, y); float *mul_local = &mul[2*(y&1)]; float *sub_local = &sub[2*(y&1)]; for (int x = 0 ; x < gw; x++) { pixel[x] = (pixel[x] - sub_local[x&1]) * mul_local[x&1]; } } } #endif } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/StdAfx.h0000644000175000017500000000344411531305652017707 00000000000000/* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #if defined(__MINGW32__) #define UNICODE #undef _WIN32_WINNT #define _WIN32_WINNT 0x0501 #endif #define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers #include #ifndef __unix__ #include #include #include #ifndef __MINGW32__ #include #else #include #endif #include #else // if unix #ifdef _XOPEN_SOURCE #if (_XOPEN_SOURCE < 600) #undef _XOPEN_SOURCE #define _XOPEN_SOURCE 600 // for posix_memalign() #endif // _XOPEN_SOURCE < 600 #else #define _XOPEN_SOURCE 600 // for posix_memalign() #endif //_XOPEN_SOURCE #include #include #include #include #include #include #endif // __unix__ #include #include "pthread.h" // STL #include #include #include #include #include using namespace std; //My own #include "TiffTag.h" #include "Common.h" #include "Point.h" rawstudio-2.0/plugins/load-rawspeed/rawspeed/TiffIFDBE.cpp0000644000175000017500000000550711526533650020502 00000000000000#include "StdAfx.h" #include "TiffIFDBE.h" #include "TiffEntryBE.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ namespace RawSpeed { TiffIFDBE::TiffIFDBE() { endian = big; } TiffIFDBE::TiffIFDBE(FileMap* f, uint32 offset) { endian = big; int entries; CHECKSIZE(offset); const unsigned char* data = f->getData(offset); entries = (unsigned short)data[0] << 8 | (unsigned short)data[1]; // Directory entries in this IFD CHECKSIZE(offset + 2 + entries*4); for (int i = 0; i < entries; i++) { TiffEntryBE *t = new TiffEntryBE(f, offset + 2 + i*12); if (t->tag == SUBIFDS || t->tag == EXIFIFDPOINTER || t->tag == DNGPRIVATEDATA || t->tag == MAKERNOTE) { // subIFD tag if (t->tag == DNGPRIVATEDATA) { try { TiffIFD *maker_ifd = parseDngPrivateData(t); mSubIFD.push_back(maker_ifd); delete(t); } catch (TiffParserException e) { // Unparsable private data are added as entries mEntry[t->tag] = t; } } else if (t->tag == MAKERNOTE || t->tag == 0x2e) { try { mSubIFD.push_back(parseMakerNote(f, t->getDataOffset(), endian)); delete(t); } catch (TiffParserException e) { // Unparsable makernotes are added as entries mEntry[t->tag] = t; } } else { const unsigned int* sub_offsets = t->getIntArray(); try { for (uint32 j = 0; j < t->count; j++) { mSubIFD.push_back(new TiffIFDBE(f, sub_offsets[j])); } delete(t); } catch (TiffParserException e) { // Unparsable subifds are added as entries mEntry[t->tag] = t; } } } else { // Store as entry mEntry[t->tag] = t; } } data = f->getDataWrt(offset + 2 + entries * 12); nextIFD = (unsigned int)data[0] << 24 | (unsigned int)data[1] << 16 | (unsigned int)data[2] << 8 | (unsigned int)data[3]; } TiffIFDBE::~TiffIFDBE(void) { } } // namespace RawSpeed rawstudio-2.0/plugins/load-rawspeed/rawspeed/BitPumpPlain.h0000644000175000017500000000352211542726010021054 00000000000000/* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ #ifndef BIT_PUMP_PLAIN_H #define BIT_PUMP_PLAIN_H #include "ByteStream.h" namespace RawSpeed { // Note: Allocated buffer MUST be at least size+sizeof(uint32) large. class BitPumpPlain { public: BitPumpPlain(ByteStream *s); BitPumpPlain(const uchar8* _buffer, uint32 _size ); uint32 getBits(uint32 nbits); uint32 getBit(); uint32 getBitsSafe(uint32 nbits); uint32 getBitSafe(); uint32 peekBits(uint32 nbits); uint32 peekBit(); uint32 peekByte(); void skipBits(uint32 nbits); uchar8 getByte(); uchar8 getByteSafe(); void setAbsoluteOffset(uint32 offset); uint32 getOffset() { return off>>3;} __inline void checkPos() { if (off>size) throw IOException("Out of buffer read");}; // Check if we have a valid position virtual ~BitPumpPlain(void); protected: const uchar8* buffer; const uint32 size; // This if the end of buffer. uint32 off; // Offset in bytes private: }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawspeed/LJpegDecompressor.h0000644000175000017500000001440711542726010022103 00000000000000#ifndef LJPEG_DECOMPRESSOR_H #define LJPEG_DECOMPRESSOR_H #include "RawDecoder.h" #include "BitPumpMSB.h" /* RawSpeed - RAW file decoder. Copyright (C) 2009 Klaus Post This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA http://www.klauspost.com */ /* * The following enum and two structs are stolen from the IJG JPEG library * Comments added by tm. See Copyright in LJpegDecompressor.cpp */ namespace RawSpeed { typedef enum { /* JPEG marker codes */ M_STUFF = 0x00, M_SOF0 = 0xc0, /* baseline DCT */ M_SOF1 = 0xc1, /* extended sequential DCT */ M_SOF2 = 0xc2, /* progressive DCT */ M_SOF3 = 0xc3, /* lossless (sequential) */ M_SOF5 = 0xc5, /* differential sequential DCT */ M_SOF6 = 0xc6, /* differential progressive DCT */ M_SOF7 = 0xc7, /* differential lossless */ M_JPG = 0xc8, /* JPEG extensions */ M_SOF9 = 0xc9, /* extended sequential DCT */ M_SOF10 = 0xca, /* progressive DCT */ M_SOF11 = 0xcb, /* lossless (sequential) */ M_SOF13 = 0xcd, /* differential sequential DCT */ M_SOF14 = 0xce, /* differential progressive DCT */ M_SOF15 = 0xcf, /* differential lossless */ M_DHT = 0xc4, /* define Huffman tables */ M_DAC = 0xcc, /* define arithmetic conditioning table */ M_RST0 = 0xd0, /* restart */ M_RST1 = 0xd1, /* restart */ M_RST2 = 0xd2, /* restart */ M_RST3 = 0xd3, /* restart */ M_RST4 = 0xd4, /* restart */ M_RST5 = 0xd5, /* restart */ M_RST6 = 0xd6, /* restart */ M_RST7 = 0xd7, /* restart */ M_SOI = 0xd8, /* start of image */ M_EOI = 0xd9, /* end of image */ M_SOS = 0xda, /* start of scan */ M_DQT = 0xdb, /* define quantization tables */ M_DNL = 0xdc, /* define number of lines */ M_DRI = 0xdd, /* define restart interval */ M_DHP = 0xde, /* define hierarchical progression */ M_EXP = 0xdf, /* expand reference image(s) */ M_APP0 = 0xe0, /* application marker, used for JFIF */ M_APP1 = 0xe1, /* application marker */ M_APP2 = 0xe2, /* application marker */ M_APP3 = 0xe3, /* application marker */ M_APP4 = 0xe4, /* application marker */ M_APP5 = 0xe5, /* application marker */ M_APP6 = 0xe6, /* application marker */ M_APP7 = 0xe7, /* application marker */ M_APP8 = 0xe8, /* application marker */ M_APP9 = 0xe9, /* application marker */ M_APP10 = 0xea, /* application marker */ M_APP11 = 0xeb, /* application marker */ M_APP12 = 0xec, /* application marker */ M_APP13 = 0xed, /* application marker */ M_APP14 = 0xee, /* application marker, used by Adobe */ M_APP15 = 0xef, /* application marker */ M_JPG0 = 0xf0, /* reserved for JPEG extensions */ M_JPG13 = 0xfd, /* reserved for JPEG extensions */ M_COM = 0xfe, /* comment */ M_TEM = 0x01, /* temporary use */ M_FILL = 0xFF } JpegMarker; /* * The following structure stores basic information about one component. */ typedef struct JpegComponentInfo { /* * These values are fixed over the whole image. * They are read from the SOF marker. */ uint32 componentId; /* identifier for this component (0..255) */ uint32 componentIndex; /* its index in SOF or cPtr->compInfo[] */ /* * Huffman table selector (0..3). The value may vary * between scans. It is read from the SOS marker. */ uint32 dcTblNo; uint32 superH; // Horizontal Supersampling uint32 superV; // Vertical Supersampling } JpegComponentInfo; /* * One of the following structures is created for each huffman coding * table. We use the same structure for encoding and decoding, so there * may be some extra fields for encoding that aren't used in the decoding * and vice-versa. */ struct HuffmanTable { /* * These two fields directly represent the contents of a JPEG DHT * marker */ uint32 bits[17]; uint32 huffval[256]; /* * The remaining fields are computed from the above to allow more * efficient coding and decoding. These fields should be considered * private to the Huffman compression & decompression modules. */ ushort16 mincode[17]; int maxcode[18]; short valptr[17]; uint32 numbits[256]; int* bigTable; bool initialized; }; class SOFInfo { public: SOFInfo() { w = h = cps = prec = 0; initialized = false;}; ~SOFInfo() {initialized = false;}; uint32 w; // Width uint32 h; // Height uint32 cps; // Components uint32 prec; // Precision JpegComponentInfo compInfo[4]; bool initialized; }; class LJpegDecompressor { public: LJpegDecompressor(FileMap* file, RawImage img); virtual ~LJpegDecompressor(void); virtual void startDecoder(uint32 offset, uint32 size, uint32 offsetX, uint32 offsetY); virtual void getSOF(SOFInfo* i, uint32 offset, uint32 size); bool mDNGCompatible; // DNG v1.0.x compatibility bool mUseBigtable; // Use only for large images virtual void addSlices(vector slices) {slicesW=slices;}; // CR2 slices. protected: virtual void parseSOF(SOFInfo* i); virtual void parseSOS(); virtual void createHuffmanTable(HuffmanTable *htbl); virtual void createBigTable(HuffmanTable *htbl); virtual void decodeScan() {ThrowRDE("LJpegDecompressor: No Scan decoder found");}; JpegMarker getNextMarker(bool allowskip); void parseDHT(); int HuffDecode(HuffmanTable *htbl); ByteStream* input; BitPumpJPEG* bits; FileMap *mFile; RawImage mRaw; SOFInfo frame; vector slicesW; uint32 pred; uint32 Pt; uint32 offX, offY; // Offset into image where decoding should start uint32 skipX, skipY; // Tile is larger than output, skip these border pixels HuffmanTable huff[4]; }; } // namespace RawSpeed #endif rawstudio-2.0/plugins/load-rawspeed/rawstudio-plugin-api.h0000644000175000017500000000171611526533643020777 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 G_BEGIN_DECLS RSFilterResponse * load_rawspeed(const gchar *filename); G_END_DECLS rawstudio-2.0/plugins/load-rawspeed/rawstudio-plugin.c0000644000175000017500000000355711541412536020222 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include "rawstudio-plugin-api.h" G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_filetype_register_loader(".arw", "Sony", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".cr2", "Canon CR2", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".dng", "Adobe Digital Negative", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".nef", "Nikon NEF", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".nrw", "Nikon NRW", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".orf", "Olympus", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".pef", "Pentax raw", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); // rs_filetype_register_loader(".raw", "Panasonic raw", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".rw2", "Panasonic raw v2", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); rs_filetype_register_loader(".srw", "Samsung SRW", load_rawspeed, 5, RS_LOADER_FLAGS_RAW); } rawstudio-2.0/plugins/load-rawspeed/Makefile.in0000644000175000017500000021144611547430037016606 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/load-rawspeed DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(rawspeeddir)" LTLIBRARIES = $(lib_LTLIBRARIES) load_rawspeed_la_DEPENDENCIES = am_load_rawspeed_la_OBJECTS = rawstudio-plugin-api.lo \ rawstudio-plugin.lo ArwDecoder.lo BitPumpJPEG.lo BitPumpMSB.lo \ BitPumpMSB32.lo BitPumpPlain.lo BlackArea.lo ByteStream.lo \ ByteStreamSwap.lo Camera.lo CameraMetaData.lo \ CameraMetadataException.lo ColorFilterArray.lo Common.lo \ Cr2Decoder.lo DngDecoder.lo DngDecoderSlices.lo \ FileIOException.lo FileMap.lo FileReader.lo IOException.lo \ LJpegDecompressor.lo LJpegPlain.lo NefDecoder.lo \ NikonDecompressor.lo OrfDecoder.lo PefDecoder.lo \ PentaxDecompressor.lo RawDecoder.lo RawDecoderException.lo \ RawImage.lo RawImageDataU16.lo RawImageDataFloat.lo \ Rw2Decoder.lo StdAfx.lo SrwDecoder.lo TiffEntryBE.lo \ TiffEntry.lo TiffIFDBE.lo TiffIFD.lo TiffParser.lo \ TiffParserException.lo TiffParserHeaderless.lo \ TiffParserOlympus.lo load_rawspeed_la_OBJECTS = $(am_load_rawspeed_la_OBJECTS) load_rawspeed_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(load_rawspeed_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(load_rawspeed_la_SOURCES) DIST_SOURCES = $(load_rawspeed_la_SOURCES) DATA = $(rawspeed_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O3 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ \ -I$(top_srcdir)/plugins/load-rawspeed/rawspeed/ lib_LTLIBRARIES = load_rawspeed.la load_rawspeed_la_LIBADD = @PACKAGE_LIBS@ load_rawspeed_la_LDFLAGS = -module -avoid-version load_rawspeed_la_SOURCES = rawstudio-plugin-api.cpp rawstudio-plugin-api.h \ rawstudio-plugin.c \ rawspeed/ArwDecoder.cpp rawspeed/ArwDecoder.h \ rawspeed/BitPumpJPEG.cpp rawspeed/BitPumpJPEG.h \ rawspeed/BitPumpMSB.cpp rawspeed/BitPumpMSB.h \ rawspeed/BitPumpMSB32.cpp rawspeed/BitPumpMSB32.h \ rawspeed/BitPumpPlain.cpp rawspeed/BitPumpPlain.h \ rawspeed/BlackArea.cpp rawspeed/BlackArea.h \ rawspeed/ByteStream.cpp rawspeed/ByteStream.h \ rawspeed/ByteStreamSwap.cpp rawspeed/ByteStreamSwap.h \ rawspeed/Camera.cpp rawspeed/Camera.h \ rawspeed/CameraMetaData.cpp rawspeed/CameraMetaData.h \ rawspeed/CameraMetadataException.cpp rawspeed/CameraMetadataException.h \ rawspeed/ColorFilterArray.cpp rawspeed/ColorFilterArray.h \ rawspeed/Common.cpp rawspeed/Common.h \ rawspeed/Cr2Decoder.cpp rawspeed/Cr2Decoder.h \ rawspeed/DngDecoder.cpp rawspeed/DngDecoder.h \ rawspeed/DngDecoderSlices.cpp rawspeed/DngDecoderSlices.h \ rawspeed/FileIOException.cpp rawspeed/FileIOException.h \ rawspeed/FileMap.cpp rawspeed/FileMap.h \ rawspeed/FileReader.cpp rawspeed/FileReader.h \ rawspeed/IOException.cpp rawspeed/IOException.h \ rawspeed/LJpegDecompressor.cpp rawspeed/LJpegDecompressor.h \ rawspeed/LJpegPlain.cpp rawspeed/LJpegPlain.h \ rawspeed/NefDecoder.cpp rawspeed/NefDecoder.h \ rawspeed/NikonDecompressor.cpp rawspeed/NikonDecompressor.h \ rawspeed/OrfDecoder.cpp rawspeed/OrfDecoder.h \ rawspeed/PefDecoder.cpp rawspeed/PefDecoder.h \ rawspeed/PentaxDecompressor.cpp rawspeed/PentaxDecompressor.h \ rawspeed/Point.h \ rawspeed/RawDecoder.cpp rawspeed/RawDecoder.h \ rawspeed/RawDecoderException.cpp rawspeed/RawDecoderException.h \ rawspeed/RawImage.cpp rawspeed/RawImage.h \ rawspeed/RawImageDataU16.cpp rawspeed/RawImage.h \ rawspeed/RawImageDataFloat.cpp rawspeed/RawImage.h \ rawspeed/Rw2Decoder.cpp rawspeed/Rw2Decoder.h \ rawspeed/StdAfx.cpp rawspeed/StdAfx.h \ rawspeed/SrwDecoder.cpp rawspeed/SrwDecoder.h \ rawspeed/TiffEntryBE.cpp rawspeed/TiffEntryBE.h \ rawspeed/TiffEntry.cpp rawspeed/TiffEntry.h \ rawspeed/TiffIFDBE.cpp rawspeed/TiffIFDBE.h \ rawspeed/TiffIFD.cpp rawspeed/TiffIFD.h \ rawspeed/TiffParser.cpp rawspeed/TiffParser.h \ rawspeed/TiffParserException.cpp rawspeed/TiffParserException.h \ rawspeed/TiffParserHeaderless.cpp rawspeed/TiffParserHeaderless.h \ rawspeed/TiffParserOlympus.cpp rawspeed/TiffParserOlympus.h \ rawspeed/TiffTag.h rawspeeddir = $(datadir)/rawspeed rawspeed_DATA = data/cameras.xml EXTRA_DIST = $(rawspeed_DATA) all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/load-rawspeed/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/load-rawspeed/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done load_rawspeed.la: $(load_rawspeed_la_OBJECTS) $(load_rawspeed_la_DEPENDENCIES) $(load_rawspeed_la_LINK) -rpath $(libdir) $(load_rawspeed_la_OBJECTS) $(load_rawspeed_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ArwDecoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BitPumpJPEG.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BitPumpMSB.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BitPumpMSB32.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BitPumpPlain.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BlackArea.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ByteStream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ByteStreamSwap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Camera.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CameraMetaData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CameraMetadataException.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ColorFilterArray.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Cr2Decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DngDecoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DngDecoderSlices.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileIOException.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileMap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/FileReader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/IOException.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LJpegDecompressor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LJpegPlain.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NefDecoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NikonDecompressor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/OrfDecoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PefDecoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/PentaxDecompressor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RawDecoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RawDecoderException.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RawImage.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RawImageDataFloat.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RawImageDataU16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Rw2Decoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SrwDecoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/StdAfx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TiffEntry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TiffEntryBE.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TiffIFD.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TiffIFDBE.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TiffParser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TiffParserException.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TiffParserHeaderless.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TiffParserOlympus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawstudio-plugin-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawstudio-plugin.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< ArwDecoder.lo: rawspeed/ArwDecoder.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ArwDecoder.lo -MD -MP -MF $(DEPDIR)/ArwDecoder.Tpo -c -o ArwDecoder.lo `test -f 'rawspeed/ArwDecoder.cpp' || echo '$(srcdir)/'`rawspeed/ArwDecoder.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/ArwDecoder.Tpo $(DEPDIR)/ArwDecoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/ArwDecoder.cpp' object='ArwDecoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ArwDecoder.lo `test -f 'rawspeed/ArwDecoder.cpp' || echo '$(srcdir)/'`rawspeed/ArwDecoder.cpp BitPumpJPEG.lo: rawspeed/BitPumpJPEG.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BitPumpJPEG.lo -MD -MP -MF $(DEPDIR)/BitPumpJPEG.Tpo -c -o BitPumpJPEG.lo `test -f 'rawspeed/BitPumpJPEG.cpp' || echo '$(srcdir)/'`rawspeed/BitPumpJPEG.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/BitPumpJPEG.Tpo $(DEPDIR)/BitPumpJPEG.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/BitPumpJPEG.cpp' object='BitPumpJPEG.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BitPumpJPEG.lo `test -f 'rawspeed/BitPumpJPEG.cpp' || echo '$(srcdir)/'`rawspeed/BitPumpJPEG.cpp BitPumpMSB.lo: rawspeed/BitPumpMSB.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BitPumpMSB.lo -MD -MP -MF $(DEPDIR)/BitPumpMSB.Tpo -c -o BitPumpMSB.lo `test -f 'rawspeed/BitPumpMSB.cpp' || echo '$(srcdir)/'`rawspeed/BitPumpMSB.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/BitPumpMSB.Tpo $(DEPDIR)/BitPumpMSB.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/BitPumpMSB.cpp' object='BitPumpMSB.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BitPumpMSB.lo `test -f 'rawspeed/BitPumpMSB.cpp' || echo '$(srcdir)/'`rawspeed/BitPumpMSB.cpp BitPumpMSB32.lo: rawspeed/BitPumpMSB32.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BitPumpMSB32.lo -MD -MP -MF $(DEPDIR)/BitPumpMSB32.Tpo -c -o BitPumpMSB32.lo `test -f 'rawspeed/BitPumpMSB32.cpp' || echo '$(srcdir)/'`rawspeed/BitPumpMSB32.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/BitPumpMSB32.Tpo $(DEPDIR)/BitPumpMSB32.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/BitPumpMSB32.cpp' object='BitPumpMSB32.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BitPumpMSB32.lo `test -f 'rawspeed/BitPumpMSB32.cpp' || echo '$(srcdir)/'`rawspeed/BitPumpMSB32.cpp BitPumpPlain.lo: rawspeed/BitPumpPlain.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BitPumpPlain.lo -MD -MP -MF $(DEPDIR)/BitPumpPlain.Tpo -c -o BitPumpPlain.lo `test -f 'rawspeed/BitPumpPlain.cpp' || echo '$(srcdir)/'`rawspeed/BitPumpPlain.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/BitPumpPlain.Tpo $(DEPDIR)/BitPumpPlain.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/BitPumpPlain.cpp' object='BitPumpPlain.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BitPumpPlain.lo `test -f 'rawspeed/BitPumpPlain.cpp' || echo '$(srcdir)/'`rawspeed/BitPumpPlain.cpp BlackArea.lo: rawspeed/BlackArea.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT BlackArea.lo -MD -MP -MF $(DEPDIR)/BlackArea.Tpo -c -o BlackArea.lo `test -f 'rawspeed/BlackArea.cpp' || echo '$(srcdir)/'`rawspeed/BlackArea.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/BlackArea.Tpo $(DEPDIR)/BlackArea.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/BlackArea.cpp' object='BlackArea.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o BlackArea.lo `test -f 'rawspeed/BlackArea.cpp' || echo '$(srcdir)/'`rawspeed/BlackArea.cpp ByteStream.lo: rawspeed/ByteStream.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ByteStream.lo -MD -MP -MF $(DEPDIR)/ByteStream.Tpo -c -o ByteStream.lo `test -f 'rawspeed/ByteStream.cpp' || echo '$(srcdir)/'`rawspeed/ByteStream.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/ByteStream.Tpo $(DEPDIR)/ByteStream.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/ByteStream.cpp' object='ByteStream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ByteStream.lo `test -f 'rawspeed/ByteStream.cpp' || echo '$(srcdir)/'`rawspeed/ByteStream.cpp ByteStreamSwap.lo: rawspeed/ByteStreamSwap.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ByteStreamSwap.lo -MD -MP -MF $(DEPDIR)/ByteStreamSwap.Tpo -c -o ByteStreamSwap.lo `test -f 'rawspeed/ByteStreamSwap.cpp' || echo '$(srcdir)/'`rawspeed/ByteStreamSwap.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/ByteStreamSwap.Tpo $(DEPDIR)/ByteStreamSwap.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/ByteStreamSwap.cpp' object='ByteStreamSwap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ByteStreamSwap.lo `test -f 'rawspeed/ByteStreamSwap.cpp' || echo '$(srcdir)/'`rawspeed/ByteStreamSwap.cpp Camera.lo: rawspeed/Camera.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Camera.lo -MD -MP -MF $(DEPDIR)/Camera.Tpo -c -o Camera.lo `test -f 'rawspeed/Camera.cpp' || echo '$(srcdir)/'`rawspeed/Camera.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Camera.Tpo $(DEPDIR)/Camera.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/Camera.cpp' object='Camera.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Camera.lo `test -f 'rawspeed/Camera.cpp' || echo '$(srcdir)/'`rawspeed/Camera.cpp CameraMetaData.lo: rawspeed/CameraMetaData.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CameraMetaData.lo -MD -MP -MF $(DEPDIR)/CameraMetaData.Tpo -c -o CameraMetaData.lo `test -f 'rawspeed/CameraMetaData.cpp' || echo '$(srcdir)/'`rawspeed/CameraMetaData.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CameraMetaData.Tpo $(DEPDIR)/CameraMetaData.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/CameraMetaData.cpp' object='CameraMetaData.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CameraMetaData.lo `test -f 'rawspeed/CameraMetaData.cpp' || echo '$(srcdir)/'`rawspeed/CameraMetaData.cpp CameraMetadataException.lo: rawspeed/CameraMetadataException.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT CameraMetadataException.lo -MD -MP -MF $(DEPDIR)/CameraMetadataException.Tpo -c -o CameraMetadataException.lo `test -f 'rawspeed/CameraMetadataException.cpp' || echo '$(srcdir)/'`rawspeed/CameraMetadataException.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/CameraMetadataException.Tpo $(DEPDIR)/CameraMetadataException.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/CameraMetadataException.cpp' object='CameraMetadataException.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o CameraMetadataException.lo `test -f 'rawspeed/CameraMetadataException.cpp' || echo '$(srcdir)/'`rawspeed/CameraMetadataException.cpp ColorFilterArray.lo: rawspeed/ColorFilterArray.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT ColorFilterArray.lo -MD -MP -MF $(DEPDIR)/ColorFilterArray.Tpo -c -o ColorFilterArray.lo `test -f 'rawspeed/ColorFilterArray.cpp' || echo '$(srcdir)/'`rawspeed/ColorFilterArray.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/ColorFilterArray.Tpo $(DEPDIR)/ColorFilterArray.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/ColorFilterArray.cpp' object='ColorFilterArray.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o ColorFilterArray.lo `test -f 'rawspeed/ColorFilterArray.cpp' || echo '$(srcdir)/'`rawspeed/ColorFilterArray.cpp Common.lo: rawspeed/Common.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Common.lo -MD -MP -MF $(DEPDIR)/Common.Tpo -c -o Common.lo `test -f 'rawspeed/Common.cpp' || echo '$(srcdir)/'`rawspeed/Common.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Common.Tpo $(DEPDIR)/Common.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/Common.cpp' object='Common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Common.lo `test -f 'rawspeed/Common.cpp' || echo '$(srcdir)/'`rawspeed/Common.cpp Cr2Decoder.lo: rawspeed/Cr2Decoder.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Cr2Decoder.lo -MD -MP -MF $(DEPDIR)/Cr2Decoder.Tpo -c -o Cr2Decoder.lo `test -f 'rawspeed/Cr2Decoder.cpp' || echo '$(srcdir)/'`rawspeed/Cr2Decoder.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Cr2Decoder.Tpo $(DEPDIR)/Cr2Decoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/Cr2Decoder.cpp' object='Cr2Decoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Cr2Decoder.lo `test -f 'rawspeed/Cr2Decoder.cpp' || echo '$(srcdir)/'`rawspeed/Cr2Decoder.cpp DngDecoder.lo: rawspeed/DngDecoder.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT DngDecoder.lo -MD -MP -MF $(DEPDIR)/DngDecoder.Tpo -c -o DngDecoder.lo `test -f 'rawspeed/DngDecoder.cpp' || echo '$(srcdir)/'`rawspeed/DngDecoder.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/DngDecoder.Tpo $(DEPDIR)/DngDecoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/DngDecoder.cpp' object='DngDecoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o DngDecoder.lo `test -f 'rawspeed/DngDecoder.cpp' || echo '$(srcdir)/'`rawspeed/DngDecoder.cpp DngDecoderSlices.lo: rawspeed/DngDecoderSlices.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT DngDecoderSlices.lo -MD -MP -MF $(DEPDIR)/DngDecoderSlices.Tpo -c -o DngDecoderSlices.lo `test -f 'rawspeed/DngDecoderSlices.cpp' || echo '$(srcdir)/'`rawspeed/DngDecoderSlices.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/DngDecoderSlices.Tpo $(DEPDIR)/DngDecoderSlices.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/DngDecoderSlices.cpp' object='DngDecoderSlices.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o DngDecoderSlices.lo `test -f 'rawspeed/DngDecoderSlices.cpp' || echo '$(srcdir)/'`rawspeed/DngDecoderSlices.cpp FileIOException.lo: rawspeed/FileIOException.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FileIOException.lo -MD -MP -MF $(DEPDIR)/FileIOException.Tpo -c -o FileIOException.lo `test -f 'rawspeed/FileIOException.cpp' || echo '$(srcdir)/'`rawspeed/FileIOException.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FileIOException.Tpo $(DEPDIR)/FileIOException.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/FileIOException.cpp' object='FileIOException.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FileIOException.lo `test -f 'rawspeed/FileIOException.cpp' || echo '$(srcdir)/'`rawspeed/FileIOException.cpp FileMap.lo: rawspeed/FileMap.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FileMap.lo -MD -MP -MF $(DEPDIR)/FileMap.Tpo -c -o FileMap.lo `test -f 'rawspeed/FileMap.cpp' || echo '$(srcdir)/'`rawspeed/FileMap.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FileMap.Tpo $(DEPDIR)/FileMap.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/FileMap.cpp' object='FileMap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FileMap.lo `test -f 'rawspeed/FileMap.cpp' || echo '$(srcdir)/'`rawspeed/FileMap.cpp FileReader.lo: rawspeed/FileReader.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT FileReader.lo -MD -MP -MF $(DEPDIR)/FileReader.Tpo -c -o FileReader.lo `test -f 'rawspeed/FileReader.cpp' || echo '$(srcdir)/'`rawspeed/FileReader.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/FileReader.Tpo $(DEPDIR)/FileReader.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/FileReader.cpp' object='FileReader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o FileReader.lo `test -f 'rawspeed/FileReader.cpp' || echo '$(srcdir)/'`rawspeed/FileReader.cpp IOException.lo: rawspeed/IOException.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT IOException.lo -MD -MP -MF $(DEPDIR)/IOException.Tpo -c -o IOException.lo `test -f 'rawspeed/IOException.cpp' || echo '$(srcdir)/'`rawspeed/IOException.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/IOException.Tpo $(DEPDIR)/IOException.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/IOException.cpp' object='IOException.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o IOException.lo `test -f 'rawspeed/IOException.cpp' || echo '$(srcdir)/'`rawspeed/IOException.cpp LJpegDecompressor.lo: rawspeed/LJpegDecompressor.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT LJpegDecompressor.lo -MD -MP -MF $(DEPDIR)/LJpegDecompressor.Tpo -c -o LJpegDecompressor.lo `test -f 'rawspeed/LJpegDecompressor.cpp' || echo '$(srcdir)/'`rawspeed/LJpegDecompressor.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/LJpegDecompressor.Tpo $(DEPDIR)/LJpegDecompressor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/LJpegDecompressor.cpp' object='LJpegDecompressor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o LJpegDecompressor.lo `test -f 'rawspeed/LJpegDecompressor.cpp' || echo '$(srcdir)/'`rawspeed/LJpegDecompressor.cpp LJpegPlain.lo: rawspeed/LJpegPlain.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT LJpegPlain.lo -MD -MP -MF $(DEPDIR)/LJpegPlain.Tpo -c -o LJpegPlain.lo `test -f 'rawspeed/LJpegPlain.cpp' || echo '$(srcdir)/'`rawspeed/LJpegPlain.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/LJpegPlain.Tpo $(DEPDIR)/LJpegPlain.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/LJpegPlain.cpp' object='LJpegPlain.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o LJpegPlain.lo `test -f 'rawspeed/LJpegPlain.cpp' || echo '$(srcdir)/'`rawspeed/LJpegPlain.cpp NefDecoder.lo: rawspeed/NefDecoder.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT NefDecoder.lo -MD -MP -MF $(DEPDIR)/NefDecoder.Tpo -c -o NefDecoder.lo `test -f 'rawspeed/NefDecoder.cpp' || echo '$(srcdir)/'`rawspeed/NefDecoder.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/NefDecoder.Tpo $(DEPDIR)/NefDecoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/NefDecoder.cpp' object='NefDecoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o NefDecoder.lo `test -f 'rawspeed/NefDecoder.cpp' || echo '$(srcdir)/'`rawspeed/NefDecoder.cpp NikonDecompressor.lo: rawspeed/NikonDecompressor.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT NikonDecompressor.lo -MD -MP -MF $(DEPDIR)/NikonDecompressor.Tpo -c -o NikonDecompressor.lo `test -f 'rawspeed/NikonDecompressor.cpp' || echo '$(srcdir)/'`rawspeed/NikonDecompressor.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/NikonDecompressor.Tpo $(DEPDIR)/NikonDecompressor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/NikonDecompressor.cpp' object='NikonDecompressor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o NikonDecompressor.lo `test -f 'rawspeed/NikonDecompressor.cpp' || echo '$(srcdir)/'`rawspeed/NikonDecompressor.cpp OrfDecoder.lo: rawspeed/OrfDecoder.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT OrfDecoder.lo -MD -MP -MF $(DEPDIR)/OrfDecoder.Tpo -c -o OrfDecoder.lo `test -f 'rawspeed/OrfDecoder.cpp' || echo '$(srcdir)/'`rawspeed/OrfDecoder.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/OrfDecoder.Tpo $(DEPDIR)/OrfDecoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/OrfDecoder.cpp' object='OrfDecoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o OrfDecoder.lo `test -f 'rawspeed/OrfDecoder.cpp' || echo '$(srcdir)/'`rawspeed/OrfDecoder.cpp PefDecoder.lo: rawspeed/PefDecoder.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PefDecoder.lo -MD -MP -MF $(DEPDIR)/PefDecoder.Tpo -c -o PefDecoder.lo `test -f 'rawspeed/PefDecoder.cpp' || echo '$(srcdir)/'`rawspeed/PefDecoder.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PefDecoder.Tpo $(DEPDIR)/PefDecoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/PefDecoder.cpp' object='PefDecoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PefDecoder.lo `test -f 'rawspeed/PefDecoder.cpp' || echo '$(srcdir)/'`rawspeed/PefDecoder.cpp PentaxDecompressor.lo: rawspeed/PentaxDecompressor.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT PentaxDecompressor.lo -MD -MP -MF $(DEPDIR)/PentaxDecompressor.Tpo -c -o PentaxDecompressor.lo `test -f 'rawspeed/PentaxDecompressor.cpp' || echo '$(srcdir)/'`rawspeed/PentaxDecompressor.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/PentaxDecompressor.Tpo $(DEPDIR)/PentaxDecompressor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/PentaxDecompressor.cpp' object='PentaxDecompressor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o PentaxDecompressor.lo `test -f 'rawspeed/PentaxDecompressor.cpp' || echo '$(srcdir)/'`rawspeed/PentaxDecompressor.cpp RawDecoder.lo: rawspeed/RawDecoder.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RawDecoder.lo -MD -MP -MF $(DEPDIR)/RawDecoder.Tpo -c -o RawDecoder.lo `test -f 'rawspeed/RawDecoder.cpp' || echo '$(srcdir)/'`rawspeed/RawDecoder.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/RawDecoder.Tpo $(DEPDIR)/RawDecoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/RawDecoder.cpp' object='RawDecoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RawDecoder.lo `test -f 'rawspeed/RawDecoder.cpp' || echo '$(srcdir)/'`rawspeed/RawDecoder.cpp RawDecoderException.lo: rawspeed/RawDecoderException.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RawDecoderException.lo -MD -MP -MF $(DEPDIR)/RawDecoderException.Tpo -c -o RawDecoderException.lo `test -f 'rawspeed/RawDecoderException.cpp' || echo '$(srcdir)/'`rawspeed/RawDecoderException.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/RawDecoderException.Tpo $(DEPDIR)/RawDecoderException.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/RawDecoderException.cpp' object='RawDecoderException.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RawDecoderException.lo `test -f 'rawspeed/RawDecoderException.cpp' || echo '$(srcdir)/'`rawspeed/RawDecoderException.cpp RawImage.lo: rawspeed/RawImage.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RawImage.lo -MD -MP -MF $(DEPDIR)/RawImage.Tpo -c -o RawImage.lo `test -f 'rawspeed/RawImage.cpp' || echo '$(srcdir)/'`rawspeed/RawImage.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/RawImage.Tpo $(DEPDIR)/RawImage.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/RawImage.cpp' object='RawImage.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RawImage.lo `test -f 'rawspeed/RawImage.cpp' || echo '$(srcdir)/'`rawspeed/RawImage.cpp RawImageDataU16.lo: rawspeed/RawImageDataU16.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RawImageDataU16.lo -MD -MP -MF $(DEPDIR)/RawImageDataU16.Tpo -c -o RawImageDataU16.lo `test -f 'rawspeed/RawImageDataU16.cpp' || echo '$(srcdir)/'`rawspeed/RawImageDataU16.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/RawImageDataU16.Tpo $(DEPDIR)/RawImageDataU16.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/RawImageDataU16.cpp' object='RawImageDataU16.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RawImageDataU16.lo `test -f 'rawspeed/RawImageDataU16.cpp' || echo '$(srcdir)/'`rawspeed/RawImageDataU16.cpp RawImageDataFloat.lo: rawspeed/RawImageDataFloat.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT RawImageDataFloat.lo -MD -MP -MF $(DEPDIR)/RawImageDataFloat.Tpo -c -o RawImageDataFloat.lo `test -f 'rawspeed/RawImageDataFloat.cpp' || echo '$(srcdir)/'`rawspeed/RawImageDataFloat.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/RawImageDataFloat.Tpo $(DEPDIR)/RawImageDataFloat.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/RawImageDataFloat.cpp' object='RawImageDataFloat.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o RawImageDataFloat.lo `test -f 'rawspeed/RawImageDataFloat.cpp' || echo '$(srcdir)/'`rawspeed/RawImageDataFloat.cpp Rw2Decoder.lo: rawspeed/Rw2Decoder.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT Rw2Decoder.lo -MD -MP -MF $(DEPDIR)/Rw2Decoder.Tpo -c -o Rw2Decoder.lo `test -f 'rawspeed/Rw2Decoder.cpp' || echo '$(srcdir)/'`rawspeed/Rw2Decoder.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/Rw2Decoder.Tpo $(DEPDIR)/Rw2Decoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/Rw2Decoder.cpp' object='Rw2Decoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o Rw2Decoder.lo `test -f 'rawspeed/Rw2Decoder.cpp' || echo '$(srcdir)/'`rawspeed/Rw2Decoder.cpp StdAfx.lo: rawspeed/StdAfx.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT StdAfx.lo -MD -MP -MF $(DEPDIR)/StdAfx.Tpo -c -o StdAfx.lo `test -f 'rawspeed/StdAfx.cpp' || echo '$(srcdir)/'`rawspeed/StdAfx.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/StdAfx.Tpo $(DEPDIR)/StdAfx.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/StdAfx.cpp' object='StdAfx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o StdAfx.lo `test -f 'rawspeed/StdAfx.cpp' || echo '$(srcdir)/'`rawspeed/StdAfx.cpp SrwDecoder.lo: rawspeed/SrwDecoder.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT SrwDecoder.lo -MD -MP -MF $(DEPDIR)/SrwDecoder.Tpo -c -o SrwDecoder.lo `test -f 'rawspeed/SrwDecoder.cpp' || echo '$(srcdir)/'`rawspeed/SrwDecoder.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/SrwDecoder.Tpo $(DEPDIR)/SrwDecoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/SrwDecoder.cpp' object='SrwDecoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o SrwDecoder.lo `test -f 'rawspeed/SrwDecoder.cpp' || echo '$(srcdir)/'`rawspeed/SrwDecoder.cpp TiffEntryBE.lo: rawspeed/TiffEntryBE.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TiffEntryBE.lo -MD -MP -MF $(DEPDIR)/TiffEntryBE.Tpo -c -o TiffEntryBE.lo `test -f 'rawspeed/TiffEntryBE.cpp' || echo '$(srcdir)/'`rawspeed/TiffEntryBE.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/TiffEntryBE.Tpo $(DEPDIR)/TiffEntryBE.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/TiffEntryBE.cpp' object='TiffEntryBE.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TiffEntryBE.lo `test -f 'rawspeed/TiffEntryBE.cpp' || echo '$(srcdir)/'`rawspeed/TiffEntryBE.cpp TiffEntry.lo: rawspeed/TiffEntry.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TiffEntry.lo -MD -MP -MF $(DEPDIR)/TiffEntry.Tpo -c -o TiffEntry.lo `test -f 'rawspeed/TiffEntry.cpp' || echo '$(srcdir)/'`rawspeed/TiffEntry.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/TiffEntry.Tpo $(DEPDIR)/TiffEntry.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/TiffEntry.cpp' object='TiffEntry.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TiffEntry.lo `test -f 'rawspeed/TiffEntry.cpp' || echo '$(srcdir)/'`rawspeed/TiffEntry.cpp TiffIFDBE.lo: rawspeed/TiffIFDBE.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TiffIFDBE.lo -MD -MP -MF $(DEPDIR)/TiffIFDBE.Tpo -c -o TiffIFDBE.lo `test -f 'rawspeed/TiffIFDBE.cpp' || echo '$(srcdir)/'`rawspeed/TiffIFDBE.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/TiffIFDBE.Tpo $(DEPDIR)/TiffIFDBE.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/TiffIFDBE.cpp' object='TiffIFDBE.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TiffIFDBE.lo `test -f 'rawspeed/TiffIFDBE.cpp' || echo '$(srcdir)/'`rawspeed/TiffIFDBE.cpp TiffIFD.lo: rawspeed/TiffIFD.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TiffIFD.lo -MD -MP -MF $(DEPDIR)/TiffIFD.Tpo -c -o TiffIFD.lo `test -f 'rawspeed/TiffIFD.cpp' || echo '$(srcdir)/'`rawspeed/TiffIFD.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/TiffIFD.Tpo $(DEPDIR)/TiffIFD.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/TiffIFD.cpp' object='TiffIFD.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TiffIFD.lo `test -f 'rawspeed/TiffIFD.cpp' || echo '$(srcdir)/'`rawspeed/TiffIFD.cpp TiffParser.lo: rawspeed/TiffParser.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TiffParser.lo -MD -MP -MF $(DEPDIR)/TiffParser.Tpo -c -o TiffParser.lo `test -f 'rawspeed/TiffParser.cpp' || echo '$(srcdir)/'`rawspeed/TiffParser.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/TiffParser.Tpo $(DEPDIR)/TiffParser.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/TiffParser.cpp' object='TiffParser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TiffParser.lo `test -f 'rawspeed/TiffParser.cpp' || echo '$(srcdir)/'`rawspeed/TiffParser.cpp TiffParserException.lo: rawspeed/TiffParserException.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TiffParserException.lo -MD -MP -MF $(DEPDIR)/TiffParserException.Tpo -c -o TiffParserException.lo `test -f 'rawspeed/TiffParserException.cpp' || echo '$(srcdir)/'`rawspeed/TiffParserException.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/TiffParserException.Tpo $(DEPDIR)/TiffParserException.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/TiffParserException.cpp' object='TiffParserException.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TiffParserException.lo `test -f 'rawspeed/TiffParserException.cpp' || echo '$(srcdir)/'`rawspeed/TiffParserException.cpp TiffParserHeaderless.lo: rawspeed/TiffParserHeaderless.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TiffParserHeaderless.lo -MD -MP -MF $(DEPDIR)/TiffParserHeaderless.Tpo -c -o TiffParserHeaderless.lo `test -f 'rawspeed/TiffParserHeaderless.cpp' || echo '$(srcdir)/'`rawspeed/TiffParserHeaderless.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/TiffParserHeaderless.Tpo $(DEPDIR)/TiffParserHeaderless.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/TiffParserHeaderless.cpp' object='TiffParserHeaderless.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TiffParserHeaderless.lo `test -f 'rawspeed/TiffParserHeaderless.cpp' || echo '$(srcdir)/'`rawspeed/TiffParserHeaderless.cpp TiffParserOlympus.lo: rawspeed/TiffParserOlympus.cpp @am__fastdepCXX_TRUE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT TiffParserOlympus.lo -MD -MP -MF $(DEPDIR)/TiffParserOlympus.Tpo -c -o TiffParserOlympus.lo `test -f 'rawspeed/TiffParserOlympus.cpp' || echo '$(srcdir)/'`rawspeed/TiffParserOlympus.cpp @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/TiffParserOlympus.Tpo $(DEPDIR)/TiffParserOlympus.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='rawspeed/TiffParserOlympus.cpp' object='TiffParserOlympus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o TiffParserOlympus.lo `test -f 'rawspeed/TiffParserOlympus.cpp' || echo '$(srcdir)/'`rawspeed/TiffParserOlympus.cpp mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-rawspeedDATA: $(rawspeed_DATA) @$(NORMAL_INSTALL) test -z "$(rawspeeddir)" || $(MKDIR_P) "$(DESTDIR)$(rawspeeddir)" @list='$(rawspeed_DATA)'; test -n "$(rawspeeddir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(rawspeeddir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(rawspeeddir)" || exit $$?; \ done uninstall-rawspeedDATA: @$(NORMAL_UNINSTALL) @list='$(rawspeed_DATA)'; test -n "$(rawspeeddir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(rawspeeddir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(rawspeeddir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(rawspeeddir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-rawspeedDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-rawspeedDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-rawspeedDATA install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES \ uninstall-rawspeedDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/output-tifffile/0000755000175000017500000000000011547430076015213 500000000000000rawstudio-2.0/plugins/output-tifffile/Makefile.am0000644000175000017500000000076611526533642017200 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = output_tifffile.la libdir = $(datadir)/rawstudio/plugins/ output_tifffile_la_LIBADD = @PACKAGE_LIBS@ output_tifffile_la_LDFLAGS = -module -avoid-version output_tifffile_la_SOURCES = output-tifffile.c rawstudio-2.0/plugins/output-tifffile/Makefile.in0000644000175000017500000004233011547430041017172 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/output-tifffile DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) output_tifffile_la_DEPENDENCIES = am_output_tifffile_la_OBJECTS = output-tifffile.lo output_tifffile_la_OBJECTS = $(am_output_tifffile_la_OBJECTS) output_tifffile_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(output_tifffile_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(output_tifffile_la_SOURCES) DIST_SOURCES = $(output_tifffile_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = output_tifffile.la output_tifffile_la_LIBADD = @PACKAGE_LIBS@ output_tifffile_la_LDFLAGS = -module -avoid-version output_tifffile_la_SOURCES = output-tifffile.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/output-tifffile/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/output-tifffile/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done output_tifffile.la: $(output_tifffile_la_OBJECTS) $(output_tifffile_la_DEPENDENCIES) $(output_tifffile_la_LINK) -rpath $(libdir) $(output_tifffile_la_OBJECTS) $(output_tifffile_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output-tifffile.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/output-tifffile/output-tifffile.c0000644000175000017500000002127711543243443020432 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include "config.h" #define RS_TYPE_TIFFFILE (rs_tifffile_type) #define RS_TIFFFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_TIFFFILE, RSTifffile)) #define RS_TIFFFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_TIFFFILE, RSTifffileClass)) #define RS_IS_TIFFFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_TIFFFILE)) typedef struct _RSTifffile RSTifffile; typedef struct _RSTifffileClass RSTifffileClass; struct _RSTifffile { RSOutput parent; gchar *filename; gboolean uncompressed; gboolean save16bit; RSColorSpace *color_space; gboolean copy_metadata; }; struct _RSTifffileClass { RSOutputClass parent_class; }; RS_DEFINE_OUTPUT(rs_tifffile, RSTifffile) enum { PROP_0, PROP_FILENAME, PROP_UNCOMPRESSED, PROP_16BIT, PROP_METADATA, PROP_COLORSPACE }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static gboolean execute(RSOutput *output, RSFilter *filter); G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_tifffile_get_type(G_TYPE_MODULE(plugin)); } static void rs_tifffile_class_init(RSTifffileClass *klass) { RSOutputClass *output_class = RS_OUTPUT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_FILENAME, g_param_spec_string( "filename", "filename", _("Full export path"), NULL, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_UNCOMPRESSED, g_param_spec_boolean( "uncompressed", "Uncompressed TIFF", _("Save uncompressed TIFF"), FALSE, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_16BIT, g_param_spec_boolean( "save16bit", "16 bit TIFF", _("Save 16 bit TIFF"), FALSE, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_METADATA, g_param_spec_boolean( "copy-metadata", "Copy Metadata", _("Copy EXIF metadata"), TRUE, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_COLORSPACE, g_param_spec_object( "colorspace", "Output colorspace", _("Color space used for saving"), RS_TYPE_COLOR_SPACE, G_PARAM_READWRITE) ); output_class->execute = execute; output_class->extension = "tif"; output_class->display_name = _("TIFF (Tagged Image File Format)"); } static void rs_tifffile_init(RSTifffile *tifffile) { tifffile->filename = NULL; tifffile->uncompressed = FALSE; tifffile->save16bit = FALSE; tifffile->copy_metadata = TRUE; tifffile->color_space = rs_color_space_new_singleton("RSSrgb"); } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSTifffile *tifffile = RS_TIFFFILE(object); switch (property_id) { case PROP_FILENAME: g_value_set_string(value, tifffile->filename); break; case PROP_UNCOMPRESSED: g_value_set_boolean(value, tifffile->uncompressed); break; case PROP_16BIT: g_value_set_boolean(value, tifffile->save16bit); break; case PROP_COLORSPACE: g_value_set_object(value, tifffile->color_space); break; case PROP_METADATA: g_value_set_boolean(value, tifffile->copy_metadata); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSTifffile *tifffile = RS_TIFFFILE(object); switch (property_id) { case PROP_FILENAME: tifffile->filename = g_value_dup_string(value); break; case PROP_UNCOMPRESSED: tifffile->uncompressed = g_value_get_boolean(value); break; case PROP_16BIT: tifffile->save16bit = g_value_get_boolean(value); break; case PROP_COLORSPACE: if (tifffile->color_space) g_object_unref(tifffile->color_space); tifffile->color_space = g_value_get_object(value); break; case PROP_METADATA: tifffile->copy_metadata = g_value_get_boolean(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void rs_tiff_generic_init(TIFF *output, guint w, guint h, const guint samples_per_pixel, const RSIccProfile *profile, gboolean uncompressed); static void rs_tiff_generic_init(TIFF *output, guint w, guint h, const guint samples_per_pixel, const RSIccProfile *profile, gboolean uncompressed) { TIFFSetField(output, TIFFTAG_IMAGEWIDTH, w); TIFFSetField(output, TIFFTAG_IMAGELENGTH, h); TIFFSetField(output, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); TIFFSetField(output, TIFFTAG_SAMPLESPERPIXEL, samples_per_pixel); TIFFSetField(output, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); TIFFSetField(output, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); if (uncompressed) TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_NONE); else { TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); TIFFSetField(output, TIFFTAG_ZIPQUALITY, 9); } if (profile) { gchar *buffer = NULL; gsize length = 0; if (rs_icc_profile_get_data(profile, &buffer, &length)) { TIFFSetField(output, TIFFTAG_ICCPROFILE, length, buffer); g_free(buffer); } } TIFFSetField(output, TIFFTAG_ROWSPERSTRIP, TIFFDefaultStripSize(output, 0)); } static gboolean execute(RSOutput *output, RSFilter *filter) { RSFilterResponse *response; RSTifffile *tifffile = RS_TIFFFILE(output); const RSIccProfile *profile = NULL; TIFF *tiff; gint row; if((tiff = TIFFOpen(tifffile->filename, "w")) == NULL) return(FALSE); if (tifffile->color_space) profile = rs_color_space_get_icc_profile(tifffile->color_space, tifffile->save16bit); RSFilterRequest *request = rs_filter_request_new(); rs_filter_request_set_quick(request, FALSE); rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", tifffile->color_space); if (tifffile->save16bit) { gint col; response = rs_filter_get_image(filter, request); RS_IMAGE16 *image = rs_filter_response_get_image(response); rs_tiff_generic_init(tiff, image->w, image->h, 3, profile, tifffile->uncompressed); gushort *line = g_new(gushort, image->w*3); g_assert(image->channels == 3); g_assert(image->pixelsize == 4); TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, 16); printf("pixelsize: %d\n", image->pixelsize); rs_io_lock(); for(row=0;rowh;row++) { gushort *buf = GET_PIXEL(image, 0, row); for(col=0;colw; col++) { line[col*3 + R] = buf[col*4 + R]; line[col*3 + G] = buf[col*4 + G]; line[col*3 + B] = buf[col*4 + B]; } TIFFWriteScanline(tiff, line, row, 0); } g_object_unref(image); g_object_unref(response); g_free(line); } else { gint col; response = rs_filter_get_image8(filter, request); GdkPixbuf *pixbuf = rs_filter_response_get_image8(response); gint width = gdk_pixbuf_get_width(pixbuf); gint height = gdk_pixbuf_get_height(pixbuf); gint input_channels = gdk_pixbuf_get_n_channels(pixbuf); rs_tiff_generic_init(tiff, width, height, 3, profile, tifffile->uncompressed); gchar *line = g_new(gchar, width * 3); TIFFSetField(tiff, TIFFTAG_BITSPERSAMPLE, 8); rs_io_lock(); for(row=0;rowcopy_metadata) rs_exif_copy(input_filename, tifffile->filename, G_OBJECT_TYPE_NAME(tifffile->color_space), RS_EXIF_FILE_TYPE_TIFF); rs_io_unlock(); g_free(input_filename); return(TRUE); } rawstudio-2.0/plugins/colorspace-adobergb/0000755000175000017500000000000011547430074015760 500000000000000rawstudio-2.0/plugins/colorspace-adobergb/Makefile.am0000644000175000017500000000100211526533643017730 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = -Wall AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = colorspace_adobergb.la libdir = $(datadir)/rawstudio/plugins/ colorspace_adobergb_la_LIBADD = @PACKAGE_LIBS@ colorspace_adobergb_la_LDFLAGS = -module -avoid-version colorspace_adobergb_la_SOURCES = colorspace-adobergb.c rawstudio-2.0/plugins/colorspace-adobergb/Makefile.in0000644000175000017500000004245611547430034017754 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/colorspace-adobergb DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) colorspace_adobergb_la_DEPENDENCIES = am_colorspace_adobergb_la_OBJECTS = colorspace-adobergb.lo colorspace_adobergb_la_OBJECTS = $(am_colorspace_adobergb_la_OBJECTS) colorspace_adobergb_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(colorspace_adobergb_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(colorspace_adobergb_la_SOURCES) DIST_SOURCES = $(colorspace_adobergb_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = -Wall AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = colorspace_adobergb.la colorspace_adobergb_la_LIBADD = @PACKAGE_LIBS@ colorspace_adobergb_la_LDFLAGS = -module -avoid-version colorspace_adobergb_la_SOURCES = colorspace-adobergb.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/colorspace-adobergb/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/colorspace-adobergb/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done colorspace_adobergb.la: $(colorspace_adobergb_la_OBJECTS) $(colorspace_adobergb_la_DEPENDENCIES) $(colorspace_adobergb_la_LINK) -rpath $(libdir) $(colorspace_adobergb_la_OBJECTS) $(colorspace_adobergb_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/colorspace-adobergb.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/colorspace-adobergb/colorspace-adobergb.c0000644000175000017500000001171611541464154021747 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 4 */ #include #include "config.h" #include "gettext.h" #include /* pow() */ #define RS_TYPE_ADOBERGB (rs_adobe_rgb_type) #define RS_ADOBERGB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_ADOBERGB, RSAdobeRGB)) #define RS_ADOBERGB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_ADOBERGB, RSAdobeRGBClass)) #define RS_IS_ADOBERGB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_ADOBERGB)) #define RS_ADOBERGB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_ADOBERGB, RSAdobeRGBClass)) typedef struct { RSColorSpace parent; } RSAdobeRGB; typedef struct { RSColorSpaceClass parent_class; const RSIccProfile *icc_profile; const RSIccProfile *icc_profile_linear; } RSAdobeRGBClass; RS_DEFINE_COLOR_SPACE(rs_adobe_rgb, RSAdobeRGB) static const RSIccProfile *get_icc_profile(const RSColorSpace *color_space, gboolean linear_profile); static const RS1dFunction *get_gamma_function(const RSColorSpace *color_space); G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_adobe_rgb_get_type(G_TYPE_MODULE(plugin)); } static void rs_adobe_rgb_class_init(RSAdobeRGBClass *klass) { RSColorSpaceClass *colorclass = RS_COLOR_SPACE_CLASS(klass); colorclass->get_icc_profile = get_icc_profile; colorclass->name = "Adobe RGB (1998) Compatible"; colorclass->description = _("Print friendly color space, compatible with Adobe RGB (1998)"); colorclass->get_gamma_function = get_gamma_function; klass->icc_profile = rs_icc_profile_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "profiles" G_DIR_SEPARATOR_S "compatibleWithAdobeRGB1998.icc"); klass->icc_profile_linear = rs_icc_profile_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "profiles" G_DIR_SEPARATOR_S "compatibleWithAdobeRGB1998-linear.icc"); } static void rs_adobe_rgb_init(RSAdobeRGB *adobe_rgb) { /* Source: http://brucelindbloom.com/Eqn_RGB_XYZ_Matrix.html */ /* Internal XYZ transformations are using D50 reference white */ const static RS_MATRIX3 to_pcs = {{ { 0.6097559, 0.2052401, 0.1492240 }, { 0.3111242, 0.6256560, 0.0632197 }, { 0.0194811, 0.0608902, 0.7448387 } }}; rs_color_space_set_matrix_to_pcs(RS_COLOR_SPACE(adobe_rgb), &to_pcs); } static const RSIccProfile * get_icc_profile(const RSColorSpace *color_space, gboolean linear_profile) { RSAdobeRGB *adobe_rgb = RS_ADOBERGB(color_space); if (linear_profile) return RS_ADOBERGB_GET_CLASS(adobe_rgb)->icc_profile_linear; else return RS_ADOBERGB_GET_CLASS(adobe_rgb)->icc_profile; } /* Gamma */ static gdouble evaluate(const RS1dFunction *func, const gdouble x); static gdouble evaluate_inverse(const RS1dFunction *func, const gdouble y); #define RS_TYPE_ADOBE_GAMMA rs_adobe_gamma_get_type() #define RS_ADOBE_GAMMA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_ADOBE_GAMMA, RSAdobeGamma)) #define RS_ADOBE_GAMMA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_ADOBE_GAMMA, RSAdobeGammaClass)) #define RS_IS_ADOBE_GAMMA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_ADOBE_GAMMA)) typedef struct { RS1dFunction parent; } RSAdobeGamma; typedef struct { RS1dFunctionClass parent_class; } RSAdobeGammaClass; GType rs_adobe_gamma_get_type(void); RS1dFunction *rs_adobe_gamma_new(void); G_DEFINE_TYPE (RSAdobeGamma, rs_adobe_gamma, RS_TYPE_1D_FUNCTION) static void rs_adobe_gamma_class_init(RSAdobeGammaClass *klass) { RS1dFunctionClass *fclass = RS_1D_FUNCTION_CLASS(klass); fclass->evaluate = evaluate; fclass->evaluate_inverse = evaluate_inverse; } static void rs_adobe_gamma_init(RSAdobeGamma *gamma) { } RS1dFunction * rs_adobe_gamma_new(void) { return RS_1D_FUNCTION(g_object_new(RS_TYPE_ADOBE_GAMMA, NULL)); } static const RS1dFunction * get_gamma_function(const RSColorSpace *color_space) { static GStaticMutex lock = G_STATIC_MUTEX_INIT; static RS1dFunction *func = NULL; g_static_mutex_lock(&lock); if (!func) func = rs_adobe_gamma_new(); g_static_mutex_unlock(&lock); return func; } static gdouble evaluate(const RS1dFunction *func, const gdouble x) { return pow(x, 1.0/2.2); } static gdouble evaluate_inverse(const RS1dFunction *func, const gdouble y) { return pow(y, 2.2); } rawstudio-2.0/plugins/exposure-mask/0000755000175000017500000000000011547430074014666 500000000000000rawstudio-2.0/plugins/exposure-mask/Makefile.am0000644000175000017500000000075411526533643016653 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = exposure_mask.la libdir = $(datadir)/rawstudio/plugins/ exposure_mask_la_LIBADD = @PACKAGE_LIBS@ exposure_mask_la_LDFLAGS = -module -avoid-version exposure_mask_la_SOURCES = exposure-mask.c rawstudio-2.0/plugins/exposure-mask/Makefile.in0000644000175000017500000004225011547430036016654 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/exposure-mask DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) exposure_mask_la_DEPENDENCIES = am_exposure_mask_la_OBJECTS = exposure-mask.lo exposure_mask_la_OBJECTS = $(am_exposure_mask_la_OBJECTS) exposure_mask_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(exposure_mask_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(exposure_mask_la_SOURCES) DIST_SOURCES = $(exposure_mask_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = exposure_mask.la exposure_mask_la_LIBADD = @PACKAGE_LIBS@ exposure_mask_la_LDFLAGS = -module -avoid-version exposure_mask_la_SOURCES = exposure-mask.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/exposure-mask/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/exposure-mask/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done exposure_mask.la: $(exposure_mask_la_OBJECTS) $(exposure_mask_la_DEPENDENCIES) $(exposure_mask_la_LINK) -rpath $(libdir) $(exposure_mask_la_OBJECTS) $(exposure_mask_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exposure-mask.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/exposure-mask/exposure-mask.c0000644000175000017500000001261411526533643017564 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 4 */ #include #define RS_TYPE_EXPOSURE_MASK (rs_exposure_mask_type) #define RS_EXPOSURE_MASK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_EXPOSURE_MASK, RSExposureMask)) #define RS_EXPOSURE_MASK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_EXPOSURE_MASK, RSExposureMaskClass)) #define RS_IS_EXPOSURE_MASK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_EXPOSURE_MASK)) typedef struct _RSExposureMask RSExposureMask; typedef struct _RSExposureMaskClass RSExposureMaskClass; struct _RSExposureMask { RSFilter parent; gboolean exposure_mask; }; struct _RSExposureMaskClass { RSFilterClass parent_class; }; RS_DEFINE_FILTER(rs_exposure_mask, RSExposureMask) enum { PROP_0, PROP_EXPOSURE_MASK }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static RSFilterResponse *get_image8(RSFilter *filter, const RSFilterRequest *request); static RSFilterClass *rs_exposure_mask_parent_class = NULL; G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_exposure_mask_get_type(G_TYPE_MODULE(plugin)); } static void rs_exposure_mask_class_init(RSExposureMaskClass *klass) { RSFilterClass *filter_class = RS_FILTER_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); rs_exposure_mask_parent_class = g_type_class_peek_parent (klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_EXPOSURE_MASK, g_param_spec_boolean ( "exposure-mask", "exposure-mask", "Show exposure mask", FALSE, G_PARAM_READWRITE)); filter_class->name = "ExposureMask filter"; filter_class->get_image8 = get_image8; } static void rs_exposure_mask_init(RSExposureMask *exposure_mask) { exposure_mask->exposure_mask = FALSE; } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSExposureMask *exposure_mask = RS_EXPOSURE_MASK(object); switch (property_id) { case PROP_EXPOSURE_MASK: g_value_set_boolean(value, exposure_mask->exposure_mask); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSExposureMask *exposure_mask = RS_EXPOSURE_MASK(object); switch (property_id) { case PROP_EXPOSURE_MASK: exposure_mask->exposure_mask = g_value_get_boolean(value); rs_filter_changed(RS_FILTER(object), RS_FILTER_CHANGED_PIXELDATA); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static RSFilterResponse * get_image8(RSFilter *filter, const RSFilterRequest *request) { RSExposureMask *exposure_mask = RS_EXPOSURE_MASK(filter); RSFilterResponse *previous_response; RSFilterResponse *response; GdkPixbuf *input; GdkPixbuf *output; gint width, col; gint height, row; guchar *in_pixel; guchar *out_pixel; gint channels; previous_response = rs_filter_get_image8(filter->previous, request); input = rs_filter_response_get_image8(previous_response); response = rs_filter_response_clone(previous_response); g_object_unref(previous_response); /* FIXME: Support ROI */ if (exposure_mask->exposure_mask) { output = gdk_pixbuf_copy(input); width = gdk_pixbuf_get_width(input); height = gdk_pixbuf_get_height(input); channels = gdk_pixbuf_get_n_channels(input); g_assert(channels == gdk_pixbuf_get_n_channels(output)); for(row=0;row, * * Anders Kvist and Klaus Post * * 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 #include /* pow() */ #include "exiv2-colorspace.h" /** * Open an image using the GDK-engine * @param filename The filename to open * @return The newly created RS_IMAGE16 or NULL on error */ static RSFilterResponse* load_gdk(const gchar *filename) { gushort gammatable[256]; RS_IMAGE16 *image = NULL; GdkPixbuf *pixbuf; guchar *pixels; gint rowstride; gint width, height; gint row,col, src, dest; gint alpha=0; gint n; gdouble nd, res; gboolean linear_guess = FALSE; RSColorSpace *input_space = exiv2_get_colorspace(filename, &linear_guess); for(n=0;n<256;n++) { nd = ((gdouble) n) * (1.0/255.0); res = (gint) (pow(nd, linear_guess ? 1.0 : 2.2) * 65535.0); _CLAMP65535(res); gammatable[n] = res; } if ((pixbuf = gdk_pixbuf_new_from_file(filename, NULL))) { rowstride = gdk_pixbuf_get_rowstride(pixbuf); pixels = gdk_pixbuf_get_pixels(pixbuf); width = gdk_pixbuf_get_width(pixbuf); height = gdk_pixbuf_get_height(pixbuf); if (gdk_pixbuf_get_has_alpha(pixbuf)) alpha = 1; image = rs_image16_new(width, height, 3, 4); for(row=0;rowh;row++) { dest = row * image->rowstride; src = row * rowstride; for(col=0;colw;col++) { image->pixels[dest++] = gammatable[pixels[src++]]; image->pixels[dest++] = gammatable[pixels[src++]]; image->pixels[dest++] = gammatable[pixels[src++]]; dest++; src+=alpha; } } g_object_unref(pixbuf); } RSFilterResponse* response = rs_filter_response_new(); if (image) { rs_filter_response_set_image(response, image); rs_filter_response_set_width(response, image->w); rs_filter_response_set_height(response, image->h); g_object_unref(image); rs_filter_param_set_object(RS_FILTER_PARAM(response), "embedded-colorspace", input_space); rs_filter_param_set_boolean(RS_FILTER_PARAM(response), "is-premultiplied", TRUE); } return response; } /* We don't load actual metadata, but we will load thumbnail and return FALSE to pass these on */ static gboolean rs_gdk_load_meta(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta) { meta->thumbnail = gdk_pixbuf_new_from_file_at_size(service, 128, 128, NULL); return FALSE; } G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_filetype_register_loader(".jpg", "JPEG", load_gdk, 10, RS_LOADER_FLAGS_8BIT); rs_filetype_register_loader(".jpeg", "JPEG", load_gdk, 10, RS_LOADER_FLAGS_8BIT); rs_filetype_register_loader(".png", "JPEG", load_gdk, 10, RS_LOADER_FLAGS_8BIT); rs_filetype_register_loader(".tif", "JPEG", load_gdk, 20, RS_LOADER_FLAGS_8BIT); rs_filetype_register_loader(".tiff", "JPEG", load_gdk, 20, RS_LOADER_FLAGS_8BIT); /* Take care of thumbnailing too */ rs_filetype_register_meta_loader(".jpg", "JPEG", rs_gdk_load_meta, 10, RS_LOADER_FLAGS_8BIT); rs_filetype_register_meta_loader(".jpeg", "JPEG", rs_gdk_load_meta, 10, RS_LOADER_FLAGS_8BIT); rs_filetype_register_meta_loader(".png", "PNG", rs_gdk_load_meta, 10, RS_LOADER_FLAGS_8BIT); rs_filetype_register_meta_loader(".tif", "TIFF", rs_gdk_load_meta, 20, RS_LOADER_FLAGS_8BIT); rs_filetype_register_meta_loader(".tiff", "TIFF", rs_gdk_load_meta, 20, RS_LOADER_FLAGS_8BIT); } rawstudio-2.0/plugins/load-gdk/exiv2-colorspace.cpp0000644000175000017500000003031111531305646017353 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include #include #include #include "exiv2-colorspace.h" #include #include #include #ifndef EXIV2_TEST_VERSION # define EXIV2_TEST_VERSION(major,minor,patch) \ ( EXIV2_VERSION >= EXIV2_MAKE_VERSION((major),(minor),(patch)) ) #endif #if EXIV2_TEST_VERSION(0,17,0) #include #endif extern "C" { /** INTERFACE **/ using namespace Exiv2; static void setup_read_icc_profile (j_decompress_ptr cinfo); static boolean read_icc_profile (j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned int *icc_data_len); struct error_mgr { jpeg_error_mgr pub; jmp_buf buf; }; static void my_error_exit (j_common_ptr cinfo) { error_mgr * error = reinterpret_cast< error_mgr * >(cinfo->err); longjmp( error->buf, 1 ); } RSColorSpace* exiv2_get_colorspace(const gchar *filename, gboolean *linear_guess) { struct jpeg_decompress_struct info; jpeg_create_decompress(&info); error_mgr err; info.err = jpeg_std_error(( jpeg_error_mgr * ) &err); err.pub.error_exit = &my_error_exit; FILE* fp = fopen(filename, "rb"); if (fp) { RSColorSpace* profile = NULL; if (setjmp(err.buf)) { goto jpeg_fail; } jpeg_stdio_src(&info, fp); setup_read_icc_profile(&info); jpeg_read_header( &info, TRUE ); /* extract ICC profile */ JOCTET *iccBuf; unsigned int iccLen; if (read_icc_profile(&info, &iccBuf, &iccLen)) { RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)iccBuf, iccLen, TRUE); free(iccBuf); profile = rs_color_space_icc_new_from_icc(icc); } jpeg_fail: jpeg_destroy_decompress(&info); fclose(fp); if (profile) return profile; } jpeg_destroy_decompress(&info); #ifdef PNG_iCCP_SUPPORTED if (1) { *linear_guess = FALSE; RSColorSpace* profile = NULL; const gchar *icc_profile_title; const gchar *icc_profile; guint icc_profile_size; png_structp png_ptr = png_create_read_struct( PNG_LIBPNG_VER_STRING, NULL, NULL, NULL); fp = fopen(filename, "rb"); if (fp) { png_byte sig[8]; if (fread(sig, 1, 8, fp) && 0 == fseek(fp,0,SEEK_SET) && png_check_sig(sig, 8)) { png_init_io(png_ptr, fp); png_infop info_ptr = png_create_info_struct(png_ptr); if (info_ptr) { png_read_info( png_ptr, info_ptr ); int compression_type; /* Extract embedded ICC profile */ if (info_ptr->valid & PNG_INFO_iCCP) { png_uint_32 retval = png_get_iCCP (png_ptr, info_ptr, (png_charpp) &icc_profile_title, &compression_type, (png_charpp) &icc_profile, (png_uint_32*) &icc_profile_size); if (retval != 0) { RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)icc_profile, icc_profile_size, TRUE); profile = rs_color_space_icc_new_from_icc(icc); } gdouble gamma = 2.2; png_get_gAMA(png_ptr, info_ptr, &gamma); if (gamma < 1.1) *linear_guess = TRUE; } } png_destroy_read_struct (&png_ptr, &info_ptr, NULL); } fclose(fp); } if (profile) return profile; } #endif try { Image::AutoPtr img = ImageFactory::open(filename); img->readMetadata(); ExifData &exifData = img->exifData(); *linear_guess = FALSE; #if EXIV2_TEST_VERSION(0,17,0) if (exifData.empty() && !img->xmpData().empty()) { copyXmpToExif(img->xmpData(), exifData); } #endif /* Parse Exif Data */ if (!exifData.empty()) { ExifData::const_iterator i; i = exifData.findKey(ExifKey("Exif.Image.BitsPerSample")); if (i != exifData.end()) if (i->toLong() == 16) *linear_guess = TRUE; i = exifData.findKey(ExifKey("Exif.Photo.ColorSpace")); if (i != exifData.end()) { if (i->toLong() == 1) return rs_color_space_new_singleton("RSSrgb"); } /* Attempt to find ICC profile */ i = exifData.findKey(ExifKey("Exif.Image.InterColorProfile")); if (i != exifData.end()) { DataBuf buf(i->size()); i->copy(buf.pData_, Exiv2::invalidByteOrder); if (buf.pData_ && buf.size_) { RSIccProfile *icc = rs_icc_profile_new_from_memory((gchar*)buf.pData_, buf.size_, TRUE); return rs_color_space_icc_new_from_icc(icc); } } i = exifData.findKey(ExifKey("Exif.Iop.InteroperabilityIndex")); if (i != exifData.end()) if (0 == i->toString().compare("R03")) return rs_color_space_new_singleton("RSAdobeRGB"); } } catch (Exiv2::Error& e) { g_debug("Exiv2 ColorSpace Loader:'%s", e.what()); } g_debug("Exiv2 ColorSpace Loader: Could not determine colorspace, assume sRGB."); return rs_color_space_new_singleton("RSSrgb"); } /* * This file provides code to read and write International Color Consortium * (ICC) device profiles embedded in JFIF JPEG image files. The ICC has * defined a standard format for including such data in JPEG "APP2" markers. * The code given here does not know anything about the internal structure * of the ICC profile data; it just knows how to put the profile data into * a JPEG file being written, or get it back out when reading. * * This code depends on new features added to the IJG JPEG library as of * IJG release 6b; it will not compile or work with older IJG versions. * * NOTE: this code would need surgery to work on 16-bit-int machines * with ICC profiles exceeding 64K bytes in size. If you need to do that, * change all the "unsigned int" variables to "INT32". You'll also need * to find a malloc() replacement that can allocate more than 64K. */ /* * Since an ICC profile can be larger than the maximum size of a JPEG marker * (64K), we need provisions to split it into multiple markers. The format * defined by the ICC specifies one or more APP2 markers containing the * following data: * Identifying string ASCII "ICC_PROFILE\0" (12 bytes) * Marker sequence number 1 for first APP2, 2 for next, etc (1 byte) * Number of markers Total number of APP2's used (1 byte) * Profile data (remainder of APP2 data) * Decoders should use the marker sequence numbers to reassemble the profile, * rather than assuming that the APP2 markers appear in the correct sequence. */ #define ICC_MARKER (JPEG_APP0 + 2) /* JPEG marker code for ICC */ #define ICC_OVERHEAD_LEN 14 /* size of non-profile data in APP2 */ #define MAX_BYTES_IN_MARKER 65533 /* maximum data len of a JPEG marker */ #define MAX_DATA_BYTES_IN_MARKER (MAX_BYTES_IN_MARKER - ICC_OVERHEAD_LEN) /* * This routine writes the given ICC profile data into a JPEG file. * It *must* be called AFTER calling jpeg_start_compress() and BEFORE * the first call to jpeg_write_scanlines(). * (This ordering ensures that the APP2 marker(s) will appear after the * SOI and JFIF or Adobe markers, but before all else.) */ /* * Prepare for reading an ICC profile */ static void setup_read_icc_profile (j_decompress_ptr cinfo) { /* Tell the library to keep any APP2 data it may find */ jpeg_save_markers(cinfo, ICC_MARKER, 0xFFFF); } /* * Handy subroutine to test whether a saved marker is an ICC profile marker. */ static boolean marker_is_icc (jpeg_saved_marker_ptr marker) { return marker->marker == ICC_MARKER && marker->data_length >= ICC_OVERHEAD_LEN && /* verify the identifying string */ GETJOCTET(marker->data[0]) == 0x49 && GETJOCTET(marker->data[1]) == 0x43 && GETJOCTET(marker->data[2]) == 0x43 && GETJOCTET(marker->data[3]) == 0x5F && GETJOCTET(marker->data[4]) == 0x50 && GETJOCTET(marker->data[5]) == 0x52 && GETJOCTET(marker->data[6]) == 0x4F && GETJOCTET(marker->data[7]) == 0x46 && GETJOCTET(marker->data[8]) == 0x49 && GETJOCTET(marker->data[9]) == 0x4C && GETJOCTET(marker->data[10]) == 0x45 && GETJOCTET(marker->data[11]) == 0x0; } /* * See if there was an ICC profile in the JPEG file being read; * if so, reassemble and return the profile data. * * TRUE is returned if an ICC profile was found, FALSE if not. * If TRUE is returned, *icc_data_ptr is set to point to the * returned data, and *icc_data_len is set to its length. * * IMPORTANT: the data at **icc_data_ptr has been allocated with malloc() * and must be freed by the caller with free() when the caller no longer * needs it. (Alternatively, we could write this routine to use the * IJG library's memory allocator, so that the data would be freed implicitly * at jpeg_finish_decompress() time. But it seems likely that many apps * will prefer to have the data stick around after decompression finishes.) * * NOTE: if the file contains invalid ICC APP2 markers, we just silently * return FALSE. You might want to issue an error message instead. */ static boolean read_icc_profile (j_decompress_ptr cinfo, JOCTET **icc_data_ptr, unsigned int *icc_data_len) { jpeg_saved_marker_ptr marker; int num_markers = 0; int seq_no; JOCTET *icc_data; unsigned int total_length; #define MAX_SEQ_NO 255 /* sufficient since marker numbers are bytes */ char marker_present[MAX_SEQ_NO+1]; /* 1 if marker found */ unsigned int data_length[MAX_SEQ_NO+1]; /* size of profile data in marker */ unsigned int data_offset[MAX_SEQ_NO+1]; /* offset for data in marker */ *icc_data_ptr = NULL; /* avoid confusion if FALSE return */ *icc_data_len = 0; /* This first pass over the saved markers discovers whether there are * any ICC markers and verifies the consistency of the marker numbering. */ for (seq_no = 1; seq_no <= MAX_SEQ_NO; seq_no++) marker_present[seq_no] = 0; for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { if (marker_is_icc(marker)) { if (num_markers == 0) num_markers = GETJOCTET(marker->data[13]); else if (num_markers != GETJOCTET(marker->data[13])) return FALSE; /* inconsistent num_markers fields */ seq_no = GETJOCTET(marker->data[12]); if (seq_no <= 0 || seq_no > num_markers) return FALSE; /* bogus sequence number */ if (marker_present[seq_no]) return FALSE; /* duplicate sequence numbers */ marker_present[seq_no] = 1; data_length[seq_no] = marker->data_length - ICC_OVERHEAD_LEN; } } if (num_markers == 0) return FALSE; /* Check for missing markers, count total space needed, * compute offset of each marker's part of the data. */ total_length = 0; for (seq_no = 1; seq_no <= num_markers; seq_no++) { if (marker_present[seq_no] == 0) return FALSE; /* missing sequence number */ data_offset[seq_no] = total_length; total_length += data_length[seq_no]; } if (total_length <= 0) return FALSE; /* found only empty markers? */ /* Allocate space for assembled data */ icc_data = (JOCTET *) malloc(total_length * sizeof(JOCTET)); if (icc_data == NULL) return FALSE; /* oops, out of memory */ /* and fill it in */ for (marker = cinfo->marker_list; marker != NULL; marker = marker->next) { if (marker_is_icc(marker)) { JOCTET FAR *src_ptr; JOCTET *dst_ptr; unsigned int length; seq_no = GETJOCTET(marker->data[12]); dst_ptr = icc_data + data_offset[seq_no]; src_ptr = marker->data + ICC_OVERHEAD_LEN; length = data_length[seq_no]; while (length--) { *dst_ptr++ = *src_ptr++; } } } *icc_data_ptr = icc_data; *icc_data_len = total_length; return TRUE; } /** END INTERFACE **/ } // extern "C" rawstudio-2.0/plugins/load-gdk/Makefile.in0000644000175000017500000004553311547430037015543 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/load-gdk DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) load_gdk_la_DEPENDENCIES = am_load_gdk_la_OBJECTS = load-gdk.lo exiv2-colorspace.lo load_gdk_la_OBJECTS = $(am_load_gdk_la_OBJECTS) load_gdk_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(load_gdk_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(load_gdk_la_SOURCES) DIST_SOURCES = $(load_gdk_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = load_gdk.la load_gdk_la_LIBADD = @PACKAGE_LIBS@ load_gdk_la_LDFLAGS = -module -avoid-version load_gdk_la_SOURCES = load-gdk.c exiv2-colorspace.cpp exiv2-colorspace.h all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/load-gdk/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/load-gdk/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done load_gdk.la: $(load_gdk_la_OBJECTS) $(load_gdk_la_DEPENDENCIES) $(load_gdk_la_LINK) -rpath $(libdir) $(load_gdk_la_OBJECTS) $(load_gdk_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exiv2-colorspace.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/load-gdk.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/load-gdk/exiv2-colorspace.h0000644000175000017500000000243011531305646017021 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 exiv2_colorspace_h__ #define exiv2_colorspace_h__ #include #ifdef _unix_ G_BEGIN_DECLS #endif #ifdef __cplusplus /* If this is a C++ compiler, use C linkage */ extern "C" { #endif extern RSColorSpace* exiv2_get_colorspace(const gchar *filename, gboolean *linear_guess); #ifdef _unix_ G_END_DECLS #endif #ifdef __cplusplus /* If this is a C++ compiler, end C linkage */ } #endif #endif // exiv2_colorspace_h__ rawstudio-2.0/plugins/output-facebook/0000755000175000017500000000000011547430076015174 500000000000000rawstudio-2.0/plugins/output-facebook/rs-facebook-client.c0000644000175000017500000003157111546623213020732 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include #include #include "rs-facebook-client.h" #define HTTP_BOUNDARY "4wncn84cq4ncto874ytnv90w43htn" /** * Get a quark used to describe Facebook error domain * @return A quark touse in GErrors from Facebook code */ GQuark rs_facebook_client_error_quark(void) { static GStaticMutex lock = G_STATIC_MUTEX_INIT; static GQuark quark; g_static_mutex_lock(&lock); if (!quark) quark = g_quark_from_static_string("rawstudio_facebook_client_error"); g_static_mutex_unlock(&lock); return quark; } struct _RSFacebookClient { GObject parent; const gchar *api_key; const gchar *secret; gchar *session_key; gchar *auth_token; gchar *auth_url; CURL *curl; }; G_DEFINE_TYPE(RSFacebookClient, rs_facebook_client, G_TYPE_OBJECT) static void rs_facebook_client_finalize(GObject *object) { RSFacebookClient *facebook = RS_FACEBOOK_CLIENT(object); g_free(facebook->session_key); g_free(facebook->auth_token); g_free(facebook->auth_url); curl_easy_cleanup(facebook->curl); G_OBJECT_CLASS(rs_facebook_client_parent_class)->finalize(object); } static void rs_facebook_client_class_init(RSFacebookClientClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->finalize = rs_facebook_client_finalize; } static void rs_facebook_client_init(RSFacebookClient *facebook) { facebook->curl = curl_easy_init(); } static gchar * xml_simple_response(const GString *xml, const gchar *needle, const gboolean root) { xmlDocPtr doc = xmlParseMemory(xml->str, xml->len); xmlNodePtr cur; cur = xmlDocGetRootElement(doc); if (!root && cur) cur = cur->xmlChildrenNode; gchar *result = NULL; while (cur) { if ((!xmlStrcmp(cur->name, BAD_CAST(needle)))) result = (gchar *) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); cur = cur->next; } return result; } static GtkListStore * xml_album_list_response(const GString *xml) { xmlDocPtr doc = xmlParseMemory(xml->str, xml->len); xmlNodePtr cur, child; cur = xmlDocGetRootElement(doc); cur = cur->xmlChildrenNode; gchar *name = NULL; gchar *aid = NULL; gchar *type = NULL; GtkListStore *albums = NULL; GtkTreeIter iter; while (cur) { if ((!xmlStrcmp(cur->name, BAD_CAST("album")))) { child = cur->xmlChildrenNode; while (child) { if ((!xmlStrcmp(child->name, BAD_CAST("name")))) name = (gchar *) xmlNodeListGetString(doc, child->xmlChildrenNode, 1); if ((!xmlStrcmp(child->name, BAD_CAST("aid")))) aid = (gchar *) xmlNodeListGetString(doc, child->xmlChildrenNode, 1); if ((!xmlStrcmp(child->name, BAD_CAST("type")))) type = (gchar *) xmlNodeListGetString(doc, child->xmlChildrenNode, 1); child = child->next; } /* We can solely upload photos to normal albums (not profile, wall and such). */ if(g_strcmp0(type, "normal") == 0) { if (!albums) albums = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING); gtk_list_store_append(albums, &iter); gtk_list_store_set(albums, &iter, 0, name, /* FIXME: Hardcoded */ 1, aid, /* FIXME: Hardcoded */ -1); } g_free(type); } cur = cur->next; } return albums; } static gboolean xml_error(const GString *xml, GError **error) { gchar *error_code = xml_simple_response(xml, "error_code", FALSE); gchar *error_msg = xml_simple_response(xml, "error_msg", FALSE); if (error_code) { g_set_error(error, RS_FACEBOOK_CLIENT_ERROR_DOMAIN, 0, "%s", error_msg); g_free(error_code); g_free(error_msg); return TRUE; } g_free(error_code); g_free(error_msg); return FALSE; } static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp) { GString *string = (GString *) userp; g_string_append_len(string, (char *) ptr, size * nmemb); return (size * nmemb); } static gboolean facebook_client_request(RSFacebookClient *facebook, const gchar *method, RSFacebookClientParam *param, GString *content, GError **error) { volatile static gint call_id = 0; CURLcode result; struct curl_slist *header = NULL; gint post_length = 0; gchar *post_str; /* We start by resetting all CURL parameters */ curl_easy_reset(facebook->curl); #ifdef fb_debug curl_easy_setopt(facebook->curl, CURLOPT_VERBOSE, TRUE); #endif /* fb_debug */ g_atomic_int_inc(&call_id); curl_easy_setopt(facebook->curl, CURLOPT_URL, "api.facebook.com/restserver.php"); rs_facebook_client_param_add_string(param, "api_key", facebook->api_key); rs_facebook_client_param_add_string(param, "method", method); rs_facebook_client_param_add_string(param, "v", "1.0"); rs_facebook_client_param_add_integer(param, "call_id", g_atomic_int_get(&call_id)); /* If we have a session key, we will use it */ if(facebook->session_key) rs_facebook_client_param_add_string(param, "session_key", facebook->session_key); header = curl_slist_append(header, "Content-Type: multipart/form-data; boundary=" HTTP_BOUNDARY); header = curl_slist_append(header, "MIME-version: 1.0;"); post_str = rs_facebook_client_param_get_post(param, facebook->secret, HTTP_BOUNDARY, &post_length); curl_easy_setopt(facebook->curl, CURLOPT_POST, TRUE); curl_easy_setopt(facebook->curl, CURLOPT_POSTFIELDS, post_str); curl_easy_setopt(facebook->curl, CURLOPT_POSTFIELDSIZE, post_length); curl_easy_setopt(facebook->curl, CURLOPT_WRITEFUNCTION, write_callback); curl_easy_setopt(facebook->curl, CURLOPT_WRITEDATA, content); curl_easy_setopt(facebook->curl, CURLOPT_HTTPHEADER, header); result = curl_easy_perform(facebook->curl); curl_slist_free_all(header); g_free(post_str); g_object_unref(param); if (xml_error(content, error)) return FALSE; return (result==0); } static const gchar * facebook_client_get_auth_token(RSFacebookClient *facebook, GError **error) { static GStaticMutex lock = G_STATIC_MUTEX_INIT; g_static_mutex_lock(&lock); if (!facebook->auth_token) { GString *content = g_string_new(""); facebook_client_request(facebook, "facebook.auth.createToken", rs_facebook_client_param_new(), content, error); facebook->auth_token = xml_simple_response(content, "auth_createToken_response", TRUE); g_string_free(content, TRUE); } g_static_mutex_unlock(&lock); return facebook->auth_token; } /** * Initializes a new RSFacebookClient * @param api_key The API key from Facebook * @param secret The secret provided by Facebook * @param session_key The stored session key or NULL if you haven't got one yet * @return A new RSFacebookClient, this must be unreffed */ RSFacebookClient * rs_facebook_client_new(const gchar *api_key, const gchar *secret, const gchar *session_key) { RSFacebookClient *facebook = g_object_new(RS_TYPE_FACEBOOK_CLIENT, NULL); facebook->api_key = api_key; facebook->secret = secret; rs_facebook_client_set_session_key(facebook, session_key); return facebook; } /** * Get the url that the user must visit to authenticate this application (api_key) * @param facebook A RSFacebookClient * @param base_url A prefix URL, "http://api.facebook.com/login.php" would make sense * @param error NULL or a pointer to a GError * initialized to NULL * @return A URL that the user can visit to authenticate this application. Thisshould not be freed */ const gchar * rs_facebook_client_get_auth_url(RSFacebookClient *facebook, const gchar *base_url, GError **error) { static GStaticMutex lock = G_STATIC_MUTEX_INIT; g_assert(RS_IS_FACEBOOK_CLIENT(facebook)); g_static_mutex_lock(&lock); if (!facebook->auth_url) facebook->auth_url = g_strdup_printf("%s?api_key=%s&auth_token=%s&req_perms=user_photos", base_url, facebook->api_key, facebook_client_get_auth_token(facebook, error)); g_static_mutex_unlock(&lock); return facebook->auth_url; } /** * Get the session key as returned from Facebook * @param facebook A RSFacebookClient * @param error NULL or a pointer to a GError * initialized to NULL * @return The session key from Facebook or NULL on error */ const gchar * rs_facebook_client_get_session_key(RSFacebookClient *facebook, GError **error) { static GStaticMutex lock = G_STATIC_MUTEX_INIT; g_assert(RS_IS_FACEBOOK_CLIENT(facebook)); g_static_mutex_lock(&lock); RSFacebookClientParam *param = rs_facebook_client_param_new(); rs_facebook_client_param_add_string(param, "auth_token", facebook->auth_token); GString *content = g_string_new(""); facebook_client_request(facebook, "facebook.auth.getSession", param, content, error); g_free(facebook->session_key); facebook->session_key = xml_simple_response(content, "session_key", FALSE); g_string_free(content, TRUE); g_static_mutex_unlock(&lock); return facebook->session_key; } /** * Set the session key, this can be used to cache the session_key * @param facebook A RSFacebookClient * @param session_key A new session key to use */ void rs_facebook_client_set_session_key(RSFacebookClient *facebook, const gchar *session_key) { g_assert(RS_IS_FACEBOOK_CLIENT(facebook)); g_free(facebook->session_key); facebook->session_key = g_strdup(session_key); } /** * Check if we are authenticated to Facebook * @param facebook A RSFacebookClient * @param error NULL or a pointer to a GError * initialized to NULL * @return TRUE if we're authenticated both by the Facebook API and by the end-user, FALSE otherwise */ gboolean rs_facebook_client_ping(RSFacebookClient *facebook, GError **error) { gboolean ret = FALSE; g_assert(RS_IS_FACEBOOK_CLIENT(facebook)); GString *content = g_string_new(""); facebook_client_request(facebook, "facebook.users.isAppAdded", rs_facebook_client_param_new(), content, NULL); gchar *result = xml_simple_response(content, "users_isAppAdded_response", TRUE); g_string_free(content, TRUE); if (result && g_str_equal(result, "1")) ret = TRUE; g_free(result); return ret; } /** * Upload a photo to Facebook, will be placed in the registered applications default photo folder * @param facebook A RSFacebookClient * @param filename Full path to an image to upload. JPEG, PNG, TIFF accepted * @param caption The caption to use for the image * @param error NULL or a pointer to a GError * initialized to NULL * @return TRUE on success, FALSE otherwise */ gboolean rs_facebook_client_upload_image(RSFacebookClient *facebook, const gchar *filename, const gchar *caption, const gchar *aid, GError **error) { g_assert(RS_IS_FACEBOOK_CLIENT(facebook)); g_return_val_if_fail(filename != NULL, FALSE); g_return_val_if_fail(g_path_is_absolute(filename), FALSE); RSFacebookClientParam *param = rs_facebook_client_param_new(); struct stat st; g_stat(filename, &st); gchar *filesize = g_strdup_printf("%d", (gint) st.st_size); rs_facebook_client_param_add_string(param, "filename", filename); rs_facebook_client_param_add_string(param, "length", filesize); if (caption) rs_facebook_client_param_add_string(param, "caption", caption); if (aid) rs_facebook_client_param_add_string(param, "aid", aid); GString *content = g_string_new(""); facebook_client_request(facebook, "facebook.photos.upload", param, content, error); g_string_free(content, TRUE); g_free(filesize); return TRUE; } /** * Get list of available albums on Facebook account (not profile, wall and so on) * @param facebook A RSFacebookClient * @param error NULL or a pointer to a GError * initialized to NULL * @return a GtkListStore with albums if any, NULL otherwise */ GtkListStore * rs_facebook_client_get_album_list(RSFacebookClient *facebook, GError **error) { g_assert(RS_IS_FACEBOOK_CLIENT(facebook)); GString *content = g_string_new(""); facebook_client_request(facebook, "facebook.photos.getAlbums", rs_facebook_client_param_new(), content, error); GtkListStore *albums = xml_album_list_response(content); g_string_free(content, TRUE); return albums; } gchar * rs_facebook_client_create_album(RSFacebookClient *facebook, const gchar *album_name) { g_assert(RS_IS_FACEBOOK_CLIENT(facebook)); RSFacebookClientParam *param = rs_facebook_client_param_new(); rs_facebook_client_param_add_string(param, "name", album_name); GString *content = g_string_new(""); facebook_client_request(facebook, "facebook.photos.createAlbum", param, content, NULL); gchar *aid = xml_simple_response(content, "aid", FALSE); g_string_free(content, TRUE); return aid; } rawstudio-2.0/plugins/output-facebook/Makefile.am0000644000175000017500000000130111526533643017144 00000000000000plugindir = $(libdir) AM_CFLAGS =\ -Wall\ -Wstrict-aliasing=0\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = output_facebook.la libdir = $(datadir)/rawstudio/plugins/ output_facebook_la_LIBADD = @PACKAGE_LIBS@ output_facebook_la_LDFLAGS = -module -avoid-version -L/usr/lib -lcurl output_facebook_la_SOURCES = output-facebook.c output-facebook.h \ rs-facebook-client.c rs-facebook-client.h \ rs-facebook-client-param.c rs-facebook-client-param.h plugin_DATA = facebook-logo.svg EXTRA_DIST = $(plugin_DATA)rawstudio-2.0/plugins/output-facebook/output-facebook.h0000644000175000017500000000213211546437540020374 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ #define FACEBOOK_API_KEY "4c86b468bbe77840771dda74c7fb1272" #define FACEBOOK_SECRET_KEY "4945724ce9ef58ce5ed2360e020ec07d" #define FACEBOOK_SERVER "https://api.facebook.com/restserver.php" #define FACEBOOK_LOGIN "http://api.facebook.com/login.php" rawstudio-2.0/plugins/output-facebook/output-facebook.c0000644000175000017500000003656011543674627020411 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Output plugin tmpl version 1 */ /* TODO: - move rs_conf_* to librawstudio - this needs RS_FILETYPE from application.h. Should/can we move this to rs-filetypes.h? - decide if rawstudio can be dependent on libflickcurl. Will this plugin be build on dependency satisfiction or --with-output-flickr option. */ #include #include #include "config.h" #include "output-facebook.h" #include #include #include "rs-facebook-client.h" /* Ugly HACK - conf_interface.c|h needs to be ported to librawstudio */ gchar *rs_conf_get_string (const gchar * name); gboolean rs_conf_set_string (const gchar * name, const gchar * value); /* FIXME: this should be moved to conf_interface.h when ported to librawstudio */ #define CONF_FACEBOOK_ALBUM_ID "facebook_album_id" #define RS_TYPE_FACEBOOK (rs_facebook_type) #define RS_FACEBOOK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_FACEBOOK, RSFacebook)) #define RS_FACEBOOK_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_FACEBOOK, RSFacebookClass)) #define RS_IS_FACEBOOK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_FACEBOOK)) typedef struct _RSFacebook RSFacebook; typedef struct _RSFacebookClass RSFacebookClass; struct _RSFacebook { RSOutput parent; gint quality; gchar *caption; gchar *album_id; }; struct _RSFacebookClass { RSOutputClass parent_class; }; typedef struct { RSFacebookClient *facebook_client; GtkEntry *entry; GtkComboBox *combobox; } CreateAlbumData; RS_DEFINE_OUTPUT (rs_facebook, RSFacebook) enum { PROP_0, PROP_LOGO, PROP_JPEG_QUALITY, PROP_CAPTION, PROP_ALBUM_SELECTOR }; static void get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); static gboolean execute (RSOutput * output, RSFilter * filter); static GtkWidget * get_album_selector_widget(RSFacebook *facebook); static GtkWidget * get_logo_widget(RSFacebook *facebook); G_MODULE_EXPORT void rs_plugin_load (RSPlugin * plugin) { rs_facebook_get_type (G_TYPE_MODULE (plugin)); } static void rs_facebook_class_init (RSFacebookClass * klass) { RSOutputClass *output_class = RS_OUTPUT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property (object_class, PROP_JPEG_QUALITY, g_param_spec_int ("quality", "JPEG Quality", _("JPEG Quality"), 10, 100, 90, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_CAPTION, g_param_spec_string ("caption", "caption", _("Caption"), NULL, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_ALBUM_SELECTOR, g_param_spec_object ("album selector", "album selector", "Album selector", GTK_TYPE_WIDGET, G_PARAM_READABLE)); g_object_class_install_property (object_class, PROP_LOGO, g_param_spec_object ("Logo", "logo", "Logo", GTK_TYPE_WIDGET, G_PARAM_READABLE)); output_class->execute = execute; output_class->display_name = _("Upload photo to Facebook"); } static void rs_facebook_init (RSFacebook * facebook) { facebook->quality = 90; } static void get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { RSFacebook *facebook = RS_FACEBOOK (object); switch (property_id) { case PROP_JPEG_QUALITY: g_value_set_int (value, facebook->quality); break; case PROP_CAPTION: g_value_set_string (value, facebook->caption); break; case PROP_ALBUM_SELECTOR: g_value_set_object(value, get_album_selector_widget(facebook)); break; case PROP_LOGO: g_value_set_object(value, get_logo_widget(facebook)); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { RSFacebook *facebook = RS_FACEBOOK (object); switch (property_id) { case PROP_JPEG_QUALITY: facebook->quality = g_value_get_int (value); break; case PROP_CAPTION: facebook->caption = g_value_dup_string (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } GtkWidget * gui_dialog_make_from_widget (const gchar * stock_id, gchar * primary_text, GtkWidget * widget) { GtkWidget *dialog, *image, *hhbox, *vvbox; GtkWidget *primary_label; gchar *str; image = gtk_image_new_from_stock (stock_id, GTK_ICON_SIZE_DIALOG); gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); dialog = gtk_dialog_new (); gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); gtk_window_set_title (GTK_WINDOW (dialog), ""); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); primary_label = gtk_label_new (NULL); gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE); gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE); gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5); gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE); str = g_strconcat ("", primary_text, "", NULL); gtk_label_set_markup (GTK_LABEL (primary_label), str); g_free (str); hhbox = gtk_hbox_new (FALSE, 12); gtk_container_set_border_width (GTK_CONTAINER (hhbox), 5); gtk_box_pack_start (GTK_BOX (hhbox), image, FALSE, FALSE, 0); vvbox = gtk_vbox_new (FALSE, 12); gtk_box_pack_start (GTK_BOX (hhbox), vvbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vvbox), primary_label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vvbox), widget, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hhbox, FALSE, FALSE, 0); return (dialog); } GtkWidget * gui_dialog_make_from_text (const gchar * stock_id, gchar * primary_text, gchar * secondary_text) { GtkWidget *secondary_label; secondary_label = gtk_label_new (NULL); gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE); gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE); gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5); gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE); gtk_label_set_markup (GTK_LABEL (secondary_label), secondary_text); return (gui_dialog_make_from_widget(stock_id, primary_text, secondary_label)); } gboolean auth_popup(const gchar *text, const gchar *auth_url) { /* FIXME: move this to librawstudio */ gdk_threads_enter (); GtkWidget *auth_dialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (auth_dialog), "Rawstudio"); gtk_container_set_border_width (GTK_CONTAINER (auth_dialog), 4); gtk_dialog_set_has_separator (GTK_DIALOG (auth_dialog), FALSE); GtkWidget *vbox = GTK_DIALOG (auth_dialog)->vbox; GtkWidget *textlabel = gtk_label_new(text); gtk_label_set_line_wrap (GTK_LABEL (textlabel), TRUE); gtk_box_pack_start (GTK_BOX (vbox), textlabel, TRUE, TRUE, 4); GtkWidget *table = gtk_table_new (2, 2, FALSE); GtkWidget *step1label = gtk_label_new (_("Step 1:")); GtkWidget *step2label = gtk_label_new (_("Step 2:")); GtkWidget *link = gtk_link_button_new_with_label (auth_url, _("Authenticate Rawstudio")); GtkWidget *hbox = gtk_hbox_new (FALSE, 4); GtkWidget *cancelbutton = gtk_button_new_from_stock (GTK_STOCK_CANCEL); GtkWidget *acceptbutton = gtk_button_new_from_stock (GTK_STOCK_GO_FORWARD); gtk_dialog_add_action_widget (GTK_DIALOG (auth_dialog), cancelbutton, GTK_RESPONSE_CANCEL); gtk_dialog_add_action_widget (GTK_DIALOG (auth_dialog), acceptbutton, GTK_RESPONSE_ACCEPT); gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 4); gtk_table_attach_defaults (GTK_TABLE (table), step1label, 0, 1, 0, 1); gtk_table_attach_defaults (GTK_TABLE (table), step2label, 0, 1, 1, 2); gtk_table_attach_defaults (GTK_TABLE (table), link, 1, 2, 0, 1); gtk_table_attach_defaults (GTK_TABLE (table), hbox, 1, 2, 1, 2); gtk_widget_show_all (auth_dialog); gint response = gtk_dialog_run (GTK_DIALOG (auth_dialog)); gtk_widget_destroy (auth_dialog); gdk_threads_leave (); if (response == GTK_RESPONSE_ACCEPT) return TRUE; else return FALSE; } static gboolean deal_with_error(GError **error) { if (!*error) return FALSE; g_warning("Error from Facebook: '%s'", (*error)->message); gdk_threads_enter(); GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Error: '%s'", (*error)->message); gtk_window_set_title(GTK_WINDOW(dialog), _("Unhandled error from Facebook")); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE); g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_widget_show (dialog); gdk_threads_leave(); g_clear_error(error); return TRUE; } gboolean facebook_auth(RSFacebookClient *facebook_client) { GError *error = NULL; gboolean ping = rs_facebook_client_ping(facebook_client, &error); deal_with_error(&error); if (!ping) { rs_facebook_client_set_session_key(facebook_client, NULL); const gchar *url = rs_facebook_client_get_auth_url(facebook_client, FACEBOOK_LOGIN, &error); deal_with_error(&error); if (!auth_popup(_("Rawstudio needs to be authenticated before it will be able to upload photos to your Facebook account."), url)) return FALSE; const gchar *session = rs_facebook_client_get_session_key(facebook_client, &error); deal_with_error(&error); if (!session) return FALSE; rs_conf_set_string("facebook_session", session); } return ping; } static gboolean execute (RSOutput * output, RSFilter * filter) { GError *error = NULL; RSFacebook *facebook = RS_FACEBOOK (output); gchar *session = rs_conf_get_string("facebook_session"); RSFacebookClient *facebook_client = rs_facebook_client_new(FACEBOOK_API_KEY, FACEBOOK_SECRET_KEY, session); g_free(session); facebook_auth(facebook_client); RSOutput *jpegsave = rs_output_new ("RSJpegfile"); gchar *temp_file = g_strdup_printf ("%s%s.rawstudio-tmp-%d.jpg", g_get_tmp_dir (), G_DIR_SEPARATOR_S, (gint) (g_random_double () * 10000.0)); g_object_set (jpegsave, "filename", temp_file, "quality", facebook->quality, NULL); rs_output_execute (jpegsave, filter); g_object_unref (jpegsave); gboolean ret = rs_facebook_client_upload_image(facebook_client, temp_file, facebook->caption, facebook->album_id, &error); deal_with_error(&error); unlink (temp_file); g_free (temp_file); g_object_unref(facebook_client); return ret; } void combobox_cell_text(GtkComboBox *combo, gint col) { GtkCellRenderer *rend = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), rend, TRUE); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), rend, "text", col); } static void album_set_active(GtkComboBox *combo, gchar *aid) { GtkTreeModel *model = gtk_combo_box_get_model(combo); GtkTreeIter iter; gchar *album_id; if (model && gtk_tree_model_get_iter_first(model, &iter)) do { gtk_tree_model_get(model, &iter, 1, &album_id, -1); if (g_strcmp0(aid, album_id) == 0) { gtk_combo_box_set_active_iter(combo, &iter); g_free(album_id); return; } g_free(album_id); } while (gtk_tree_model_iter_next(model, &iter)); } static void album_changed(GtkComboBox *combo, gpointer callback_data) { RSFacebook *facebook = callback_data; GtkTreeIter iter; GtkTreeModel *model; gchar *album, *aid; gtk_combo_box_get_active_iter(GTK_COMBO_BOX(combo), &iter); model = gtk_combo_box_get_model(GTK_COMBO_BOX(combo)); gtk_tree_model_get(model, &iter, 0, &album, 1, &aid, -1); facebook->album_id = aid; rs_conf_set_string(CONF_FACEBOOK_ALBUM_ID, aid); return; } static void create_album(GtkButton *button, gpointer callback_data) { CreateAlbumData *create_album_data = callback_data; RSFacebookClient *facebook_client = create_album_data->facebook_client; GtkEntry *entry = create_album_data->entry; GtkComboBox *combobox = create_album_data->combobox; const gchar *album_name = gtk_entry_get_text(entry); gchar *aid = rs_facebook_client_create_album(facebook_client, album_name); if (aid) { GtkListStore *albums = rs_facebook_client_get_album_list(facebook_client, NULL); gtk_combo_box_set_model(combobox, GTK_TREE_MODEL(albums)); album_set_active(combobox, aid); gtk_entry_set_text(entry, ""); } } GtkWidget * get_album_selector_widget(RSFacebook *facebook) { GError *error = NULL; gchar *album_id = rs_conf_get_string(CONF_FACEBOOK_ALBUM_ID); CreateAlbumData *create_album_data = g_malloc(sizeof(CreateAlbumData)); gchar *session = rs_conf_get_string("facebook_session"); RSFacebookClient *facebook_client = rs_facebook_client_new(FACEBOOK_API_KEY, FACEBOOK_SECRET_KEY, session); g_free(session); facebook_auth(facebook_client); GtkListStore *albums = rs_facebook_client_get_album_list(facebook_client, &error); GtkWidget *combobox = gtk_combo_box_new(); combobox_cell_text(GTK_COMBO_BOX(combobox), 0); gtk_combo_box_set_model(GTK_COMBO_BOX(combobox), GTK_TREE_MODEL(albums)); album_set_active(GTK_COMBO_BOX(combobox), album_id); facebook->album_id = album_id; g_signal_connect ((gpointer) combobox, "changed", G_CALLBACK (album_changed), facebook); GtkWidget *box = gtk_hbox_new(FALSE, 2); GtkWidget *label = gtk_label_new(_("Albums")); GtkWidget *sep = gtk_vseparator_new(); GtkWidget *entry = gtk_entry_new(); GtkWidget *button = gtk_button_new_with_label(_("Create album")); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (box), combobox, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (box), sep, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (box), entry, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 2); create_album_data->facebook_client = facebook_client; create_album_data->entry = GTK_ENTRY(entry); create_album_data->combobox = GTK_COMBO_BOX(combobox); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (create_album), create_album_data); return box; } GtkWidget * get_logo_widget(RSFacebook *facebook) { gchar *filename = g_build_filename(PACKAGE_DATA_DIR, PACKAGE, G_DIR_SEPARATOR_S "plugins" G_DIR_SEPARATOR_S "facebook-logo.svg", NULL); GtkWidget *box = gtk_vbox_new(TRUE, 2); GtkWidget *logo = gtk_image_new_from_file(filename); g_free(filename); gtk_box_pack_start (GTK_BOX (box), logo, FALSE, FALSE, 2); return box; } rawstudio-2.0/plugins/output-facebook/facebook-logo.svg0000644000175000017500000001512611526533643020352 00000000000000 image/svg+xml rawstudio-2.0/plugins/output-facebook/Makefile.in0000644000175000017500000004506511547430040017162 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/output-facebook DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(plugindir)" LTLIBRARIES = $(lib_LTLIBRARIES) output_facebook_la_DEPENDENCIES = am_output_facebook_la_OBJECTS = output-facebook.lo \ rs-facebook-client.lo rs-facebook-client-param.lo output_facebook_la_OBJECTS = $(am_output_facebook_la_OBJECTS) output_facebook_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(output_facebook_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(output_facebook_la_SOURCES) DIST_SOURCES = $(output_facebook_la_SOURCES) DATA = $(plugin_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir) AM_CFLAGS = \ -Wall\ -Wstrict-aliasing=0\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = output_facebook.la output_facebook_la_LIBADD = @PACKAGE_LIBS@ output_facebook_la_LDFLAGS = -module -avoid-version -L/usr/lib -lcurl output_facebook_la_SOURCES = output-facebook.c output-facebook.h \ rs-facebook-client.c rs-facebook-client.h \ rs-facebook-client-param.c rs-facebook-client-param.h plugin_DATA = facebook-logo.svg EXTRA_DIST = $(plugin_DATA) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/output-facebook/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/output-facebook/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done output_facebook.la: $(output_facebook_la_OBJECTS) $(output_facebook_la_DEPENDENCIES) $(output_facebook_la_LINK) -rpath $(libdir) $(output_facebook_la_OBJECTS) $(output_facebook_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output-facebook.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-facebook-client-param.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-facebook-client.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pluginDATA: $(plugin_DATA) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" @list='$(plugin_DATA)'; test -n "$(plugindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(plugindir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(plugindir)" || exit $$?; \ done uninstall-pluginDATA: @$(NORMAL_UNINSTALL) @list='$(plugin_DATA)'; test -n "$(plugindir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(plugindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(plugindir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(plugindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pluginDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-pluginDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pluginDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES \ uninstall-pluginDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/output-facebook/rs-facebook-client.h0000644000175000017500000001141511526533643020737 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_FACEBOOK_CLIENT_H #define RS_FACEBOOK_CLIENT_H #include #include #include "rs-facebook-client-param.h" G_BEGIN_DECLS /** * Get a quark used to describe Facebook error domain * @return A quark touse in GErrors from Facebook code */ GQuark rs_facebook_client_error_quark(void); #define RS_FACEBOOK_CLIENT_ERROR_DOMAIN rs_facebook_client_error_quark() #define RS_TYPE_FACEBOOK_CLIENT rs_facebook_client_get_type() #define RS_FACEBOOK_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_FACEBOOK_CLIENT, RSFacebookClient)) #define RS_FACEBOOK_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_FACEBOOK_CLIENT, RSFacebookClientClass)) #define RS_IS_FACEBOOK_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_FACEBOOK_CLIENT)) #define RS_IS_FACEBOOK_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_FACEBOOK_CLIENT)) #define RS_FACEBOOK_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_FACEBOOK_CLIENT, RSFacebookClientClass)) typedef struct _RSFacebookClient RSFacebookClient; typedef struct { GObjectClass parent_class; } RSFacebookClientClass; GType rs_facebook_client_get_type(void); /** * Initializes a new RSFacebookClient * @param api_key The API key from Facebook * @param secret The secret provided by Facebook * @param session_key The stored session key or NULL if you haven't got one yet * @return A new RSFacebookClient, this must be unreffed */ RSFacebookClient * rs_facebook_client_new(const gchar *api_key, const gchar *secret, const gchar *session_key); /** * Get the url that the user must visit to authenticate this application (api_key) * @param facebook A RSFacebookClient * @param base_url A prefix URL, "http://api.facebook.com/login.php" would make sense * @param error NULL or a pointer to a GError * initialized to NULL * @return A URL that the user can visit to authenticate this application. Thisshould not be freed */ const gchar * rs_facebook_client_get_auth_url(RSFacebookClient *facebook, const gchar *base_url, GError **error); /** * Get the session key as returned from Facebook * @param facebook A RSFacebookClient * @param error NULL or a pointer to a GError * initialized to NULL * @return The session key from Facebook or NULL on error */ const gchar * rs_facebook_client_get_session_key(RSFacebookClient *facebook, GError **error); /** * Set the session key, this can be used to cache the session_key * @param facebook A RSFacebookClient * @param session_key A new session key to use */ void rs_facebook_client_set_session_key(RSFacebookClient *facebook, const gchar *session_key); /** * Check if we are authenticated to Facebook * @param facebook A RSFacebookClient * @param error NULL or a pointer to a GError * initialized to NULL * @return TRUE if we're authenticated both by the Facebook API and by the end-user, FALSE otherwise */ gboolean rs_facebook_client_ping(RSFacebookClient *facebook, GError **error); /** * Upload a photo to Facebook, will be placed in the registered applications default photo folder * @param facebook A RSFacebookClient * @param filename Full path to an image to upload. JPEG, PNG, TIFF accepted * @param caption The caption to use for the image * @param error NULL or a pointer to a GError * initialized to NULL * @return TRUE on success, FALSE otherwise */ gboolean rs_facebook_client_upload_image(RSFacebookClient *facebook, const gchar *filename, const gchar *caption, const gchar *aid, GError **error); /** * Get list of available albums on Facebook account (not profile, wall and so on) * @param facebook A RSFacebookClient * @param error NULL or a pointer to a GError * initialized to NULL * @return a GtkListStore with albums if any, NULL otherwise */ GtkListStore * rs_facebook_client_get_album_list(RSFacebookClient *facebook, GError **error); gchar * rs_facebook_client_create_album(RSFacebookClient *facebook, const gchar *album_name); G_END_DECLS #endif /* RS_FACEBOOK_CLIENT_H */ rawstudio-2.0/plugins/output-facebook/rs-facebook-client-param.h0000644000175000017500000000620311526533643022034 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_FACEBOOK_CLIENT_PARAM_H #define RS_FACEBOOK_CLIENT_PARAM_H #include G_BEGIN_DECLS #define RS_TYPE_FACEBOOK_CLIENT_PARAM rs_facebook_client_param_get_type() #define RS_FACEBOOK_CLIENT_PARAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_FACEBOOK_CLIENT_PARAM, RSFacebookClientParam)) #define RS_FACEBOOK_CLIENT_PARAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_FACEBOOK_CLIENT_PARAM, RSFacebookClientParamClass)) #define RS_IS_FACEBOOK_CLIENT_PARAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_FACEBOOK_CLIENT_PARAM)) #define RS_IS_FACEBOOK_CLIENT_PARAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_FACEBOOK_CLIENT_PARAM)) #define RS_FACEBOOK_CLIENT_PARAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_FACEBOOK_CLIENT_PARAM, RSFacebookClientParamClass)) typedef struct { GObject parent; GList *params; } RSFacebookClientParam; typedef struct { GObjectClass parent_class; } RSFacebookClientParamClass; GType rs_facebook_client_param_get_type(void); /** * Initialize a new RSFacebookClientParam * @return Anew RSFacebookClientParam */ RSFacebookClientParam * rs_facebook_client_param_new(void); /** * Add a string argument to a RSFacebookClientParam * @param param A RSFacebookClientParam * @param name The name of the parameter * @param value The value of the parameter */ void rs_facebook_client_param_add_string(RSFacebookClientParam *param, const gchar *name, const gchar *value); /** * Add a string argument to a RSFacebookClientParam * @param param A RSFacebookClientParam * @param name The name of the parameter * @param value The value of the parameter */ void rs_facebook_client_param_add_integer(RSFacebookClientParam *param, const gchar *name, const gint value); /** * Get the complete POST string to use for a Facebook request including signature * @param param A RSFacebookClientParam * @param secret The secret provided by Facebook * @param boundary A string to use as HTTP boundary * @param length If non-NULL, will store the length of the post string returned * @return A newly allocated POST-string, this must be freed with g_free() */ gchar * rs_facebook_client_param_get_post(RSFacebookClientParam *param, const gchar *secret, const gchar *boundary, gint *length); G_END_DECLS #endif /* RS_FACEBOOK_CLIENT_PARAM_H */ rawstudio-2.0/plugins/output-facebook/rs-facebook-client-param.c0000644000175000017500000001420711526533643022032 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-facebook-client-param.h" typedef struct { gchar *name; gchar *value; } ParamPair; static ParamPair *param_pair_new(gchar *name, gchar *value); static void param_pair_free(gpointer data, gpointer user_data); static gint param_pair_cmp(gconstpointer a, gconstpointer b); static ParamPair * param_pair_new(gchar *name, gchar *value) { ParamPair *pair = g_new(ParamPair, 1); pair->name = name; pair->value = value; return pair; } static void param_pair_free(gpointer data, gpointer user_data) { ParamPair *pair = (ParamPair *) data; g_free(pair->name); g_free(pair->value); g_free(pair); } static gint param_pair_cmp(gconstpointer a, gconstpointer b) { ParamPair *pair_a = (ParamPair *) a; ParamPair *pair_b = (ParamPair *) b; if (pair_a == pair_b) return 0; if (!pair_a) return 1; if (!pair_b) return -1; return g_strcmp0(pair_a->name, pair_b->name); } G_DEFINE_TYPE(RSFacebookClientParam, rs_facebook_client_param, G_TYPE_OBJECT) static void rs_facebook_client_param_finalize(GObject *object) { RSFacebookClientParam *param = RS_FACEBOOK_CLIENT_PARAM(object); g_list_foreach(param->params, param_pair_free, NULL); G_OBJECT_CLASS(rs_facebook_client_param_parent_class)->finalize(object); } static void rs_facebook_client_param_class_init(RSFacebookClientParamClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = rs_facebook_client_param_finalize; } static void rs_facebook_client_param_init(RSFacebookClientParam *self) { } /** * Initialize a new RSFacebookClientParam * @return Anew RSFacebookClientParam */ RSFacebookClientParam * rs_facebook_client_param_new(void) { return g_object_new(RS_TYPE_FACEBOOK_CLIENT_PARAM, NULL); } /** * Add a string argument to a RSFacebookClientParam * @param param A RSFacebookClientParam * @param name The name of the parameter * @param value The value of the parameter */ void rs_facebook_client_param_add_string(RSFacebookClientParam *param, const gchar *name, const gchar *value) { g_assert(RS_IS_FACEBOOK_CLIENT_PARAM(param)); ParamPair *pair = param_pair_new(g_strdup(name), g_strdup(value)); param->params = g_list_append(param->params, pair); } /** * Add a string argument to a RSFacebookClientParam * @param param A RSFacebookClientParam * @param name The name of the parameter * @param value The value of the parameter */ void rs_facebook_client_param_add_integer(RSFacebookClientParam *param, const gchar *name, const gint value) { g_assert(RS_IS_FACEBOOK_CLIENT_PARAM(param)); ParamPair *pair = param_pair_new(g_strdup(name), g_strdup_printf("%d", value)); param->params = g_list_append(param->params, pair); } /** * Get the complete POST string to use for a Facebook request including signature * @param param A RSFacebookClientParam * @param secret The secret provided by Facebook * @param boundary A string to use as HTTP boundary * @param length If non-NULL, will store the length of the post string returned * @return A newly allocated POST-string, this must be freed with g_free() */ gchar * rs_facebook_client_param_get_post(RSFacebookClientParam *param, const gchar *secret, const gchar *boundary, gint *length) { gchar *post; gchar *signature; GString *str; GString *attachment = NULL; GList *node; g_assert(RS_IS_FACEBOOK_CLIENT_PARAM(param)); g_assert(secret != NULL); g_assert(boundary != NULL); /* Facebook requires parameter list to be sorted, we'll do that */ param->params = g_list_sort(param->params, param_pair_cmp); /* Build signature */ str = g_string_sized_new(10240); for(node = g_list_first(param->params) ; node != NULL; node = g_list_next(node)) { ParamPair *pair = node->data; g_string_append_printf(str, "%s=%s", pair->name, pair->value); } g_string_append_printf(str, "%s", secret); signature = g_compute_checksum_for_string(G_CHECKSUM_MD5, str->str, str->len); g_string_free(str, TRUE); rs_facebook_client_param_add_string(param, "sig", signature); g_free(signature); /* Build complete post */ str = g_string_sized_new(10240); for(node = g_list_first(param->params) ; node != NULL; node = g_list_next(node)) { ParamPair *pair = node->data; /* If we encounter filename, we prepare data to be added last */ if (g_strcmp0(pair->name, "filename") == 0) { gchar *contents; gsize length; if (g_file_get_contents(pair->value, &contents, &length, NULL)) { if (!length) g_warning("You must use the length argument, if you attaches a file"); /* We try toallocate everything we need up front */ attachment = g_string_sized_new(length + 200); g_string_append_printf(attachment, "--%s\r\n", boundary); g_string_append_printf(attachment, "Content-Disposition: form-data; filename=%s\r\n", pair->value); g_string_append_printf(attachment, "Content-Type: image/jpg\r\n\r\n"); attachment = g_string_append_len(attachment, contents, length); g_string_append_printf(attachment, "\r\n--%s\r\n", boundary); g_free(contents); } } g_string_append_printf(str, "--%s\r\nContent-Disposition: form-data; name=\"%s\"\r\n\r\n%s\r\n", boundary, pair->name, pair->value); } if (attachment) { str = g_string_append_len(str, attachment->str, attachment->len); g_string_free(attachment, TRUE); } /* Assign length if requested */ if (length) *length = str->len; post = str->str; g_string_free(str, FALSE); return post; } rawstudio-2.0/plugins/Makefile.in0000644000175000017500000004267611547430034014063 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = \ cache \ colorspace-adobergb \ colorspace-prophoto \ colorspace-srgb \ colorspace-transform \ crop \ dcp \ demosaic \ denoise \ exposure-mask \ fuji-rotate \ input-file \ input-image16 \ lensfun \ load-dcraw \ load-gdk \ load-rawspeed \ meta-ciff \ meta-exiv2 \ meta-mrw \ meta-raf \ meta-tiff \ meta-x3f \ output-jpegfile \ output-facebook \ output-flickr \ output-picasa \ output-pngfile \ output-tifffile \ resample \ rotate all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am check check-am clean clean-generic clean-libtool \ ctags ctags-recursive distclean distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/colorspace-transform/0000755000175000017500000000000011547430074016226 500000000000000rawstudio-2.0/plugins/colorspace-transform/rs-cmm.c0000644000175000017500000002202211526533643017511 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include "rs-cmm.h" static gushort gammatable22[65536]; struct _RSCmm { GObject parent; const RSIccProfile *input_profile; const RSIccProfile *output_profile; gint num_threads; gboolean dirty8; gboolean dirty16; gfloat premul[3]; gushort clip[3]; cmsHPROFILE lcms_input_profile; cmsHPROFILE lcms_output_profile; cmsHTRANSFORM lcms_transform8; cmsHTRANSFORM lcms_transform16; }; G_DEFINE_TYPE (RSCmm, rs_cmm, G_TYPE_OBJECT) static void load_profile(RSCmm *cmm, const RSIccProfile *profile, const RSIccProfile **profile_target, cmsHPROFILE *lcms_target); static void prepare8(RSCmm *cmm); static void prepare16(RSCmm *cmm); static GMutex *is_profile_gamma_22_corrected_linear_lock = NULL; static void rs_cmm_dispose(GObject *object) { G_OBJECT_CLASS(rs_cmm_parent_class)->dispose (object); } static void rs_cmm_class_init(RSCmmClass *klass) { gint n; gdouble nd; GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->dispose = rs_cmm_dispose; /* Build our 2.2 gamma table */ for (n=0;n<65536;n++) { nd = ((gdouble) n) / 65535.0; nd = pow(nd, 1.0/2.2); gammatable22[n] = CLAMP((gint) (nd*65535.0), 0, 65535); } /* GObject locking will protect us here */ if (!is_profile_gamma_22_corrected_linear_lock) is_profile_gamma_22_corrected_linear_lock = g_mutex_new(); } static void rs_cmm_init(RSCmm *cmm) { } RSCmm * rs_cmm_new(void) { return g_object_new(RS_TYPE_CMM, NULL); } void rs_cmm_set_input_profile(RSCmm *cmm, const RSIccProfile *input_profile) { g_assert(RS_IS_CMM(cmm)); g_assert(RS_IS_ICC_PROFILE(input_profile)); load_profile(cmm, input_profile, &cmm->input_profile, &cmm->lcms_input_profile); } void rs_cmm_set_output_profile(RSCmm *cmm, const RSIccProfile *output_profile) { g_assert(RS_IS_CMM(cmm)); g_assert(RS_IS_ICC_PROFILE(output_profile)); load_profile(cmm, output_profile, &cmm->output_profile, &cmm->lcms_output_profile); } void rs_cmm_set_num_threads(RSCmm *cmm, const gint num_threads) { g_assert(RS_IS_CMM(cmm)); cmm->num_threads = MAX(1, num_threads); } void rs_cmm_set_premul(RSCmm *cmm, const gfloat premul[3]) { g_assert(RS_IS_CMM(cmm)); cmm->premul[R] = CLAMP(premul[R], 0.0001, 100.0); cmm->premul[G] = CLAMP(premul[G], 0.0001, 100.0); cmm->premul[B] = CLAMP(premul[B], 0.0001, 100.0); cmm->clip[R] = (gushort) 65535.0 / cmm->premul[R]; cmm->clip[G] = (gushort) 65535.0 / cmm->premul[G]; cmm->clip[B] = (gushort) 65535.0 / cmm->premul[B]; } gboolean rs_cmm_transform16(RSCmm *cmm, RS_IMAGE16 *input, RS_IMAGE16 *output) { gushort *buffer; printf("rs_cms_transform16()\n"); gint y, x; g_assert(RS_IS_CMM(cmm)); g_assert(RS_IS_IMAGE16(input)); g_assert(RS_IS_IMAGE16(output)); g_return_val_if_fail(input->w == output->w, FALSE); g_return_val_if_fail(input->h == output->h, FALSE); g_return_val_if_fail(input->pixelsize == 4, FALSE); if (cmm->dirty16) prepare16(cmm); buffer = g_new(gushort, input->w * 4); for(y=0;yh;y++) { gushort *in = GET_PIXEL(input, 0, y); gushort *out = GET_PIXEL(output, 0, y); gushort *buffer_pointer = buffer; for(x=0;xw;x++) { register gfloat r = (gfloat) MIN(*in, cmm->clip[R]); in++; register gfloat g = (gfloat) MIN(*in, cmm->clip[G]); in++; register gfloat b = (gfloat) MIN(*in, cmm->clip[B]); in++; in++; r = MIN(r, cmm->clip[R]); g = MIN(g, cmm->clip[G]); b = MIN(b, cmm->clip[B]); r = r * cmm->premul[R]; g = g * cmm->premul[G]; b = b * cmm->premul[B]; r = MIN(r, 65535.0); g = MIN(g, 65535.0); b = MIN(b, 65535.0); *(buffer_pointer++) = (gushort) r; *(buffer_pointer++) = (gushort) g; *(buffer_pointer++) = (gushort) b; buffer_pointer++; } cmsDoTransform(cmm->lcms_transform16, buffer, out, input->w); } g_free(buffer); return TRUE; } gboolean rs_cmm_transform8(RSCmm *cmm, RS_IMAGE16 *input, GdkPixbuf *output) { g_assert(RS_IS_CMM(cmm)); g_assert(RS_IS_IMAGE16(input)); g_assert(GDK_IS_PIXBUF(output)); g_return_val_if_fail(input->w == gdk_pixbuf_get_width(output), FALSE); g_return_val_if_fail(input->h == gdk_pixbuf_get_height(output), FALSE); g_return_val_if_fail(input->pixelsize == 4, FALSE); if (cmm->dirty8) prepare8(cmm); /* FIXME: Render */ g_warning("rs_cmm_transform8() is a stub"); return TRUE; } static guchar * pack_rgb_w4(void *info, register WORD wOut[], register LPBYTE output) { *(LPWORD) output = wOut[0]; output+= 2; *(LPWORD) output = wOut[1]; output+= 2; *(LPWORD) output = wOut[2]; output+= 4; return(output); } static guchar * unroll_rgb_w4(void *info, register WORD wIn[], register LPBYTE accum) { wIn[0] = *(LPWORD) accum; accum+= 2; wIn[1] = *(LPWORD) accum; accum+= 2; wIn[2] = *(LPWORD) accum; accum+= 4; return(accum); } static guchar * unroll_rgb_w4_gammatable22(void *info, register WORD wIn[], register LPBYTE accum) { wIn[0] = gammatable22[*(LPWORD) accum]; accum+= 2; wIn[1] = gammatable22[*(LPWORD) accum]; accum+= 2; wIn[2] = gammatable22[*(LPWORD) accum]; accum+= 4; return(accum); } static void load_profile(RSCmm *cmm, const RSIccProfile *profile, const RSIccProfile **profile_target, cmsHPROFILE *lcms_target) { // DEBUG START gchar *filename; g_object_get((void *) profile, "filename", &filename, NULL); printf("load_profile(%p [%s])\n", profile, filename); // DEBUG END gchar *data; gsize length; if (*profile_target == profile) return; *profile_target = profile; if (*lcms_target) cmsCloseProfile(*lcms_target); if (rs_icc_profile_get_data(profile, &data, &length)) *lcms_target = cmsOpenProfileFromMem(data, length); g_warn_if_fail(*lcms_target != NULL); cmm->dirty8 = TRUE; cmm->dirty16 = TRUE; printf("load_profile() DONE\n"); } static void prepare8(RSCmm *cmm) { } static gboolean is_profile_gamma_22_corrected(cmsHPROFILE *profile) { cmsHTRANSFORM testtransform; cmsHPROFILE linear = NULL; gint n; gint lin = 0; gint g045 = 0; gushort buffer[27]; gushort table_lin[] = { 6553, 6553, 6553, 13107, 13107, 13107, 19661, 19661, 19661, 26214, 26214, 26214, 32768, 32768, 32768, 39321, 39321, 39321, 45875, 45875, 45875, 52428, 52428, 52428, 58981, 58981, 58981 }; const gushort table_g045[] = { 392, 392, 392, 1833, 1833, 1833, 4514, 4514, 4514, 8554, 8554, 8554, 14045, 14045, 14045, 21061, 21061, 21061, 29665, 29665, 29665, 39913, 39913, 39913, 51855, 51855, 51855 }; g_mutex_lock(is_profile_gamma_22_corrected_linear_lock); if (linear == NULL) { static cmsCIExyYTRIPLE srgb_primaries = { {0.64, 0.33, 0.212656}, {0.115, 0.826, 0.724938}, {0.157, 0.018, 0.016875}}; cmsCIExyY D65; LPGAMMATABLE gamma[3]; cmsWhitePointFromTemp(6504, &D65); gamma[0] = gamma[1] = gamma[2] = cmsBuildGamma(2,1.0); linear = cmsCreateRGBProfile(&D65, &srgb_primaries, gamma); } g_mutex_unlock(is_profile_gamma_22_corrected_linear_lock); testtransform = cmsCreateTransform(profile, TYPE_RGB_16, linear, TYPE_RGB_16, INTENT_PERCEPTUAL, 0); cmsDoTransform(testtransform, table_lin, buffer, 9); cmsDeleteTransform(testtransform); /* We compare the transformed values to the original linear values to determine if we're closer to a gamma 2.2 correction or 1.0 */ for (n=0;n<9;n++) { lin += abs(buffer[n*3]-table_lin[n*3]); lin += abs(buffer[n*3+1]-table_lin[n*3+1]); lin += abs(buffer[n*3+2]-table_lin[n*3+2]); g045 += abs(buffer[n*3]-table_g045[n*3]); g045 += abs(buffer[n*3+1]-table_g045[n*3+1]); g045 += abs(buffer[n*3+2]-table_g045[n*3+2]); } return (g045 < lin); } static void prepare16(RSCmm *cmm) { if (!cmm->dirty16) return; if (cmm->lcms_transform16) cmsDeleteTransform(cmm->lcms_transform16); cmm->lcms_transform16 = cmsCreateTransform( cmm->lcms_input_profile, TYPE_RGB_16, cmm->lcms_output_profile, TYPE_RGB_16, INTENT_PERCEPTUAL, 0); g_warn_if_fail(cmm->lcms_transform16 != NULL); /* Enable packing/unpacking for pixelsize==4 */ /* If we estimate that the input profile will apply gamma correction, we try to undo it in 16 bit transform */ if (is_profile_gamma_22_corrected(cmm->lcms_input_profile)) cmsSetUserFormatters(cmm->lcms_transform16, TYPE_RGB_16, unroll_rgb_w4_gammatable22, TYPE_RGB_16, pack_rgb_w4); else cmsSetUserFormatters(cmm->lcms_transform16, TYPE_RGB_16, unroll_rgb_w4, TYPE_RGB_16, pack_rgb_w4); cmm->dirty16 = FALSE; } rawstudio-2.0/plugins/colorspace-transform/colorspace_transform_sse2.c0000644000175000017500000005523611543675232023511 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 5 */ #include #include #include "rs-cmm.h" #include "colorspace_transform.h" #if defined(__SSE2__) #include /* SSE2 Polynomial pow function from Mesa3d (MIT License) */ #define EXP_POLY_DEGREE 2 #define POLY0(x, c0) _mm_load_ps(c0) #define POLY1(x, c0, c1) _mm_add_ps(_mm_mul_ps(POLY0(x, c1), x), _mm_load_ps(c0)) #define POLY2(x, c0, c1, c2) _mm_add_ps(_mm_mul_ps(POLY1(x, c1, c2), x), _mm_load_ps(c0)) #define POLY3(x, c0, c1, c2, c3) _mm_add_ps(_mm_mul_ps(POLY2(x, c1, c2, c3), x), _mm_load_ps(c0)) #define POLY4(x, c0, c1, c2, c3, c4) _mm_add_ps(_mm_mul_ps(POLY3(x, c1, c2, c3, c4), x), _mm_load_ps(c0)) #define POLY5(x, c0, c1, c2, c3, c4, c5) _mm_add_ps(_mm_mul_ps(POLY4(x, c1, c2, c3, c4, c5), x), _mm_load_ps(c0)) static const gfloat exp_p5_0[4] __attribute__ ((aligned (16))) = {9.9999994e-1f, 9.9999994e-1f, 9.9999994e-1f, 9.9999994e-1f}; static const gfloat exp_p5_1[4] __attribute__ ((aligned (16))) = {6.9315308e-1f, 6.9315308e-1f, 6.9315308e-1f, 6.9315308e-1f}; static const gfloat exp_p5_2[4] __attribute__ ((aligned (16))) = {2.4015361e-1f, 2.4015361e-1f, 2.4015361e-1f, 2.4015361e-1f}; static const gfloat exp_p5_3[4] __attribute__ ((aligned (16))) = {5.5826318e-2f, 5.5826318e-2f, 5.5826318e-2f, 5.5826318e-2f}; static const gfloat exp_p5_4[4] __attribute__ ((aligned (16))) = {8.9893397e-3f, 8.9893397e-3f, 8.9893397e-3f, 8.9893397e-3f}; static const gfloat exp_p5_5[4] __attribute__ ((aligned (16))) = {1.8775767e-3f, 1.8775767e-3f, 1.8775767e-3f, 1.8775767e-3f}; static const gfloat exp_p4_0[4] __attribute__ ((aligned (16))) = {1.0000026f, 1.0000026f, 1.0000026f, 1.0000026f}; static const gfloat exp_p4_1[4] __attribute__ ((aligned (16))) = {6.9300383e-1f, 6.9300383e-1f, 6.9300383e-1f, 6.9300383e-1f}; static const gfloat exp_p4_2[4] __attribute__ ((aligned (16))) = {2.4144275e-1f, 2.4144275e-1f, 2.4144275e-1f, 2.4144275e-1f}; static const gfloat exp_p4_3[4] __attribute__ ((aligned (16))) = {5.2011464e-2f, 5.2011464e-2f, 5.2011464e-2f, 5.2011464e-2f}; static const gfloat exp_p4_4[4] __attribute__ ((aligned (16))) = {1.3534167e-2f, 1.3534167e-2f, 1.3534167e-2f, 1.3534167e-2f}; static const gfloat exp_p3_0[4] __attribute__ ((aligned (16))) = {9.9992520e-1f, 9.9992520e-1f, 9.9992520e-1f, 9.9992520e-1f}; static const gfloat exp_p3_1[4] __attribute__ ((aligned (16))) = {6.9583356e-1f, 6.9583356e-1f, 6.9583356e-1f, 6.9583356e-1f}; static const gfloat exp_p3_2[4] __attribute__ ((aligned (16))) = {2.2606716e-1f, 2.2606716e-1f, 2.2606716e-1f, 2.2606716e-1f}; static const gfloat exp_p3_3[4] __attribute__ ((aligned (16))) = {7.8024521e-2f, 7.8024521e-2f, 7.8024521e-2f, 7.8024521e-2f}; static const gfloat exp_p2_0[4] __attribute__ ((aligned (16))) = {1.0017247f, 1.0017247f, 1.0017247f, 1.0017247f}; static const gfloat exp_p2_1[4] __attribute__ ((aligned (16))) = {6.5763628e-1f, 6.5763628e-1f, 6.5763628e-1f, 6.5763628e-1f}; static const gfloat exp_p2_2[4] __attribute__ ((aligned (16))) = {3.3718944e-1f, 3.3718944e-1f, 3.3718944e-1f, 3.3718944e-1f}; static const gfloat _ones_ps[4] __attribute__ ((aligned (16))) = {1.0f, 1.0f, 1.0f, 1.0f}; static const gfloat _one29_ps[4] __attribute__ ((aligned (16))) = {129.00000f, 129.00000f, 129.00000f, 129.00000f}; static const gfloat _minusone27_ps[4] __attribute__ ((aligned (16))) = {-126.99999f, -126.99999f, -126.99999f, -126.99999f}; static const gfloat _half_ps[4] __attribute__ ((aligned (16))) = {0.5f, 0.5f, 0.5f, 0.5f}; static const guint _one27[4] __attribute__ ((aligned (16))) = {127,127,127,127}; static inline __m128 exp2f4(__m128 x) { __m128i ipart; __m128 fpart, expipart, expfpart; x = _mm_min_ps(x, _mm_load_ps(_one29_ps)); x = _mm_max_ps(x, _mm_load_ps(_minusone27_ps)); /* ipart = int(x - 0.5) */ ipart = _mm_cvtps_epi32(_mm_sub_ps(x, _mm_load_ps(_half_ps))); /* fpart = x - ipart */ fpart = _mm_sub_ps(x, _mm_cvtepi32_ps(ipart)); /* expipart = (float) (1 << ipart) */ expipart = _mm_castsi128_ps(_mm_slli_epi32(_mm_add_epi32(ipart, _mm_load_si128((__m128i*)_one27)), 23)); /* minimax polynomial fit of 2**x, in range [-0.5, 0.5[ */ #if EXP_POLY_DEGREE == 5 expfpart = POLY5(fpart, exp_p5_0, exp_p5_1, exp_p5_2, exp_p5_3, exp_p5_4, exp_p5_5); #elif EXP_POLY_DEGREE == 4 expfpart = POLY4(fpart, exp_p4_0, exp_p4_1, exp_p4_2, exp_p4_3, exp_p4_4); #elif EXP_POLY_DEGREE == 3 expfpart = POLY3(fpart, exp_p3_0, exp_p3_1, exp_p3_2, exp_p3_3); #elif EXP_POLY_DEGREE == 2 expfpart = POLY2(fpart, exp_p2_0, exp_p2_1, exp_p2_2); #else #error #endif return _mm_mul_ps(expipart, expfpart); } #define LOG_POLY_DEGREE 4 static const gfloat log_p5_0[4] __attribute__ ((aligned (16))) = {3.1157899f, 3.1157899f, 3.1157899f, 3.1157899f}; static const gfloat log_p5_1[4] __attribute__ ((aligned (16))) = {-3.3241990f, -3.3241990f, -3.3241990f, -3.3241990f}; static const gfloat log_p5_2[4] __attribute__ ((aligned (16))) = {2.5988452f, 2.5988452f, 2.5988452f, 2.5988452f}; static const gfloat log_p5_3[4] __attribute__ ((aligned (16))) = {-1.2315303f, -1.2315303f, -1.2315303f, -1.2315303f}; static const gfloat log_p5_4[4] __attribute__ ((aligned (16))) = {3.1821337e-1f, 3.1821337e-1f, 3.1821337e-1f, 3.1821337e-1f}; static const gfloat log_p5_5[4] __attribute__ ((aligned (16))) = {-3.4436006e-2f, -3.4436006e-2f, -3.4436006e-2f, -3.4436006e-2f}; static const gfloat log_p4_0[4] __attribute__ ((aligned (16))) = {2.8882704548164776201f, 2.8882704548164776201f, 2.8882704548164776201f, 2.8882704548164776201f}; static const gfloat log_p4_1[4] __attribute__ ((aligned (16))) = {-2.52074962577807006663f, -2.52074962577807006663f, -2.52074962577807006663f, -2.52074962577807006663f}; static const gfloat log_p4_2[4] __attribute__ ((aligned (16))) = {1.48116647521213171641f, 1.48116647521213171641f, 1.48116647521213171641f, 1.48116647521213171641f}; static const gfloat log_p4_3[4] __attribute__ ((aligned (16))) = {-0.465725644288844778798f, -0.465725644288844778798f,-0.465725644288844778798f, -0.465725644288844778798f}; static const gfloat log_p4_4[4] __attribute__ ((aligned (16))) = {0.0596515482674574969533f, 0.0596515482674574969533f, 0.0596515482674574969533f, 0.0596515482674574969533f}; static const gfloat log_p3_0[4] __attribute__ ((aligned (16))) = {2.61761038894603480148f, 2.61761038894603480148f, 2.61761038894603480148f, 2.61761038894603480148f}; static const gfloat log_p3_1[4] __attribute__ ((aligned (16))) = {-1.75647175389045657003f, -1.75647175389045657003f, -1.75647175389045657003f, -1.75647175389045657003f}; static const gfloat log_p3_2[4] __attribute__ ((aligned (16))) = {0.688243882994381274313f, 0.688243882994381274313f, 0.688243882994381274313f, 0.688243882994381274313f}; static const gfloat log_p3_3[4] __attribute__ ((aligned (16))) = {-0.107254423828329604454f, -0.107254423828329604454f, -0.107254423828329604454f, -0.107254423828329604454f}; static const gfloat log_p2_0[4] __attribute__ ((aligned (16))) = {2.28330284476918490682f, 2.28330284476918490682f, 2.28330284476918490682f, 2.28330284476918490682f}; static const gfloat log_p2_1[4] __attribute__ ((aligned (16))) = {-1.04913055217340124191f, -1.04913055217340124191f, -1.04913055217340124191f, -1.04913055217340124191f}; static const gfloat log_p2_2[4] __attribute__ ((aligned (16))) = {0.204446009836232697516f, 0.204446009836232697516f, 0.204446009836232697516f, 0.204446009836232697516f}; static const guint _exp_mask[4] __attribute__ ((aligned (16))) = {0x7F800000,0x7F800000,0x7F800000,0x7F800000}; static const guint _mantissa_mask[4] __attribute__ ((aligned (16))) = {0x007FFFFF,0x007FFFFF,0x007FFFFF,0x007FFFFF}; static inline __m128 log2f4(__m128 x) { __m128i exp = _mm_load_si128((__m128i*)_exp_mask); __m128i mant = _mm_load_si128((__m128i*)_mantissa_mask); __m128 one = _mm_load_ps(_ones_ps); __m128i i = _mm_castps_si128(x); __m128 e = _mm_cvtepi32_ps(_mm_sub_epi32(_mm_srli_epi32(_mm_and_si128(i, exp), 23), _mm_load_si128((__m128i*)_one27))); __m128 m = _mm_or_ps(_mm_castsi128_ps(_mm_and_si128(i, mant)), one); __m128 p; /* Minimax polynomial fit of log2(x)/(x - 1), for x in range [1, 2[ */ #if LOG_POLY_DEGREE == 6 p = POLY5( m, log_p5_0, log_p5_1, log_p5_2, log_p5_3, log_p5_4, log_p5_5); #elif LOG_POLY_DEGREE == 5 p = POLY4(m, log_p4_0, log_p4_1, log_p4_2, log_p4_3, log_p4_4); #elif LOG_POLY_DEGREE == 4 p = POLY3(m, log_p3_0, log_p3_1, log_p3_2, log_p3_3); #elif LOG_POLY_DEGREE == 3 p = POLY2(m, log_p2_0, log_p2_1, log_p2_2); #else #error #endif /* This effectively increases the polynomial degree by one, but ensures that log2(1) == 0*/ p = _mm_mul_ps(p, _mm_sub_ps(m, one)); return _mm_add_ps(p, e); } static inline __m128 _mm_fastpow_ps(__m128 x, __m128 y) { return exp2f4(_mm_mul_ps(log2f4(x), y)); } /* END: SSE2 Polynomial pow function from Mesa3d (MIT License) */ static inline __m128 sse_matrix3_mul(float* mul, __m128 a, __m128 b, __m128 c) { __m128 v = _mm_load_ps(mul); __m128 acc = _mm_mul_ps(a, v); v = _mm_load_ps(mul+4); acc = _mm_add_ps(acc, _mm_mul_ps(b, v)); v = _mm_load_ps(mul+8); acc = _mm_add_ps(acc, _mm_mul_ps(c, v)); return acc; } static const gfloat _junction_ps[4] __attribute__ ((aligned (16))) = {0.0031308, 0.0031308, 0.0031308, 0.0031308}; static const gfloat _normalize[4] __attribute__ ((aligned (16))) = {1.0f/65535.0f, 1.0f/65535.0f, 1.0f/65535.0f, 1.0f/65535.0f}; static const gfloat _8bit[4] __attribute__ ((aligned (16))) = {255.5f, 255.5f, 255.5f, 255.5f}; static const gfloat _srb_mul_under[4] __attribute__ ((aligned (16))) = {12.92f, 12.92f, 12.92f, 12.92f}; static const gfloat _srb_mul_over[4] __attribute__ ((aligned (16))) = {1.055f, 1.055f, 1.055f, 1.055f}; static const gfloat _srb_sub_over[4] __attribute__ ((aligned (16))) = {0.055f, 0.055f, 0.055f, 0.055f}; static const gfloat _srb_pow_over[4] __attribute__ ((aligned (16))) = {1.0/2.4, 1.0/2.4, 1.0/2.4, 1.0/2.4}; static const guint _alpha_mask[4] __attribute__ ((aligned (16))) = {0xff000000,0xff000000,0xff000000,0xff000000}; void transform8_srgb_sse2(ThreadInfo* t) { RS_IMAGE16 *input = t->input; GdkPixbuf *output = t->output; RS_MATRIX3 *matrix = t->matrix; gint x,y; gint width; float mat_ps[4*4*3] __attribute__ ((aligned (16))); for (x = 0; x < 4; x++ ) { mat_ps[x] = matrix->coeff[0][0]; mat_ps[x+4] = matrix->coeff[0][1]; mat_ps[x+8] = matrix->coeff[0][2]; mat_ps[12+x] = matrix->coeff[1][0]; mat_ps[12+x+4] = matrix->coeff[1][1]; mat_ps[12+x+8] = matrix->coeff[1][2]; mat_ps[24+x] = matrix->coeff[2][0]; mat_ps[24+x+4] = matrix->coeff[2][1]; mat_ps[24+x+8] = matrix->coeff[2][2]; } int start_x = t->start_x; /* Always have aligned input and output adress */ if (start_x & 3) start_x = ((start_x) / 4) * 4; int complete_w = t->end_x - start_x; /* If width is not multiple of 4, check if we can extend it a bit */ if (complete_w & 3) { if ((t->end_x+4) < input->w) complete_w = (((complete_w + 3) / 4) * 4); } for(y=t->start_y ; yend_y ; y++) { gushort *i = GET_PIXEL(input, start_x, y); guchar *o = GET_PIXBUF_PIXEL(output, start_x, y); gboolean aligned_write = !((guintptr)(o)&0xf); width = complete_w >> 2; while(width--) { /* Load and convert to float */ __m128i zero = _mm_setzero_si128(); __m128i in = _mm_load_si128((__m128i*)i); // Load two pixels __m128i in2 = _mm_load_si128((__m128i*)i+1); // Load two pixels _mm_prefetch(i + 64, _MM_HINT_NTA); __m128i p1 =_mm_unpacklo_epi16(in, zero); __m128i p2 =_mm_unpackhi_epi16(in, zero); __m128i p3 =_mm_unpacklo_epi16(in2, zero); __m128i p4 =_mm_unpackhi_epi16(in2, zero); __m128 p1f = _mm_cvtepi32_ps(p1); __m128 p2f = _mm_cvtepi32_ps(p2); __m128 p3f = _mm_cvtepi32_ps(p3); __m128 p4f = _mm_cvtepi32_ps(p4); /* Convert to planar */ __m128 g1g0r1r0 = _mm_unpacklo_ps(p1f, p2f); __m128 b1b0 = _mm_unpackhi_ps(p1f, p2f); __m128 g3g2r3r2 = _mm_unpacklo_ps(p3f, p4f); __m128 b3b2 = _mm_unpackhi_ps(p3f, p4f); __m128 r = _mm_movelh_ps(g1g0r1r0, g3g2r3r2); __m128 g = _mm_movehl_ps(g3g2r3r2, g1g0r1r0); __m128 b = _mm_movelh_ps(b1b0, b3b2); /* Apply matrix to convert to sRGB */ __m128 r2 = sse_matrix3_mul(mat_ps, r, g, b); __m128 g2 = sse_matrix3_mul(&mat_ps[12], r, g, b); __m128 b2 = sse_matrix3_mul(&mat_ps[24], r, g, b); /* Normalize to 0->1 and clamp */ __m128 normalize = _mm_load_ps(_normalize); __m128 max_val = _mm_load_ps(_ones_ps); __m128 min_val = _mm_setzero_ps(); r = _mm_min_ps(max_val, _mm_max_ps(min_val, _mm_mul_ps(normalize, r2))); g = _mm_min_ps(max_val, _mm_max_ps(min_val, _mm_mul_ps(normalize, g2))); b = _mm_min_ps(max_val, _mm_max_ps(min_val, _mm_mul_ps(normalize, b2))); /* Apply Gamma */ /* Calculate values to be used if larger than junction point */ __m128 mul_over = _mm_load_ps(_srb_mul_over); __m128 sub_over = _mm_load_ps(_srb_sub_over); __m128 pow_over = _mm_load_ps(_srb_pow_over); __m128 r_gam = _mm_sub_ps(_mm_mul_ps( mul_over, _mm_fastpow_ps(r, pow_over)), sub_over); __m128 g_gam = _mm_sub_ps(_mm_mul_ps( mul_over, _mm_fastpow_ps(g, pow_over)), sub_over); __m128 b_gam = _mm_sub_ps(_mm_mul_ps( mul_over, _mm_fastpow_ps(b, pow_over)), sub_over); /* Create mask for values smaller than junction point */ __m128 junction = _mm_load_ps(_junction_ps); __m128 mask_r = _mm_cmplt_ps(r, junction); __m128 mask_g = _mm_cmplt_ps(g, junction); __m128 mask_b = _mm_cmplt_ps(b, junction); /* Calculate value to be used if under junction */ __m128 mul_under = _mm_load_ps(_srb_mul_under); __m128 r_mul = _mm_and_ps(mask_r, _mm_mul_ps(mul_under, r)); __m128 g_mul = _mm_and_ps(mask_g, _mm_mul_ps(mul_under, g)); __m128 b_mul = _mm_and_ps(mask_b, _mm_mul_ps(mul_under, b)); /* Select the value to be used based on the junction mask and scale to 8 bit */ __m128 upscale = _mm_load_ps(_8bit); r = _mm_mul_ps(upscale, _mm_or_ps(r_mul, _mm_andnot_ps(mask_r, r_gam))); g = _mm_mul_ps(upscale, _mm_or_ps(g_mul, _mm_andnot_ps(mask_g, g_gam))); b = _mm_mul_ps(upscale, _mm_or_ps(b_mul, _mm_andnot_ps(mask_b, b_gam))); /* Convert to 8 bit unsigned and interleave*/ __m128i r_i = _mm_cvtps_epi32(r); __m128i g_i = _mm_cvtps_epi32(g); __m128i b_i = _mm_cvtps_epi32(b); r_i = _mm_packs_epi32(r_i, r_i); g_i = _mm_packs_epi32(g_i, g_i); b_i = _mm_packs_epi32(b_i, b_i); /* Set alpha value to 255 and store */ __m128i alpha_mask = _mm_load_si128((__m128i*)_alpha_mask); __m128i rg_i = _mm_unpacklo_epi16(r_i, g_i); __m128i bb_i = _mm_unpacklo_epi16(b_i, b_i); p1 = _mm_unpacklo_epi32(rg_i, bb_i); p2 = _mm_unpackhi_epi32(rg_i, bb_i); p1 = _mm_or_si128(alpha_mask, _mm_packus_epi16(p1, p2)); if (aligned_write) _mm_store_si128((__m128i*)o, p1); else _mm_storeu_si128((__m128i*)o, p1); i += 16; o += 16; } /* Process remaining pixels */ width = complete_w & 3; while(width--) { __m128i zero = _mm_setzero_si128(); __m128i in = _mm_loadl_epi64((__m128i*)i); // Load one pixel __m128i p1 =_mm_unpacklo_epi16(in, zero); __m128 p1f = _mm_cvtepi32_ps(p1); /* Splat r,g,b */ __m128 r = _mm_shuffle_ps(p1f, p1f, _MM_SHUFFLE(0,0,0,0)); __m128 g = _mm_shuffle_ps(p1f, p1f, _MM_SHUFFLE(1,1,1,1)); __m128 b = _mm_shuffle_ps(p1f, p1f, _MM_SHUFFLE(2,2,2,2)); __m128 r2 = sse_matrix3_mul(mat_ps, r, g, b); __m128 g2 = sse_matrix3_mul(&mat_ps[12], r, g, b); __m128 b2 = sse_matrix3_mul(&mat_ps[24], r, g, b); r = _mm_unpacklo_ps(r2, g2); // RR GG RR GG r = _mm_movelh_ps(r, b2); // RR GG BB BB __m128 normalize = _mm_load_ps(_normalize); __m128 max_val = _mm_load_ps(_ones_ps); __m128 min_val = _mm_setzero_ps(); r = _mm_min_ps(max_val, _mm_max_ps(min_val, _mm_mul_ps(normalize, r))); __m128 mul_over = _mm_load_ps(_srb_mul_over); __m128 sub_over = _mm_load_ps(_srb_sub_over); __m128 pow_over = _mm_load_ps(_srb_pow_over); __m128 r_gam = _mm_sub_ps(_mm_mul_ps( mul_over, _mm_fastpow_ps(r, pow_over)), sub_over); __m128 junction = _mm_load_ps(_junction_ps); __m128 mask_r = _mm_cmplt_ps(r, junction); __m128 mul_under = _mm_load_ps(_srb_mul_under); __m128 r_mul = _mm_and_ps(mask_r, _mm_mul_ps(mul_under, r)); __m128 upscale = _mm_load_ps(_8bit); r = _mm_mul_ps(upscale, _mm_or_ps(r_mul, _mm_andnot_ps(mask_r, r_gam))); /* Convert to 8 bit unsigned */ zero = _mm_setzero_si128(); __m128i r_i = _mm_cvtps_epi32(r); /* To 16 bit signed */ r_i = _mm_packs_epi32(r_i, zero); /* To 8 bit unsigned - set alpha channel*/ __m128i alpha_mask = _mm_load_si128((__m128i*)_alpha_mask); r_i = _mm_or_si128(alpha_mask, _mm_packus_epi16(r_i, zero)); *(int*)o = _mm_cvtsi128_si32(r_i); i+=4; o+=4; } } } void transform8_otherrgb_sse2(ThreadInfo* t) { RS_IMAGE16 *input = t->input; GdkPixbuf *output = t->output; RS_MATRIX3 *matrix = t->matrix; gint x,y; gint width; float mat_ps[4*4*3] __attribute__ ((aligned (16))); for (x = 0; x < 4; x++ ) { mat_ps[x] = matrix->coeff[0][0]; mat_ps[x+4] = matrix->coeff[0][1]; mat_ps[x+8] = matrix->coeff[0][2]; mat_ps[12+x] = matrix->coeff[1][0]; mat_ps[12+x+4] = matrix->coeff[1][1]; mat_ps[12+x+8] = matrix->coeff[1][2]; mat_ps[24+x] = matrix->coeff[2][0]; mat_ps[24+x+4] = matrix->coeff[2][1]; mat_ps[24+x+8] = matrix->coeff[2][2]; } int start_x = t->start_x; /* Always have aligned input and output adress */ if (start_x & 3) start_x = ((start_x) / 4) * 4; int complete_w = t->end_x - start_x; /* If width is not multiple of 4, check if we can extend it a bit */ if (complete_w & 3) { if ((t->end_x+4) < input->w) complete_w = ((complete_w+3) / 4 * 4); } __m128 gamma = _mm_set1_ps(t->output_gamma); for(y=t->start_y ; yend_y ; y++) { gushort *i = GET_PIXEL(input, start_x, y); guchar *o = GET_PIXBUF_PIXEL(output, start_x, y); gboolean aligned_write = !((guintptr)(o)&0xf); width = complete_w >> 2; while(width--) { /* Load and convert to float */ __m128i zero = _mm_setzero_si128(); __m128i in = _mm_load_si128((__m128i*)i); // Load two pixels __m128i in2 = _mm_load_si128((__m128i*)i+1); // Load two pixels _mm_prefetch(i + 64, _MM_HINT_NTA); __m128i p1 =_mm_unpacklo_epi16(in, zero); __m128i p2 =_mm_unpackhi_epi16(in, zero); __m128i p3 =_mm_unpacklo_epi16(in2, zero); __m128i p4 =_mm_unpackhi_epi16(in2, zero); __m128 p1f = _mm_cvtepi32_ps(p1); __m128 p2f = _mm_cvtepi32_ps(p2); __m128 p3f = _mm_cvtepi32_ps(p3); __m128 p4f = _mm_cvtepi32_ps(p4); /* Convert to planar */ __m128 g1g0r1r0 = _mm_unpacklo_ps(p1f, p2f); __m128 b1b0 = _mm_unpackhi_ps(p1f, p2f); __m128 g3g2r3r2 = _mm_unpacklo_ps(p3f, p4f); __m128 b3b2 = _mm_unpackhi_ps(p3f, p4f); __m128 r = _mm_movelh_ps(g1g0r1r0, g3g2r3r2); __m128 g = _mm_movehl_ps(g3g2r3r2, g1g0r1r0); __m128 b = _mm_movelh_ps(b1b0, b3b2); /* Apply matrix to convert to sRGB */ __m128 r2 = sse_matrix3_mul(mat_ps, r, g, b); __m128 g2 = sse_matrix3_mul(&mat_ps[12], r, g, b); __m128 b2 = sse_matrix3_mul(&mat_ps[24], r, g, b); /* Normalize to 0->1 and clamp */ __m128 normalize = _mm_load_ps(_normalize); __m128 max_val = _mm_load_ps(_ones_ps); __m128 min_val = _mm_setzero_ps(); r = _mm_min_ps(max_val, _mm_max_ps(min_val, _mm_mul_ps(normalize, r2))); g = _mm_min_ps(max_val, _mm_max_ps(min_val, _mm_mul_ps(normalize, g2))); b = _mm_min_ps(max_val, _mm_max_ps(min_val, _mm_mul_ps(normalize, b2))); /* Apply Gamma */ __m128 upscale = _mm_load_ps(_8bit); r = _mm_mul_ps(upscale, _mm_fastpow_ps(r, gamma)); g = _mm_mul_ps(upscale, _mm_fastpow_ps(g, gamma)); b = _mm_mul_ps(upscale, _mm_fastpow_ps(b, gamma)); /* Convert to 8 bit unsigned and interleave*/ __m128i r_i = _mm_cvtps_epi32(r); __m128i g_i = _mm_cvtps_epi32(g); __m128i b_i = _mm_cvtps_epi32(b); r_i = _mm_packs_epi32(r_i, r_i); g_i = _mm_packs_epi32(g_i, g_i); b_i = _mm_packs_epi32(b_i, b_i); /* Set alpha value to 255 and store */ __m128i alpha_mask = _mm_load_si128((__m128i*)_alpha_mask); __m128i rg_i = _mm_unpacklo_epi16(r_i, g_i); __m128i bb_i = _mm_unpacklo_epi16(b_i, b_i); p1 = _mm_unpacklo_epi32(rg_i, bb_i); p2 = _mm_unpackhi_epi32(rg_i, bb_i); p1 = _mm_or_si128(alpha_mask, _mm_packus_epi16(p1, p2)); if (aligned_write) _mm_store_si128((__m128i*)o, p1); else _mm_storeu_si128((__m128i*)o, p1); i += 16; o += 16; } /* Process remaining pixels */ width = complete_w & 3; while(width--) { __m128i zero = _mm_setzero_si128(); __m128i in = _mm_loadl_epi64((__m128i*)i); // Load two pixels __m128i p1 =_mm_unpacklo_epi16(in, zero); __m128 p1f = _mm_cvtepi32_ps(p1); /* Splat r,g,b */ __m128 r = _mm_shuffle_ps(p1f, p1f, _MM_SHUFFLE(0,0,0,0)); __m128 g = _mm_shuffle_ps(p1f, p1f, _MM_SHUFFLE(1,1,1,1)); __m128 b = _mm_shuffle_ps(p1f, p1f, _MM_SHUFFLE(2,2,2,2)); __m128 r2 = sse_matrix3_mul(mat_ps, r, g, b); __m128 g2 = sse_matrix3_mul(&mat_ps[12], r, g, b); __m128 b2 = sse_matrix3_mul(&mat_ps[24], r, g, b); r = _mm_unpacklo_ps(r2, g2); // GG RR GG RR r = _mm_movelh_ps(r, b2); // BB BB GG RR __m128 normalize = _mm_load_ps(_normalize); __m128 max_val = _mm_load_ps(_ones_ps); __m128 min_val = _mm_setzero_ps(); r = _mm_min_ps(max_val, _mm_max_ps(min_val, _mm_mul_ps(normalize, r))); __m128 upscale = _mm_load_ps(_8bit); r = _mm_mul_ps(upscale, _mm_fastpow_ps(r, gamma)); /* Convert to 8 bit unsigned */ zero = _mm_setzero_si128(); __m128i r_i = _mm_cvtps_epi32(r); /* To 16 bit signed */ r_i = _mm_packs_epi32(r_i, zero); /* To 8 bit unsigned - set alpha channel*/ __m128i alpha_mask = _mm_load_si128((__m128i*)_alpha_mask); r_i = _mm_or_si128(alpha_mask, _mm_packus_epi16(r_i, zero)); *(int*)o = _mm_cvtsi128_si32(r_i); i+=4; o+=4; } } } gboolean cst_has_sse2(void) { return TRUE; } #else // !defined __SSE2__ /* Provide empty functions if not SSE2 compiled to avoid linker errors */ void transform8_srgb_sse2(ThreadInfo* t) { /* We should never even get here */ g_assert(FALSE); } void transform8_otherrgb_sse2(ThreadInfo* t) { /* We should never even get here */ g_assert(FALSE); } gboolean cst_has_sse2() { return FALSE; } #endifrawstudio-2.0/plugins/colorspace-transform/Makefile.am0000644000175000017500000000226011526533643020205 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall \ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = colorspace_transform.la libdir = $(datadir)/rawstudio/plugins/ colorspace_transform_la_LIBADD = @PACKAGE_LIBS@ colorspace_transform_sse2.lo rs-cmm.lo colorspace_transform-c.lo colorspace_transform_la_LDFLAGS = -module -avoid-version colorspace_transform_la_SOURCES = EXTRA_DIST = colorspace_transform.c rs-cmm.c rs-cmm.h colorspace_transform_sse2.c colorspace_transform.h colorspace_transform-c.lo: colorspace_transform.c colorspace_transform.h $(LTCOMPILE) -o colorspace_transform-c.o -c $(top_srcdir)/plugins/colorspace-transform/colorspace_transform.c rs-cmm.lo: rs-cmm.c rs-cmm.h $(LTCOMPILE) -c $(top_srcdir)/plugins/colorspace-transform/rs-cmm.c colorspace_transform_sse2.lo: colorspace_transform_sse2.c colorspace_transform.h if CAN_COMPILE_SSE2 SSE_FLAG=-msse2 else SSE_FLAG= endif $(LTCOMPILE) $(SSE_FLAG) -c $(top_srcdir)/plugins/colorspace-transform/colorspace_transform_sse2.c rawstudio-2.0/plugins/colorspace-transform/rs-cmm.h0000644000175000017500000000377211526533643017531 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_CMM_H #define RS_CMM_H #include #include G_BEGIN_DECLS #define RS_TYPE_CMM rs_cmm_get_type() #define RS_CMM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_CMM, RSCmm)) #define RS_CMM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_CMM, RSCmmClass)) #define RS_IS_CMM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_CMM)) #define RS_IS_CMM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_CMM)) #define RS_CMM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_CMM, RSCmmClass)) typedef struct _RSCmm RSCmm; typedef struct { GObjectClass parent_class; } RSCmmClass; GType rs_cmm_get_type(void); RSCmm *rs_cmm_new(void); void rs_cmm_set_input_profile(RSCmm *cmm, const RSIccProfile *input_profile); void rs_cmm_set_output_profile(RSCmm *cmm, const RSIccProfile *output_profile); void rs_cmm_set_num_threads(RSCmm *cmm, const gint num_threads); void rs_cmm_set_premul(RSCmm *cmm, const gfloat premul[3]); gboolean rs_cmm_transform16(RSCmm *cmm, RS_IMAGE16 *input, RS_IMAGE16 *output); gboolean rs_cmm_transform8(RSCmm *cmm, RS_IMAGE16 *input, GdkPixbuf *output); G_END_DECLS #endif /* RS_CMM_H */ rawstudio-2.0/plugins/colorspace-transform/colorspace_transform.c0000644000175000017500000003573111543674627022562 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 5 */ #include #include #include "rs-cmm.h" #include "colorspace_transform.h" struct _RSColorspaceTransform { RSFilter parent; gfloat premul[4]; gboolean has_premul; RSCmm *cmm; }; struct _RSColorspaceTransformClass { RSFilterClass parent_class; }; RS_DEFINE_FILTER(rs_colorspace_transform, RSColorspaceTransform) enum { PROP_0, PROP_CHANGEME }; static RSFilterResponse *get_image(RSFilter *filter, const RSFilterRequest *request); static RSFilterResponse *get_image8(RSFilter *filter, const RSFilterRequest *request); static gboolean convert_colorspace16(RSColorspaceTransform *colorspace_transform, RS_IMAGE16 *input_image, RS_IMAGE16 *output_image, RSColorSpace *input_space, RSColorSpace *output_space); static void convert_colorspace8(RSColorspaceTransform *colorspace_transform, RS_IMAGE16 *input_image, GdkPixbuf *output_image, RSColorSpace *input_space, RSColorSpace *output_space, GdkRectangle *roi); static RSFilterClass *rs_colorspace_transform_parent_class = NULL; /* SSE2 optimized functions */ extern void transform8_srgb_sse2(ThreadInfo* t); extern void transform8_otherrgb_sse2(ThreadInfo* t); extern gboolean cst_has_sse2(void); G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_colorspace_transform_get_type(G_TYPE_MODULE(plugin)); } static void rs_colorspace_transform_class_init(RSColorspaceTransformClass *klass) { RSFilterClass *filter_class = RS_FILTER_CLASS (klass); rs_colorspace_transform_parent_class = g_type_class_peek_parent (klass); filter_class->name = "ColorspaceTransform filter"; filter_class->get_image = get_image; filter_class->get_image8 = get_image8; } static void rs_colorspace_transform_init(RSColorspaceTransform *colorspace_transform) { /* FIXME: unref this at some point */ colorspace_transform->cmm = rs_cmm_new(); rs_cmm_set_num_threads(colorspace_transform->cmm, rs_get_number_of_processor_cores()); } static RSFilterResponse * get_image(RSFilter *filter, const RSFilterRequest *request) { RSColorspaceTransform *colorspace_transform = RS_COLORSPACE_TRANSFORM(filter); RSFilterResponse *previous_response; RSFilterResponse *response; RS_IMAGE16 *input; RS_IMAGE16 *output = NULL; int i; previous_response = rs_filter_get_image(filter->previous, request); input = rs_filter_response_get_image(previous_response); if (!RS_IS_IMAGE16(input)) return previous_response; RSColorSpace *input_space = rs_filter_param_get_object_with_type(RS_FILTER_PARAM(previous_response), "colorspace", RS_TYPE_COLOR_SPACE); RSColorSpace *output_space = rs_filter_param_get_object_with_type(RS_FILTER_PARAM(request), "colorspace", RS_TYPE_COLOR_SPACE); for( i = 0; i < 4; i++) colorspace_transform->premul[i] = 1.0f; if (input_space && output_space && (input_space != output_space)) { gboolean is_premultiplied = FALSE; rs_filter_param_get_boolean(RS_FILTER_PARAM(previous_response), "is-premultiplied", &is_premultiplied); if (!is_premultiplied) colorspace_transform->has_premul = rs_filter_param_get_float4(RS_FILTER_PARAM(request), "premul", colorspace_transform->premul); rs_cmm_set_premul(colorspace_transform->cmm, colorspace_transform->premul); output = rs_image16_copy(input, FALSE); if (convert_colorspace16(colorspace_transform, input, output, input_space, output_space)) { /* Image was converted */ response = rs_filter_response_clone(previous_response); g_object_unref(previous_response); if (colorspace_transform->has_premul) rs_filter_param_set_boolean(RS_FILTER_PARAM(response), "is-premultiplied", TRUE); rs_filter_param_set_object(RS_FILTER_PARAM(response), "colorspace", output_space); rs_filter_response_set_image(response, output); g_object_unref(output); g_object_unref(input); return response; } else { /* No conversion was needed */ g_object_unref(input); g_object_unref(output); return previous_response; } } else { g_object_unref(input); return previous_response; } } static RSFilterResponse * get_image8(RSFilter *filter, const RSFilterRequest *request) { RSColorspaceTransform *colorspace_transform = RS_COLORSPACE_TRANSFORM(filter); RSFilterResponse *previous_response; RSFilterResponse *response; RS_IMAGE16 *input; GdkPixbuf *output = NULL; GdkRectangle *roi; int i; previous_response = rs_filter_get_image(filter->previous, request); input = rs_filter_response_get_image(previous_response); if (!RS_IS_IMAGE16(input)) return previous_response; roi = rs_filter_request_get_roi(request); RSColorSpace *input_space = rs_filter_param_get_object_with_type(RS_FILTER_PARAM(previous_response), "colorspace", RS_TYPE_COLOR_SPACE); RSColorSpace *output_space = rs_filter_param_get_object_with_type(RS_FILTER_PARAM(request), "colorspace", RS_TYPE_COLOR_SPACE); response = rs_filter_response_clone(previous_response); g_object_unref(previous_response); for( i = 0; i < 4; i++) colorspace_transform->premul[i] = 1.0f; gboolean is_premultiplied = FALSE; rs_filter_param_get_boolean(RS_FILTER_PARAM(response), "is-premultiplied", &is_premultiplied); if (!is_premultiplied) if ((colorspace_transform->has_premul = rs_filter_param_get_float4(RS_FILTER_PARAM(request), "premul", colorspace_transform->premul))) rs_cmm_set_premul(colorspace_transform->cmm, colorspace_transform->premul); if (colorspace_transform->has_premul) rs_filter_param_set_boolean(RS_FILTER_PARAM(response), "is-premultiplied", TRUE); #if 0 printf("\033[33m8 input_space: %s\033[0m\n", (input_space) ? G_OBJECT_TYPE_NAME(input_space) : "none"); printf("\033[33m8 output_space: %s\n\033[0m", (output_space) ? G_OBJECT_TYPE_NAME(output_space) : "none"); #endif output = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, input->w, input->h); /* Process output */ convert_colorspace8(colorspace_transform, input, output, input_space, output_space, roi); rs_filter_response_set_image8(response, output); rs_filter_param_set_object(RS_FILTER_PARAM(response), "colorspace", output_space); g_object_unref(output); g_object_unref(input); return response; } static void transform8_c(ThreadInfo* t) { gint row; gint r,g,b; gint width; RS_MATRIX3Int mati; RS_IMAGE16 *input = t->input; GdkPixbuf *output = (GdkPixbuf *)t->output; guchar *table8 = t->table8; g_assert(RS_IS_IMAGE16(input)); g_assert(GDK_IS_PIXBUF(output)); gint o_channels = gdk_pixbuf_get_n_channels(output); matrix3_to_matrix3int(t->matrix, &mati); for(row=t->start_y ; rowend_y ; row++) { gushort *i = GET_PIXEL(input, t->start_x, row); guchar *o = GET_PIXBUF_PIXEL(output, t->start_x, row); width = t->end_x - t->start_x; while(width-- > 0) { r = ( i[R] * mati.coeff[0][0] + i[G] * mati.coeff[0][1] + i[B] * mati.coeff[0][2] + MATRIX_RESOLUTION_ROUNDER ) >> MATRIX_RESOLUTION; g = ( i[R] * mati.coeff[1][0] + i[G] * mati.coeff[1][1] + i[B] * mati.coeff[1][2] + MATRIX_RESOLUTION_ROUNDER ) >> MATRIX_RESOLUTION; b = ( i[R] * mati.coeff[2][0] + i[G] * mati.coeff[2][1] + i[B] * mati.coeff[2][2] + MATRIX_RESOLUTION_ROUNDER ) >> MATRIX_RESOLUTION; r = CLAMP(r, 0, 65535); g = CLAMP(g, 0, 65535); b = CLAMP(b, 0, 65535); o[R] = table8[r]; o[G] = table8[g]; o[B] = table8[b]; o[3] = 255; i += input->pixelsize; o += o_channels; } } } static void transform16_c(gushort* __restrict input, gushort* __restrict output, gint num_pixels, const gint pixelsize, RS_MATRIX3 *matrix) { gint r,g,b; RS_MATRIX3Int mati; matrix3_to_matrix3int(matrix, &mati); while(num_pixels--) { r = ( input[R] * mati.coeff[0][0] + input[G] * mati.coeff[0][1] + input[B] * mati.coeff[0][2] + MATRIX_RESOLUTION_ROUNDER ) >> MATRIX_RESOLUTION; g = ( input[R] * mati.coeff[1][0] + input[G] * mati.coeff[1][1] + input[B] * mati.coeff[1][2] + MATRIX_RESOLUTION_ROUNDER ) >> MATRIX_RESOLUTION; b = ( input[R] * mati.coeff[2][0] + input[G] * mati.coeff[2][1] + input[B] * mati.coeff[2][2] + MATRIX_RESOLUTION_ROUNDER ) >> MATRIX_RESOLUTION; r = CLAMP(r, 0, 65535); g = CLAMP(g, 0, 65535); b = CLAMP(b, 0, 65535); output[R] = r; output[G] = g; output[B] = b; input += pixelsize; output += pixelsize; } } static gboolean convert_colorspace16(RSColorspaceTransform *colorspace_transform, RS_IMAGE16 *input_image, RS_IMAGE16 *output_image, RSColorSpace *input_space, RSColorSpace *output_space) { g_assert(RS_IS_IMAGE16(input_image)); g_assert(RS_IS_IMAGE16(output_image)); g_assert(RS_IS_COLOR_SPACE(input_space)); g_assert(RS_IS_COLOR_SPACE(output_space)); /* If input/output-image doesn't differ, return no transformation needed */ if (input_space == output_space && !colorspace_transform->has_premul) return FALSE; /* A few sanity checks */ g_assert(input_image->w == output_image->w); g_assert(input_image->h == output_image->h); /* If a CMS is needed, do the transformation using LCMS */ if (RS_COLOR_SPACE_REQUIRES_CMS(input_space) || RS_COLOR_SPACE_REQUIRES_CMS(output_space)) { const RSIccProfile *i, *o; i = rs_color_space_get_icc_profile(input_space, TRUE); o = rs_color_space_get_icc_profile(output_space, TRUE); rs_cmm_set_input_profile(colorspace_transform->cmm, i); rs_cmm_set_output_profile(colorspace_transform->cmm, o); rs_cmm_transform16(colorspace_transform->cmm, input_image, output_image); } /* If we get here, we can transform using simple vector math */ else { RS_VECTOR3 vec = {{colorspace_transform->premul[0]},{colorspace_transform->premul[1]},{colorspace_transform->premul[2]}}; const RS_MATRIX3 mul_vec = vector3_as_diagonal(&vec); const RS_MATRIX3 a = rs_color_space_get_matrix_from_pcs(input_space); RS_MATRIX3 a_premul; matrix3_multiply(&a, &mul_vec, &a_premul); const RS_MATRIX3 b = rs_color_space_get_matrix_to_pcs(output_space); RS_MATRIX3 mat; matrix3_multiply(&b, &a_premul, &mat); transform16_c( GET_PIXEL(input_image, 0, 0), GET_PIXEL(output_image, 0, 0), input_image->h * input_image->pitch, input_image->pixelsize, &mat); } return TRUE; } gpointer start_single_cs8_transform_thread(gpointer _thread_info) { ThreadInfo* t = _thread_info; RS_IMAGE16 *input_image = t->input; GdkPixbuf *output = (GdkPixbuf*) t->output; RSColorSpace *input_space = t->input_space; RSColorSpace *output_space = t->output_space; g_assert(RS_IS_IMAGE16(input_image)); g_assert(GDK_IS_PIXBUF(output)); g_assert(RS_IS_COLOR_SPACE(input_space)); g_assert(RS_IS_COLOR_SPACE(output_space)); gboolean sse2_available = (!!(rs_detect_cpu_features() & RS_CPU_FLAG_SSE2)) && cst_has_sse2(); if (sse2_available && rs_color_space_new_singleton("RSSrgb") == output_space) { transform8_srgb_sse2(t); return (NULL); } if (sse2_available && rs_color_space_new_singleton("RSAdobeRGB") == output_space) { t->output_gamma = 1.0 / 2.19921875; transform8_otherrgb_sse2(t); return (NULL); } if (sse2_available && rs_color_space_new_singleton("RSProphoto") == output_space) { t->output_gamma = 1.0 / 1.8; transform8_otherrgb_sse2(t); return (NULL); } /* Fall back to C-functions */ /* Calculate our gamma table */ const RS1dFunction *input_gamma = rs_color_space_get_gamma_function(input_space); const RS1dFunction *output_gamma = rs_color_space_get_gamma_function(output_space); guchar table8[65536]; gint i; for(i=0;i<65536;i++) { gdouble nd = ((gdouble) i) * (1.0/65535.0); nd = rs_1d_function_evaluate_inverse(input_gamma, nd); nd = rs_1d_function_evaluate(output_gamma, nd); /* 8 bit output */ gint res = (gint) (nd*255.0 + 0.5f); _CLAMP255(res); table8[i] = res; } t->table8 = table8; transform8_c(t); return (NULL); } static void convert_colorspace8(RSColorspaceTransform *colorspace_transform, RS_IMAGE16 *input_image, GdkPixbuf *output_image, RSColorSpace *input_space, RSColorSpace *output_space, GdkRectangle *_roi) { g_assert(RS_IS_IMAGE16(input_image)); g_assert(GDK_IS_PIXBUF(output_image)); g_assert(RS_IS_COLOR_SPACE(input_space)); g_assert(RS_IS_COLOR_SPACE(output_space)); /* A few sanity checks */ g_assert(input_image->w == gdk_pixbuf_get_width(output_image)); g_assert(input_image->h == gdk_pixbuf_get_height(output_image)); GdkRectangle *roi = _roi; if (!roi) { roi = g_new(GdkRectangle, 1); roi->x = 0; roi->y = 0; roi->width = input_image->w; roi->height = input_image->h; } /* If a CMS is needed, do the transformation using LCMS */ if (RS_COLOR_SPACE_REQUIRES_CMS(input_space) || RS_COLOR_SPACE_REQUIRES_CMS(output_space)) { const RSIccProfile *i, *o; i = rs_color_space_get_icc_profile(input_space, TRUE); o = rs_color_space_get_icc_profile(output_space, FALSE); rs_cmm_set_input_profile(colorspace_transform->cmm, i); rs_cmm_set_output_profile(colorspace_transform->cmm, o); rs_cmm_transform8(colorspace_transform->cmm, input_image, output_image); } /* If we get here, we can transform using simple vector math and a lookup table */ else { const RS_VECTOR3 vec = {{colorspace_transform->premul[0]},{colorspace_transform->premul[1]},{colorspace_transform->premul[2]}}; const RS_MATRIX3 mul_vec = vector3_as_diagonal(&vec); const RS_MATRIX3 a = rs_color_space_get_matrix_from_pcs(input_space); RS_MATRIX3 a_premul; matrix3_multiply(&a, &mul_vec, &a_premul); const RS_MATRIX3 b = rs_color_space_get_matrix_to_pcs(output_space); RS_MATRIX3 mat; matrix3_multiply(&b, &a_premul, &mat); gint i; guint y_offset, y_per_thread, threaded_h; const guint threads = rs_get_number_of_processor_cores(); ThreadInfo *t = g_new(ThreadInfo, threads); threaded_h = roi->height; y_per_thread = (threaded_h + threads-1)/threads; y_offset = roi->y; for (i = 0; i < threads; i++) { t[i].input = input_image; t[i].output = output_image; t[i].start_y = y_offset; t[i].start_x = roi->x; t[i].end_x = roi->x + roi->width; t[i].cst = colorspace_transform; t[i].input_space = input_space; t[i].output_space = output_space; y_offset += y_per_thread; y_offset = MIN(input_image->h, y_offset); t[i].end_y = y_offset; t[i].matrix = &mat; t[i].table8 = NULL; t[i].threadid = g_thread_create(start_single_cs8_transform_thread, &t[i], TRUE, NULL); } /* Wait for threads to finish */ for(i = 0; i < threads; i++) g_thread_join(t[i].threadid); g_free(t); } /* If we created the ROI here, free it */ if (!_roi) g_free(roi); } rawstudio-2.0/plugins/colorspace-transform/colorspace_transform.h0000644000175000017500000000413211543674627022556 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 5 */ #include #include #include "rs-cmm.h" #define RS_TYPE_COLORSPACE_TRANSFORM (rs_colorspace_transform_type) #define RS_COLORSPACE_TRANSFORM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_COLORSPACE_TRANSFORM, RSColorspaceTransform)) #define RS_COLORSPACE_TRANSFORM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_COLORSPACE_TRANSFORM, RSColorspaceTransformClass)) #define RS_IS_COLORSPACE_TRANSFORM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_COLORSPACE_TRANSFORM)) typedef struct _RSColorspaceTransform RSColorspaceTransform; typedef struct _RSColorspaceTransformClass RSColorspaceTransformClass; typedef struct { RSColorspaceTransform *cst; GThread *threadid; gint start_x; gint start_y; gint end_x; gint end_y; RS_IMAGE16 *input; void *output; RSColorSpace *input_space; RSColorSpace *output_space; RS_MATRIX3 *matrix; gboolean gamma_correct; guchar* table8; gfloat output_gamma; GCond* run_transform; GMutex* run_transform_mutex; GCond* transform_finished; GMutex* transform_finished_mutex; gboolean do_run_transform; } ThreadInfo; /* SSE2 optimized functions */ void transform8_srgb_sse2(ThreadInfo* t); void transform8_otherrgb_sse2(ThreadInfo* t); gboolean cst_has_sse2(void); rawstudio-2.0/plugins/colorspace-transform/Makefile.in0000644000175000017500000003571011547430035020216 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/colorspace-transform DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) colorspace_transform_la_DEPENDENCIES = colorspace_transform_sse2.lo \ rs-cmm.lo colorspace_transform-c.lo am_colorspace_transform_la_OBJECTS = colorspace_transform_la_OBJECTS = \ $(am_colorspace_transform_la_OBJECTS) colorspace_transform_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(colorspace_transform_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(colorspace_transform_la_SOURCES) DIST_SOURCES = $(colorspace_transform_la_SOURCES) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall \ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = colorspace_transform.la colorspace_transform_la_LIBADD = @PACKAGE_LIBS@ colorspace_transform_sse2.lo rs-cmm.lo colorspace_transform-c.lo colorspace_transform_la_LDFLAGS = -module -avoid-version colorspace_transform_la_SOURCES = EXTRA_DIST = colorspace_transform.c rs-cmm.c rs-cmm.h colorspace_transform_sse2.c colorspace_transform.h @CAN_COMPILE_SSE2_FALSE@SSE_FLAG = @CAN_COMPILE_SSE2_TRUE@SSE_FLAG = -msse2 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/colorspace-transform/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/colorspace-transform/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done colorspace_transform.la: $(colorspace_transform_la_OBJECTS) $(colorspace_transform_la_DEPENDENCIES) $(colorspace_transform_la_LINK) -rpath $(libdir) $(colorspace_transform_la_OBJECTS) $(colorspace_transform_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool distclean distclean-compile \ distclean-generic distclean-libtool distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-libLTLIBRARIES colorspace_transform-c.lo: colorspace_transform.c colorspace_transform.h $(LTCOMPILE) -o colorspace_transform-c.o -c $(top_srcdir)/plugins/colorspace-transform/colorspace_transform.c rs-cmm.lo: rs-cmm.c rs-cmm.h $(LTCOMPILE) -c $(top_srcdir)/plugins/colorspace-transform/rs-cmm.c colorspace_transform_sse2.lo: colorspace_transform_sse2.c colorspace_transform.h $(LTCOMPILE) $(SSE_FLAG) -c $(top_srcdir)/plugins/colorspace-transform/colorspace_transform_sse2.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/lensfun/0000755000175000017500000000000011547430074013535 500000000000000rawstudio-2.0/plugins/lensfun/Makefile.am0000644000175000017500000000150311526533643015513 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4\ -funroll-loops AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = lensfun.la libdir = $(datadir)/rawstudio/plugins/ lensfun_la_LIBADD = @PACKAGE_LIBS@ lensfun-sse2.lo lensfun-c.lo lensfun_la_LDFLAGS = -module -avoid-version lensfun_la_SOURCES = lensfun-version.c lensfun-version.h EXTRA_DIST = lensfun-sse2.c lensfun.c lensfun-c.lo: lensfun.c $(LTCOMPILE) -o lensfun-c.lo -c $(top_srcdir)/plugins/lensfun/lensfun.c lensfun-sse2.lo: lensfun-sse2.c if CAN_COMPILE_SSE2 SSE_FLAG=-msse2 else SSE_FLAG= endif $(LTCOMPILE) $(SSE_FLAG) -c $(top_srcdir)/plugins/lensfun/lensfun-sse2.c rawstudio-2.0/plugins/lensfun/lensfun.c0000644000175000017500000005663411543674627015323 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 4 */ #include #include #if defined (__SSE2__) #include #endif /* __SSE2__ */ #include #include "lensfun-version.h" static guint rs_lf_version = 0; #define RS_TYPE_LENSFUN (rs_lensfun_type) #define RS_LENSFUN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_LENSFUN, RSLensfun)) #define RS_LENSFUN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_LENSFUN, RSLensfunClass)) #define RS_IS_LENSFUN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_LENSFUN)) typedef struct _RSLensfun RSLensfun; typedef struct _RSLensfunClass RSLensfunClass; struct _RSLensfun { RSFilter parent; lfDatabase *ldb; gchar *make; gchar *model; RSLens *lens; gchar *lens_make; gchar *lens_model; gfloat focal; gfloat aperture; gfloat tca_kr; gfloat tca_kb; gfloat vignetting; gboolean distortion_enabled; lfLens *selected_lens; const lfCamera *selected_camera; gboolean DIRTY; }; struct _RSLensfunClass { RSFilterClass parent_class; }; RS_DEFINE_FILTER(rs_lensfun, RSLensfun) enum { PROP_0, PROP_MAKE, PROP_MODEL, PROP_LENS, PROP_LENS_MAKE, PROP_LENS_MODEL, PROP_FOCAL, PROP_APERTURE, PROP_TCA_KR, PROP_TCA_KB, PROP_VIGNETTING, PROP_DISTORTION_ENABLED, }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static RSFilterResponse *get_image(RSFilter *filter, const RSFilterRequest *request); static void inline rs_image16_nearest_full(RS_IMAGE16 *in, gushort *out, gfloat *pos); static void inline rs_image16_bilinear_full(RS_IMAGE16 *in, gushort *out, gfloat *pos); extern gboolean is_sse2_compiled(void); extern void rs_image16_bilinear_full_sse2(RS_IMAGE16 *in, gushort *out, gfloat *pos, const gint *current_xy, const gint* min_max_xy); extern void rs_image16_bilinear_nomeasure_sse2(RS_IMAGE16 *in, gushort *out, gfloat *pos); static RSFilterClass *rs_lensfun_parent_class = NULL; G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_lensfun_get_type(G_TYPE_MODULE(plugin)); } static void rs_lensfun_class_init(RSLensfunClass *klass) { RSFilterClass *filter_class = RS_FILTER_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); rs_lensfun_parent_class = g_type_class_peek_parent (klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_MAKE, g_param_spec_string( "make", "make", "The make of the camera (ie. \"Canon\")", NULL, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_MODEL, g_param_spec_string( "model", "model", "The model of the camera (ie. \"Canon EOS 20D\")", NULL, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_LENS, g_param_spec_object( "lens", "lens", "A RSLens object describing the lens", RS_TYPE_LENS, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_LENS_MAKE, g_param_spec_string( "lens_make", "lens_make", "The make of the lens (ie. \"Canon\")", NULL, G_PARAM_READABLE) ); g_object_class_install_property(object_class, PROP_LENS_MODEL, g_param_spec_string( "lens_model", "lens_model", "The model of the lens (ie. \"Canon\")", NULL, G_PARAM_READABLE) ); g_object_class_install_property(object_class, PROP_FOCAL, g_param_spec_float( "focal", "focal", "focal", 0.0, G_MAXFLOAT, 50.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_APERTURE, g_param_spec_float( "aperture", "aperture", "aperture", 1.0, G_MAXFLOAT, 5.6, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_TCA_KR, g_param_spec_float( "tca_kr", "tca_kr", "tca_kr", -1, 1, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_TCA_KB, g_param_spec_float( "tca_kb", "tca_kb", "tca_kb", -1, 1, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_VIGNETTING, g_param_spec_float( "vignetting", "vignetting", "vignetting", -1.5, 1.5, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_DISTORTION_ENABLED, g_param_spec_boolean( "distortion-enabled", "distortion-enabled", "distortion-enabled", FALSE, G_PARAM_READWRITE) ); filter_class->name = "Lensfun filter"; filter_class->get_image = get_image; rs_lf_version = rs_guess_lensfun_version(); } static void rs_lensfun_init(RSLensfun *lensfun) { lensfun->make = NULL; lensfun->model = NULL; lensfun->lens = NULL; lensfun->lens_make = NULL; lensfun->lens_model = NULL; lensfun->focal = 50.0; /* Well... */ lensfun->aperture = 5.6; lensfun->tca_kr = 0.0; lensfun->tca_kb = 0.0; lensfun->vignetting = 0.0; lensfun->distortion_enabled = FALSE; /* Initialize Lensfun database */ lensfun->ldb = lf_db_new (); lf_db_load (lensfun->ldb); } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSLensfun *lensfun = RS_LENSFUN(object); switch (property_id) { case PROP_MAKE: g_value_set_string(value, lensfun->make); break; case PROP_MODEL: g_value_set_string(value, lensfun->model); break; case PROP_LENS: g_value_set_object(value, lensfun->lens); break; case PROP_LENS_MAKE: g_value_set_string(value, lensfun->lens_make); break; case PROP_LENS_MODEL: g_value_set_string(value, lensfun->lens_model); break; case PROP_FOCAL: g_value_set_float(value, lensfun->focal); break; case PROP_APERTURE: g_value_set_float(value, lensfun->aperture); break; case PROP_TCA_KR: g_value_set_float(value, lensfun->tca_kr); break; case PROP_TCA_KB: g_value_set_float(value, lensfun->tca_kb); break; case PROP_VIGNETTING: g_value_set_float(value, lensfun->vignetting); break; case PROP_DISTORTION_ENABLED: g_value_set_boolean(value, lensfun->distortion_enabled); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSLensfun *lensfun = RS_LENSFUN(object); switch (property_id) { case PROP_MAKE: g_free(lensfun->make); lensfun->make = g_value_dup_string(value); lensfun->DIRTY = TRUE; break; case PROP_MODEL: g_free(lensfun->model); lensfun->model = g_value_dup_string(value); lensfun->DIRTY = TRUE; break; case PROP_LENS: if (lensfun->lens) g_object_unref(lensfun->lens); lensfun->lens = g_value_dup_object(value); lensfun->DIRTY = TRUE; break; case PROP_FOCAL: lensfun->focal = g_value_get_float(value); break; case PROP_APERTURE: lensfun->aperture = g_value_get_float(value); break; case PROP_TCA_KR: lensfun->tca_kr = g_value_get_float(value); rs_filter_changed(RS_FILTER(lensfun), RS_FILTER_CHANGED_PIXELDATA); break; case PROP_TCA_KB: lensfun->tca_kb = g_value_get_float(value); rs_filter_changed(RS_FILTER(lensfun), RS_FILTER_CHANGED_PIXELDATA); break; case PROP_VIGNETTING: lensfun->vignetting = g_value_get_float(value); rs_filter_changed(RS_FILTER(lensfun), RS_FILTER_CHANGED_PIXELDATA); break; case PROP_DISTORTION_ENABLED: lensfun->DIRTY = TRUE; lensfun->distortion_enabled = g_value_get_boolean(value); rs_filter_changed(RS_FILTER(lensfun), RS_FILTER_CHANGED_PIXELDATA); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } typedef struct { gint start_y; gint end_y; lfModifier *mod; RS_IMAGE16 *input; RS_IMAGE16 *output; GThread *threadid; gint effective_flags; GdkRectangle *roi; gint stage; gint min_max_xy[4]; gboolean measure_minmax_coords; } ThreadInfo; static gpointer thread_func(gpointer _thread_info) { gint x, y, i; ThreadInfo* t = _thread_info; if (t->stage == 2) { /* Do lensfun vignetting */ if (t->effective_flags & LF_MODIFY_VIGNETTING) { lf_modifier_apply_color_modification (t->mod, GET_PIXEL(t->input, t->roi->x, t->start_y), t->roi->x, t->start_y, t->roi->width, t->end_y - t->start_y, LF_CR_4 (RED, GREEN, BLUE, UNKNOWN), t->input->rowstride*2); } return NULL; } gboolean sse2_available = !!(rs_detect_cpu_features() & RS_CPU_FLAG_SSE2) && is_sse2_compiled(); gint min_max_xy[16] __attribute__ ((aligned (16))); gint current_xy[2] __attribute__ ((aligned (16))) = {0,0}; if (t->input->pixelsize != 4) sse2_available = FALSE; if (sse2_available) { for (i = 0; i < 8; i++) { min_max_xy[i] = 0; min_max_xy[i+8] = 65536; } } else { min_max_xy[0] = min_max_xy[1] = 0; min_max_xy[2] = min_max_xy[3] = 65536; } gfloat max_w = (float)t->input->w-1; gfloat max_h = (float)t->input->h-1; if (t->stage == 3) { /* Do TCA and distortion */ gfloat *pos = g_new0(gfloat, t->input->w*6); const gint pixelsize = t->output->pixelsize; for(y = t->start_y; y < t->end_y; y++) { gushort *target; lf_modifier_apply_subpixel_geometry_distortion(t->mod, t->roi->x, (gfloat) y, t->roi->width, 1, pos); target = GET_PIXEL(t->output, t->roi->x, y); gfloat* l_pos = pos; if (sse2_available) { current_xy[1] = y; for(x = 0; x < t->roi->width ; x++) { if (t->measure_minmax_coords) { current_xy[0] = x; rs_image16_bilinear_full_sse2(t->input, target, l_pos, current_xy, min_max_xy); } else { rs_image16_bilinear_nomeasure_sse2(t->input, target, l_pos); } target += 4; l_pos += 6; } } else { for(x = 0; x < t->roi->width ; x++) { rs_image16_bilinear_full(t->input, target, l_pos); if (t->measure_minmax_coords) { /* Set minimum and maximum values */ if (l_pos[0] < 0.0001 || l_pos[2] < 0.0001 || l_pos[4] < 0.0001) min_max_xy[0] = x; if (l_pos[1] < 0.0001 || l_pos[3] < 0.0001 || l_pos[5] < 0.0001) min_max_xy[1] = y; if ((l_pos[0] > max_w || l_pos[2] > max_w || l_pos[4] > max_w) && min_max_xy[2] > 65535) min_max_xy[2] = x; if ((l_pos[1] > max_h || l_pos[3] > max_h || l_pos[5] > max_h) && min_max_xy[3] > 65535) min_max_xy[3] = y; } target += pixelsize; l_pos += 6; } } } g_free(pos); if (sse2_available) { for (i = 1; i < 4; i++) { min_max_xy[0] = MAX(min_max_xy[0], min_max_xy[i]); min_max_xy[4] = MAX(min_max_xy[4], min_max_xy[4+i]); min_max_xy[8] = MIN(min_max_xy[8], min_max_xy[8+i]); min_max_xy[12] = MIN(min_max_xy[12], min_max_xy[12+i]); } for (i = 0; i < 4; i++) t->min_max_xy[i] = min_max_xy[i*4]; //g_debug("x1:%d, y1:%d, x2:%d, y2:%d", t->min_max_xy[0],t->min_max_xy[1],t->min_max_xy[2],t->min_max_xy[3]); } else { for (i = 0; i < 4; i++) t->min_max_xy[i] = min_max_xy[i]; } } return NULL; } static RSFilterResponse * get_image(RSFilter *filter, const RSFilterRequest *request) { RSLensfun *lensfun = RS_LENSFUN(filter); RSFilterResponse *previous_response; RSFilterResponse *response; RS_IMAGE16 *input; RS_IMAGE16 *output = NULL; const gchar *make = NULL; const gchar *model = NULL; GdkRectangle *roi, *vign_roi; RS_RECT *proposed_crop; gboolean measure_minmax_coords = FALSE; previous_response = rs_filter_get_image(filter->previous, request); input = rs_filter_response_get_image(previous_response); response = rs_filter_response_clone(previous_response); g_object_unref(previous_response); if (rs_filter_request_get_quick(request)) { rs_filter_response_set_quick(response); if (input) { rs_filter_response_set_image(response, input); g_object_unref(input); } return response; } if (!RS_IS_IMAGE16(input)) return response; gint i; if (!lensfun->ldb) { g_warning ("Failed to create database"); rs_filter_response_set_image(response, input); g_object_unref(input); return response; } if(lensfun->DIRTY) { if (lensfun->selected_lens) lf_free(lensfun->selected_lens); const lfCamera **cameras = NULL; const lfLens **lenses = NULL; lensfun->selected_camera = NULL; lensfun->selected_lens = NULL; if (lensfun->make && lensfun->model) cameras = lf_db_find_cameras(lensfun->ldb, lensfun->make, lensfun->model); if (cameras) { /* FIXME: selecting first camera */ lensfun->selected_camera = cameras [0]; lf_free (cameras); if (rs_lens_get_lensfun_model(lensfun->lens)) { model = rs_lens_get_lensfun_model(lensfun->lens); make = rs_lens_get_lensfun_make(lensfun->lens); lenses = lf_db_find_lenses_hd(lensfun->ldb, lensfun->selected_camera, make, model, 0); if (lenses) { lensfun->selected_lens = lf_lens_new(); /* FIXME: selecting first lens */ lf_lens_copy(lensfun->selected_lens, lenses [0]); lf_free (lenses); } } } else { g_debug("Lensfun: Camera not found. Using camera from same manufacturer."); /* Try same manufacturer to be able to use CA-correction and vignetting */ cameras = lf_db_find_cameras(lensfun->ldb, lensfun->make, NULL); if (cameras) { lensfun->selected_camera = cameras [0]; lf_free (cameras); } } lensfun->distortion_enabled = rs_lens_get_lensfun_enabled(lensfun->lens); if ((!lensfun->selected_lens || !lensfun->distortion_enabled) && lensfun->selected_camera) { // g_debug("Lensfun: Lens not found or lens is disabled. Using neutral lense."); if (ABS(lensfun->tca_kr) + ABS(lensfun->tca_kb) + ABS(lensfun->vignetting) < 0.001) { rs_filter_response_set_image(response, input); g_object_unref(input); return response; } lfLens* lens = lf_lens_new (); lens->Model = lensfun->model; lens->MinFocal = 10.0; lens->MaxFocal = 1000.0; lens->MinAperture = 1.0; lens->MaxAperture = 50.0; lensfun->selected_lens = lens; /* FIXME: It doesn't really seem to use this, at least we'll know when it does ;)*/ lens->Mounts = (char**)1; } lensfun->DIRTY = FALSE; } roi = rs_filter_request_get_roi(request); gboolean destroy_roi = FALSE; if (!roi) { measure_minmax_coords = TRUE; roi = g_new(GdkRectangle, 1); roi->x = 0; roi->y = 0; roi->width = input->w; roi->height = input->h; destroy_roi = TRUE; } else if (roi->x <= 0 && roi->y <= 0 && roi->width >= input->w && roi->height >= input->h) measure_minmax_coords = TRUE; /* Expand ROI by 25% in each direction for vignetting correction */ vign_roi = g_new(GdkRectangle, 1); vign_roi->x = MAX(0, roi->x - ((roi->width+4) / 4)); vign_roi->y = MAX(0, roi->y - ((roi->height+4) / 4)); vign_roi->width = MIN(input->w - vign_roi->x, roi->width + ((roi->width + 2) / 2)); vign_roi->height = MIN(input->h - vign_roi->y, roi->height + ((roi->height + 2) / 2)); /* Proceed if we got everything */ if (lensfun->selected_lens && lf_lens_check((lfLens *) lensfun->selected_lens)) { gint effective_flags; /* Set TCA */ if (ABS(lensfun->tca_kr) > 0.01f || ABS(lensfun->tca_kb) > 0.01f) { lfLensCalibTCA tca; tca.Model = LF_TCA_MODEL_LINEAR; if (rs_lf_version < 0x00020500) { /* Lensfun < 0.2.5.0 */ tca.Terms[0] = (lensfun->tca_kr/100)+1; tca.Terms[1] = (lensfun->tca_kb/100)+1; } else { /* Lensfun >= 0.2.5.0 */ tca.Terms[0] = 1.0f/(((lensfun->tca_kr/100))+1); tca.Terms[1] = 1.0f/(((lensfun->tca_kb/100))+1); } lf_lens_add_calib_tca((lfLens *) lensfun->selected_lens, (lfLensCalibTCA *) &tca); } else { lf_lens_remove_calib_tca(lensfun->selected_lens, 0); lf_lens_remove_calib_tca(lensfun->selected_lens, 1); } /* Set vignetting */ if (ABS(lensfun->vignetting) > 0.01f) { lfLensCalibVignetting vignetting; vignetting.Model = LF_VIGNETTING_MODEL_PA; vignetting.Distance = 1.0; vignetting.Focal = lensfun->focal; vignetting.Aperture = lensfun->aperture; gfloat vign = -lensfun->vignetting * 1.5; if (vign > 0.0f) vign *= 4.0f; vignetting.Terms[0] = vign * 0.5; vignetting.Terms[1] = vign * 0.03; vignetting.Terms[2] = vign * 0.005; lf_lens_add_calib_vignetting((lfLens *) lensfun->selected_lens, &vignetting); } else { lf_lens_remove_calib_vignetting(lensfun->selected_lens, 0); lf_lens_remove_calib_vignetting(lensfun->selected_lens, 1); lf_lens_remove_calib_vignetting(lensfun->selected_lens, 2); } lfModifier *mod = lf_modifier_new (lensfun->selected_lens, lensfun->selected_camera->CropFactor, input->w, input->h); effective_flags = lf_modifier_initialize (mod, lensfun->selected_lens, LF_PF_U16, /* lfPixelFormat */ lensfun->focal, /* focal */ lensfun->aperture, /* aperture */ 1.0, /* distance */ 1.0, /* scale */ LF_UNKNOWN, /* lfLensType targeom, */ /* FIXME: ? */ LF_MODIFY_ALL, /* flags */ /* FIXME: ? */ FALSE); /* reverse */ /* Print flags used */ #if 0 GString *flags = g_string_new(""); if (effective_flags & LF_MODIFY_TCA) g_string_append(flags, " LF_MODIFY_TCA"); if (effective_flags & LF_MODIFY_VIGNETTING) g_string_append(flags, " LF_MODIFY_VIGNETTING"); if (effective_flags & LF_MODIFY_CCI) g_string_append(flags, " LF_MODIFY_CCI"); if (effective_flags & LF_MODIFY_DISTORTION) g_string_append(flags, " LF_MODIFY_DISTORTION"); if (effective_flags & LF_MODIFY_GEOMETRY) g_string_append(flags, " LF_MODIFY_GEOMETRY"); if (effective_flags & LF_MODIFY_SCALE) g_string_append(flags, " LF_MODIFY_SCALE"); g_debug("Effective flags:%s", flags->str); g_string_free(flags, TRUE); #endif if (effective_flags > 0) { proposed_crop = g_new(RS_RECT, 1); const guint threads = rs_get_number_of_processor_cores(); ThreadInfo *t = g_new(ThreadInfo, threads); /* Set up job description for individual threads */ for (i = 0; i < threads; i++) { t[i].measure_minmax_coords = measure_minmax_coords; t[i].mod = mod; t[i].effective_flags = effective_flags; } /* Start threads to apply phase 2, Vignetting and CA Correction */ if (effective_flags & (LF_MODIFY_VIGNETTING | LF_MODIFY_CCI)) { /* Phase 2 is corrected inplace, so copy input first */ guint y_offset, y_per_thread, threaded_h; threaded_h = vign_roi->height; y_per_thread = (threaded_h + threads-1)/threads; y_offset = vign_roi->y; output = rs_image16_copy(input, TRUE); g_object_unref(input); for (i = 0; i < threads; i++) { t[i].input = t[i].output = output; t[i].stage = 2; t[i].roi = vign_roi; t[i].start_y = y_offset; y_offset += y_per_thread; y_offset = MIN(vign_roi->y + vign_roi->height, y_offset); t[i].end_y = y_offset; t[i].threadid = g_thread_create(thread_func, &t[i], TRUE, NULL); } /* Wait for threads to finish */ for(i = 0; i < threads; i++) g_thread_join(t[i].threadid); input = output; } /* Start threads to apply phase 1+3, Chromatic abberation and distortion Correction */ if (effective_flags & (LF_MODIFY_TCA | LF_MODIFY_DISTORTION | LF_MODIFY_GEOMETRY)) { guint y_offset, y_per_thread, threaded_h; output = rs_image16_copy(input, FALSE); threaded_h = roi->height; y_per_thread = (threaded_h + threads-1)/threads; y_offset = roi->y; for (i = 0; i < threads; i++) { t[i].input = input; t[i].output = output; t[i].roi = roi; t[i].start_y = y_offset; y_offset += y_per_thread; y_offset = MIN(roi->y + roi->height, y_offset); t[i].end_y = y_offset; t[i].stage = 3; t[i].threadid = g_thread_create(thread_func, &t[i], TRUE, NULL); } /* Wait for threads to finish */ for(i = 0; i < threads; i++) g_thread_join(t[i].threadid); } else { output = rs_image16_copy(input, TRUE); measure_minmax_coords = FALSE; } if (measure_minmax_coords) { proposed_crop->x1 = proposed_crop->y1 = 0; proposed_crop->x2 = output->w-1; proposed_crop->y2 = output->h-1; for(i = 0; i < threads; i++) { proposed_crop->x1 = MIN(output->w-100, MAX(proposed_crop->x1, t[i].min_max_xy[0])); proposed_crop->y1 = MIN(output->h-100, MAX(proposed_crop->y1, t[i].min_max_xy[1])); proposed_crop->x2 = MAX(proposed_crop->x1+10, MIN(proposed_crop->x2, t[i].min_max_xy[2])); proposed_crop->y2 = MAX(proposed_crop->y1+10, MIN(proposed_crop->y2, t[i].min_max_xy[3])); } if (proposed_crop->x1 != 0 || proposed_crop->y1 != 0 || proposed_crop->x2 != output->w-1 || proposed_crop->y2 != output->h-1) { rs_filter_param_set_integer(RS_FILTER_PARAM(response), "proposed-crop-x1", proposed_crop->x1); rs_filter_param_set_integer(RS_FILTER_PARAM(response), "proposed-crop-y1", proposed_crop->y1); rs_filter_param_set_integer(RS_FILTER_PARAM(response), "proposed-crop-x2", proposed_crop->x2); rs_filter_param_set_integer(RS_FILTER_PARAM(response), "proposed-crop-y2", proposed_crop->y2); // g_debug("x1:%d, y1:%d, x2:%d, y2:%d", proposed_crop->x1, proposed_crop->y1, proposed_crop->x2, proposed_crop->y2); } else g_free(proposed_crop); } g_free(t); rs_filter_response_set_image(response, output); g_object_unref(output); } else rs_filter_response_set_image(response, input); lf_modifier_destroy(mod); } else { g_debug("lf_lens_check() failed"); rs_filter_response_set_image(response, input); } if (destroy_roi) g_free(roi); g_free(vign_roi); g_object_unref(input); return response; } static void inline rs_image16_nearest_full(RS_IMAGE16 *in, gushort *out, gfloat *pos) { gint ipos[6]; gint i; for (i = 0; i < 6; i+=2) { ipos[i] = CLAMP((gint)pos[i], 0, in->w-1); ipos[i+1] = CLAMP((gint)pos[i+1], 0, in->h-1); } out[R] = GET_PIXEL(in, ipos[0], ipos[1])[R]; out[G] = GET_PIXEL(in, ipos[2], ipos[3])[G]; out[B] = GET_PIXEL(in, ipos[4], ipos[5])[B]; } static void inline rs_image16_bilinear_full(RS_IMAGE16 *in, gushort *out, gfloat *pos) { gint ipos_x, ipos_y ; gint i; gint m_w = (in->w-1); gint m_h = (in->h-1); for (i = 0; i < 3; i++) { ipos_x = CLAMP((gint)(pos[i*2]*256.0f), 0, m_w << 8); ipos_y = CLAMP((gint)(pos[i*2+1]*256.0f), 0, m_h << 8); /* Calculate next pixel offset */ const gint nx = MIN((ipos_x>>8) + 1, m_w); const gint ny = MIN((ipos_y>>8) + 1, m_h); gushort* a = GET_PIXEL(in, ipos_x>>8, ipos_y>>8); gushort* b = GET_PIXEL(in, nx , ipos_y>>8); gushort* c = GET_PIXEL(in, ipos_x>>8, ny); gushort* d = GET_PIXEL(in, nx, ny); /* Calculate distances */ const gint diffx = ipos_x & 0xff; /* x distance from a */ const gint diffy = ipos_y & 0xff; /* y distance fromy a */ const gint inv_diffx = 256 - diffx; /* inverse x distance from a */ const gint inv_diffy = 256 - diffy; /* inverse y distance from a */ /* Calculate weightings */ const gint aw = (inv_diffx * inv_diffy) >> 1; /* Weight is now 0.15 fp */ const gint bw = (diffx * inv_diffy) >> 1; const gint cw = (inv_diffx * diffy) >> 1; const gint dw = (diffx * diffy) >> 1; out[i] = (gushort) ((a[i]*aw + b[i]*bw + c[i]*cw + d[i]*dw + 16384) >> 15 ); } } rawstudio-2.0/plugins/lensfun/lensfun-version.h0000644000175000017500000000177111543674627017003 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_LENSFUN_VERSION_H #define RS_LENSFUN_VERSION_H #include guint rs_guess_lensfun_version(void); #endif /* RS_LENSFUN_VERSION_H */ rawstudio-2.0/plugins/lensfun/Makefile.in0000644000175000017500000004271511547430036015531 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/lensfun DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) lensfun_la_DEPENDENCIES = lensfun-sse2.lo lensfun-c.lo am_lensfun_la_OBJECTS = lensfun-version.lo lensfun_la_OBJECTS = $(am_lensfun_la_OBJECTS) lensfun_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(lensfun_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(lensfun_la_SOURCES) DIST_SOURCES = $(lensfun_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4\ -funroll-loops AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = lensfun.la lensfun_la_LIBADD = @PACKAGE_LIBS@ lensfun-sse2.lo lensfun-c.lo lensfun_la_LDFLAGS = -module -avoid-version lensfun_la_SOURCES = lensfun-version.c lensfun-version.h EXTRA_DIST = lensfun-sse2.c lensfun.c @CAN_COMPILE_SSE2_FALSE@SSE_FLAG = @CAN_COMPILE_SSE2_TRUE@SSE_FLAG = -msse2 all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/lensfun/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/lensfun/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done lensfun.la: $(lensfun_la_OBJECTS) $(lensfun_la_DEPENDENCIES) $(lensfun_la_LINK) -rpath $(libdir) $(lensfun_la_OBJECTS) $(lensfun_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lensfun-version.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES lensfun-c.lo: lensfun.c $(LTCOMPILE) -o lensfun-c.lo -c $(top_srcdir)/plugins/lensfun/lensfun.c lensfun-sse2.lo: lensfun-sse2.c $(LTCOMPILE) $(SSE_FLAG) -c $(top_srcdir)/plugins/lensfun/lensfun-sse2.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/lensfun/lensfun-version.c0000644000175000017500000000700211543674627016767 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* This is various techniques to guess Lensfun version. We need this because Lensfun didn't include a LF_VERSION in any release before 0.2.5.1 - but the API/ABI changed in 0.2.5.0. */ #include "lensfun-version.h" #ifdef LF_VERSION /* First we try to use LF_VERSION from Lensfun, this will work from Lensfun version > 0.2.5.1 */ guint rs_guess_lensfun_version() { return LF_VERSION; } #elif defined(__gnu_linux__) \ && (__GLIBC__ > 2 \ || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \ || (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2)) /* As a fallback we try to look at the name of the linked library path (only for Linux hosts) */ #include #include #include #include #include #define __USE_GNU #include static gint _guess_lensfun_iterator(struct dl_phdr_info *info, gsize size, gpointer user_data); guint rs_guess_lensfun_version(void) { gint max_unwind_levels; gint major=0, minor=0, micro=0, bugfix=0; guint version = 0; gchar *library_path = NULL, *filename = NULL; if (version > 0) return version; dl_iterate_phdr(_guess_lensfun_iterator, &library_path); /* Try to unwind symlinks */ max_unwind_levels = 10; while (library_path && (max_unwind_levels > 0)) { gchar new_path[400]; /* Break if it's not a symlink, we must be done */ if (!g_file_test(library_path, G_FILE_TEST_IS_SYMLINK)) break; /* We just try to read the link, this should fail if the file is not a symbolic link */ gsize len; if ((len = readlink(library_path, new_path, 399)) > 0) { /* null-terminate new path */ new_path[len] = '\0'; g_free(library_path); library_path = g_strdup(new_path); } max_unwind_levels--; } /* Remove path */ filename = g_path_get_basename(library_path); /* Try to read the version number from the library name. If not all tokens are found, sscanf() will still fill in the ones available */ if (filename) sscanf(filename, "liblensfun.so.%d.%d.%d.%d", &major, &minor, µ, &bugfix); /* Build integer mathcing LF_VERSION */ version = major << 24 | minor << 16 | micro << 8 | bugfix; g_free(filename); g_free(library_path); if (version == 0) g_warning("Lensfun library version is unknown."); return version; } static gint _guess_lensfun_iterator(struct dl_phdr_info *info, gsize size, gpointer user_data) { gchar **library_path = (gchar **) user_data; if (g_strstr_len(info->dlpi_name, -1, "liblensfun.so")) { *library_path = g_strdup(info->dlpi_name); return 1; } else return 0; } #else /* - or we give up and return 0, this is bad */ guint rs_guess_lensfun_version() { g_warning("Lensfun library version is unknown."); return 0; } #endif rawstudio-2.0/plugins/lensfun/lensfun-sse2.c0000644000175000017500000003101011543674627016152 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 4 */ #include #include #if defined (__SSE2__) #include static gfloat twofiftytwo_ps[4] __attribute__ ((aligned (16))) = {256.0f, 256.0f, 256.0f, 0.0f}; static gint _zero12[4] __attribute__ ((aligned (16))) = {0,1,2,0}; static gint _max_coord[4] __attribute__ ((aligned (16))) = {65536,65536,65536,65536}; gboolean is_sse2_compiled(void) { return TRUE; } void rs_image16_bilinear_full_sse2(RS_IMAGE16 *in, gushort *out, gfloat *pos, const gint *current_xy, const gint* min_max_xy) { const gint m_w = (in->w-1); const gint m_h = (in->h-1); __m128 p0, p1; if ((uintptr_t)pos & 15) { p0 = _mm_loadu_ps(pos); // y1x1 y0x0 p1 = _mm_loadu_ps(pos+4); // ---- y2x2 } else { p0 = _mm_load_ps(pos); // y1x1 y0x0 p1 = _mm_load_ps(pos+4); // ---- y2x2 } // to x2x2 x1x0 __m128 xf = _mm_shuffle_ps(p0, p1, _MM_SHUFFLE(0,0,2,0)); // to y2y2 y1y0 __m128 yf = _mm_shuffle_ps(p0, p1, _MM_SHUFFLE(1,1,3,1)); __m128 fl256 = _mm_load_ps(twofiftytwo_ps); xf = _mm_mul_ps(xf, fl256); yf = _mm_mul_ps(yf, fl256); __m128i x = _mm_cvttps_epi32(xf); __m128i y = _mm_cvttps_epi32(yf); __m128i _m_w = _mm_slli_epi32(_mm_set1_epi32(m_w), 8); __m128i _m_h = _mm_slli_epi32(_mm_set1_epi32(m_h), 8); __m128i x_gt, y_gt; /* Clamping */ x_gt = _mm_cmpgt_epi32(x, _m_w); y_gt = _mm_cmpgt_epi32(y, _m_h); x = _mm_or_si128(_mm_andnot_si128(x_gt, x), _mm_and_si128(_m_w, x_gt)); y = _mm_or_si128(_mm_andnot_si128(y_gt, y), _mm_and_si128(_m_h, y_gt)); __m128i current_pos = _mm_loadl_epi64((__m128i*)current_xy); __m128i current_x = _mm_shuffle_epi32(current_pos,_MM_SHUFFLE(0,0,0,0)); __m128i current_y = _mm_shuffle_epi32(current_pos,_MM_SHUFFLE(1,1,1,1)); __m128i max_x = _mm_load_si128((__m128i*)&min_max_xy[8]); __m128i max_y = _mm_load_si128((__m128i*)&min_max_xy[12]); __m128i max_coord = _mm_load_si128((__m128i*)_max_coord); __m128i eq_max_x = _mm_cmpeq_epi32(max_coord, max_x); __m128i eq_max_y = _mm_cmpeq_epi32(max_coord, max_y); x_gt = _mm_and_si128(x_gt, eq_max_x); y_gt = _mm_and_si128(y_gt, eq_max_y); __m128i insert_x = _mm_and_si128(x_gt, current_x); __m128i insert_y = _mm_and_si128(y_gt, current_y); max_x = _mm_or_si128(insert_x, _mm_andnot_si128(x_gt, max_x)); max_y = _mm_or_si128(insert_y, _mm_andnot_si128(y_gt, max_y)); _mm_store_si128((__m128i*)&min_max_xy[8], max_x); _mm_store_si128((__m128i*)&min_max_xy[12], max_y); __m128i zero = _mm_setzero_si128(); __m128i x_lt = _mm_cmplt_epi32(x, zero); __m128i y_lt = _mm_cmplt_epi32(y, zero); x = _mm_andnot_si128(x_lt, x); y = _mm_andnot_si128(y_lt, y); __m128i min_x = _mm_load_si128((__m128i*)&min_max_xy[0]); __m128i min_y = _mm_load_si128((__m128i*)&min_max_xy[4]); insert_x = _mm_and_si128(x_lt, current_x); insert_y = _mm_and_si128(y_lt, current_y); min_x = _mm_or_si128(insert_x, _mm_andnot_si128(x_lt, min_x)); min_y = _mm_or_si128(insert_y, _mm_andnot_si128(y_lt, min_y)); _mm_store_si128((__m128i*)&min_max_xy[0], min_x); _mm_store_si128((__m128i*)&min_max_xy[4], min_y); __m128i one = _mm_set1_epi32(1); __m128i nx = _mm_add_epi32(one, _mm_srai_epi32(x, 8)); __m128i ny = _mm_add_epi32(one, _mm_srai_epi32(y, 8)); /* Check that 'next' pixels are in bounds */ _m_w = _mm_srai_epi32(_m_w, 8); _m_h = _mm_srai_epi32(_m_h, 8); x_gt = _mm_cmpgt_epi32(nx, _m_w); y_gt = _mm_cmpgt_epi32(ny, _m_h); nx = _mm_or_si128(_mm_andnot_si128(x_gt, nx), _mm_and_si128(_m_w, x_gt)); ny = _mm_or_si128(_mm_andnot_si128(y_gt, ny), _mm_and_si128(_m_h, y_gt)); int xfer[16] __attribute__ ((aligned (16))); /* Pitch as pixels */ __m128i pitch = _mm_set1_epi32(in->rowstride >> 2 | ((in->rowstride >> 2)<<16)); /* Remove remainder */ __m128i tx = _mm_srai_epi32(x, 8); __m128i ty = _mm_srai_epi32(y, 8); /* Multiply y by pitch */ ty = _mm_packs_epi32(ty, ty); __m128i ty_lo = _mm_mullo_epi16(ty, pitch); __m128i ty_hi = _mm_mulhi_epi16(ty, pitch); ty = _mm_unpacklo_epi16(ty_lo, ty_hi); /* Same to next pixel */ ny = _mm_packs_epi32(ny, ny); __m128i ny_lo = _mm_mullo_epi16(ny, pitch); __m128i ny_hi = _mm_mulhi_epi16(ny, pitch); ny = _mm_unpacklo_epi16(ny_lo, ny_hi); /* Add pitch and x offset */ __m128i a_offset = _mm_add_epi32(tx, ty); __m128i b_offset = _mm_add_epi32(nx, ty); __m128i c_offset = _mm_add_epi32(tx, ny); __m128i d_offset = _mm_add_epi32(nx, ny); /* Multiply by pixelsize and add RGB offsets */ __m128i zero12 = _mm_load_si128((__m128i*)_zero12); a_offset = _mm_add_epi32(zero12, _mm_slli_epi32(a_offset, 2)); b_offset = _mm_add_epi32(zero12, _mm_slli_epi32(b_offset, 2)); c_offset = _mm_add_epi32(zero12, _mm_slli_epi32(c_offset, 2)); d_offset = _mm_add_epi32(zero12, _mm_slli_epi32(d_offset, 2)); _mm_store_si128((__m128i*)xfer, a_offset); _mm_store_si128((__m128i*)&xfer[4], b_offset); _mm_store_si128((__m128i*)&xfer[8], c_offset); _mm_store_si128((__m128i*)&xfer[12], d_offset); gushort* pixels[12]; /* Loop unrolled, allows agressive instruction reordering */ /* Red, then G & B */ pixels[0] = in->pixels + xfer[0]; // a pixels[1] = in->pixels + xfer[4]; // b pixels[2] = in->pixels + xfer[8]; // c pixels[3] = in->pixels + xfer[12]; // d pixels[4] = in->pixels + xfer[1+0]; // a pixels[5] = in->pixels + xfer[1+4]; // b pixels[6] = in->pixels + xfer[1+8]; // c pixels[7] = in->pixels + xfer[1+12]; // d pixels[8] = in->pixels + xfer[2+0]; // a pixels[9] = in->pixels + xfer[2+4]; // b pixels[10] = in->pixels + xfer[2+8]; // c pixels[11] = in->pixels + xfer[2+12]; // d /* Calculate distances */ __m128i twofiftyfive = _mm_set1_epi32(255); __m128i diffx = _mm_and_si128(x, twofiftyfive); __m128i diffy = _mm_and_si128(y, twofiftyfive); __m128i inv_diffx = _mm_andnot_si128(diffx, twofiftyfive); __m128i inv_diffy = _mm_andnot_si128(diffy, twofiftyfive); /* Calculate weights */ __m128i aw = _mm_srai_epi32(_mm_mullo_epi16(inv_diffx, inv_diffy),1); __m128i bw = _mm_srai_epi32(_mm_mullo_epi16(diffx, inv_diffy),1); __m128i cw = _mm_srai_epi32(_mm_mullo_epi16(inv_diffx, diffy),1); __m128i dw = _mm_srai_epi32(_mm_mullo_epi16(diffx, diffy),1); _mm_store_si128((__m128i*)xfer, aw); _mm_store_si128((__m128i*)&xfer[4], bw); _mm_store_si128((__m128i*)&xfer[8], cw); _mm_store_si128((__m128i*)&xfer[12], dw); gushort** p = pixels; /* Loop unrolled */ out[0] = (gushort) ((xfer[0] * *p[0] + xfer[4] * *p[1] + xfer[8] * *p[2] + xfer[12] * *p[3] + 16384) >> 15 ); p+=4; out[1] = (gushort) ((xfer[1] * *p[0] + xfer[1+4] * *p[1] + xfer[1+8] * *p[2] + xfer[1+12] * *p[3] + 16384) >> 15 ); p+=4; out[2] = (gushort) ((xfer[2] * *p[0] + xfer[2+4] * *p[1] + xfer[2+8] * *p[2] + xfer[2+12] * *p[3] + 16384) >> 15 ); } void rs_image16_bilinear_nomeasure_sse2(RS_IMAGE16 *in, gushort *out, gfloat *pos) { const gint m_w = (in->w-1); const gint m_h = (in->h-1); __m128 p0, p1; if ((uintptr_t)pos & 15) { p0 = _mm_loadu_ps(pos); // y1x1 y0x0 p1 = _mm_loadu_ps(pos+4); // ---- y2x2 } else { p0 = _mm_load_ps(pos); // y1x1 y0x0 p1 = _mm_load_ps(pos+4); // ---- y2x2 } // to x2x2 x1x0 __m128 xf = _mm_shuffle_ps(p0, p1, _MM_SHUFFLE(0,0,2,0)); // to y2y2 y1y0 __m128 yf = _mm_shuffle_ps(p0, p1, _MM_SHUFFLE(1,1,3,1)); __m128 fl256 = _mm_load_ps(twofiftytwo_ps); xf = _mm_mul_ps(xf, fl256); yf = _mm_mul_ps(yf, fl256); __m128i x = _mm_cvttps_epi32(xf); __m128i y = _mm_cvttps_epi32(yf); __m128i _m_w = _mm_slli_epi32(_mm_set1_epi32(m_w), 8); __m128i _m_h = _mm_slli_epi32(_mm_set1_epi32(m_h), 8); __m128i x_gt, y_gt; /* Clamping */ x_gt = _mm_cmpgt_epi32(x, _m_w); y_gt = _mm_cmpgt_epi32(y, _m_h); x = _mm_or_si128(_mm_andnot_si128(x_gt, x), _mm_and_si128(_m_w, x_gt)); y = _mm_or_si128(_mm_andnot_si128(y_gt, y), _mm_and_si128(_m_h, y_gt)); __m128i zero = _mm_setzero_si128(); __m128i x_lt = _mm_cmplt_epi32(x, zero); __m128i y_lt = _mm_cmplt_epi32(y, zero); x = _mm_andnot_si128(x_lt, x); y = _mm_andnot_si128(y_lt, y); __m128i one = _mm_set1_epi32(1); __m128i nx = _mm_add_epi32(one, _mm_srai_epi32(x, 8)); __m128i ny = _mm_add_epi32(one, _mm_srai_epi32(y, 8)); /* Check that 'next' pixels are in bounds */ _m_w = _mm_srai_epi32(_m_w, 8); _m_h = _mm_srai_epi32(_m_h, 8); x_gt = _mm_cmpgt_epi32(nx, _m_w); y_gt = _mm_cmpgt_epi32(ny, _m_h); nx = _mm_or_si128(_mm_andnot_si128(x_gt, nx), _mm_and_si128(_m_w, x_gt)); ny = _mm_or_si128(_mm_andnot_si128(y_gt, ny), _mm_and_si128(_m_h, y_gt)); int xfer[16] __attribute__ ((aligned (16))); /* Pitch as pixels */ __m128i pitch = _mm_set1_epi32(in->rowstride >> 2 | ((in->rowstride >> 2)<<16)); /* Remove remainder */ __m128i tx = _mm_srai_epi32(x, 8); __m128i ty = _mm_srai_epi32(y, 8); /* Multiply y by pitch */ ty = _mm_packs_epi32(ty, ty); __m128i ty_lo = _mm_mullo_epi16(ty, pitch); __m128i ty_hi = _mm_mulhi_epi16(ty, pitch); ty = _mm_unpacklo_epi16(ty_lo, ty_hi); /* Same to next pixel */ ny = _mm_packs_epi32(ny, ny); __m128i ny_lo = _mm_mullo_epi16(ny, pitch); __m128i ny_hi = _mm_mulhi_epi16(ny, pitch); ny = _mm_unpacklo_epi16(ny_lo, ny_hi); /* Add pitch and x offset */ __m128i a_offset = _mm_add_epi32(tx, ty); __m128i b_offset = _mm_add_epi32(nx, ty); __m128i c_offset = _mm_add_epi32(tx, ny); __m128i d_offset = _mm_add_epi32(nx, ny); /* Multiply by pixelsize and add RGB offsets */ __m128i zero12 = _mm_load_si128((__m128i*)_zero12); a_offset = _mm_add_epi32(zero12, _mm_slli_epi32(a_offset, 2)); b_offset = _mm_add_epi32(zero12, _mm_slli_epi32(b_offset, 2)); c_offset = _mm_add_epi32(zero12, _mm_slli_epi32(c_offset, 2)); d_offset = _mm_add_epi32(zero12, _mm_slli_epi32(d_offset, 2)); _mm_store_si128((__m128i*)xfer, a_offset); _mm_store_si128((__m128i*)&xfer[4], b_offset); _mm_store_si128((__m128i*)&xfer[8], c_offset); _mm_store_si128((__m128i*)&xfer[12], d_offset); gushort* pixels[12]; /* Loop unrolled, allows agressive instruction reordering */ /* Red, then G & B */ pixels[0] = in->pixels + xfer[0]; // a pixels[1] = in->pixels + xfer[4]; // b pixels[2] = in->pixels + xfer[8]; // c pixels[3] = in->pixels + xfer[12]; // d pixels[4] = in->pixels + xfer[1+0]; // a pixels[5] = in->pixels + xfer[1+4]; // b pixels[6] = in->pixels + xfer[1+8]; // c pixels[7] = in->pixels + xfer[1+12]; // d pixels[8] = in->pixels + xfer[2+0]; // a pixels[9] = in->pixels + xfer[2+4]; // b pixels[10] = in->pixels + xfer[2+8]; // c pixels[11] = in->pixels + xfer[2+12]; // d /* Calculate distances */ __m128i twofiftyfive = _mm_set1_epi32(255); __m128i diffx = _mm_and_si128(x, twofiftyfive); __m128i diffy = _mm_and_si128(y, twofiftyfive); __m128i inv_diffx = _mm_andnot_si128(diffx, twofiftyfive); __m128i inv_diffy = _mm_andnot_si128(diffy, twofiftyfive); /* Calculate weights */ __m128i aw = _mm_srai_epi32(_mm_mullo_epi16(inv_diffx, inv_diffy),1); __m128i bw = _mm_srai_epi32(_mm_mullo_epi16(diffx, inv_diffy),1); __m128i cw = _mm_srai_epi32(_mm_mullo_epi16(inv_diffx, diffy),1); __m128i dw = _mm_srai_epi32(_mm_mullo_epi16(diffx, diffy),1); _mm_store_si128((__m128i*)xfer, aw); _mm_store_si128((__m128i*)&xfer[4], bw); _mm_store_si128((__m128i*)&xfer[8], cw); _mm_store_si128((__m128i*)&xfer[12], dw); gushort** p = pixels; /* Loop unrolled */ out[0] = (gushort) ((xfer[0] * *p[0] + xfer[4] * *p[1] + xfer[8] * *p[2] + xfer[12] * *p[3] + 16384) >> 15 ); p+=4; out[1] = (gushort) ((xfer[1] * *p[0] + xfer[1+4] * *p[1] + xfer[1+8] * *p[2] + xfer[1+12] * *p[3] + 16384) >> 15 ); p+=4; out[2] = (gushort) ((xfer[2] * *p[0] + xfer[2+4] * *p[1] + xfer[2+8] * *p[2] + xfer[2+12] * *p[3] + 16384) >> 15 ); } #else // NO SSE2 gboolean is_sse2_compiled(void) { return FALSE; } void rs_image16_bilinear_full_sse2(RS_IMAGE16 *in, gushort *out, gfloat *pos,const gint *current_xy, const gint* min_max_xy) { } void rs_image16_bilinear_nomeasure_sse2(RS_IMAGE16 *in, gushort *out, gfloat *pos) { } #endif // defined (__SSE2__) rawstudio-2.0/plugins/output-picasa/0000755000175000017500000000000011547430076014663 500000000000000rawstudio-2.0/plugins/output-picasa/Makefile.am0000644000175000017500000000110711526533643016637 00000000000000plugindir = $(libdir) AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = output_picasa.la libdir = $(datadir)/rawstudio/plugins/ output_picasa_la_LIBADD = @PACKAGE_LIBS@ output_picasa_la_LDFLAGS = -module -avoid-version -L/usr/lib output_picasa_la_SOURCES = output-picasa.c rs-picasa-client.c rs-picasa-client.h plugin_DATA = picasa-logo.svg EXTRA_DIST = $(plugin_DATA)rawstudio-2.0/plugins/output-picasa/rs-picasa-client.h0000644000175000017500000000157611543674627020133 00000000000000#ifndef RS_PICASA_CLIENT_H #define RS_PICASA_CLIENT_H #include #include typedef struct { CURL *curl; gchar *username; gchar *password; gchar *auth_token; gchar *captcha_token; gchar *captcha_url; gchar curl_error_buffer[CURL_ERROR_SIZE]; } PicasaClient; enum { PICASA_CLIENT_OK, PICASA_CLIENT_ERROR, PICASA_CLIENT_RETRY }; gboolean rs_picasa_client_auth_popup(PicasaClient *picasa_client); gboolean rs_picasa_client_auth(PicasaClient *picasa_client); GtkListStore * rs_picasa_client_get_album_list(PicasaClient *picasa_client, GError **error); char * rs_picasa_client_create_album(PicasaClient *picasa_client, const gchar *name, GError **error); gboolean rs_picasa_client_upload_photo(PicasaClient *picasa_client, gchar *photo, gchar *input_name, gchar *albumid, GError **error); PicasaClient * rs_picasa_client_init(void); #endif /* RS_PICASA_CLIENT_H */ rawstudio-2.0/plugins/output-picasa/picasa-logo.svg0000644000175000017500000003063511526533643017532 00000000000000 image/svg+xml rawstudio-2.0/plugins/output-picasa/Makefile.in0000644000175000017500000004442711547430041016653 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/output-picasa DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(plugindir)" LTLIBRARIES = $(lib_LTLIBRARIES) output_picasa_la_DEPENDENCIES = am_output_picasa_la_OBJECTS = output-picasa.lo rs-picasa-client.lo output_picasa_la_OBJECTS = $(am_output_picasa_la_OBJECTS) output_picasa_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(output_picasa_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(output_picasa_la_SOURCES) DIST_SOURCES = $(output_picasa_la_SOURCES) DATA = $(plugin_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir) AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = output_picasa.la output_picasa_la_LIBADD = @PACKAGE_LIBS@ output_picasa_la_LDFLAGS = -module -avoid-version -L/usr/lib output_picasa_la_SOURCES = output-picasa.c rs-picasa-client.c rs-picasa-client.h plugin_DATA = picasa-logo.svg EXTRA_DIST = $(plugin_DATA) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/output-picasa/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/output-picasa/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done output_picasa.la: $(output_picasa_la_OBJECTS) $(output_picasa_la_DEPENDENCIES) $(output_picasa_la_LINK) -rpath $(libdir) $(output_picasa_la_OBJECTS) $(output_picasa_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/output-picasa.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-picasa-client.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pluginDATA: $(plugin_DATA) @$(NORMAL_INSTALL) test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" @list='$(plugin_DATA)'; test -n "$(plugindir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(plugindir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(plugindir)" || exit $$?; \ done uninstall-pluginDATA: @$(NORMAL_UNINSTALL) @list='$(plugin_DATA)'; test -n "$(plugindir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(plugindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(plugindir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(plugindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-pluginDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-pluginDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-pluginDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES \ uninstall-pluginDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/output-picasa/output-picasa.c0000644000175000017500000003404311541464417017551 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Output plugin tmpl version 1 */ #include #include #include "config.h" #include #include #include "rs-picasa-client.h" #include #define RS_TYPE_PICASA (rs_picasa_type) #define RS_PICASA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_PICASA, RSPicasa)) #define RS_PICASA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_PICASA, RSPicasaClass)) #define RS_IS_PICASA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_PICASA)) typedef struct _RSPicasa RSPicasa; typedef struct _RSPicasaClass RSPicasaClass; struct _RSPicasa { RSOutput parent; gchar *album_id; gint quality; gboolean copy_metadata; }; struct _RSPicasaClass { RSOutputClass parent_class; }; typedef struct { PicasaClient *picasa_client; GtkEntry *entry; GtkComboBox *combobox; } CreateAlbumData; typedef struct { PicasaClient *picasa_client; GtkComboBox *combobox; GtkWidget *label; } SwitchUserData; RS_DEFINE_OUTPUT (rs_picasa, RSPicasa) enum { PROP_0, PROP_LOGO, PROP_JPEG_QUALITY, PROP_ALBUM_SELECTOR, PROP_METADATA, PROP_FILENAME /* Required for a output plugin - not in use */ }; static void get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec); static void set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec); static gboolean execute (RSOutput * output, RSFilter * filter); GtkWidget * get_album_selector_widget(RSPicasa *picasa); static GtkWidget * get_picasa_logo_widget(RSPicasa *picasa); G_MODULE_EXPORT void rs_plugin_load (RSPlugin * plugin) { rs_picasa_get_type (G_TYPE_MODULE (plugin)); } static void rs_picasa_class_init (RSPicasaClass * klass) { RSOutputClass *output_class = RS_OUTPUT_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property (object_class, PROP_JPEG_QUALITY, g_param_spec_int ("quality", "JPEG Quality", _("JPEG Quality"), 10, 100, 90, G_PARAM_READWRITE)); g_object_class_install_property (object_class, PROP_LOGO, g_param_spec_object ("Logo", "logo", "Logo", GTK_TYPE_WIDGET, G_PARAM_READABLE)); g_object_class_install_property (object_class, PROP_ALBUM_SELECTOR, g_param_spec_object ("album selector", "album selector", "Album selector", GTK_TYPE_WIDGET, G_PARAM_READABLE)); g_object_class_install_property(object_class, PROP_METADATA, g_param_spec_boolean( "copy-metadata", "Copy Metadata", _("Retain EXIF metadata"), TRUE, G_PARAM_READWRITE) ); output_class->execute = execute; output_class->display_name = _("Upload photo to Picasa"); } static void rs_picasa_init (RSPicasa * picasa) { picasa->quality = 90; picasa->album_id = rs_conf_get_string(CONF_PICASA_CLIENT_ALBUM_ID); picasa->copy_metadata = TRUE; } static void get_property (GObject * object, guint property_id, GValue * value, GParamSpec * pspec) { RSPicasa *picasa = RS_PICASA (object); switch (property_id) { case PROP_JPEG_QUALITY: g_value_set_int (value, picasa->quality); break; case PROP_LOGO: g_value_set_object(value, get_picasa_logo_widget(picasa)); break; case PROP_ALBUM_SELECTOR: g_value_set_object(value, get_album_selector_widget(picasa)); break; case PROP_METADATA: g_value_set_boolean(value, picasa->copy_metadata); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property (GObject * object, guint property_id, const GValue * value, GParamSpec * pspec) { RSPicasa *picasa = RS_PICASA (object); switch (property_id) { case PROP_JPEG_QUALITY: picasa->quality = g_value_get_int (value); break; case PROP_METADATA: picasa->copy_metadata = g_value_get_boolean(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } void combobox_cell_text(GtkComboBox *combo, gint col) { GtkCellRenderer *rend = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (combo), rend, TRUE); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (combo), rend, "text", col); } static gboolean deal_with_error(GError **error) { if (!*error) return TRUE; g_warning("Error from Picasa: '%s'", (*error)->message); gdk_threads_enter(); GtkWidget *dialog = gtk_message_dialog_new(NULL, 0, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Error: '%s'", (*error)->message); gtk_window_set_title(GTK_WINDOW(dialog), _("Unhandled error from Picasa")); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE); g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_destroy), NULL); gtk_widget_show (dialog); gdk_threads_leave(); g_clear_error(error); return FALSE; } static void album_set_active(GtkComboBox *combo, gchar *aid) { GtkTreeModel *model = gtk_combo_box_get_model(combo); GtkTreeIter iter; gchar *album_id; if (model && gtk_tree_model_get_iter_first(model, &iter)) do { gtk_tree_model_get(model, &iter, 1, &album_id, -1); if (g_strcmp0(aid, album_id) == 0) { gtk_combo_box_set_active_iter(combo, &iter); g_free(album_id); return; } g_free(album_id); } while (gtk_tree_model_iter_next(model, &iter)); } static void album_changed(GtkComboBox *combo, gpointer callback_data) { RSPicasa *picasa = callback_data; GtkTreeIter iter; GtkTreeModel *model; gchar *album, *aid; gtk_combo_box_get_active_iter(GTK_COMBO_BOX(combo), &iter); model = gtk_combo_box_get_model(GTK_COMBO_BOX(combo)); gtk_tree_model_get(model, &iter, 0, &album, 1, &aid, -1); picasa->album_id = aid; rs_conf_set_string(CONF_PICASA_CLIENT_ALBUM_ID, aid); return; } static void create_album(GtkButton *button, gpointer callback_data) { GError *error = NULL; CreateAlbumData *create_album_data = callback_data; PicasaClient *picasa_client = create_album_data->picasa_client; GtkEntry *entry = create_album_data->entry; GtkComboBox *combobox = create_album_data->combobox; const gchar *album_name = gtk_entry_get_text(entry); gchar *aid = rs_picasa_client_create_album(picasa_client, album_name, &error); if (aid) { GtkListStore *albums = rs_picasa_client_get_album_list(picasa_client, &error); gtk_combo_box_set_model(combobox, GTK_TREE_MODEL(albums)); album_set_active(combobox, aid); gtk_entry_set_text(entry, ""); } } void set_user_label(SwitchUserData* switch_user_data) { PicasaClient *picasa_client = switch_user_data->picasa_client; if (picasa_client->username) { gchar *user_label_text; if (picasa_client->auth_token) user_label_text = g_strconcat(_("Current User: "), picasa_client->username, _(" (Logged in succesfully)"), NULL); else user_label_text = g_strconcat(_("Current User: "), picasa_client->username, _(" (Cannot log in)"), NULL); gtk_label_set_text(GTK_LABEL(switch_user_data->label), user_label_text); } else gtk_label_set_text(GTK_LABEL(switch_user_data->label), _("(No user entered)")); } static void switch_user(GtkButton *button, gpointer callback_data) { SwitchUserData *switch_user_data = (SwitchUserData*)callback_data; PicasaClient *picasa_client = switch_user_data->picasa_client; GtkComboBox *combobox = switch_user_data->combobox; GError *error = NULL; gchar* old_user_name = NULL; if (picasa_client->username) { old_user_name = g_strdup(picasa_client->username); g_free(picasa_client->username); } picasa_client->username = NULL; /* We retry until we can log in */ while (!rs_picasa_client_auth(picasa_client)) { set_user_label(switch_user_data); if (!rs_picasa_client_auth_popup(picasa_client)) { /* Cancel pressed, or no info entered */ if (!picasa_client->auth_token) gtk_combo_box_set_model(combobox, NULL); if (picasa_client->auth_token && !picasa_client->username && old_user_name) picasa_client->username = old_user_name; set_user_label(switch_user_data); return; } } /* Save information */ rs_conf_set_string(CONF_PICASA_CLIENT_AUTH_TOKEN, picasa_client->auth_token); rs_conf_set_string(CONF_PICASA_CLIENT_USERNAME, picasa_client->username); /* Update UI */ set_user_label(switch_user_data); GtkListStore *albums = rs_picasa_client_get_album_list(picasa_client, &error); gtk_combo_box_set_model(combobox, GTK_TREE_MODEL(albums)); if (old_user_name) g_free(old_user_name); } GtkWidget * get_album_selector_widget(RSPicasa *picasa) { GError *error = NULL; gchar *album_id = picasa->album_id; PicasaClient *picasa_client = rs_picasa_client_init(); if (NULL == picasa_client) return NULL; CreateAlbumData *create_album_data = g_malloc(sizeof(CreateAlbumData)); SwitchUserData *switch_user_data = g_malloc(sizeof(SwitchUserData)); GtkListStore *albums = rs_picasa_client_get_album_list(picasa_client, &error); GtkWidget *combobox = gtk_combo_box_new(); combobox_cell_text(GTK_COMBO_BOX(combobox), 0); gtk_combo_box_set_model(GTK_COMBO_BOX(combobox), GTK_TREE_MODEL(albums)); album_set_active(GTK_COMBO_BOX(combobox), album_id); picasa->album_id = album_id; g_signal_connect ((gpointer) combobox, "changed", G_CALLBACK (album_changed), picasa); GtkWidget *vbox = gtk_vbox_new(FALSE, 2); GtkWidget *box = gtk_hbox_new(FALSE, 2); GtkWidget *label = gtk_label_new(_("Albums")); GtkWidget *sep = gtk_vseparator_new(); GtkWidget *entry = gtk_entry_new(); GtkWidget *button = gtk_button_new_with_label(_("Create album")); gtk_box_pack_start (GTK_BOX (box), label, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (box), combobox, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (box), sep, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (box), entry, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (box), button, FALSE, FALSE, 2); create_album_data->picasa_client = picasa_client; create_album_data->entry = GTK_ENTRY(entry); create_album_data->combobox = GTK_COMBO_BOX(combobox); /* UI for switching user */ GtkWidget *box2 = gtk_hbox_new(FALSE, 2); GtkWidget *label2 = gtk_label_new(""); GtkWidget *button2 = gtk_button_new_with_label(_("Switch User")); gtk_box_pack_start (GTK_BOX (box2), label2, FALSE, FALSE, 2); gtk_box_pack_end (GTK_BOX (box2), button2, FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET(box2), FALSE, FALSE, 2); gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET(box), FALSE, FALSE, 2); switch_user_data->picasa_client = picasa_client; switch_user_data->label = label2; switch_user_data->combobox = GTK_COMBO_BOX(combobox); set_user_label(switch_user_data); g_signal_connect ((gpointer) button, "clicked", G_CALLBACK (create_album), create_album_data); g_signal_connect ((gpointer) button2, "clicked", G_CALLBACK (switch_user), switch_user_data); return vbox; } static gboolean execute (RSOutput * output, RSFilter * filter) { gboolean uploaded_ok; GError *error = NULL; RSPicasa *picasa = RS_PICASA (output); RSOutput *jpegsave = rs_output_new ("RSJpegfile"); gchar *input_filename = NULL; rs_filter_get_recursive(filter, "filename", &input_filename, NULL); PicasaClient *picasa_client = rs_picasa_client_init(); if (NULL == picasa_client) return FALSE; gchar *temp_file = g_strdup_printf ("%s%s.rawstudio-tmp-%d.jpg", g_get_tmp_dir (), G_DIR_SEPARATOR_S, (gint) (g_random_double () * 10000.0)); g_object_set (jpegsave, "filename", temp_file, "quality", picasa->quality, "copy-metadata", picasa->copy_metadata, NULL); rs_output_execute (jpegsave, filter); g_object_unref (jpegsave); uploaded_ok = rs_picasa_client_upload_photo(picasa_client, temp_file, input_filename, picasa->album_id, &error); unlink (temp_file); g_free (temp_file); /* If upload failed, but we did not receive an error, just return failure */ if (!uploaded_ok && (!error)) return FALSE; return deal_with_error(&error); } static GtkWidget * get_picasa_logo_widget(RSPicasa *picasa) { gchar *filename = g_build_filename(PACKAGE_DATA_DIR, PACKAGE, G_DIR_SEPARATOR_S "plugins" G_DIR_SEPARATOR_S "picasa-logo.svg", NULL); GtkWidget *box = gtk_vbox_new(TRUE, 2); GtkWidget *logo = gtk_image_new_from_file(filename); g_free(filename); gtk_box_pack_start (GTK_BOX (box), logo, FALSE, FALSE, 2); return box; } rawstudio-2.0/plugins/output-picasa/rs-picasa-client.c0000644000175000017500000004540111543674627020121 00000000000000/** * Documentation for Picasa: * http://code.google.com/apis/picasaweb/docs/2.0/developers_guide_protocol.html * Login: http://code.google.com/apis/accounts/docs/AuthForInstalledApps.html * * Documentation for CURL: * http://curl.haxx.se/libcurl/c/curl_easy_setopt.html */ #include #include #include #include #include #include "rs-picasa-client.h" #include "conf_interface.h" #include #include //#define CURL_DEBUG TRUE #define PICASA_LOGIN_URL "https://www.google.com/accounts/ClientLogin" #define PICASA_DATA_URL "http://picasaweb.google.com/data/feed/api" #define HTTP_BOUNDARY "5d0ae7df9faf6ee0ae584d7676ca34d0" /* md5sum of "Rawstudio2PicasaWebAlbums" */ typedef enum { PICASA_ALBUM_NAME, PICASA_ALBUM_ID } PicasaAlbum; static gint picasa_error(PicasaClient *picasa_client, gint code, const GString *data, GError **error) { gchar *error_msg = NULL; switch(code) { case 200: case 201: break; case 404: error_msg = g_strdup(data->str); break; case 403: case 401: { picasa_client->auth_token = NULL; while (!rs_picasa_client_auth(picasa_client)) { if (!rs_picasa_client_auth_popup(picasa_client)) { /* Cancel pressed, or no info entered */ g_set_error(error, g_quark_from_static_string("rawstudio_facebook_client_error"), code, _("Cannot log in")); return PICASA_CLIENT_ERROR; } } /* Save information */ rs_conf_set_string(CONF_PICASA_CLIENT_AUTH_TOKEN, picasa_client->auth_token); rs_conf_set_string(CONF_PICASA_CLIENT_USERNAME, picasa_client->username); return PICASA_CLIENT_RETRY; } break; default: error_msg = g_strdup_printf("Error %d not caught, please submit this as a bugreport:\n%s", code, data->str); break; } if (error_msg) { g_set_error(error, g_quark_from_static_string("rawstudio_facebook_client_error"), code, "%s", error_msg); g_free(error_msg); return PICASA_CLIENT_ERROR; } else { return PICASA_CLIENT_OK; } } static GtkListStore * xml_album_list_response(const GString *xml) { xmlDocPtr doc = xmlParseMemory(xml->str, xml->len); xmlNodePtr cur, child; cur = xmlDocGetRootElement(doc); cur = cur->xmlChildrenNode; gchar *id = NULL; gchar *name = NULL; GtkListStore *albums = NULL; GtkTreeIter iter; while (cur) { if ((!xmlStrcmp(cur->name, BAD_CAST("entry")))) { child = cur->xmlChildrenNode; while (child) { if ((!xmlStrcmp(child->name, BAD_CAST("name"))) && g_strcmp0((char *) child->ns->prefix, "gphoto") == 0) name = (gchar *) xmlNodeListGetString(doc, child->xmlChildrenNode, 1); if ((!xmlStrcmp(child->name, BAD_CAST("id"))) && g_strcmp0((char *) child->ns->prefix, "gphoto") == 0) id = (gchar *) xmlNodeListGetString(doc, child->xmlChildrenNode, 1); child = child->next; } if (name && id) { if (!albums) albums = gtk_list_store_new(2, G_TYPE_STRING, G_TYPE_STRING); gtk_list_store_append(albums, &iter); gtk_list_store_set(albums, &iter, PICASA_ALBUM_NAME, name, PICASA_ALBUM_ID, id, -1); id = NULL; name = NULL; } } cur = cur->next; } return albums; } gchar * xml_album_create_response(const GString *xml) { xmlDocPtr doc = xmlParseMemory(xml->str, xml->len); xmlNodePtr cur; cur = xmlDocGetRootElement(doc); cur = cur->xmlChildrenNode; gchar *id = NULL; while (cur) { if ((!xmlStrcmp(cur->name, BAD_CAST("id"))) && g_strcmp0((char *) cur->ns->prefix, "gphoto") == 0) { id = (gchar *) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); return id; } cur = cur->next; } return NULL; } static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp) { GString *string = (GString *) userp; g_string_append_len(string, (char *) ptr, size * nmemb); return (size * nmemb); } gint rs_picasa_client_operation_error_popup(PicasaClient *picasa_client) { gdk_threads_enter (); GtkWidget *retry_dialog = gtk_dialog_new (); gtk_window_set_title ( GTK_WINDOW ( retry_dialog ), _ ( "Retry Operation?" ) ); gtk_container_set_border_width ( GTK_CONTAINER ( retry_dialog ), 10 ); gtk_dialog_set_has_separator ( GTK_DIALOG ( retry_dialog ), FALSE ); GtkWidget *vbox = GTK_DIALOG ( retry_dialog )->vbox; GtkWidget *textlabel = gtk_label_new ( _ ( "An error was returned when communicating with the Picasa web service:" ) ); gtk_label_set_line_wrap ( GTK_LABEL ( textlabel ), TRUE ); gtk_box_pack_start ( GTK_BOX ( vbox ), textlabel, TRUE, TRUE, 10 ); textlabel = gtk_label_new ( g_strdup ( picasa_client->curl_error_buffer ) ); gtk_label_set_line_wrap ( GTK_LABEL ( textlabel ), TRUE ); gtk_box_pack_start ( GTK_BOX ( vbox ), textlabel, TRUE, TRUE, 10 ); textlabel = gtk_label_new ( _ ( "Would you like to Retry the operation?" ) ); gtk_label_set_line_wrap ( GTK_LABEL ( textlabel ), TRUE ); gtk_box_pack_start ( GTK_BOX ( vbox ), textlabel, TRUE, TRUE, 10 ); GtkWidget *yesbutton = gtk_button_new_from_stock ( GTK_STOCK_YES ); GtkWidget *nobutton = gtk_button_new_from_stock ( GTK_STOCK_NO ); gtk_dialog_add_action_widget ( GTK_DIALOG ( retry_dialog ), yesbutton, GTK_RESPONSE_YES ); gtk_dialog_add_action_widget ( GTK_DIALOG ( retry_dialog ), nobutton, GTK_RESPONSE_NO ); gtk_widget_show_all ( retry_dialog ); gint response = gtk_dialog_run ( GTK_DIALOG ( retry_dialog ) ); gtk_widget_destroy ( retry_dialog ); gdk_threads_leave (); if ( response == GTK_RESPONSE_YES ) return PICASA_CLIENT_RETRY; return PICASA_CLIENT_ERROR; } gint handle_curl_code(PicasaClient *picasa_client, CURLcode result) { if (result != CURLE_OK) { return rs_picasa_client_operation_error_popup(picasa_client); } else { return PICASA_CLIENT_OK; } } gboolean rs_picasa_client_auth_popup(PicasaClient *picasa_client) { gdk_threads_enter (); GtkWidget *auth_dialog = gtk_dialog_new (); gtk_window_set_title (GTK_WINDOW (auth_dialog), _("Picasa Webalbum Authentification")); gtk_container_set_border_width (GTK_CONTAINER (auth_dialog), 4); gtk_dialog_set_has_separator (GTK_DIALOG (auth_dialog), FALSE); GtkWidget *vbox = GTK_DIALOG (auth_dialog)->vbox; GtkWidget *textlabel = gtk_label_new(_("Please type in your username and password for Picasa Web Albums.")); gtk_label_set_line_wrap (GTK_LABEL (textlabel), TRUE); gtk_box_pack_start (GTK_BOX (vbox), textlabel, TRUE, TRUE, 4); GtkWidget *table = gtk_table_new (2, 2, FALSE); GtkWidget *username = gtk_label_new (_("Username: ")); GtkWidget *password = gtk_label_new (_("Password: ")); GtkWidget *input_username = gtk_entry_new(); GtkWidget *input_password = gtk_entry_new(); gtk_entry_set_visibility(GTK_ENTRY(input_password), FALSE); GtkWidget *cancelbutton = gtk_button_new_from_stock (GTK_STOCK_CANCEL); GtkWidget *acceptbutton = gtk_button_new_from_stock (GTK_STOCK_GO_FORWARD); gtk_dialog_add_action_widget (GTK_DIALOG (auth_dialog), cancelbutton, GTK_RESPONSE_CANCEL); gtk_dialog_add_action_widget (GTK_DIALOG (auth_dialog), acceptbutton, GTK_RESPONSE_OK); gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 4); gtk_table_attach_defaults (GTK_TABLE (table), username, 0, 1, 0, 1); gtk_table_attach_defaults (GTK_TABLE (table), password, 0, 1, 1, 2); gtk_table_attach_defaults (GTK_TABLE (table), input_username, 1, 2, 0, 1); gtk_table_attach_defaults (GTK_TABLE (table), input_password, 1, 2, 1, 2); gtk_widget_show_all (auth_dialog); gint response = gtk_dialog_run (GTK_DIALOG (auth_dialog)); if (0 == gtk_entry_get_text_length(GTK_ENTRY(input_username)) || 0 == gtk_entry_get_text_length(GTK_ENTRY(input_password)) || response != GTK_RESPONSE_OK ) { gtk_widget_destroy (auth_dialog); gdk_threads_leave (); return FALSE; } picasa_client->auth_token = NULL; picasa_client->username = g_strdup(gtk_entry_get_text(GTK_ENTRY(input_username))); picasa_client->password = g_strdup(gtk_entry_get_text(GTK_ENTRY(input_password))); gtk_widget_destroy (auth_dialog); gdk_threads_leave (); return TRUE; } gboolean rs_picasa_client_auth(PicasaClient *picasa_client) { gint ret; /* Already authenticated? */ if (picasa_client->username && picasa_client->auth_token != NULL) return TRUE; /* do we have enough information? */ if (picasa_client->username == NULL || picasa_client->password == NULL) return FALSE; GString *data = g_string_new(NULL); struct curl_slist *header = NULL; GString *post_str = g_string_new(NULL); g_string_printf(post_str, "accountType=GOOGLE&Email=%s&Passwd=%s&service=lh2&source=Rawstudio", picasa_client->username, picasa_client->password); g_free(picasa_client->password); header = curl_slist_append(header, "Content-Type: application/x-www-form-urlencoded"); curl_easy_reset(picasa_client->curl); /* If we get less than 10 bytes in 30 seconds, time out */ curl_easy_setopt(picasa_client->curl, CURLOPT_LOW_SPEED_LIMIT, 10); curl_easy_setopt(picasa_client->curl, CURLOPT_LOW_SPEED_TIME, 30); curl_easy_setopt(picasa_client->curl, CURLOPT_ERRORBUFFER, picasa_client->curl_error_buffer); curl_easy_setopt(picasa_client->curl, CURLOPT_URL, PICASA_LOGIN_URL); curl_easy_setopt(picasa_client->curl, CURLOPT_POST, TRUE); curl_easy_setopt(picasa_client->curl, CURLOPT_POSTFIELDS, post_str->str); curl_easy_setopt(picasa_client->curl, CURLOPT_POSTFIELDSIZE, post_str->len); curl_easy_setopt(picasa_client->curl, CURLOPT_WRITEFUNCTION, write_callback); curl_easy_setopt(picasa_client->curl, CURLOPT_WRITEDATA, data); curl_easy_setopt(picasa_client->curl, CURLOPT_HTTPHEADER, header); #ifdef CURL_DEBUG curl_easy_setopt(picasa_client->curl, CURLOPT_VERBOSE, TRUE); #endif CURLcode result = curl_easy_perform(picasa_client->curl); ret = handle_curl_code(picasa_client, result); if (PICASA_CLIENT_ERROR == ret) return FALSE; if (PICASA_CLIENT_RETRY == ret) return rs_picasa_client_auth(picasa_client); /* To read values as GKeyFile we need a group */ data = g_string_prepend(data, "[PICASA]\n"); GKeyFile *kf = g_key_file_new(); g_key_file_load_from_data(kf, data->str, data->len, G_KEY_FILE_NONE, NULL); picasa_client->captcha_token = g_key_file_get_value(kf, "PICASA", "CaptchaToken", NULL); picasa_client->captcha_url = g_key_file_get_value(kf, "PICASA", "CaptchaUrl", NULL); if (picasa_client->captcha_token && picasa_client->captcha_url) { g_warning("Capcha required and not implemented yet..sorry :("); // FIXME: fetch captcha and let user re-authenticate - call this function again. g_free(picasa_client->captcha_token); g_free(picasa_client->captcha_url); return FALSE; } else { picasa_client->auth_token = g_key_file_get_value(kf, "PICASA", "Auth", NULL); } g_string_free(data, TRUE); g_string_free(post_str, TRUE); curl_slist_free_all(header); if (NULL == picasa_client->auth_token) return FALSE; return TRUE; } GtkListStore * rs_picasa_client_get_album_list(PicasaClient *picasa_client, GError **error) { gint ret; g_assert(picasa_client->auth_token != NULL); g_assert(picasa_client->username != NULL); GString *data = g_string_new(NULL); struct curl_slist *header = NULL; GString *url = g_string_new(NULL); g_string_printf(url, "%s/user/%s", PICASA_DATA_URL, picasa_client->username); GString *auth_string = g_string_new("Authorization: GoogleLogin auth="); auth_string = g_string_append(auth_string, picasa_client->auth_token); header = curl_slist_append(header, auth_string->str); curl_easy_reset(picasa_client->curl); /* If we get less than 10 bytes in 30 seconds, time out */ curl_easy_setopt(picasa_client->curl, CURLOPT_LOW_SPEED_LIMIT, 10); curl_easy_setopt(picasa_client->curl, CURLOPT_LOW_SPEED_TIME, 30); curl_easy_setopt(picasa_client->curl, CURLOPT_ERRORBUFFER, picasa_client->curl_error_buffer); curl_easy_setopt(picasa_client->curl, CURLOPT_URL, url->str); curl_easy_setopt(picasa_client->curl, CURLOPT_WRITEFUNCTION, write_callback); curl_easy_setopt(picasa_client->curl, CURLOPT_WRITEDATA, data); curl_easy_setopt(picasa_client->curl, CURLOPT_HTTPHEADER, header); #ifdef CURL_DEBUG curl_easy_setopt(picasa_client->curl, CURLOPT_VERBOSE, TRUE); #endif CURLcode result = curl_easy_perform(picasa_client->curl); ret = handle_curl_code(picasa_client, result); if (PICASA_CLIENT_RETRY == ret) return rs_picasa_client_get_album_list(picasa_client, error); else if (PICASA_CLIENT_ERROR == ret) return NULL; glong response_code; curl_easy_getinfo(picasa_client->curl, CURLINFO_RESPONSE_CODE, &response_code); ret = picasa_error(picasa_client, response_code, data, error); if (PICASA_CLIENT_OK == ret) return xml_album_list_response(data); else if (PICASA_CLIENT_RETRY == ret) return rs_picasa_client_get_album_list(picasa_client, error); return NULL; } gchar * rs_picasa_client_create_album(PicasaClient *picasa_client, const gchar *name, GError **error) { gint ret; gchar *body = g_strdup_printf(" %s

privatetrue%d000", name, (int) time(NULL)); g_assert(picasa_client->auth_token != NULL); g_assert(picasa_client->username != NULL); GString *data = g_string_new(NULL); struct curl_slist *header = NULL; GString *url = g_string_new(NULL); g_string_printf(url, "%s/user/%s", PICASA_DATA_URL, picasa_client->username); GString *auth_string = g_string_new("Authorization: GoogleLogin auth="); auth_string = g_string_append(auth_string, picasa_client->auth_token); header = curl_slist_append(header, auth_string->str); header = curl_slist_append(header, "Content-Type: application/atom+xml"); curl_easy_reset(picasa_client->curl); /* If we get less than 10 bytes in 30 seconds, time out */ curl_easy_setopt(picasa_client->curl, CURLOPT_LOW_SPEED_LIMIT, 10); curl_easy_setopt(picasa_client->curl, CURLOPT_LOW_SPEED_TIME, 30); curl_easy_setopt(picasa_client->curl, CURLOPT_ERRORBUFFER, picasa_client->curl_error_buffer); curl_easy_setopt(picasa_client->curl, CURLOPT_URL, url->str); curl_easy_setopt(picasa_client->curl, CURLOPT_WRITEFUNCTION, write_callback); curl_easy_setopt(picasa_client->curl, CURLOPT_WRITEDATA, data); curl_easy_setopt(picasa_client->curl, CURLOPT_HTTPHEADER, header); curl_easy_setopt(picasa_client->curl, CURLOPT_POST, TRUE); curl_easy_setopt(picasa_client->curl, CURLOPT_POSTFIELDS, body); curl_easy_setopt(picasa_client->curl, CURLOPT_POSTFIELDSIZE, strlen(body)); #ifdef CURL_DEBUG curl_easy_setopt(picasa_client->curl, CURLOPT_VERBOSE, TRUE); #endif CURLcode result = curl_easy_perform(picasa_client->curl); ret = handle_curl_code(picasa_client, result); if (PICASA_CLIENT_ERROR == ret) return NULL; else if (PICASA_CLIENT_RETRY == ret) return rs_picasa_client_create_album(picasa_client, name, error); glong response_code; curl_easy_getinfo(picasa_client->curl, CURLINFO_RESPONSE_CODE, &response_code); ret = picasa_error(picasa_client, response_code, data, error); if (PICASA_CLIENT_OK == ret) return xml_album_create_response(data); else if (PICASA_CLIENT_RETRY == ret) return rs_picasa_client_create_album(picasa_client, name, error); return NULL; } gboolean rs_picasa_client_upload_photo(PicasaClient *picasa_client, gchar *photo, gchar *input_name, gchar *albumid, GError **error) { gint ret; g_assert(picasa_client->auth_token != NULL); g_assert(picasa_client->username != NULL); GString *data = g_string_new(NULL); struct curl_slist *header = NULL; GString *url = g_string_new(NULL); g_string_printf(url, "%s/user/%s/albumid/%s", PICASA_DATA_URL, picasa_client->username, albumid); GString *auth_string = g_string_new("Authorization: GoogleLogin auth="); auth_string = g_string_append(auth_string, picasa_client->auth_token); gchar *contents; gsize length; g_file_get_contents(photo, &contents, &length, NULL); gchar *basename = g_path_get_basename(input_name); gchar *slug_name = g_strdup_printf("Slug: %s", basename); header = curl_slist_append(header, auth_string->str); header = curl_slist_append(header, "Content-Type: image/jpeg"); header = curl_slist_append(header, slug_name); curl_easy_reset(picasa_client->curl); curl_easy_setopt(picasa_client->curl, CURLOPT_ERRORBUFFER, picasa_client->curl_error_buffer); /* If we get less than 100 bytes in 30 seconds, time out */ curl_easy_setopt(picasa_client->curl, CURLOPT_LOW_SPEED_LIMIT, 100); curl_easy_setopt(picasa_client->curl, CURLOPT_LOW_SPEED_TIME, 30); curl_easy_setopt(picasa_client->curl, CURLOPT_URL, url->str); curl_easy_setopt(picasa_client->curl, CURLOPT_HTTPHEADER, header); curl_easy_setopt(picasa_client->curl, CURLOPT_POST, TRUE); curl_easy_setopt(picasa_client->curl, CURLOPT_POSTFIELDS, contents); curl_easy_setopt(picasa_client->curl, CURLOPT_POSTFIELDSIZE, (gint) length); curl_easy_setopt(picasa_client->curl, CURLOPT_WRITEFUNCTION, write_callback); curl_easy_setopt(picasa_client->curl, CURLOPT_WRITEDATA, data); #ifdef CURL_DEBUG curl_easy_setopt(picasa_client->curl, CURLOPT_VERBOSE, TRUE); #endif CURLcode result = curl_easy_perform(picasa_client->curl); g_free(basename); g_free(slug_name); ret = handle_curl_code(picasa_client, result); if (PICASA_CLIENT_ERROR == ret) return FALSE; else if (PICASA_CLIENT_RETRY == ret) return rs_picasa_client_upload_photo(picasa_client, photo, input_name, albumid, error); glong response_code; curl_easy_getinfo(picasa_client->curl, CURLINFO_RESPONSE_CODE, &response_code); ret = picasa_error(picasa_client, response_code, data, error); if (PICASA_CLIENT_OK == ret) return TRUE; else if (PICASA_CLIENT_RETRY == ret) return rs_picasa_client_upload_photo(picasa_client, photo, input_name, albumid, error); return FALSE; } PicasaClient * rs_picasa_client_init(void) { PicasaClient *picasa_client = g_malloc0(sizeof(PicasaClient)); picasa_client->curl = curl_easy_init(); curl_easy_setopt(picasa_client->curl, CURLOPT_ERRORBUFFER, picasa_client->curl_error_buffer); picasa_client->auth_token = rs_conf_get_string(CONF_PICASA_CLIENT_AUTH_TOKEN); picasa_client->username = rs_conf_get_string(CONF_PICASA_CLIENT_USERNAME); while (!rs_picasa_client_auth(picasa_client)) { if (!rs_picasa_client_auth_popup(picasa_client)) { /* Cancel pressed, or no info entered */ return NULL; } } /* Save information */ rs_conf_set_string(CONF_PICASA_CLIENT_AUTH_TOKEN, picasa_client->auth_token); rs_conf_set_string(CONF_PICASA_CLIENT_USERNAME, picasa_client->username); return picasa_client; } rawstudio-2.0/plugins/crop/0000755000175000017500000000000011547430074013026 500000000000000rawstudio-2.0/plugins/crop/Makefile.am0000644000175000017500000000070011526533643015002 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = crop.la libdir = $(datadir)/rawstudio/plugins/ crop_la_LIBADD = @PACKAGE_LIBS@ crop_la_LDFLAGS = -module -avoid-version crop_la_SOURCES = crop.c rawstudio-2.0/plugins/crop/Makefile.in0000644000175000017500000004172011547430035015014 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/crop DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) crop_la_DEPENDENCIES = am_crop_la_OBJECTS = crop.lo crop_la_OBJECTS = $(am_crop_la_OBJECTS) crop_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(crop_la_LDFLAGS) \ $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(crop_la_SOURCES) DIST_SOURCES = $(crop_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = crop.la crop_la_LIBADD = @PACKAGE_LIBS@ crop_la_LDFLAGS = -module -avoid-version crop_la_SOURCES = crop.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/crop/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/crop/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done crop.la: $(crop_la_OBJECTS) $(crop_la_DEPENDENCIES) $(crop_la_LINK) -rpath $(libdir) $(crop_la_OBJECTS) $(crop_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crop.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/crop/crop.c0000644000175000017500000002605111526533643014064 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 3 */ #include #include #define RS_TYPE_CROP (rs_crop_type) #define RS_CROP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_CROP, RSCrop)) #define RS_CROP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_CROP, RSCropClass)) #define RS_IS_CROP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_CROP)) typedef struct _RSCrop RSCrop; typedef struct _RSCropClass RSCropClass; struct _RSCrop { RSFilter parent; RS_RECT target; RS_RECT effective; gint width; gint height; gfloat scale; }; struct _RSCropClass { RSFilterClass parent_class; }; RS_DEFINE_FILTER(rs_crop, RSCrop) enum { PROP_0, PROP_RECTANGLE, PROP_X1, PROP_X2, PROP_Y1, PROP_Y2, PROP_EFFECTIVE_X1, PROP_EFFECTIVE_X2, PROP_EFFECTIVE_Y1, PROP_EFFECTIVE_Y2, PROP_WIDTH, PROP_HEIGHT }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static void calc(RSCrop *crop); static RSFilterResponse *get_image(RSFilter *filter, const RSFilterRequest *request); static RSFilterResponse *get_size(RSFilter *filter, const RSFilterRequest *request); static RSFilterClass *rs_crop_parent_class = NULL; G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { /* Let the GType system register our type */ rs_crop_get_type(G_TYPE_MODULE(plugin)); } static void rs_crop_class_init (RSCropClass *klass) { RSFilterClass *filter_class = RS_FILTER_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); rs_crop_parent_class = g_type_class_peek_parent (klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_RECTANGLE, g_param_spec_pointer ( "rectangle", "rectangle", "RS_RECT to crop", G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_X1, g_param_spec_int("x1", "x1", "x1", 0, 2147483647, 0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_Y1, g_param_spec_int("y1", "y1", "y1", 0, 2147483647, 0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_X2, g_param_spec_int("x2", "x2", "x2", 0, 2147483647, 0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_Y2, g_param_spec_int("y2", "y2", "y2", 0, 2147483647, 0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_EFFECTIVE_X1, g_param_spec_int("effective-x1", "effective-x1", "Effective x1", 0, 2147483647, 0, G_PARAM_READABLE) ); g_object_class_install_property(object_class, PROP_EFFECTIVE_Y1, g_param_spec_int("effective-y1", "effective-y1", "Effective y1", 0, 2147483647, 0, G_PARAM_READABLE) ); g_object_class_install_property(object_class, PROP_EFFECTIVE_X2, g_param_spec_int("effective-x2", "effective-x2", "Effective x2", 0, 2147483647, 0, G_PARAM_READABLE) ); g_object_class_install_property(object_class, PROP_EFFECTIVE_Y2, g_param_spec_int("effective-y2", "effective-y2", "Effective y2", 0, 2147483647, 0, G_PARAM_READABLE) ); g_object_class_install_property(object_class, PROP_WIDTH, g_param_spec_int("width", "width", "Width", 0, 2147483647, 0, G_PARAM_READABLE) ); g_object_class_install_property(object_class, PROP_HEIGHT, g_param_spec_int("height", "height", "Height", 0, 2147483647, 0, G_PARAM_READABLE) ); filter_class->name = "Crop filter"; filter_class->get_image = get_image; filter_class->get_size = get_size; } static void rs_crop_init (RSCrop *crop) { crop->target.x1 = 0; crop->target.x2 = 65535; crop->target.y1 = 0; crop->target.y2 = 65535; crop->scale = 1.0f; } static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSCrop *crop = RS_CROP(object); calc(crop); switch (property_id) { case PROP_RECTANGLE: g_value_set_pointer(value, &crop->target); break; case PROP_X1: g_value_set_int(value, crop->target.x1); break; case PROP_X2: g_value_set_int(value, crop->target.x2); break; case PROP_Y1: g_value_set_int(value, crop->target.y1); break; case PROP_Y2: g_value_set_int(value, crop->target.y2); break; case PROP_EFFECTIVE_X1: g_value_set_int(value, crop->effective.x1); break; case PROP_EFFECTIVE_X2: g_value_set_int(value, crop->effective.x2); break; case PROP_EFFECTIVE_Y1: g_value_set_int(value, crop->effective.y1); break; case PROP_EFFECTIVE_Y2: g_value_set_int(value, crop->effective.y2); break; case PROP_WIDTH: g_value_set_int(value, crop->width); break; case PROP_HEIGHT: g_value_set_int(value, crop->height); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSCrop *crop = RS_CROP(object); RSFilter *filter = RS_FILTER(crop); RS_RECT *rect; int n; switch (property_id) { case PROP_RECTANGLE: rect = g_value_get_pointer(value); if (rect) { if (crop->target.x1 != rect->x1 || crop->target.x2 != rect->x2 || crop->target.y1 != rect->y1 || crop->target.y2 != rect->y2) { crop->target = *rect; rs_filter_changed(filter, RS_FILTER_CHANGED_DIMENSION); } } else { if (crop->target.x1 != 0 || crop->target.x2 != 65535 || crop->target.y1 != 0 || crop->target.y2 != 65535) { crop->target.x1 = 0; crop->target.x2 = 65535; crop->target.y1 = 0; crop->target.y2 = 65535; rs_filter_changed(filter, RS_FILTER_CHANGED_DIMENSION); } } break; case PROP_X1: n = g_value_get_int(value); if (n != crop->target.x1) { rs_filter_changed(filter, RS_FILTER_CHANGED_DIMENSION); crop->target.x1 = n; } break; case PROP_Y1: n = g_value_get_int(value); if (n != crop->target.y1) { rs_filter_changed(filter, RS_FILTER_CHANGED_DIMENSION); crop->target.y1 = n; } break; case PROP_X2: n = g_value_get_int(value); if (n != crop->target.x2) { rs_filter_changed(filter, RS_FILTER_CHANGED_DIMENSION); crop->target.x2 = n; } break; case PROP_Y2: n = g_value_get_int(value); if (n != crop->target.y2) { rs_filter_changed(filter, RS_FILTER_CHANGED_DIMENSION); crop->target.y2 = n; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void calc(RSCrop *crop) { RSFilter *filter = RS_FILTER(crop); if (!filter->previous) return; crop->scale = 1.0f; rs_filter_get_recursive(RS_FILTER(crop), "scale", &crop->scale, NULL); RSFilterResponse *response = rs_filter_get_size(filter->previous, RS_FILTER_REQUEST_QUICK); gint parent_width = rs_filter_response_get_width(response); gint parent_height = rs_filter_response_get_height(response); g_object_unref(response); crop->effective.x1 = CLAMP((float)crop->target.x1 * crop->scale + 0.5f, 0, parent_width-1); crop->effective.x2 = CLAMP((float)crop->target.x2 * crop->scale + 0.5f, 0, parent_width-1); crop->effective.y1 = CLAMP((float)crop->target.y1 * crop->scale + 0.5f, 0, parent_height-1); crop->effective.y2 = CLAMP((float)crop->target.y2 * crop->scale + 0.5f, 0, parent_height-1); crop->width = crop->effective.x2 - crop->effective.x1 + 1; crop->height = crop->effective.y2 - crop->effective.y1 + 1; } static RSFilterResponse * get_image(RSFilter *filter, const RSFilterRequest *request) { g_assert(RS_IS_FILTER(filter)); RSCrop *crop = RS_CROP(filter); RSFilterResponse *previous_response; RSFilterResponse *response; RS_IMAGE16 *output; RS_IMAGE16 *input; gint row; /* We request response twice, is that wise? */ response = rs_filter_get_size(filter->previous, request); gint parent_width = rs_filter_response_get_width(response); gint parent_height = rs_filter_response_get_height(response); g_object_unref(response); calc(crop); /* Special case for full crop */ if ((crop->width == parent_width) && (crop->height==parent_height)) return rs_filter_get_image(filter->previous, request); /* Add ROI for cropped region */ if (!rs_filter_request_get_roi(request)) { GdkRectangle* roi = g_new(GdkRectangle, 1); roi->x = crop->effective.x1; roi->y = crop->effective.y1; roi->width = crop->width; roi->height = crop->height; RSFilterRequest *new_request = rs_filter_request_clone(request); rs_filter_request_set_roi(new_request, roi); previous_response = rs_filter_get_image(filter->previous, new_request); g_free(roi); g_object_unref(new_request); } else { /* Add crop to ROI */ GdkRectangle* org_roi = rs_filter_request_get_roi(request); GdkRectangle* roi = g_new(GdkRectangle, 1); roi->x = org_roi->x + crop->effective.x1; roi->y = org_roi->y + crop->effective.y1; roi->width = MIN(org_roi->width, crop->width - org_roi->x); roi->height = MIN(org_roi->height, crop->height - org_roi->y); RSFilterRequest *new_request = rs_filter_request_clone(request); rs_filter_request_set_roi(new_request, roi); previous_response = rs_filter_get_image(filter->previous, new_request); g_free(roi); g_object_unref(new_request); } input = rs_filter_response_get_image(previous_response); if (!RS_IS_IMAGE16(input)) return previous_response; response = rs_filter_response_clone(previous_response); gboolean half_size = FALSE; rs_filter_param_get_boolean(RS_FILTER_PARAM(previous_response), "half-size", &half_size); g_object_unref(previous_response); int shift = half_size ? 1 : 0; output = rs_image16_new(crop->width>>shift, crop->height>>shift, 3, input->pixelsize); rs_filter_response_set_image(response, output); g_object_unref(output); /* Copy a row at a time */ for(row=0; rowh; row++) memcpy(GET_PIXEL(output, 0, row), GET_PIXEL(input, crop->effective.x1>>shift, row+(crop->effective.y1>>shift)), output->rowstride*sizeof(gushort)); g_object_unref(input); return response; } static RSFilterResponse * get_size(RSFilter *filter, const RSFilterRequest *request) { RSCrop *crop = RS_CROP(filter); calc(crop); RSFilterResponse *previous_response = rs_filter_get_size(filter->previous, request); RSFilterResponse *response = rs_filter_response_clone(previous_response); g_object_unref(previous_response); rs_filter_response_set_width(response, crop->width); rs_filter_response_set_height(response, crop->height); return response; } rawstudio-2.0/plugins/meta-exiv2/0000755000175000017500000000000011547430075014045 500000000000000rawstudio-2.0/plugins/meta-exiv2/exiv2-meta.c0000644000175000017500000000317511531305646016116 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include "exiv2-metadata.h" static gboolean exiv2_load_meta(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta) { return exiv2_load_meta_interface(service, rawfile, offset, meta); } G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_filetype_register_meta_loader(".jpg", "8 bit JPEG File", exiv2_load_meta, 100, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".jpeg", "8 bit JPEG File", exiv2_load_meta, 100, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".png", "PNG File", exiv2_load_meta, 100, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".tiff", "TIFF File", exiv2_load_meta, 100, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".tif", "TIFF File", exiv2_load_meta, 100, RS_LOADER_FLAGS_RAW); } rawstudio-2.0/plugins/meta-exiv2/Makefile.am0000644000175000017500000000100211531305646016010 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = meta_exiv2.la libdir = $(datadir)/rawstudio/plugins/ meta_exiv2_la_LIBADD = @PACKAGE_LIBS@ meta_exiv2_la_LDFLAGS = -module -avoid-version meta_exiv2_la_SOURCES = exiv2-meta.c exiv2-metadata.cpp exiv2-metadata.h rawstudio-2.0/plugins/meta-exiv2/exiv2-metadata.h0000644000175000017500000000245311531305646016753 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 exiv2_metadata_h__ #define exiv2_metadata_h__ #include #ifdef _unix_ G_BEGIN_DECLS #endif #ifdef __cplusplus /* If this is a C++ compiler, use C linkage */ extern "C" { #endif extern gboolean exiv2_load_meta_interface(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta); #ifdef _unix_ G_END_DECLS #endif #ifdef __cplusplus /* If this is a C++ compiler, end C linkage */ } #endif #endif // exiv2_metadata_h__ rawstudio-2.0/plugins/meta-exiv2/exiv2-metadata.cpp0000644000175000017500000002205711532304443017303 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include #include #include #include "exiv2-metadata.h" #include #ifndef EXIV2_TEST_VERSION # define EXIV2_TEST_VERSION(major,minor,patch) \ ( EXIV2_VERSION >= EXIV2_MAKE_VERSION((major),(minor),(patch)) ) #endif #if EXIV2_TEST_VERSION(0,17,0) #include #endif #if EXIV2_TEST_VERSION(0,19,0) #include #endif extern "C" { /** INTERFACE **/ using namespace Exiv2; static void set_metadata_maker(std::string maker, RSMetadata *meta) { meta->make_ascii = rs_remove_tailing_spaces(g_strdup(maker.c_str()), TRUE); if (g_ascii_strncasecmp(meta->make_ascii, "Canon",5)) meta->make = MAKE_CANON; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "CASIO", 5)) meta->make = MAKE_CASIO; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "Hasselblad", 10)) meta->make = MAKE_HASSELBLAD; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "KODAK", 5)) meta->make = MAKE_KODAK; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "EASTMAN KODAK", 13)) meta->make = MAKE_KODAK; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "Leica", 5)) meta->make = MAKE_LEICA; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "Minolta", 7)) meta->make = MAKE_MINOLTA; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "KONICA MINOLTA", 14)) meta->make = MAKE_MINOLTA; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "Mamiya", 6)) meta->make = MAKE_MAMIYA; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "NIKON", 5)) meta->make = MAKE_NIKON; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "OLYMPUS", 7)) meta->make = MAKE_OLYMPUS; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "Panasonic", 9)) meta->make = MAKE_PANASONIC; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "PENTAX", 6)) meta->make = MAKE_PENTAX; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "Phase One", 9)) meta->make = MAKE_PHASEONE; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "Ricoh", 5)) meta->make = MAKE_RICOH; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "SAMSUNG", 7)) meta->make = MAKE_SAMSUNG; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "SONY", 7)) meta->make = MAKE_SONY; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "FUJIFILM", 4)) meta->make = MAKE_FUJIFILM; else if (0 == g_ascii_strncasecmp(meta->make_ascii, "SEIKO EPSON", 11)) meta->make = MAKE_EPSON; } gboolean exiv2_load_meta_interface(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta) { try { Image::AutoPtr img = ImageFactory::open((byte*)raw_get_map(rawfile), raw_get_filesize(rawfile)); img->readMetadata(); ExifData &exifData = img->exifData(); #if EXIV2_TEST_VERSION(0,17,0) /* We perfer XMP data, so copy it to EXIF */ XmpData &xmpData = img->xmpData(); if (!xmpData.empty()) copyXmpToExif(xmpData, exifData); #endif /* Parse Exif Data */ if (!exifData.empty()) { ExifData::const_iterator i; i = exifData.findKey(ExifKey("Exif.Image.Make")); if (i != exifData.end()) set_metadata_maker(i->toString(), meta); i = exifData.findKey(ExifKey("Exif.Image.Model")); if (i != exifData.end()) meta->model_ascii = g_strdup(i->toString().c_str()); #if EXIV2_TEST_VERSION(0,19,0) i = orientation(exifData); if (i != exifData.end()) { switch (i->getValue()->toLong()) { case 6: meta->orientation = 90; break; case 8: meta->orientation = 270; break; } } #endif i = exifData.findKey(ExifKey("Exif.Image.DateTimeOriginal")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.Image.DateTime")); if (i != exifData.end()) { meta->time_ascii = g_strdup(i->toString().c_str()); meta->timestamp = rs_exiftime_to_unixtime(meta->time_ascii); } i = exifData.findKey(ExifKey("Exif.Image.ExposureTime")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.Photo.ExposureTime")); if (i != exifData.end()) meta->shutterspeed = 1.0 / i->getValue()->toFloat(); else { i = exifData.findKey(ExifKey("Exif.Image.ShutterSpeedValue")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.Photo.ShutterSpeedValue")); if (i != exifData.end()) meta->shutterspeed = 1.0 / i->toFloat(); } i = exifData.findKey(ExifKey("Exif.Image.FNumber")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.Photo.FNumber")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.Image.ApertureValue")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.Photo.ApertureValue")); if (i != exifData.end()) meta->aperture = i->toFloat(); i = exifData.findKey(ExifKey("Exif.Image.FocalLength")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.Photo.FocalLength")); if (i != exifData.end()) meta->focallength = i->toFloat()-0.01; #if EXIV2_TEST_VERSION(0,19,0) i = isoSpeed(exifData); if (i != exifData.end()) meta->iso = i->toLong(); /* Text based Lens Identifier */ i = lensName(exifData); if (i != exifData.end()) { TypeId type = i->typeId(); if (type == unsignedShort || type == unsignedLong || type == signedShort || type == signedLong || type == unsignedByte || type == signedByte) meta->lens_id = i->toLong(); else if (type == asciiString || type == string) meta->fixed_lens_identifier = g_strdup(i->toString().c_str()); } #endif /* Canon*/ i = exifData.findKey(ExifKey("Exif.CanonCs.Lens")); if (i != exifData.end() && i->value().count() >= 3 && i->value().typeId() == unsignedShort) { float fu = i->value().toFloat(2); if (fu != 0.0) { meta->lens_min_focal = i->toFloat(0) / fu; meta->lens_max_focal = i->toFloat(1) /fu; } } i = exifData.findKey(ExifKey("Exif.CanonCs.MinAperture")); if (i != exifData.end()) meta->lens_min_aperture = (gfloat) exp(CanonEv(i->toFloat())*log(2)/2); i = exifData.findKey(ExifKey("Exif.CanonCs.MaxAperture")); if (i != exifData.end()) meta->lens_max_aperture = (gfloat) exp(CanonEv(i->toFloat())*log(2)/2); /* Olympus */ i = exifData.findKey(ExifKey("Exif.OlympusEq.MinFocalLength")); if (i != exifData.end()) meta->lens_min_focal = i->toFloat(); i = exifData.findKey(ExifKey("Exif.OlympusEq.MaxFocalLength")); if (i != exifData.end()) meta->lens_max_focal = i->toFloat(); /* Nikon */ i = exifData.findKey(ExifKey("Exif.NikonLd1.MinFocalLength")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.NikonLd2.MinFocalLength")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.NikonLd3.MinFocalLength")); if (i != exifData.end()) meta->lens_min_focal = 5.0 * pow(2.0, i->toLong()/24.0); i = exifData.findKey(ExifKey("Exif.NikonLd1.MaxFocalLength")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.NikonLd2.MaxFocalLength")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.NikonLd3.MaxFocalLength")); if (i != exifData.end()) meta->lens_max_focal = 5.0 * pow(2.0, i->toLong()/24.0); i = exifData.findKey(ExifKey("Exif.NikonLd1.MaxApertureAtMinFocal")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.NikonLd2.MaxApertureAtMinFocal")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.NikonLd3.MaxApertureAtMinFocal")); if (i != exifData.end()) meta->lens_min_aperture = i->toLong()/12.0; i = exifData.findKey(ExifKey("Exif.NikonLd1.MaxApertureAtMaxFocal")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.NikonLd2.MaxApertureAtMaxFocal")); if (i == exifData.end()) i = exifData.findKey(ExifKey("Exif.NikonLd3.MaxApertureAtMaxFocal")); if (i != exifData.end()) meta->lens_max_aperture = i->toLong()/12.0; /* Fuji */ i = exifData.findKey(ExifKey("Exif.Fujifilm.MinFocalLength")); if (i != exifData.end()) meta->lens_min_focal = i->toFloat(); i = exifData.findKey(ExifKey("Exif.Fujifilm.MaxFocalLength")); if (i != exifData.end()) meta->lens_max_focal = i->toFloat(); return TRUE; } } catch (Exiv2::Error& e) { g_debug("Exiv2 Metadata Loader:'%s'", e.what()); } return FALSE; } /** END INTERFACE **/ } // extern "C" rawstudio-2.0/plugins/meta-exiv2/Makefile.in0000644000175000017500000004560311547430040016032 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/meta-exiv2 DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) meta_exiv2_la_DEPENDENCIES = am_meta_exiv2_la_OBJECTS = exiv2-meta.lo exiv2-metadata.lo meta_exiv2_la_OBJECTS = $(am_meta_exiv2_la_OBJECTS) meta_exiv2_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(meta_exiv2_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(meta_exiv2_la_SOURCES) DIST_SOURCES = $(meta_exiv2_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = meta_exiv2.la meta_exiv2_la_LIBADD = @PACKAGE_LIBS@ meta_exiv2_la_LDFLAGS = -module -avoid-version meta_exiv2_la_SOURCES = exiv2-meta.c exiv2-metadata.cpp exiv2-metadata.h all: all-am .SUFFIXES: .SUFFIXES: .c .cpp .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/meta-exiv2/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/meta-exiv2/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done meta_exiv2.la: $(meta_exiv2_la_OBJECTS) $(meta_exiv2_la_DEPENDENCIES) $(meta_exiv2_la_LINK) -rpath $(libdir) $(meta_exiv2_la_OBJECTS) $(meta_exiv2_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exiv2-meta.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exiv2-metadata.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cpp.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/resample/0000755000175000017500000000000011547430076013675 500000000000000rawstudio-2.0/plugins/resample/Makefile.am0000644000175000017500000000144011526533643015651 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = resample.la libdir = $(datadir)/rawstudio/plugins/ resample_la_LIBADD = @PACKAGE_LIBS@ resample-sse2.lo resample-c.lo resample_la_LDFLAGS = -module -avoid-version resample_la_SOURCES = EXTRA_DIST = resample-sse2.c resample.c resample-c.lo: resample.c $(LTCOMPILE) -o resample-c.o -c $(top_srcdir)/plugins/resample/resample.c resample-sse2.lo: resample-sse2.c if CAN_COMPILE_SSE2 SSE_FLAG=-msse2 else SSE_FLAG= endif $(LTCOMPILE) $(SSE_FLAG) -c $(top_srcdir)/plugins/resample/resample-sse2.c rawstudio-2.0/plugins/resample/resample.c0000644000175000017500000006343611543674627015615 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 4 */ #include #include #include /*memcpy */ #define RS_TYPE_RESAMPLE (rs_resample_type) #define RS_RESAMPLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_RESAMPLE, RSResample)) #define RS_RESAMPLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_RESAMPLE, RSResampleClass)) #define RS_IS_RESAMPLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_RESAMPLE)) typedef struct _RSResample RSResample; typedef struct _RSResampleClass RSResampleClass; struct _RSResample { RSFilter parent; gint target_width; gint target_height; gint new_width; gint new_height; gfloat scale; gboolean bounding_box; gboolean never_quick; }; struct _RSResampleClass { RSFilterClass parent_class; }; typedef struct { RS_IMAGE16 *input; /* Input Image to Resampler */ RS_IMAGE16 *output; /* Output Image from Resampler */ guint old_size; /* Old dimension in the direction of the resampler*/ guint new_size; /* New size in the direction of the resampler */ guint dest_offset_other; /* Where in the unchanged direction should we begin writing? */ guint dest_end_other; /* Where in the unchanged direction should we stop writing? */ guint (*resample_support)(void); gfloat (*resample_func)(gfloat); GThread *threadid; gboolean use_compatible; /* Use compatible resampler if pixelsize != 4 */ gboolean use_fast; /* Use nearest neighbour resampler, also compatible*/ } ResampleInfo; RS_DEFINE_FILTER(rs_resample, RSResample) enum { PROP_0, PROP_WIDTH, PROP_HEIGHT, PROP_BOUNDING_BOX, PROP_NEVER_QUICK, PROP_SCALE }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static void previous_changed(RSFilter *filter, RSFilter *parent, RSFilterChangedMask mask); static RSFilterChangedMask recalculate_dimensions(RSResample *resample); static RSFilterResponse *get_image(RSFilter *filter, const RSFilterRequest *request); static RSFilterResponse *get_size(RSFilter *filter, const RSFilterRequest *request); static void ResizeH(ResampleInfo *info); void ResizeV(ResampleInfo *info); extern void ResizeV_SSE2(ResampleInfo *info); static void ResizeH_compatible(ResampleInfo *info); static void ResizeV_compatible(ResampleInfo *info); static void ResizeH_fast(ResampleInfo *info); void ResizeV_fast(ResampleInfo *info); static RSFilterClass *rs_resample_parent_class = NULL; static inline guint clampbits(gint x, guint n) { guint32 _y_temp; if( (_y_temp=x>>n) ) x = ~_y_temp >> (32-n); return x;} G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_resample_get_type(G_TYPE_MODULE(plugin)); } static void rs_resample_class_init(RSResampleClass *klass) { RSFilterClass *filter_class = RS_FILTER_CLASS (klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); rs_resample_parent_class = g_type_class_peek_parent (klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_WIDTH, g_param_spec_int( "width", "width", "The width of the scaled image", 6, 65535, 100, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_HEIGHT, g_param_spec_int( "height", "height", "The height of the scaled image", 6, 65535, 100, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_BOUNDING_BOX, g_param_spec_boolean( "bounding-box", "bounding-box", "Use width/height as a bounding box", FALSE, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_SCALE, g_param_spec_float( "scale", "scale", "The expected scaling factor in bounding box mode", 0.0, 100.0, 1.0, G_PARAM_READABLE) ); g_object_class_install_property(object_class, PROP_NEVER_QUICK, g_param_spec_boolean( "never-quick", "never-quick", "Never use quick function, even if allowed by request", FALSE, G_PARAM_READWRITE) ); filter_class->name = "Resample filter"; filter_class->get_image = get_image; filter_class->get_size = get_size; filter_class->previous_changed = previous_changed; } static void rs_resample_init(RSResample *resample) { resample->target_width = -1; resample->target_height = -1; resample->new_width = -1; resample->new_height = -1; resample->bounding_box = FALSE; resample->scale = 1.0; resample->never_quick = FALSE; } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSResample *resample = RS_RESAMPLE(object); switch (property_id) { case PROP_WIDTH: g_value_set_int(value, resample->target_width); break; case PROP_HEIGHT: g_value_set_int(value, resample->target_height); break; case PROP_BOUNDING_BOX: g_value_set_boolean(value, resample->bounding_box); break; case PROP_NEVER_QUICK: g_value_set_boolean(value, resample->never_quick); break; case PROP_SCALE: g_value_set_float(value, resample->scale); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSResample *resample = RS_RESAMPLE(object); RSFilterChangedMask mask = 0; switch (property_id) { case PROP_WIDTH: if (g_value_get_int(value) != resample->target_width) { resample->target_width = g_value_get_int(value); mask |= recalculate_dimensions(resample); } break; case PROP_HEIGHT: if (g_value_get_int(value) != resample->target_height) { resample->target_height = g_value_get_int(value); mask |= recalculate_dimensions(resample); } break; case PROP_BOUNDING_BOX: if (g_value_get_boolean(value) != resample->bounding_box) { resample->bounding_box = g_value_get_boolean(value); mask |= recalculate_dimensions(resample); } break; case PROP_NEVER_QUICK: if (g_value_get_boolean(value) != resample->never_quick) { resample->never_quick = g_value_get_boolean(value); mask |= RS_FILTER_CHANGED_PIXELDATA; } break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } if (mask) rs_filter_changed(RS_FILTER(object), mask); } static void previous_changed(RSFilter *filter, RSFilter *parent, RSFilterChangedMask mask) { if (mask & RS_FILTER_CHANGED_DIMENSION) mask |= recalculate_dimensions(RS_RESAMPLE(filter)); rs_filter_changed(filter, mask); } static RSFilterChangedMask recalculate_dimensions(RSResample *resample) { RSFilterChangedMask mask = 0; gint new_width, new_height; gint previous_width = 0; gint previous_height = 0; if (RS_FILTER(resample)->previous) rs_filter_get_size_simple(RS_FILTER(resample)->previous, RS_FILTER_REQUEST_QUICK, &previous_width, &previous_height); if (resample->bounding_box && RS_FILTER(resample)->previous) { new_width = previous_width; new_height = previous_height; rs_constrain_to_bounding_box(resample->target_width, resample->target_height, &new_width, &new_height); resample->scale = ((((gfloat) new_width)/ previous_width) + (((gfloat) new_height)/ previous_height))/2.0; } else { new_width = resample->target_width; new_height = resample->target_height; if (RS_FILTER(resample)->previous) { if (previous_width > 0 && previous_height > 0) resample->scale = MIN((gfloat)new_width / previous_width, (gfloat)new_height / previous_height); else resample->scale = 1.0f; } else { resample->scale = 1.0f; } } if ((new_width != resample->new_width) || (new_height != resample->new_height)) { resample->new_width = new_width; resample->new_height = new_height; mask |= RS_FILTER_CHANGED_DIMENSION; } return mask; } static inline void bit_blt(char* dstp, int dst_pitch, const char* srcp, int src_pitch, int row_size, int height) { if (height == 1 || (dst_pitch == src_pitch && src_pitch == row_size)) { memcpy(dstp, srcp, row_size*height); return; } int y; for (y = height; y > 0; --y) { memcpy(dstp, srcp, row_size); dstp += dst_pitch; srcp += src_pitch; } } gpointer start_thread_resampler(gpointer _thread_info) { ResampleInfo* t = _thread_info; if (!t->input) { g_debug("Resampler: input is NULL"); g_thread_exit(NULL); return NULL; } if (!t->output) { g_debug("Resampler: output is NULL"); g_thread_exit(NULL); return NULL; } if (t->input->h != t->output->h) { gboolean sse2_available = !!(rs_detect_cpu_features() & RS_CPU_FLAG_SSE2); if (t->use_fast) ResizeV_fast(t); else if (t->use_compatible) ResizeV_compatible(t); else if (sse2_available) ResizeV_SSE2(t); else ResizeV(t); } else if (t->input->w != t->output->w) { if (t->use_fast) ResizeH_fast(t); else if (t->use_compatible) ResizeH_compatible(t); else ResizeH(t); } /* Unchanged in both directions, have thread 0 copy all the image */ else if (t->dest_offset_other == 0) bit_blt((char*)GET_PIXEL(t->output,0,0), t->output->rowstride * 2, (const char*)GET_PIXEL(t->input,0,0), t->input->rowstride * 2, t->input->rowstride * 2, t->input->h); g_thread_exit(NULL); return NULL; /* Make the compiler shut up - we'll never return */ } static RSFilterResponse * get_image(RSFilter *filter, const RSFilterRequest *request) { gboolean use_fast = FALSE; RSResample *resample = RS_RESAMPLE(filter); RSFilterResponse *previous_response; RSFilterResponse *response; RS_IMAGE16 *afterVertical; RS_IMAGE16 *input; RS_IMAGE16 *output = NULL; gint input_width; gint input_height; rs_filter_get_size_simple(filter->previous, request, &input_width, &input_height); /* Return the input, if the new size is uninitialized */ if ((resample->new_width == -1) || (resample->new_height == -1)) return rs_filter_get_image(filter->previous, request); /* Simply return the input, if we don't scale */ if ((input_width == resample->new_width) && (input_height == resample->new_height)) return rs_filter_get_image(filter->previous, request); /* Remove ROI, it doesn't make sense across resampler */ if (rs_filter_request_get_roi(request)) { RSFilterRequest *new_request = rs_filter_request_clone(request); rs_filter_request_set_roi(new_request, NULL); previous_response = rs_filter_get_image(filter->previous, new_request); g_object_unref(new_request); } else previous_response = rs_filter_get_image(filter->previous, request); input = rs_filter_response_get_image(previous_response); if (!RS_IS_IMAGE16(input)) return previous_response; input_width = input->w; input_height = input->h; response = rs_filter_response_clone(previous_response); g_object_unref(previous_response); previous_response = NULL; /* Use compatible (and slow) version if input isn't 3 channels and pixelsize 4 */ gboolean use_compatible = ( ! ( input->pixelsize == 4 && input->channels == 3)); if (!resample->never_quick && rs_filter_request_get_quick(request)) { use_fast = TRUE; rs_filter_response_set_quick(response); } if (input_width < 32 || input_height < 32) use_compatible = TRUE; guint threads = rs_get_number_of_processor_cores(); ResampleInfo* h_resample = g_new(ResampleInfo, threads); ResampleInfo* v_resample = g_new(ResampleInfo, threads); /* Create intermediate and output images*/ afterVertical = rs_image16_new(input_width, resample->new_height, input->channels, input->pixelsize); // Only even count guint output_x_per_thread = ((input_width + threads - 1 ) / threads ); while (((output_x_per_thread * input->pixelsize) & 15) != 0) output_x_per_thread++; guint output_x_offset = 0; guint i; for (i = 0; i < threads; i++) { /* Set info for Vertical resampler */ ResampleInfo *v = &v_resample[i]; v->input = input; v->output = afterVertical; v->old_size = input_height; v->new_size = resample->new_height; v->dest_offset_other = output_x_offset; v->dest_end_other = MIN(output_x_offset + output_x_per_thread, input_width); v->use_compatible = use_compatible; v->use_fast = use_fast; /* Start it up */ v->threadid = g_thread_create(start_thread_resampler, v, TRUE, NULL); /* Update offset */ output_x_offset = v->dest_end_other; } /* Wait for vertical threads to finish */ for(i = 0; i < threads; i++) g_thread_join(v_resample[i].threadid); /* input no longer needed */ g_object_unref(input); input = NULL; /* create output */ output = rs_image16_new(resample->new_width, resample->new_height, afterVertical->channels, afterVertical->pixelsize); guint input_y_offset = 0; guint input_y_per_thread = (resample->new_height+threads-1) / threads; for (i = 0; i < threads; i++) { /* Set info for Horizontal resampler */ ResampleInfo *h = &h_resample[i]; h->input = afterVertical; h->output = output; h->old_size = input_width; h->new_size = resample->new_width; h->dest_offset_other = input_y_offset; h->dest_end_other = MIN(input_y_offset+input_y_per_thread, resample->new_height); h->use_compatible = use_compatible; h->use_fast = use_fast; /* Start it up */ h->threadid = g_thread_create(start_thread_resampler, h, TRUE, NULL); /* Update offset */ input_y_offset = h->dest_end_other; } /* Wait for horizontal threads to finish */ for(i = 0; i < threads; i++) g_thread_join(h_resample[i].threadid); /* Clean up */ g_free(h_resample); g_free(v_resample); g_object_unref(afterVertical); rs_filter_response_set_image(response, output); rs_filter_param_set_boolean(RS_FILTER_PARAM(response), "half-size", FALSE); g_object_unref(output); return response; } static RSFilterResponse * get_size(RSFilter *filter, const RSFilterRequest *request) { RSResample *resample = RS_RESAMPLE(filter); RSFilterResponse *previous_response = rs_filter_get_size(filter->previous, request); if ((resample->new_width == -1) || (resample->new_height == -1)) return previous_response; RSFilterResponse *response = rs_filter_response_clone(previous_response); g_object_unref(previous_response); rs_filter_response_set_width(response, resample->new_width); rs_filter_response_set_height(response, resample->new_height); return response; } static guint lanczos_taps(void) { return 3; } static gfloat sinc(gfloat value) { if (value != 0.0f) { value *= M_PI; return sinf(value) / value; } else return 1.0f; } static gfloat lanczos_weight(gfloat value) { value = fabsf(value); if (value < lanczos_taps()) { return (sinc(value) * sinc(value / lanczos_taps())); } else return 0.0f; } const static gint FPScale = 16384; /* fixed point scaler */ const static gint FPScaleShift = 14; /* fixed point scaler */ static void ResizeH(ResampleInfo *info) { const RS_IMAGE16 *input = info->input; const RS_IMAGE16 *output = info->output; const guint old_size = info->old_size; const guint new_size = info->new_size; gfloat pos_step = ((gfloat) old_size) / ((gfloat)new_size); gfloat filter_step = MIN(1.0 / pos_step, 1.0); gfloat filter_support = (gfloat) lanczos_taps() / filter_step; gint fir_filter_size = (gint) (ceil(filter_support*2)); if (old_size <= fir_filter_size) return ResizeH_fast(info); gint *weights = g_new(gint, new_size * fir_filter_size); gint *offsets = g_new(gint, new_size); gfloat pos = 0.0f; gint i,j,k; for (i=0; i old_size-1) end_pos = old_size-1; gint start_pos = end_pos - fir_filter_size + 1; if (start_pos < 0) start_pos = 0; offsets[i] = start_pos * 4; /* the following code ensures that the coefficients add to exactly FPScale */ gfloat total = 0.0; /* Ensure that we have a valid position */ gfloat ok_pos = MAX(0.0,MIN(old_size-1,pos)); for (j=0; j 0.0f); gfloat total2 = 0.0; for (k=0; kpixelsize == 4); g_assert(input->channels == 3); guint y,x; for (y = info->dest_offset_other; y < info->dest_end_other ; y++) { gushort *in_line = GET_PIXEL(input, 0, y); gushort *out = GET_PIXEL(output, 0, y); gint *wg = weights; for (x = 0; x < new_size; x++) { guint i; gushort *in = &in_line[offsets[x]]; gint acc1 = 0; gint acc2 = 0; gint acc3 = 0; for (i = 0; i >FPScaleShift, 16); out[x*4+1] = clampbits((acc2 + (FPScale/2))>>FPScaleShift, 16); out[x*4+2] = clampbits((acc3 + (FPScale/2))>>FPScaleShift, 16); } } g_free(weights); g_free(offsets); } void ResizeV(ResampleInfo *info) { const RS_IMAGE16 *input = info->input; const RS_IMAGE16 *output = info->output; const guint old_size = info->old_size; const guint new_size = info->new_size; const guint start_x = info->dest_offset_other; const guint end_x = info->dest_end_other; gfloat pos_step = ((gfloat) old_size) / ((gfloat)new_size); gfloat filter_step = MIN(1.0 / pos_step, 1.0); gfloat filter_support = (gfloat) lanczos_taps() / filter_step; gint fir_filter_size = (gint) (ceil(filter_support*2)); if (old_size <= fir_filter_size) return ResizeV_fast(info); gint *weights = g_new(gint, new_size * fir_filter_size); gint *offsets = g_new(gint, new_size); gfloat pos = 0.0; gint i,j,k; for (i=0; i old_size-1) end_pos = old_size-1; gint start_pos = end_pos - fir_filter_size + 1; if (start_pos < 0) start_pos = 0; offsets[i] = start_pos; /* The following code ensures that the coefficients add to exactly FPScale */ gfloat total = 0.0; /* Ensure that we have a valid position */ gfloat ok_pos = MAX(0.0,MIN(old_size-1,pos)); for (j=0; j 0.0f); gfloat total2 = 0.0; for (k=0; kpixelsize == 4); g_assert(input->channels == 3); guint y,x; gint *wg = weights; for (y = 0; y < new_size ; y++) { gushort *in = GET_PIXEL(input, start_x, offsets[y]); gushort *out = GET_PIXEL(output, 0, y); for (x = start_x; x < end_x; x++) { gint acc1 = 0; gint acc2 = 0; gint acc3 = 0; for (i = 0; i < fir_filter_size; i++) { acc1 += in[i*input->rowstride]* wg[i]; acc2 += in[i*input->rowstride+1] * wg[i]; acc3 += in[i*input->rowstride+2] * wg[i]; } out[x*4] = clampbits((acc1 + (FPScale/2))>>FPScaleShift, 16); out[x*4+1] = clampbits((acc2 + (FPScale/2))>>FPScaleShift, 16); out[x*4+2] = clampbits((acc3 + (FPScale/2))>>FPScaleShift, 16); in+=4; } wg+=fir_filter_size; } g_free(weights); g_free(offsets); } static void ResizeH_compatible(ResampleInfo *info) { const RS_IMAGE16 *input = info->input; const RS_IMAGE16 *output = info->output; const guint old_size = info->old_size; const guint new_size = info->new_size; gint pixelsize = input->pixelsize; gint ch = input->channels; gfloat pos_step = ((gfloat) old_size) / ((gfloat)new_size); gfloat filter_step = MIN(1.0 / pos_step, 1.0); gfloat filter_support = (gfloat) lanczos_taps() / filter_step; gint fir_filter_size = (gint) (ceil(filter_support*2)); if (old_size <= fir_filter_size) return ResizeH_fast(info); gint *weights = g_new(gint, new_size * fir_filter_size); gint *offsets = g_new(gint, new_size); gfloat pos = 0.0; gint i,j,k; for (i=0; i old_size-1) end_pos = old_size-1; gint start_pos = end_pos - fir_filter_size + 1; if (start_pos < 0) start_pos = 0; offsets[i] = start_pos * pixelsize; /* the following code ensures that the coefficients add to exactly FPScale */ gfloat total = 0.0; /* Ensure that we have a valid position */ gfloat ok_pos = MAX(0.0,MIN(old_size-1,pos)); for (j=0; j 0.0f); gfloat total2 = 0.0; for (k=0; kdest_offset_other; y < info->dest_end_other ; y++) { gint *wg = weights; gushort *in_line = GET_PIXEL(input, 0, y); gushort *out = GET_PIXEL(output, 0, y); for (x = 0; x < new_size; x++) { guint i; gushort *in = &in_line[offsets[x]]; for (c = 0 ; c < ch; c++) { gint acc = 0; for (i = 0; i >FPScaleShift, 16); } wg += fir_filter_size; } } g_free(weights); g_free(offsets); } static void ResizeV_compatible(ResampleInfo *info) { const RS_IMAGE16 *input = info->input; const RS_IMAGE16 *output = info->output; const guint old_size = info->old_size; const guint new_size = info->new_size; const guint start_x = info->dest_offset_other; const guint end_x = info->dest_end_other; gint pixelsize = input->pixelsize; gint ch = input->channels; gfloat pos_step = ((gfloat) old_size) / ((gfloat)new_size); gfloat filter_step = MIN(1.0 / pos_step, 1.0); gfloat filter_support = (gfloat) lanczos_taps() / filter_step; gint fir_filter_size = (gint) (ceil(filter_support*2)); if (old_size <= fir_filter_size) return ResizeV_fast(info); gint *weights = g_new(gint, new_size * fir_filter_size); gint *offsets = g_new(gint, new_size); gfloat pos = 0.0; gint i,j,k; for (i=0; i old_size-1) end_pos = old_size-1; gint start_pos = end_pos - fir_filter_size + 1; if (start_pos < 0) start_pos = 0; offsets[i] = start_pos; /* The following code ensures that the coefficients add to exactly FPScale */ gfloat total = 0.0; /* Ensure that we have a valid position */ gfloat ok_pos = MAX(0.0,MIN(old_size-1,pos)); for (j=0; j 0.0f); gfloat total2 = 0.0; for (k=0; krowstride]* wg[i]; } out[x*pixelsize+c] = clampbits((acc + (FPScale/2))>>FPScaleShift, 16); in++; } } wg+=fir_filter_size; } g_free(weights); g_free(offsets); } void ResizeV_fast(ResampleInfo *info) { const RS_IMAGE16 *input = info->input; const RS_IMAGE16 *output = info->output; const guint old_size = info->old_size; const guint new_size = info->new_size; const guint start_x = info->dest_offset_other; const guint end_x = info->dest_end_other; gint pixelsize = input->pixelsize; gint ch = input->channels; gfloat pos_step = ((gfloat) old_size) / ((gfloat)new_size); gint pos = 0; gint delta = (gint)(pos_step * 65536.0); guint y,x,c; for (y = 0; y < new_size ; y++) { gushort *in = GET_PIXEL(input, start_x, pos>>16); gushort *out = GET_PIXEL(output, start_x, y); int out_pos = 0; for (x = start_x; x < end_x; x++) { for (c = 0; c < ch; c++) { out[out_pos+c] = in[c]; } out_pos += pixelsize; in+=pixelsize; } pos += delta; } } static void ResizeH_fast(ResampleInfo *info) { const RS_IMAGE16 *input = info->input; const RS_IMAGE16 *output = info->output; const guint old_size = info->old_size; const guint new_size = info->new_size; gint pixelsize = input->pixelsize; gint ch = input->channels; gfloat pos_step = ((gfloat) old_size) / ((gfloat)new_size); gint pos; gint delta = (gint)(pos_step * 65536.0); guint y,x,c; for (y = info->dest_offset_other; y < info->dest_end_other ; y++) { gushort *in_line = GET_PIXEL(input, 0, y); gushort *out = GET_PIXEL(output, 0, y); pos = 0; int out_pos = 0; for (x = 0; x < new_size; x++) { gushort* start_pos = &in_line[(pos>>16)*pixelsize]; for (c = 0 ; c < ch; c++) { out[out_pos+c] = start_pos[c]; } out_pos += pixelsize; pos += delta; } } } rawstudio-2.0/plugins/resample/resample-sse2.c0000644000175000017500000003101011543674627016446 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Plugin tmpl version 4 */ #include #include /* Special Vertical SSE2 resampler, that has massive parallism. * An important restriction is that "info->dest_offset_other", must result * in a 16 byte aligned memory pointer. */ typedef struct { RS_IMAGE16 *input; /* Input Image to Resampler */ RS_IMAGE16 *output; /* Output Image from Resampler */ guint old_size; /* Old dimension in the direction of the resampler*/ guint new_size; /* New size in the direction of the resampler */ guint dest_offset_other; /* Where in the unchanged direction should we begin writing? */ guint dest_end_other; /* Where in the unchanged direction should we stop writing? */ guint (*resample_support)(void); gfloat (*resample_func)(gfloat); GThread *threadid; gboolean use_compatible; /* Use compatible resampler if pixelsize != 4 */ gboolean use_fast; /* Use nearest neighbour resampler, also compatible*/ } ResampleInfo; extern void ResizeV(ResampleInfo *info); extern void ResizeV_fast(ResampleInfo *info); static inline guint clampbits(gint x, guint n) { guint32 _y_temp; if( (_y_temp=x>>n) ) x = ~_y_temp >> (32-n); return x;} static guint lanczos_taps(void) { return 3; } static gfloat sinc(gfloat value) { if (value != 0.0f) { value *= M_PI; return sinf(value) / value; } else return 1.0f; } static gfloat lanczos_weight(gfloat value) { value = fabsf(value); if (value < lanczos_taps()) { return (sinc(value) * sinc(value / lanczos_taps())); } else return 0.0f; } const static gint FPScale = 16384; /* fixed point scaler */ const static gint FPScaleShift = 14; /* fixed point scaler */ #if defined (__x86_64__) #include void ResizeV_SSE2(ResampleInfo *info) { const RS_IMAGE16 *input = info->input; const RS_IMAGE16 *output = info->output; const guint old_size = info->old_size; const guint new_size = info->new_size; const guint start_x = info->dest_offset_other * input->pixelsize; const guint end_x = info->dest_end_other * input->pixelsize; gfloat pos_step = ((gfloat) old_size) / ((gfloat)new_size); gfloat filter_step = MIN(1.0f / pos_step, 1.0f); gfloat filter_support = (gfloat) lanczos_taps() / filter_step; gint fir_filter_size = (gint) (ceil(filter_support*2)); if (old_size <= fir_filter_size) return ResizeV_fast(info); gint *weights = g_new(gint, new_size * fir_filter_size); gint *offsets = g_new(gint, new_size); gfloat pos = 0.0; gint i,j,k; for (i=0; i old_size-1) end_pos = old_size-1; gint start_pos = end_pos - fir_filter_size + 1; if (start_pos < 0) start_pos = 0; offsets[i] = start_pos; /* The following code ensures that the coefficients add to exactly FPScale */ gfloat total = 0.0; /* Ensure that we have a valid position */ gfloat ok_pos = MAX(0.0,MIN(old_size-1,pos)); for (j=0; j 0.0f); gfloat total2 = 0.0; for (k=0; k> 2); __m128i add_32 = _mm_set_epi32(add_round_sub, add_round_sub, add_round_sub, add_round_sub); __m128i signxor = _mm_set_epi32(0x80008000, 0x80008000, 0x80008000, 0x80008000); for (y = 0; y < new_size ; y++) { gushort *in = GET_PIXEL(input, start_x / input->pixelsize, offsets[y]); gushort *out = GET_PIXEL(output, 0, y); __m128i zero; zero = _mm_setzero_si128(); for (x = start_x; x <= (end_x_sse-24); x+=24) { /* Accumulators, set to 0 */ __m128i acc1, acc2, acc3, acc1_h, acc2_h, acc3_h; acc1 = acc2 = acc3 = acc1_h = acc2_h = acc3_h = zero; for (i = 0; i < fir_filter_size; i++) { /* Load weight */ __m128i w = _mm_set_epi32(wg[i],wg[i],wg[i],wg[i]); /* Load source and prefetch next line */ int pos = i * input->rowstride; __m128i src1i, src2i, src3i; __m128i* in_sse = (__m128i*)&in[pos]; src1i = _mm_load_si128(in_sse); src2i = _mm_load_si128(in_sse+1); src3i = _mm_load_si128(in_sse+2); _mm_prefetch(&in[pos + 32], _MM_HINT_NTA); /* Unpack to dwords */ __m128i src1i_h, src2i_h, src3i_h; src1i_h = _mm_unpackhi_epi16(src1i, zero); src2i_h = _mm_unpackhi_epi16(src2i, zero); src3i_h = _mm_unpackhi_epi16(src3i, zero); src1i = _mm_unpacklo_epi16(src1i, zero); src2i = _mm_unpacklo_epi16(src2i, zero); src3i = _mm_unpacklo_epi16(src3i, zero); /*Shift down to 15 bit for multiplication */ src1i_h = _mm_srli_epi16(src1i_h, 1); src2i_h = _mm_srli_epi16(src2i_h, 1); src3i_h = _mm_srli_epi16(src3i_h, 1); src1i = _mm_srli_epi16(src1i, 1); src2i = _mm_srli_epi16(src2i, 1); src3i = _mm_srli_epi16(src3i, 1); /* Multiply my weight */ src1i_h = _mm_madd_epi16(src1i_h, w); src2i_h = _mm_madd_epi16(src2i_h, w); src3i_h = _mm_madd_epi16(src3i_h, w); src1i = _mm_madd_epi16(src1i, w); src2i = _mm_madd_epi16(src2i, w); src3i = _mm_madd_epi16(src3i, w); /* Accumulate */ acc1_h = _mm_add_epi32(acc1_h, src1i_h); acc2_h = _mm_add_epi32(acc2_h, src2i_h); acc3_h = _mm_add_epi32(acc3_h, src3i_h); acc1 = _mm_add_epi32(acc1, src1i); acc2 = _mm_add_epi32(acc2, src2i); acc3 = _mm_add_epi32(acc3, src3i); } /* Add rounder and subtract 32768 */ acc1_h = _mm_add_epi32(acc1_h, add_32); acc2_h = _mm_add_epi32(acc2_h, add_32); acc3_h = _mm_add_epi32(acc3_h, add_32); acc1 = _mm_add_epi32(acc1, add_32); acc2 = _mm_add_epi32(acc2, add_32); acc3 = _mm_add_epi32(acc3, add_32); /* Shift down */ acc1_h = _mm_srai_epi32(acc1_h, FPScaleShift - 1 ); acc2_h = _mm_srai_epi32(acc2_h, FPScaleShift - 1); acc3_h = _mm_srai_epi32(acc3_h, FPScaleShift - 1); acc1 = _mm_srai_epi32(acc1, FPScaleShift - 1); acc2 = _mm_srai_epi32(acc2, FPScaleShift - 1); acc3 = _mm_srai_epi32(acc3, FPScaleShift - 1); /* Pack to signed shorts */ acc1 = _mm_packs_epi32(acc1, acc1_h); acc2 = _mm_packs_epi32(acc2, acc2_h); acc3 = _mm_packs_epi32(acc3, acc3_h); /* Shift sign to unsinged shorts */ acc1 = _mm_xor_si128(acc1, signxor); acc2 = _mm_xor_si128(acc2, signxor); acc3 = _mm_xor_si128(acc3, signxor); /* Store result */ __m128i* sse_dst = (__m128i*)&out[x]; _mm_stream_si128(sse_dst, acc1); _mm_stream_si128(sse_dst + 1, acc2); _mm_stream_si128(sse_dst + 2, acc3); in += 24; } /* Process remaining pixels */ for (; x < end_x; x++) { gint acc1 = 0; for (i = 0; i < fir_filter_size; i++) { acc1 += in[i * input->rowstride] * *(gshort*)&wg[i]; } out[x] = clampbits((acc1 + (FPScale / 2)) >> FPScaleShift, 16); in++; } wg += fir_filter_size; } _mm_sfence(); g_free(weights); g_free(offsets); } #elif defined (__SSE2__) #include void ResizeV_SSE2(ResampleInfo *info) { const RS_IMAGE16 *input = info->input; const RS_IMAGE16 *output = info->output; const guint old_size = info->old_size; const guint new_size = info->new_size; const guint start_x = info->dest_offset_other * input->pixelsize; const guint end_x = info->dest_end_other * input->pixelsize; gfloat pos_step = ((gfloat) old_size) / ((gfloat)new_size); gfloat filter_step = MIN(1.0f / pos_step, 1.0f); gfloat filter_support = (gfloat) lanczos_taps() / filter_step; gint fir_filter_size = (gint) (ceil(filter_support*2)); if (old_size <= fir_filter_size) return ResizeV_fast(info); gint *weights = g_new(gint, new_size * fir_filter_size); gint *offsets = g_new(gint, new_size); gfloat pos = 0.0; gint i,j,k; for (i=0; i old_size-1) end_pos = old_size-1; gint start_pos = end_pos - fir_filter_size + 1; if (start_pos < 0) start_pos = 0; offsets[i] = start_pos; /* The following code ensures that the coefficients add to exactly FPScale */ gfloat total = 0.0; /* Ensure that we have a valid position */ gfloat ok_pos = MAX(0.0f,MIN(old_size-1,pos)); for (j=0; j 0.0f); gfloat total2 = 0.0; for (k=0; k> 2); /* Subtract 32768 as it would appear after shift */ add_round_sub -= (32768 << (FPScaleShift-1)); /* 0.5 pixel value is lost to rounding times fir_filter_size, compensate */ add_round_sub += fir_filter_size * (FPScale >> 2); for (y = 0; y < new_size ; y++) { gushort *in = GET_PIXEL(input, start_x / input->pixelsize, offsets[y]); gushort *out = GET_PIXEL(output, 0, y); __m128i zero; zero = _mm_setzero_si128(); for (x = start_x; x <= (end_x_sse-8); x+=8) { /* Accumulators, set to 0 */ __m128i acc1, acc1_h; acc1 = acc1_h = zero; for (i = 0; i < fir_filter_size; i++) { /* Load weight */ __m128i w = _mm_set_epi32(wg[i],wg[i],wg[i],wg[i]); /* Load source */ __m128i src1i; __m128i* in_sse = (__m128i*)&in[i * input->rowstride]; src1i = _mm_load_si128(in_sse); _mm_prefetch(in_sse+4, _MM_HINT_NTA); /* Unpack to dwords */ __m128i src1i_h; src1i_h = _mm_unpackhi_epi16(src1i, zero); src1i = _mm_unpacklo_epi16(src1i, zero); /*Shift down to 15 bit for multiplication */ src1i_h = _mm_srli_epi16(src1i_h, 1); src1i = _mm_srli_epi16(src1i, 1); /* Multiply my weight */ src1i_h = _mm_madd_epi16(src1i_h, w); src1i = _mm_madd_epi16(src1i, w); /* Accumulate */ acc1_h = _mm_add_epi32(acc1_h, src1i_h); acc1 = _mm_add_epi32(acc1, src1i); } __m128i add_32 = _mm_set_epi32(add_round_sub, add_round_sub, add_round_sub, add_round_sub); __m128i signxor = _mm_set_epi32(0x80008000, 0x80008000, 0x80008000, 0x80008000); /* Add rounder and subtract 32768 */ acc1_h = _mm_add_epi32(acc1_h, add_32); acc1 = _mm_add_epi32(acc1, add_32); /* Shift down */ acc1_h = _mm_srai_epi32(acc1_h, FPScaleShift - 1 ); acc1 = _mm_srai_epi32(acc1, FPScaleShift - 1); /* Pack to signed shorts */ acc1 = _mm_packs_epi32(acc1, acc1_h); /* Shift sign to unsinged shorts */ acc1 = _mm_xor_si128(acc1, signxor); /* Store result */ __m128i* sse_dst = (__m128i*)&out[x]; _mm_store_si128(sse_dst, acc1); in += 8; } /* Process remaining pixels */ for (; x < end_x; x++) { gint acc1 = 0; for (i = 0; i < fir_filter_size; i++) { acc1 += in[i * input->rowstride] * *(gshort*)&wg[i]; } out[x] = clampbits((acc1 + (FPScale / 2)) >> FPScaleShift, 16); in++; } wg += fir_filter_size; } g_free(weights); g_free(offsets); } #else // not defined (__SSE2__) void ResizeV_SSE2(ResampleInfo *info) { ResizeV(info); } #endif // not defined (__x86_64__) and not defined (__SSE2__) rawstudio-2.0/plugins/resample/Makefile.in0000644000175000017500000003450211547430041015656 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/resample DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) resample_la_DEPENDENCIES = resample-sse2.lo resample-c.lo am_resample_la_OBJECTS = resample_la_OBJECTS = $(am_resample_la_OBJECTS) resample_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(resample_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(resample_la_SOURCES) DIST_SOURCES = $(resample_la_SOURCES) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = resample.la resample_la_LIBADD = @PACKAGE_LIBS@ resample-sse2.lo resample-c.lo resample_la_LDFLAGS = -module -avoid-version resample_la_SOURCES = EXTRA_DIST = resample-sse2.c resample.c @CAN_COMPILE_SSE2_FALSE@SSE_FLAG = @CAN_COMPILE_SSE2_TRUE@SSE_FLAG = -msse2 all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/resample/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/resample/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done resample.la: $(resample_la_OBJECTS) $(resample_la_DEPENDENCIES) $(resample_la_LINK) -rpath $(libdir) $(resample_la_OBJECTS) $(resample_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool distclean distclean-compile \ distclean-generic distclean-libtool distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ uninstall uninstall-am uninstall-libLTLIBRARIES resample-c.lo: resample.c $(LTCOMPILE) -o resample-c.o -c $(top_srcdir)/plugins/resample/resample.c resample-sse2.lo: resample-sse2.c $(LTCOMPILE) $(SSE_FLAG) -c $(top_srcdir)/plugins/resample/resample-sse2.c # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/plugins/meta-tiff/0000755000175000017500000000000011547430075013740 500000000000000rawstudio-2.0/plugins/meta-tiff/Makefile.am0000644000175000017500000000073111526533643015717 00000000000000plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS =\ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = meta_tiff.la libdir = $(datadir)/rawstudio/plugins/ meta_tiff_la_LIBADD = @PACKAGE_LIBS@ meta_tiff_la_LDFLAGS = -module -avoid-version meta_tiff_la_SOURCES = tiff-meta.c rawstudio-2.0/plugins/meta-tiff/tiff-meta.c0000644000175000017500000016736711542726006015721 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #ifdef WIN32 #include /* ntohl() */ #else #include /* sony_decrypt(): htonl() */ #endif #include /* memcpy() */ #include #include "rs-utils.h" /* It is required having some arbitrary maximum exposure time to prevent borked * shutter speed values being interpreted from the tiff. * 8h seems to be reasonable, even for astronomists with extra battery packs */ #define EXPO_TIME_MAXVAL (8*60.0*60.0) typedef struct { RSMetadata meta; gint sony_offset; gint sony_length; gint sony_key; guint pad[128]; guint p; } SonyMeta; struct IFD { gushort tag; gushort type; guint count; guint value_offset; guchar value_uchar; gushort value_ushort; guint value_uint; gdouble value_rational; guint offset; gdouble value; }; static gfloat get_rational(RAWFILE *rawfile, guint offset); inline static void read_ifd(RAWFILE *rawfile, guint offset, struct IFD *ifd); static gboolean makernote_canon(RAWFILE *rawfile, guint offset, RSMetadata *meta); static gboolean makernote_leica(RAWFILE *rawfile, guint offset, RSMetadata *meta); static gboolean makernote_minolta(RAWFILE *rawfile, guint offset, RSMetadata *meta); static gboolean makernote_nikon(RAWFILE *rawfile, guint offset, RSMetadata *meta); static gboolean makernote_olympus(RAWFILE *rawfile, guint base, guint offset, RSMetadata *meta); static gboolean makernote_olympus_camerasettings(RAWFILE *rawfile, guint base, guint offset, RSMetadata *meta); static gboolean makernote_olympus_imageprocessing(RAWFILE *rawfile, guint base, guint offset, RSMetadata *meta); static gboolean makernote_olympus_equipment(RAWFILE *rawfile, guint base, guint offset, RSMetadata *meta); static gboolean ifd_panasonic(RAWFILE *rawfile, guint offset, RSMetadata *meta); static gboolean makernote_pentax(RAWFILE *rawfile, guint offset, RSMetadata *meta); static gboolean makernote_samsung(RAWFILE *rawfile, guint offset, RSMetadata *meta); static gboolean makernote_sony(RAWFILE *rawfile, guint offset, RSMetadata *meta); static void sony_decrypt(SonyMeta *sony, guint *data, gint len); static gboolean private_sony(RAWFILE *rawfile, guint offset, RSMetadata *meta); static gboolean exif_reader(RAWFILE *rawfile, guint offset, RSMetadata *meta); static gboolean ifd_reader(RAWFILE *rawfile, guint offset, RSMetadata *meta); static gboolean thumbnail_reader(const gchar *service, RAWFILE *rawfile, guint offset, guint length, RSMetadata *meta); static gboolean thumbnail_store(GdkPixbuf *pixbuf, RSMetadata *meta); static GdkPixbuf* raw_thumbnail_reader(const gchar *service, RSMetadata *meta); typedef enum tiff_field_type { TIFF_FIELD_TYPE_UNDEF__ = 0, TIFF_FIELD_TYPE_BYTE = 1, TIFF_FIELD_TYPE_ASCII = 2, TIFF_FIELD_TYPE_SHORT = 3, TIFF_FIELD_TYPE_LONG = 4, TIFF_FIELD_TYPE_RATIONAL = 5, /* Added in TIFF 6.0 */ TIFF_FIELD_TYPE_SBYTE = 6, TIFF_FIELD_TYPE_UNDEFINED = 7, TIFF_FIELD_TYPE_SSHORT = 8, TIFF_FIELD_TYPE_SLONG = 9, TIFF_FIELD_TYPE_SRATIONAL = 10, TIFF_FIELD_TYPE_FLOAT = 11, TIFF_FIELD_TYPE_DOUBLE = 12, /* Just for convenience */ TIFF_FIELD_TYPE_MAX = 12, } TIFF_FIELD_TYPE; guint tiff_field_size[TIFF_FIELD_TYPE_MAX+1] = {1, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8}; /** * Get a TIFF_FIELD_TYPE_RATIONAL value from a TIFF file */ static gfloat get_rational(RAWFILE *rawfile, guint offset) { guint uint1=0, uint2=1; if (!raw_get_uint(rawfile, offset, &uint1)) return 0; if (!raw_get_uint(rawfile, offset+4, &uint2)) return 0; if (uint2 == 0) return 0; return ((gdouble) uint1) / ((gdouble) uint2); } inline static void read_ifd(RAWFILE *rawfile, guint offset, struct IFD *ifd) { /* guint size = 0; */ raw_get_ushort(rawfile, offset, &ifd->tag); raw_get_ushort(rawfile, offset+2, &ifd->type); raw_get_uint(rawfile, offset+4, &ifd->count); raw_get_uint(rawfile, offset+8, &ifd->value_offset); ifd->value = 0; if (ifd->type > 0 && ifd->type <= TIFF_FIELD_TYPE_MAX) { if ((ifd->count * tiff_field_size[ifd->type]) < 5) ifd->offset = offset+8; else ifd->offset = ifd->value_offset; } if (ifd->count == 1) switch (ifd->type) { case TIFF_FIELD_TYPE_BYTE: raw_get_uchar(rawfile, offset+8, &ifd->value_uchar); ifd->value = ifd->value_uchar; break; case TIFF_FIELD_TYPE_SHORT: raw_get_ushort(rawfile, offset+8, &ifd->value_ushort); ifd->value = ifd->value_ushort; break; case TIFF_FIELD_TYPE_LONG: raw_get_uint(rawfile, offset+8, &ifd->value_uint); ifd->value = ifd->value_uint; break; case TIFF_FIELD_TYPE_RATIONAL: ifd->value_rational = get_rational(rawfile, ifd->value_offset); ifd->value = ifd->value_rational; break; default: /* FIXME: Implement types from TIFF 6.0 */ break; } } #if 0 static void print_ifd(RAWFILE *rawfile, struct IFD *ifd) { gchar *tmp; printf("tag: %04x ", ifd->tag); printf("%8u ", ifd->type); printf("%8u * ", ifd->count); switch (ifd->type) { case TIFF_FIELD_TYPE_ASCII: tmp = raw_strdup (rawfile, ifd->value_offset, ifd->count); printf("[%-30s] ", tmp); g_free(tmp); break; case TIFF_FIELD_TYPE_SHORT: printf("[%8u] ", ifd->value_ushort); break; case TIFF_FIELD_TYPE_LONG: printf("[%8u] ", ifd->value_offset); break; case TIFF_FIELD_TYPE_RATIONAL: printf("[%.03f] ", ifd->value_rational); break; default: printf("[0x%08x] ", ifd->value_offset); break; } printf("@ %d ", ifd->offset); printf("{ %.05f }", ifd->value); printf("\n"); } #endif static gboolean makernote_canon(RAWFILE *rawfile, guint offset, RSMetadata *meta) { gushort number_of_entries = 0; gushort ushort_temp1; guint uint_temp1; gushort wb_index = 0; gchar* lens_name; struct IFD ifd; /* get number of entries */ if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; offset += 2; while(number_of_entries--) { read_ifd(rawfile, offset, &ifd); offset += 12; switch (ifd.tag) { case 0x0001: /* CanonCameraSettings */ if (meta->make == MAKE_CANON) { gshort temp, focalunits; /* Lens ID */ raw_get_short(rawfile, ifd.value_offset+44, &temp); meta->lens_id = temp; /* Focalunits */ raw_get_short(rawfile, ifd.value_offset+50, &focalunits); /* Max Focal */ raw_get_short(rawfile, ifd.value_offset+46, &temp); meta->lens_max_focal = (gfloat) temp * (gfloat) focalunits; /* Min Focal */ raw_get_short(rawfile, ifd.value_offset+48, &temp); meta->lens_min_focal = (gfloat) temp * (gfloat) focalunits; /* Max Aperture */ raw_get_short(rawfile, ifd.value_offset+52, &temp); meta->lens_max_aperture = (gfloat) exp(CanonEv(temp)*log(2)/2); /* Min Aperture */ raw_get_short(rawfile, ifd.value_offset+54, &temp); meta->lens_min_aperture = (gfloat) exp(CanonEv(temp)*log(2)/2); } break; case 0x0004: /* CanonShotInfo */ raw_get_ushort(rawfile, ifd.value_offset+14, &wb_index); break; case 0x0029: /* White Balance for G9 */ if (g_str_equal(meta->model_ascii, "Canon PowerShot G9")) { gint wb_offset = (wb_index < 18) ? "012347800000005896"[wb_index]-'0' : 0; wb_offset = ifd.value_offset + wb_offset*32 + 8; raw_get_uint(rawfile, wb_offset, &uint_temp1); meta->cam_mul[1] = (gdouble) uint_temp1; raw_get_uint(rawfile, wb_offset+4, &uint_temp1); meta->cam_mul[0] = (gdouble) uint_temp1; raw_get_uint(rawfile, wb_offset+8, &uint_temp1); meta->cam_mul[2] = (gdouble) uint_temp1; raw_get_uint(rawfile, wb_offset+12, &uint_temp1); meta->cam_mul[3] = (gdouble) uint_temp1; rs_metadata_normalize_wb(meta); } break; case 0x0095: /* Lens Name */ lens_name = raw_strdup(rawfile, ifd.value_offset, ifd.count); /* We only add Canon lenses, since others are simply registered as "30mm", etc. */ if (lens_name[0] == 'E' && lens_name[1] == 'F') meta->fixed_lens_identifier = g_strconcat("Canon ", lens_name, NULL); g_free(lens_name); break; case 0x00a4: /* WhiteBalanceTable */ raw_get_ushort(rawfile, ifd.value_offset+wb_index*48+0, &ushort_temp1); meta->cam_mul[0] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, ifd.value_offset+wb_index*48+2, &ushort_temp1); meta->cam_mul[1] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, ifd.value_offset+wb_index*48+4, &ushort_temp1); meta->cam_mul[2] = (gdouble) ushort_temp1; meta->cam_mul[3] = meta->cam_mul[1]; rs_metadata_normalize_wb(meta); break; case 0x4001: /* white balance for mulpiple Canon cameras */ switch (ifd.count) { case 582: /* Canon 20D, 350D */ ifd.value_offset += 50; break; case 653: /* Canon EOS 1D Mk II, Canon 1Ds Mk2 */ ifd.value_offset += 68; break; case 674: /* Canon EOS 1D Mk III */ case 692: /* Canon EOS 40D */ case 702: /* Canon EOS 1Ds Mk III */ case 796: /* Canon EOS 5D, Canon EOS 30D, Canon EOS 400D */ case 1227: /* Canon EOS 450D */ case 1250: /* Canon EOS 5D Mk II */ case 1273: /* Canon EOS 600D */ case 1337: /* Canon 1D Mk IV */ case 1251: /* Canon EOS 500D - is this really correct? */ case 1338: /* Canon EOS 550D */ case 1346: /* Canon EOS 60D */ ifd.value_offset += 126; break; case 5120: /* Canon PowerShot G10 */ ifd.value_offset += 142; break; } /* RGGB-format! */ raw_get_ushort(rawfile, ifd.value_offset, &ushort_temp1); meta->cam_mul[0] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, ifd.value_offset+2, &ushort_temp1); meta->cam_mul[1] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, ifd.value_offset+4, &ushort_temp1); meta->cam_mul[3] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, ifd.value_offset+6, &ushort_temp1); meta->cam_mul[2] = (gdouble) ushort_temp1; rs_metadata_normalize_wb(meta); break; } } return TRUE; } static gboolean makernote_leica(RAWFILE *rawfile, guint offset, RSMetadata *meta) { gboolean ret = FALSE; gushort number_of_entries = 0; guint version = 0; struct IFD ifd; /* get number of entries */ if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; offset += 2; while(number_of_entries--) { read_ifd(rawfile, offset, &ifd); offset += 12; switch (version) { case 100: switch(ifd.tag) { case 0x0011: /* Red balance */ meta->cam_mul[1] = 1.0; meta->cam_mul[3] = 1.0; meta->cam_mul[0] = ifd.value / 256.0; break; case 0x0012: /* Blue balance */ meta->cam_mul[2] = ifd.value / 256.0; break; case 0x8769: /* ExifIFDPointer */ exif_reader(rawfile, ifd.value_offset, meta); break; } break; case 200: switch(ifd.tag) { case 0x0024: /* WB Red Level */ meta->cam_mul[0] = ifd.value; break; case 0x0025: /* WB Green Level */ meta->cam_mul[1] = ifd.value; meta->cam_mul[3] = ifd.value; break; case 0x0026: /* WB Blue Level */ meta->cam_mul[2] = ifd.value; break; case 0x8769: /* ExifIFDPointer */ exif_reader(rawfile, ifd.value_offset, meta); break; } break; default: switch(ifd.tag) { case 0x0001: /* Raw version */ switch (ifd.value_offset) { case 0x30303130: /* Leica */ version = 100; ret = TRUE; break; case 0x30303230: /* Leica / Panasonic */ version = 200; ret = FALSE; break; case 0x30313230: /* Panasonic */ version = 210; ret = FALSE; break; case 0x31303230: /* Panasonic */ version = 201; ret = FALSE; break; case 0x32303230: /* Panasonic */ version = 202; ret = FALSE; break; default: ret = FALSE; break; } break; } break; } } rs_metadata_normalize_wb(meta); return ret; } static gboolean makernote_minolta(RAWFILE *rawfile, guint offset, RSMetadata *meta) { gushort number_of_entries = 0; struct IFD ifd; /* get number of entries */ if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; offset += 2; while(number_of_entries--) { read_ifd(rawfile, offset, &ifd); offset += 12; switch (ifd.tag) { case 0x0088: /* Minolta */ meta->preview_start = ifd.value_offset + raw_get_base(rawfile); break; case 0x0081: /* Minolta DiMAGE 5 */ meta->thumbnail_start = ifd.value_offset + raw_get_base(rawfile); meta->thumbnail_length = ifd.count; break; case 0x0089: /* Minolta */ meta->preview_length = ifd.value_offset; break; } } return TRUE; } static gboolean makernote_nikon(RAWFILE *rawfile, guint offset, RSMetadata *meta) { static const guchar xlat[2][256] = { { 0xc1,0xbf,0x6d,0x0d,0x59,0xc5,0x13,0x9d,0x83,0x61,0x6b,0x4f,0xc7,0x7f,0x3d,0x3d, 0x53,0x59,0xe3,0xc7,0xe9,0x2f,0x95,0xa7,0x95,0x1f,0xdf,0x7f,0x2b,0x29,0xc7,0x0d, 0xdf,0x07,0xef,0x71,0x89,0x3d,0x13,0x3d,0x3b,0x13,0xfb,0x0d,0x89,0xc1,0x65,0x1f, 0xb3,0x0d,0x6b,0x29,0xe3,0xfb,0xef,0xa3,0x6b,0x47,0x7f,0x95,0x35,0xa7,0x47,0x4f, 0xc7,0xf1,0x59,0x95,0x35,0x11,0x29,0x61,0xf1,0x3d,0xb3,0x2b,0x0d,0x43,0x89,0xc1, 0x9d,0x9d,0x89,0x65,0xf1,0xe9,0xdf,0xbf,0x3d,0x7f,0x53,0x97,0xe5,0xe9,0x95,0x17, 0x1d,0x3d,0x8b,0xfb,0xc7,0xe3,0x67,0xa7,0x07,0xf1,0x71,0xa7,0x53,0xb5,0x29,0x89, 0xe5,0x2b,0xa7,0x17,0x29,0xe9,0x4f,0xc5,0x65,0x6d,0x6b,0xef,0x0d,0x89,0x49,0x2f, 0xb3,0x43,0x53,0x65,0x1d,0x49,0xa3,0x13,0x89,0x59,0xef,0x6b,0xef,0x65,0x1d,0x0b, 0x59,0x13,0xe3,0x4f,0x9d,0xb3,0x29,0x43,0x2b,0x07,0x1d,0x95,0x59,0x59,0x47,0xfb, 0xe5,0xe9,0x61,0x47,0x2f,0x35,0x7f,0x17,0x7f,0xef,0x7f,0x95,0x95,0x71,0xd3,0xa3, 0x0b,0x71,0xa3,0xad,0x0b,0x3b,0xb5,0xfb,0xa3,0xbf,0x4f,0x83,0x1d,0xad,0xe9,0x2f, 0x71,0x65,0xa3,0xe5,0x07,0x35,0x3d,0x0d,0xb5,0xe9,0xe5,0x47,0x3b,0x9d,0xef,0x35, 0xa3,0xbf,0xb3,0xdf,0x53,0xd3,0x97,0x53,0x49,0x71,0x07,0x35,0x61,0x71,0x2f,0x43, 0x2f,0x11,0xdf,0x17,0x97,0xfb,0x95,0x3b,0x7f,0x6b,0xd3,0x25,0xbf,0xad,0xc7,0xc5, 0xc5,0xb5,0x8b,0xef,0x2f,0xd3,0x07,0x6b,0x25,0x49,0x95,0x25,0x49,0x6d,0x71,0xc7 }, { 0xa7,0xbc,0xc9,0xad,0x91,0xdf,0x85,0xe5,0xd4,0x78,0xd5,0x17,0x46,0x7c,0x29,0x4c, 0x4d,0x03,0xe9,0x25,0x68,0x11,0x86,0xb3,0xbd,0xf7,0x6f,0x61,0x22,0xa2,0x26,0x34, 0x2a,0xbe,0x1e,0x46,0x14,0x68,0x9d,0x44,0x18,0xc2,0x40,0xf4,0x7e,0x5f,0x1b,0xad, 0x0b,0x94,0xb6,0x67,0xb4,0x0b,0xe1,0xea,0x95,0x9c,0x66,0xdc,0xe7,0x5d,0x6c,0x05, 0xda,0xd5,0xdf,0x7a,0xef,0xf6,0xdb,0x1f,0x82,0x4c,0xc0,0x68,0x47,0xa1,0xbd,0xee, 0x39,0x50,0x56,0x4a,0xdd,0xdf,0xa5,0xf8,0xc6,0xda,0xca,0x90,0xca,0x01,0x42,0x9d, 0x8b,0x0c,0x73,0x43,0x75,0x05,0x94,0xde,0x24,0xb3,0x80,0x34,0xe5,0x2c,0xdc,0x9b, 0x3f,0xca,0x33,0x45,0xd0,0xdb,0x5f,0xf5,0x52,0xc3,0x21,0xda,0xe2,0x22,0x72,0x6b, 0x3e,0xd0,0x5b,0xa8,0x87,0x8c,0x06,0x5d,0x0f,0xdd,0x09,0x19,0x93,0xd0,0xb9,0xfc, 0x8b,0x0f,0x84,0x60,0x33,0x1c,0x9b,0x45,0xf1,0xf0,0xa3,0x94,0x3a,0x12,0x77,0x33, 0x4d,0x44,0x78,0x28,0x3c,0x9e,0xfd,0x65,0x57,0x16,0x94,0x6b,0xfb,0x59,0xd0,0xc8, 0x22,0x36,0xdb,0xd2,0x63,0x98,0x43,0xa1,0x04,0x87,0x86,0xf7,0xa6,0x26,0xbb,0xd6, 0x59,0x4d,0xbf,0x6a,0x2e,0xaa,0x2b,0xef,0xe6,0x78,0xb6,0x4e,0xe0,0x2f,0xdc,0x7c, 0xbe,0x57,0x19,0x32,0x7e,0x2a,0xd0,0xb8,0xba,0x29,0x00,0x3c,0x52,0x7d,0xa8,0x49, 0x3b,0x2d,0xeb,0x25,0x49,0xfa,0xa3,0xaa,0x39,0xa7,0xc5,0xa7,0x50,0x11,0x36,0xfb, 0xc6,0x67,0x4a,0xf5,0xa5,0x12,0x65,0x7e,0xb0,0xdf,0xaf,0x4e,0xb3,0x61,0x7f,0x2f } }; gint i; guint tmp; gushort number_of_entries; gushort fieldtag=0; gushort fieldtype; gushort ushort_temp1=0; gfloat float_temp1=0.0, float_temp2=0.0; guint valuecount; guint uint_temp1=0; guchar char_tmp='\0'; guint base; guint save; gint serial = 0; gint key = 0; guint ver97 = 0; guchar buf97[324], ci, cj, ck; guchar buf98[33] = ""; gushort lensdata = 0; gboolean magic; /* Nikon's makernote type */ gboolean got_wb = FALSE; if (raw_strcmp(rawfile, offset, "Nikon", 5)) { base = offset +=10; raw_get_uint(rawfile, offset+4, &tmp); offset += tmp; magic = TRUE; } else { magic = FALSE; base = offset; } if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; if (number_of_entries>5000) return FALSE; offset += 2; save = offset; while(number_of_entries--) { /* FIXME: Port to read_ifd() */ offset = save; raw_get_ushort(rawfile, offset, &fieldtag); raw_get_ushort(rawfile, offset+2, &fieldtype); raw_get_uint(rawfile, offset+4, &valuecount); offset += 8; save = offset + 4; if ((valuecount * ("1112481124848"[fieldtype < 13 ? fieldtype:0]-'0') > 4) && magic) { raw_get_uint(rawfile, offset, &uint_temp1); offset = base + uint_temp1; } switch(fieldtag) { case 0x0002: /* ISO */ raw_get_ushort(rawfile, offset+2, &meta->iso); break; case 0x000c: /* D1 White Balance */ if (g_str_equal(meta->model_ascii, "NIKON D1X") || g_str_equal(meta->model_ascii, "NIKON D90") || g_str_equal(meta->model_ascii, "NIKON D3S") || g_str_equal(meta->model_ascii, "NIKON D300S") || g_str_equal(meta->model_ascii, "NIKON D3000") || g_str_equal(meta->model_ascii, "NIKON D3100") || g_str_equal(meta->model_ascii, "NIKON D5000") || g_str_equal(meta->model_ascii, "NIKON D7000")) { meta->cam_mul[0] = get_rational(rawfile, offset); meta->cam_mul[2] = get_rational(rawfile, offset+8); meta->cam_mul[1] = get_rational(rawfile, offset+16); meta->cam_mul[3] = get_rational(rawfile, offset+24); rs_metadata_normalize_wb(meta); got_wb = TRUE; } else { /* This is fucked, where did these two magic constants come from? */ raw_get_float(rawfile, uint_temp1, &float_temp1); raw_get_float(rawfile, uint_temp1+4, &float_temp2); meta->cam_mul[0] = (gdouble) (float_temp1/float_temp2)/1.0;//2.218750; raw_get_float(rawfile, uint_temp1+8, &float_temp1); raw_get_float(rawfile, uint_temp1+12, &float_temp2); meta->cam_mul[2] = (gdouble) (float_temp1/float_temp2)/1.0;//1.148438; raw_get_float(rawfile, uint_temp1+16, &float_temp1); raw_get_float(rawfile, uint_temp1+20, &float_temp2); meta->cam_mul[1] = (gdouble) (float_temp1/float_temp2); raw_get_float(rawfile, uint_temp1+24, &float_temp1); raw_get_float(rawfile, uint_temp1+28, &float_temp2); meta->cam_mul[3] = (gdouble) (float_temp1/float_temp2); rs_metadata_normalize_wb(meta); } break; case 0x0011: /* NikonPreview */ raw_get_uint(rawfile, offset, &uint_temp1); ifd_reader(rawfile, uint_temp1+base, meta); meta->thumbnail_start += base; break; case 0x0084: /* Lens - rational64u[4] */ raw_get_rational(rawfile, offset, &float_temp1); meta->lens_min_focal = float_temp1; raw_get_rational(rawfile, offset+8, &float_temp1); meta->lens_max_focal = float_temp1; raw_get_rational(rawfile, offset+16, &float_temp1); meta->lens_max_aperture = float_temp1; raw_get_rational(rawfile, offset+24, &float_temp1); meta->lens_min_aperture = float_temp1; break; case 0x0097: /* white balance */ if (g_str_equal(meta->model_ascii, "NIKON D90") || g_str_equal(meta->model_ascii, "NIKON D3S") || g_str_equal(meta->model_ascii, "NIKON D300S")) break; for(i=0;i<4;i++) { raw_get_uchar(rawfile, offset+i, &char_tmp); ver97 = (ver97 << 4) + char_tmp-'0'; } offset += 4; switch (ver97) { case 0x100: /* RBGG-format */ offset += 68; raw_get_ushort(rawfile, offset, &ushort_temp1); meta->cam_mul[0] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, offset+2, &ushort_temp1); meta->cam_mul[2] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, offset+4, &ushort_temp1); meta->cam_mul[1] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, offset+6, &ushort_temp1); meta->cam_mul[3] = (gdouble) ushort_temp1; rs_metadata_normalize_wb(meta); break; case 0x102: /* RGGB-format */ offset += 6; raw_get_ushort(rawfile, offset, &ushort_temp1); meta->cam_mul[0] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, offset+2, &ushort_temp1); meta->cam_mul[1] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, offset+4, &ushort_temp1); meta->cam_mul[3] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, offset+6, &ushort_temp1); meta->cam_mul[2] = (gdouble) ushort_temp1; rs_metadata_normalize_wb(meta); break; case 0x103: offset += 16; for(i=0;i<4;i++) { raw_get_ushort(rawfile, offset+2*i, &ushort_temp1); meta->cam_mul[i] = ushort_temp1; } rs_metadata_normalize_wb(meta); break; } if (ver97 >> 8 == 2) { if (ver97 != 0x205) offset += 280; raw_strcpy(rawfile, offset, buf97, 324); } break; case 0x0098: /* LensData - LensData0100 | LensData0101 | LensData0201 | LensData0204 | LensDataUnknown */ /* Will be used in 0x00a7 */ raw_strcpy(rawfile, offset, &buf98, 33); gchar *str = raw_strdup(rawfile, offset, 4); lensdata = atoi(str); g_free(str); /* Unencrypted LensIDNumber */ if (lensdata == 100) meta->lens_id = buf98[0x06]; break; case 0x001d: /* serial */ raw_get_uchar(rawfile, offset++, &char_tmp); while(char_tmp) { serial = serial*10 + (g_ascii_isdigit(char_tmp) ? char_tmp - '0' : char_tmp % 10); raw_get_uchar(rawfile, offset++, &char_tmp); } break; case 0x00a7: /* white balance */ { guchar ctmp[4]; raw_get_uchar(rawfile, offset++, ctmp); raw_get_uchar(rawfile, offset++, ctmp+1); raw_get_uchar(rawfile, offset++, ctmp+2); raw_get_uchar(rawfile, offset, ctmp+3); key = ctmp[0]^ctmp[1]^ctmp[2]^ctmp[3]; /* data from 0x0098 */ if (strlen((const gchar *) buf98)) { ci = xlat[0][serial & 0xff]; cj = xlat[1][key]; ck = 0x60; for (i=4; i < sizeof(buf98); i++) buf98[i] = buf98[i] ^ (cj += ci * ck++); /* Finding LensIDNumber - 101 untested */ if (lensdata == 101 || lensdata == 201 || lensdata == 202 || lensdata == 203) meta->lens_id = buf98[0x0b]; else if (lensdata == 204) meta->lens_id = buf98[0x0c]; } if (got_wb) break; if (ver97 >> 8 == 2) { ci = xlat[0][serial & 0xff]; cj = xlat[1][key]; ck = 0x60; for (i=0; i < 324; i++) buf97[i] ^= (cj += ci * ck++); for (i=0; i<4; i++) meta->cam_mul[i ^ (i >> 1)] = raw_get_ushort_from_string( rawfile, (gchar *)(buf97 + (ver97 == 0x205 ? 14:6) + i*2)); if (ver97 == 0x209) /* D300 */ for(i=0; i<4; i++) meta->cam_mul[i ^ (i >> 1) ^ 1] = raw_get_ushort_from_string(rawfile, (gchar *)(buf97 + 10 + i*2)); rs_metadata_normalize_wb(meta); } break; } case 0x00aa: /* Nikon Saturation */ if (meta->make == MAKE_NIKON) { if (raw_strcmp(rawfile, offset, "ENHANCED", 8)) meta->saturation = 1.5; else if (raw_strcmp(rawfile, offset, "MODERATE", 8)) meta->saturation = 0.5; else meta->saturation = 1.0; } break; case 0x0081: /* Nikon ToneComp (contrast)*/ if (meta->make == MAKE_NIKON) { if (raw_strcmp(rawfile, offset, "HIGH", 4)) meta->contrast = 1.2; else if (raw_strcmp(rawfile, offset, "LOW", 3)) meta->contrast= 0.8; else meta->contrast = 1.0; } break; } } return TRUE; } static gboolean makernote_olympus_camerasettings(RAWFILE *rawfile, guint base, guint offset, RSMetadata *meta) { /* NOTE! At least on E-410 the offsets in this section is relative to the base of the MakerNotes! */ gushort number_of_entries; gushort fieldtag=0; gushort fieldtype; guint valuecount; guint uint_temp1=0; guint save; if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; if (number_of_entries>5000) return FALSE; offset += 2; save = offset; while(number_of_entries--) { /* FIXME: Port to read_ifd() */ offset = save; raw_get_ushort(rawfile, offset, &fieldtag); raw_get_ushort(rawfile, offset+2, &fieldtype); raw_get_uint(rawfile, offset+4, &valuecount); offset += 8; save = offset + 4; if ((valuecount * ("1112481124848"[fieldtype < 13 ? fieldtype:0]-'0') > 4)) { raw_get_uint(rawfile, offset, &uint_temp1); offset = base + uint_temp1; } raw_get_uint(rawfile, offset, &uint_temp1); switch(fieldtag) { case 0x0101: /* PreviewImageStart */ raw_get_uint(rawfile, offset, &meta->preview_start); meta->preview_start += raw_get_base(rawfile); break; case 0x0102: /* PreviewImageLength */ raw_get_uint(rawfile, offset, &meta->preview_length); break; } } return TRUE; } static gboolean makernote_olympus_imageprocessing(RAWFILE *rawfile, guint base, guint offset, RSMetadata *meta) { gushort number_of_entries; struct IFD ifd; gushort ushort_temp1, ushort_temp2; if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; if (number_of_entries>5000) return FALSE; offset += 2; while(number_of_entries--) { read_ifd(rawfile, offset, &ifd); offset += 12; switch(ifd.tag) { case 0x0100: /* WB on E-510 */ if (ifd.count == 2) { raw_get_ushort(rawfile, ifd.offset, &ushort_temp1); raw_get_ushort(rawfile, ifd.offset+2, &ushort_temp2); } else if (ifd.count == 4) { raw_get_ushort(rawfile, ifd.offset+base, &ushort_temp1); raw_get_ushort(rawfile, ifd.offset+base+2, &ushort_temp2); } meta->cam_mul[0] = (gdouble) ushort_temp1 / 256.0; meta->cam_mul[2] = (gdouble) ushort_temp2 / 256.0; rs_metadata_normalize_wb(meta); break; } } return TRUE; } static gboolean makernote_olympus_equipment(RAWFILE *rawfile, guint base, guint offset, RSMetadata *meta) { gushort number_of_entries; struct IFD ifd; gushort ushort_temp1; gchar *str = NULL; gint total; if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; if (number_of_entries>5000) return FALSE; offset += 2; while(number_of_entries--) { read_ifd(rawfile, offset, &ifd); offset += 12; switch(ifd.tag) { case 0x0202: /* LensSerialNumber */ str = raw_strdup(rawfile, base + ifd.value_offset, 32); /* Make a number from the string we just got */ gint i = 0; while(str[i]) total += str[i++]; meta->lens_id = total; break; case 0x0205: /* MinApertureAtMinFocal */ raw_get_ushort(rawfile, offset-4, &ushort_temp1); meta->lens_min_aperture = (gfloat) pow(sqrt(2),(ushort_temp1/256)); break; case 0x0206: /* MaxApertureAtMaxFocal */ raw_get_ushort(rawfile, offset-4, &ushort_temp1); meta->lens_max_aperture = (gfloat) pow(sqrt(2),(ushort_temp1/256)); break; case 0x0207: /* MinFocalLength */ raw_get_ushort(rawfile, offset-4, &ushort_temp1); meta->lens_min_focal = ushort_temp1; break; case 0x0208: /* MaxFocalLength */ raw_get_ushort(rawfile, offset-4, &ushort_temp1); meta->lens_max_focal = ushort_temp1; break; } } return TRUE; } static gboolean makernote_olympus(RAWFILE *rawfile, guint base, guint offset, RSMetadata *meta) { gushort number_of_entries; gushort fieldtag=0; gushort fieldtype; gushort ushort_temp1=0; guint valuecount; guint uint_temp1=0; guint save; if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; if (number_of_entries>5000) return FALSE; offset += 2; save = offset; while(number_of_entries--) { /* FIXME: Port to read_ifd() */ offset = save; raw_get_ushort(rawfile, offset, &fieldtag); raw_get_ushort(rawfile, offset+2, &fieldtype); raw_get_uint(rawfile, offset+4, &valuecount); offset += 8; save = offset + 4; if ((valuecount * ("1112481124848"[fieldtype < 13 ? fieldtype:0]-'0') > 4)) { raw_get_uint(rawfile, offset, &uint_temp1); offset = base + uint_temp1; } raw_get_uint(rawfile, offset, &uint_temp1); switch(fieldtag) { case 0x0100: /* Thumbnail */ raw_get_ushort(rawfile, save-4, &ushort_temp1); meta->thumbnail_start = ushort_temp1; meta->thumbnail_length = valuecount; break; case 0x1017: /* Red multiplier on many Olympus's (E-10, E-300, E-330, E-400, E-500) */ raw_get_ushort(rawfile, offset, &ushort_temp1); meta->cam_mul[0] = (gdouble) ushort_temp1 / 256.0; break; case 0x1018: /* Blue multiplier on many Olympus's (E-10, E-300, E-330, E-400, E-500) */ raw_get_ushort(rawfile, offset, &ushort_temp1); meta->cam_mul[2] = (gdouble) ushort_temp1 / 256.0; break; case 0x2010: /* Equipment2 */ raw_get_uint(rawfile, offset, &uint_temp1); makernote_olympus_equipment(rawfile, base, base+uint_temp1, meta); break; case 0x2020: /* Olympus CameraSettings Tags */ raw_get_uint(rawfile, offset, &uint_temp1); makernote_olympus_camerasettings(rawfile, base+uint_temp1, base+uint_temp1, meta); meta->preview_start += base; /* Stupid hack! */ break; case 0x2040: /* Olympus ImageProcessing */ raw_get_uint(rawfile, offset, &uint_temp1); makernote_olympus_imageprocessing(rawfile, base, base+uint_temp1, meta); break; } } return TRUE; } static gboolean makernote_panasonic(RAWFILE *rawfile, guint offset, RSMetadata *meta) { gushort number_of_entries; struct IFD ifd; if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; if (number_of_entries>5000) return FALSE; offset += 2; while(number_of_entries--) { read_ifd(rawfile, offset, &ifd); offset += 12; switch(ifd.tag) { case 81: /* Lens type */ meta->fixed_lens_identifier = raw_strdup(rawfile, ifd.value_offset, ifd.count); break; case 82: /* Lens serial number */ if (!meta->fixed_lens_identifier) meta->fixed_lens_identifier = raw_strdup(rawfile, ifd.value_offset, ifd.count); break; case 0x8769: /* ExifIFDPointer */ exif_reader(rawfile, ifd.value_offset, meta); break; case 0x0111: /* StripOffsets - may be jpeg data */ if (ifd.count == 1 && raw_get_uint(rawfile, ifd.offset, &meta->thumbnail_start)) meta->thumbnail_start += raw_get_base(rawfile); else meta->thumbnail_start = 0; break; case 0x0117: /* StripByteCounts */ if (ifd.value_offset) meta->thumbnail_length = ifd.value_offset; break; } } return TRUE; } static gboolean likely_jpeg_at(RAWFILE *rawfile, guint offset) { guchar thumb_test_1 = 0; guchar thumb_test_2 = 0; guchar thumb_test_comps = 0; if (raw_get_uchar(rawfile, offset, &thumb_test_1)) { /* If SOI marker, it is likely valid JPEG*/ if (thumb_test_1 == 0xff && raw_get_uchar(rawfile, offset+1, &thumb_test_2)) if (thumb_test_2 == 0xd8) /* We read the "number of components", any value > 4 doesn't make sense */ if (raw_get_uchar(rawfile, offset+6, &thumb_test_comps)) if (thumb_test_comps <= 4) return TRUE; } return FALSE; } static gboolean ifd_panasonic(RAWFILE *rawfile, guint offset, RSMetadata *meta) { gushort number_of_entries; struct IFD ifd; RAWFILE *internal_file; guint off_first; gushort byteorder; if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; if (number_of_entries>5000) return FALSE; offset += 2; while(number_of_entries--) { read_ifd(rawfile, offset, &ifd); offset += 12; switch(ifd.tag) { case 0x0017: /* ISO */ meta->iso = ifd.value_offset; break; case 0x0024: /* WBRedLevel */ meta->cam_mul[0] = ifd.value_offset; break; case 0x0025: /* WBGreenLevel */ meta->cam_mul[1] = ifd.value_offset; meta->cam_mul[3] = ifd.value_offset; break; case 0x0026: /* WBBlueLevel */ meta->cam_mul[2] = ifd.value_offset; break; case 0x002e: /* Data Dump */ if (ifd.type != 7 || ifd.count <= 16) break; if (!raw_get_uint(rawfile, ifd.value_offset+12+4, &off_first)) break; if (!raw_get_ushort(rawfile,ifd.value_offset+12, &byteorder)) break; meta->thumbnail_length = ifd.count; internal_file = raw_create_from_memory(raw_get_map(rawfile)+ifd.value_offset+12, ifd.count, off_first, byteorder); ifd_reader(internal_file, off_first, meta); raw_close_file(internal_file); break; } } if (meta->thumbnail_start > raw_get_filesize(rawfile)) meta->thumbnail_start = 0; if (!likely_jpeg_at(rawfile, meta->thumbnail_start)) meta->thumbnail_start = 0; guint thumb_guess =0x1000; /* Thumbnails in Panasonic are always at 0x100 byte boundaries, and never observed start after byte 0x3000, so we play safe */ while (meta->thumbnail_start == 0 && thumb_guess < 0x8000) { if (likely_jpeg_at(rawfile, thumb_guess)) meta->thumbnail_start = thumb_guess; thumb_guess += 0x100; } /* Find end of image */ if (meta->thumbnail_start) { thumb_guess = 0; guchar* image = raw_get_map(rawfile) + meta->thumbnail_start; do { if (image[thumb_guess] == 0xff && image[thumb_guess] == 0xd9) meta->thumbnail_length = thumb_guess+2; } while (thumb_guess++ < raw_get_filesize(rawfile) - meta->thumbnail_start); } return TRUE; } static gboolean makernote_pentax(RAWFILE *rawfile, guint offset, RSMetadata *meta) { gushort number_of_entries; gushort ushort_temp1=0; struct IFD ifd; if (raw_strcmp(rawfile, offset, "AOC", 3)) offset += 6; else return FALSE; if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; if (number_of_entries>5000) return FALSE; offset += 2; while(number_of_entries--) { read_ifd(rawfile, offset, &ifd); offset += 12; switch(ifd.tag) { case 0x0201: /* White balance */ raw_get_ushort(rawfile, ifd.value_offset, &ushort_temp1); meta->cam_mul[0] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, ifd.value_offset+2, &ushort_temp1); meta->cam_mul[1] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, ifd.value_offset+4, &ushort_temp1); meta->cam_mul[3] = (gdouble) ushort_temp1; raw_get_ushort(rawfile, ifd.value_offset+6, &ushort_temp1); meta->cam_mul[2] = (gdouble) ushort_temp1; break; } } return TRUE; } static gboolean makernote_samsung(RAWFILE *rawfile, guint offset, RSMetadata *meta) { gushort number_of_entries = 0; guint base = offset; guint uint_temp1; gushort ushort_temp1; struct IFD ifd; /* get number of entries */ if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; offset += 2; while(number_of_entries--) { read_ifd(rawfile, offset, &ifd); offset += 12; switch (ifd.tag) { case 0xa021: /* White Balance */ raw_get_uint(rawfile, base+ifd.value_offset, &uint_temp1); meta->cam_mul[0] = (gdouble) uint_temp1; raw_get_uint(rawfile, base+ifd.value_offset+4, &uint_temp1); meta->cam_mul[1] = (gdouble) uint_temp1; raw_get_uint(rawfile, base+ifd.value_offset+8, &uint_temp1); meta->cam_mul[3] = (gdouble) uint_temp1; raw_get_uint(rawfile, base+ifd.value_offset+12, &uint_temp1); meta->cam_mul[2] = (gdouble) uint_temp1; break; case 0xa028: /* White Balance */ raw_get_uint(rawfile, base+ifd.value_offset, &uint_temp1); meta->cam_mul[0] -= (gdouble) uint_temp1; raw_get_uint(rawfile, base+ifd.value_offset+4, &uint_temp1); meta->cam_mul[1] -= (gdouble) uint_temp1; raw_get_uint(rawfile, base+ifd.value_offset+8, &uint_temp1); meta->cam_mul[3] -= (gdouble) uint_temp1; raw_get_uint(rawfile, base+ifd.value_offset+12, &uint_temp1); meta->cam_mul[2] -= (gdouble) uint_temp1; break; case 0xa003: /* LensType */ raw_get_ushort(rawfile, offset-4, &ushort_temp1); meta->lens_id = ushort_temp1; break; } } rs_metadata_normalize_wb(meta); return TRUE; } static gboolean makernote_sony(RAWFILE *rawfile, guint offset, RSMetadata *meta) { gushort number_of_entries = 0; guint uint_temp1; struct IFD ifd; /* get number of entries */ if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; offset += 2; while(number_of_entries--) { read_ifd(rawfile, offset, &ifd); offset += 12; switch (ifd.tag) { case 0xb027: /* LensType */ raw_get_uint(rawfile, offset-4, &uint_temp1); meta->lens_id = uint_temp1; break; } } return TRUE; } static void sony_decrypt(SonyMeta *sony, guint *data, gint len) { while (len--) *data++ ^= sony->pad[sony->p++ & 127] = sony->pad[(sony->p+1) & 127] ^ sony->pad[(sony->p+65) & 127]; } static gboolean private_sony(RAWFILE *rawfile, guint offset, RSMetadata *meta) { gushort number_of_entries; struct IFD ifd; gint i; gint key; SonyMeta *sony = (SonyMeta *) meta; if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; if (number_of_entries>5000) return FALSE; offset += 2; while(number_of_entries--) { read_ifd(rawfile, offset, &ifd); offset += 12; switch(ifd.tag) { case 0x7200: /* SR2SubIFDOffset */ sony->sony_offset = ifd.value_offset; break; case 0x7201: /* SR2SubIFDLength */ sony->sony_length = ifd.value_offset; break; case 0x7221: /* SR2SubIFDKey */ sony->sony_key = ifd.value_offset; /* Initialize decrypter */ key = sony->sony_key; for (sony->p=0; sony->p < 4; sony->p++) sony->pad[sony->p] = key = key * 48828125 + 1; sony->pad[3] = sony->pad[3] << 1 | (sony->pad[0]^sony->pad[2]) >> 31; for (sony->p=4; sony->p < 127; sony->p++) sony->pad[sony->p] = (sony->pad[sony->p-4]^sony->pad[sony->p-2]) << 1 | (sony->pad[sony->p-3]^sony->pad[sony->p-1]) >> 31; for (sony->p=0; sony->p < 127; sony->p++) sony->pad[sony->p] = htonl(sony->pad[sony->p]); break; } } if ((sony->sony_offset > 0) && (sony->sony_length > 0) && (sony->sony_key != 0)) { gpointer buf = g_new0(guchar, sony->sony_length); if (raw_strcpy(rawfile, sony->sony_offset, buf, sony->sony_length)) { sony_decrypt(sony, buf, sony->sony_length/4); gushort *sbuf = (gushort *)(buf); gushort tag_count = sbuf[0]; struct IFD *private_ifd; for(i=0;itag) { case 0x7303: /* WB_GRBGLevels */ sbuf = (gushort *)(buf + private_ifd->value_offset - sony->sony_offset); meta->cam_mul[1] = (gdouble) sbuf[0]; meta->cam_mul[0] = (gdouble) sbuf[1]; meta->cam_mul[2] = (gdouble) sbuf[2]; meta->cam_mul[3] = (gdouble) sbuf[3]; rs_metadata_normalize_wb(meta); break; case 0x7313: /* WB_RGGBLevels */ sbuf = (gushort *)(buf + private_ifd->value_offset - sony->sony_offset); meta->cam_mul[0] = (gdouble) sbuf[0]; meta->cam_mul[1] = (gdouble) sbuf[1]; meta->cam_mul[3] = (gdouble) sbuf[2]; meta->cam_mul[2] = (gdouble) sbuf[3]; rs_metadata_normalize_wb(meta); break; } } } } return TRUE; } static gboolean exif_reader(RAWFILE *rawfile, guint offset, RSMetadata *meta) { gushort number_of_entries = 0; struct IFD ifd; /* get number of entries */ if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; offset += 2; while(number_of_entries--) { read_ifd(rawfile, offset, &ifd); offset += 12; switch (ifd.tag) { case 0x010f: /* Make */ if (!meta->make_ascii) meta->make_ascii = rs_remove_tailing_spaces(raw_strdup(rawfile, ifd.offset, ifd.count), TRUE); break; case 0x0110: /* Model */ if (!meta->model_ascii) meta->model_ascii = rs_remove_tailing_spaces(raw_strdup(rawfile, ifd.offset, ifd.count), TRUE); break; case 0x9003: /* DateTime */ case 0x9004: /* DateTime */ if (!meta->time_ascii) { meta->time_ascii = raw_strdup(rawfile, ifd.value_offset, ifd.count); meta->timestamp = rs_exiftime_to_unixtime(meta->time_ascii); } break; case 0x829A: /* ExposureTime */ if (ifd.count == 1 && ifd.value_rational < EXPO_TIME_MAXVAL) meta->shutterspeed = 1.0 / ifd.value_rational; break; case 0x829D: /* FNumber */ if (ifd.count == 1) meta->aperture = ifd.value_rational; break; case 0x8827: /* ISOSpeedRatings */ if (ifd.count == 1) meta->iso = ifd.value_ushort; break; case 0x920A: /* Focal length */ meta->focallength = ifd.value_rational; break; case 0x927c: /* MakerNote */ switch (meta->make) { case MAKE_CANON: makernote_canon(rawfile, ifd.value_offset, meta); break; case MAKE_MINOLTA: makernote_minolta(rawfile, ifd.value_offset, meta); break; case MAKE_NIKON: makernote_nikon(rawfile, ifd.value_offset, meta); break; case MAKE_PENTAX: makernote_pentax(rawfile, ifd.value_offset, meta); break; case MAKE_OLYMPUS: if (raw_strcmp(rawfile, ifd.value_offset, "OLYMPUS", 7)) makernote_olympus(rawfile, ifd.value_offset, ifd.value_offset+12, meta); else if (raw_strcmp(rawfile, ifd.value_offset, "OLYMP", 5)) makernote_olympus(rawfile, ifd.value_offset+8, ifd.value_offset+8, meta); break; case MAKE_SAMSUNG: makernote_samsung(rawfile, ifd.value_offset, meta); break; case MAKE_SONY: makernote_sony(rawfile, ifd.value_offset, meta); break; case MAKE_PANASONIC: if (raw_strcmp(rawfile, ifd.value_offset, "Panasonic", 9)) makernote_panasonic(rawfile, ifd.value_offset+12, meta); break; default: break; } break; } } return TRUE; } static gboolean parse_dng_private_data(RAWFILE *rawfile, guint offset, RSMetadata *meta) { /* 1. Six bytes containing the zero-terminated string "Adobe". (The DNG specification calls for the DNGPrivateData tag to start with an ASCII string identifying the creator/format). 2. 4 bytes: an ASCII string ("MakN" for a Makernote), indicating what sort of data is being stored here. Note that this is not zero-terminated. 3. A four-byte count (number of data bytes following); this is the length of the original MakerNote data. (This is always in "most significant byte first" format). 4. 2 bytes: the byte-order indicator from the original file (the usual 'MM'/4D4D or 'II'/4949). 5. 4 bytes: the original file offset for the MakerNote tag data (stored according to the byte order given above). 6. The contents of the MakerNote tag. This is a simple byte-for-byte copy, with no modification. */ gushort tiff_byteorder = raw_get_byteorder(rawfile); /* Check if first string is "Adobe" */ if (!raw_strcmp(rawfile, offset, "Adobe", 5)) return FALSE; offset+=6; /* Check if type is Adobe Makernote */ if (!raw_strcmp(rawfile, offset, "MakN", 4)) return FALSE; offset+=4; /* Read makernote info */ raw_set_byteorder(rawfile, 0x4D4D); guint org_size; if (!raw_get_uint(rawfile, offset, &org_size)) { raw_set_byteorder(rawfile, tiff_byteorder); return FALSE; } if (org_size > raw_get_filesize(rawfile)-offset) { raw_set_byteorder(rawfile, tiff_byteorder); return FALSE; } offset+=4; gushort byteorder = 0; raw_get_ushort(rawfile, offset, &byteorder); offset+=2; if (byteorder != 0x4D4D && byteorder != 0x4949) { raw_set_byteorder(rawfile, tiff_byteorder); return FALSE; } guint org_offset; if (!raw_get_uint(rawfile, offset, &org_offset)) { raw_set_byteorder(rawfile, tiff_byteorder); return FALSE; } offset+=4; /* Create memory mapped TIFF */ const gchar* data = raw_get_map(rawfile); gchar* maker_data = g_malloc(org_offset + org_size); memcpy(&maker_data[org_offset],&data[offset], org_size); RAWFILE *maker_raw = raw_create_from_memory(maker_data, org_offset + org_size, org_offset, byteorder); /* Read makernote, as if this was the original file */ /* We preserve WB since it might have changed - converted Canon sRAW for instance */ gdouble stored_mul[4]; memcpy(stored_mul, meta->cam_mul,4*sizeof(gdouble)); switch (meta->make) { case MAKE_CANON: makernote_canon(maker_raw, org_offset, meta); break; case MAKE_MINOLTA: makernote_minolta(maker_raw, org_offset, meta); break; case MAKE_NIKON: makernote_nikon(maker_raw, org_offset, meta); break; case MAKE_PENTAX: makernote_pentax(maker_raw, org_offset, meta); break; case MAKE_OLYMPUS: if (raw_strcmp(maker_raw, org_offset, "OLYMPUS", 7)) makernote_olympus(maker_raw, org_offset, org_offset+12, meta); else if (raw_strcmp(maker_raw,org_offset, "OLYMP", 5)) makernote_olympus(maker_raw, org_offset+8, org_offset+8, meta); break; case MAKE_SAMSUNG: makernote_samsung(maker_raw, org_offset, meta); break; case MAKE_SONY: makernote_sony(maker_raw, org_offset, meta); break; case MAKE_PANASONIC: if (raw_strcmp(maker_raw, org_offset, "Panasonic", 9)) makernote_panasonic(maker_raw, org_offset+12, meta); break; default: break; } /* Restore WB */ memcpy(meta->cam_mul, stored_mul, 4*sizeof(gdouble)); raw_close_file(maker_raw); g_free(maker_data); raw_set_byteorder(rawfile, tiff_byteorder); return TRUE; } static gboolean ifd_reader(RAWFILE *rawfile, guint offset, RSMetadata *meta) { gushort number_of_entries = 0; gboolean is_preview = FALSE; guint uint_temp1; gfloat float_temp; struct IFD ifd; /* get number of entries */ if(!raw_get_ushort(rawfile, offset, &number_of_entries)) return FALSE; offset += 2; while(number_of_entries--) { read_ifd(rawfile, offset, &ifd); offset += 12; switch (ifd.tag) { case 0x00fe: /* Subfile type */ is_preview = (((gint)ifd.value) & 1) != 0; break; case 0x0100: /* Image width */ if (is_preview) meta->preview_width = ifd.value; break; case 0x0101: /* Image length (aka height in human language) */ if (is_preview) meta->preview_height = ifd.value; break; case 0x0102: /* Bits per sample */ if (is_preview) { raw_get_ushort (rawfile, ifd.value_offset + 0, &meta->preview_bits [0]); raw_get_ushort (rawfile, ifd.value_offset + 2, &meta->preview_bits [1]); raw_get_ushort (rawfile, ifd.value_offset + 4, &meta->preview_bits [2]); } break; case 0x0103: /* Compression */ break; case 0x010f: /* Make */ if (!meta->make_ascii) { meta->make_ascii = rs_remove_tailing_spaces(raw_strdup(rawfile, ifd.offset, ifd.count), TRUE); if (raw_strcmp(rawfile, ifd.value_offset, "Canon", 5)) meta->make = MAKE_CANON; else if (raw_strcmp(rawfile, ifd.value_offset, "CASIO", 5)) meta->make = MAKE_CASIO; else if (raw_strcmp(rawfile, ifd.value_offset, "Hasselblad", 10)) meta->make = MAKE_HASSELBLAD; else if (raw_strcmp(rawfile, ifd.value_offset, "KODAK", 5)) meta->make = MAKE_KODAK; else if (raw_strcmp(rawfile, ifd.value_offset, "EASTMAN KODAK", 13)) meta->make = MAKE_KODAK; else if (raw_strcmp(rawfile, ifd.value_offset, "Leica", 5)) meta->make = MAKE_LEICA; else if (raw_strcmp(rawfile, ifd.value_offset, "Minolta", 7)) meta->make = MAKE_MINOLTA; else if (raw_strcmp(rawfile, ifd.value_offset, "KONICA MINOLTA", 14)) meta->make = MAKE_MINOLTA; else if (raw_strcmp(rawfile, ifd.value_offset, "Mamiya", 6)) meta->make = MAKE_MAMIYA; else if (raw_strcmp(rawfile, ifd.value_offset, "NIKON", 5)) meta->make = MAKE_NIKON; else if (raw_strcmp(rawfile, ifd.value_offset, "OLYMPUS", 7)) meta->make = MAKE_OLYMPUS; else if (raw_strcmp(rawfile, ifd.value_offset, "Panasonic", 9)) meta->make = MAKE_PANASONIC; else if (raw_strcmp(rawfile, ifd.value_offset, "PENTAX", 6)) meta->make = MAKE_PENTAX; else if (raw_strcmp(rawfile, ifd.value_offset, "Phase One", 9)) meta->make = MAKE_PHASEONE; else if (raw_strcmp(rawfile, ifd.value_offset, "Ricoh", 5)) meta->make = MAKE_RICOH; else if (raw_strcmp(rawfile, ifd.value_offset, "SAMSUNG", 7)) meta->make = MAKE_SAMSUNG; /* Do not detect SONY, we don't want to call private_sony() unless we're sure we have a hidden SonyMeta */ else if (raw_strcmp(rawfile, ifd.value_offset, "FUJIFILM", 4)) meta->make = MAKE_FUJIFILM; else if (raw_strcmp(rawfile, ifd.value_offset, "SEIKO EPSON", 11)) meta->make = MAKE_EPSON; } break; case 0x0110: /* Model */ if (!meta->model_ascii) meta->model_ascii = rs_remove_tailing_spaces(raw_strdup(rawfile, ifd.offset, ifd.count), TRUE); break; case 0x0111: /* StripOffsets */ if (meta->preview_start==0 || is_preview) meta->preview_start = ifd.value + raw_get_base(rawfile); break; case 0x0112: /* Orientation */ if (ifd.count == 1) { meta->orientation = ifd.value_ushort; switch (meta->orientation) { case 6: meta->orientation = 90; break; case 8: meta->orientation = 270; break; } } break; case 0x0117: /* StripByteCounts */ if (meta->preview_length==0 || is_preview) meta->preview_length = ifd.value; break; case 0x011c: /* Planar configuration */ if (is_preview) meta->preview_planar_config = ifd.value; break; case 0x0132: /* DateTime */ break; case 0x014a: /* SubIFD */ /*Sony DSLR-A100 tag 0x014a points to RAW data */ if (meta->make == MAKE_SONY) if (g_strcmp0(meta->model_ascii, "DSLR-A100") == 0) break; if (ifd.count == 1) ifd_reader(rawfile, ifd.value_offset, meta); else { raw_get_uint(rawfile, ifd.value_offset, &uint_temp1); ifd_reader(rawfile, uint_temp1, meta); } break; case 0x0201: /* JPEGInterchangeFormat */ meta->thumbnail_start = ifd.value_uint + raw_get_base(rawfile); break; case 0x0202: /* JPEGInterchangeFormatLength */ meta->thumbnail_length = ifd.value_uint; break; case 0x8769: /* ExifIFDPointer */ exif_reader(rawfile, ifd.value_offset, meta); break; /* The following tags are from the DNG spec, they should be safe */ case 0xc628: /* DNG: AsShotNeutral */ if (((ifd.type == TIFF_FIELD_TYPE_RATIONAL)||(ifd.type == TIFF_FIELD_TYPE_SRATIONAL)) && ifd.count == 3) { meta->cam_mul[0] = 1.0/get_rational(rawfile, ifd.value_offset); meta->cam_mul[1] = 1.0/get_rational(rawfile, ifd.value_offset+8); meta->cam_mul[2] = 1.0/get_rational(rawfile, ifd.value_offset+16); meta->cam_mul[3] = meta->cam_mul[1]; rs_metadata_normalize_wb(meta); } break; case 0xc634: /* DNG: PrivateData */ if (meta->make == MAKE_SONY) private_sony(rawfile, ifd.value_offset, meta); parse_dng_private_data(rawfile, ifd.value_offset, meta); break; case 0xc630: /* DNG LensInfo */ if (raw_get_rational(rawfile, ifd.value_offset, &float_temp)) meta->lens_min_focal = float_temp; if (raw_get_rational(rawfile, ifd.value_offset+8, &float_temp)) meta->lens_max_focal = float_temp; if (raw_get_rational(rawfile, ifd.value_offset+16, &float_temp)) meta->lens_min_aperture = float_temp; if (raw_get_rational(rawfile, ifd.value_offset+24, &float_temp)) meta->lens_max_aperture = float_temp; break; } } return TRUE; } /** * Generic TIFF reader */ static gboolean tiff_load_meta(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta) { guint next = 0; gushort ifd_num = 0; guchar version; version = raw_init_file_tiff(rawfile, offset); if (version == 0x55) meta->make = MAKE_LEICA; offset = get_first_ifd_offset(rawfile); do { if (!raw_get_ushort(rawfile, offset, &ifd_num)) break; /* used for calculating next IFD */ if (!raw_get_uint(rawfile, offset+2+ifd_num*12, &next)) break; /* 2: offset+short(ifd_num), 12: length of ifd-entry */ switch (meta->make) { case MAKE_LEICA: if (!makernote_leica(rawfile, offset, meta)) ifd_reader(rawfile, offset, meta); break; default: ifd_reader(rawfile, offset, meta); break; } /* Hack to support a few cameras that embeds EXIF-info or Makernotes in IFD 0 */ if (meta->make == MAKE_CANON && g_str_equal(meta->model_ascii, "EOS D2000C")) exif_reader(rawfile, offset, meta); if (meta->make == MAKE_KODAK && g_str_equal(meta->model_ascii, "DCS520C")) exif_reader(rawfile, offset, meta); if (meta->make == MAKE_KODAK && g_str_equal(meta->model_ascii, "DCS Pro 14N")) exif_reader(rawfile, offset, meta); if (meta->make == MAKE_PANASONIC) ifd_panasonic(rawfile, offset, meta); if (offset == next) break; /* avoid infinite loops */ offset = next; } while (next>0); rs_metadata_normalize_wb(meta); return !!meta->make; } /** * .TIF reader */ static gboolean tif_load_meta(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta) { if (!tiff_load_meta(service, rawfile, offset, meta)) return FALSE; /* Phase One and Samsung doesn't set this */ if ((meta->make == MAKE_PHASEONE) || (meta->make == MAKE_SAMSUNG)) meta->preview_planar_config = 1; /* Load thumbnail - try thumbnail first - then preview image - then decode the RAW image*/ if (!thumbnail_reader(service, rawfile, meta->thumbnail_start, meta->thumbnail_length, meta)) if (!thumbnail_reader(service, rawfile, meta->preview_start, meta->preview_length, meta)) thumbnail_store(raw_thumbnail_reader(service, meta), meta); return TRUE; } static gboolean thumbnail_reader(const gchar *service, RAWFILE *rawfile, guint offset, guint length, RSMetadata *meta) { GdkPixbuf *pixbuf=NULL; if ((offset>0) && (length>0) && (length<5000000)) { if ((length==165888) && (meta->make == MAKE_CANON)) pixbuf = gdk_pixbuf_new_from_data(raw_get_map(rawfile)+offset, GDK_COLORSPACE_RGB, FALSE, 8, 288, 192, 288*3, NULL, NULL); else if (length==57600) /* Multiple Nikon, Pentax and Samsung cameras */ pixbuf = gdk_pixbuf_new_from_data(raw_get_map(rawfile)+offset, GDK_COLORSPACE_RGB, FALSE, 8, 160, 120, 160*3, NULL, NULL); else if (length==48672) pixbuf = gdk_pixbuf_new_from_data(raw_get_map(rawfile)+offset, GDK_COLORSPACE_RGB, FALSE, 8, 156, 104, 156*3, NULL, NULL); else /* Many RAW files are based on TIFF and include the preview image * as the "main" image in the TIFF so that "normal" image viewing * programs can display at least the thumbnail. So we will * check if the TIFF contains such a thumbnail in the simplest * possible format (e.g. uncompressed R8G8B8) and use it * if it is present. */ if (offset == meta->preview_start && /* if we're using the preview image */ meta->preview_planar_config == 1 && /* uncompressed */ meta->preview_bits [0] == 8 && meta->preview_bits [1] == 8 && meta->preview_bits [2] == 8 && /* R8G8B8 */ meta->preview_width * meta->preview_height * 3 == length && meta->preview_width > 16 && meta->preview_width < 1024 && meta->preview_height > 16 && meta->preview_height < 1024) /* Some arbitrary sane limit */ pixbuf = gdk_pixbuf_new_from_data( raw_get_map(rawfile)+offset, GDK_COLORSPACE_RGB, FALSE, 8, meta->preview_width, meta->preview_height, meta->preview_width * 3, NULL, NULL); else /* Try to guess file format based on contents (JPEG previews) */ pixbuf = raw_get_pixbuf(rawfile, offset, length); } if ( pixbuf && (gdk_pixbuf_get_width(pixbuf) < 10 || gdk_pixbuf_get_height(pixbuf) < 10)) pixbuf = NULL; return thumbnail_store(pixbuf, meta); } static gboolean thumbnail_store(GdkPixbuf *pixbuf, RSMetadata *meta) { GdkPixbuf *pixbuf2=NULL; if (pixbuf) { gdouble ratio; /* Handle Canon/Nikon cropping */ if ((gdk_pixbuf_get_width(pixbuf) == 160) && (gdk_pixbuf_get_height(pixbuf)==120)) { pixbuf2 = gdk_pixbuf_new(GDK_COLORSPACE_RGB, FALSE, 8, 160, 106); gdk_pixbuf_copy_area(pixbuf, 0, 7, 160, 106, pixbuf2, 0, 0); g_object_unref(pixbuf); pixbuf = pixbuf2; } /* Scale to a bounding box of 128x128 pixels */ ratio = ((gdouble) gdk_pixbuf_get_width(pixbuf))/((gdouble) gdk_pixbuf_get_height(pixbuf)); if (ratio>1.0) pixbuf2 = gdk_pixbuf_scale_simple(pixbuf, 128, (gint) (128.0/ratio), GDK_INTERP_BILINEAR); else pixbuf2 = gdk_pixbuf_scale_simple(pixbuf, (gint) (128.0*ratio), 128, GDK_INTERP_BILINEAR); g_object_unref(pixbuf); pixbuf = pixbuf2; /* Rotate thumbnail in place */ switch (meta->orientation) { /* this is very COUNTER-intuitive - gdk_pixbuf_rotate_simple() is wierd */ case 90: pixbuf2 = gdk_pixbuf_rotate_simple(pixbuf, GDK_PIXBUF_ROTATE_CLOCKWISE); g_object_unref(pixbuf); pixbuf = pixbuf2; break; case 270: pixbuf2 = gdk_pixbuf_rotate_simple(pixbuf, GDK_PIXBUF_ROTATE_COUNTERCLOCKWISE); g_object_unref(pixbuf); pixbuf = pixbuf2; break; } meta->thumbnail = pixbuf; return TRUE; } return FALSE; } static GdkPixbuf* raw_thumbnail_reader(const gchar *service, RSMetadata *meta) { GdkPixbuf* pixbuf = 0; gint c; gfloat pre_mul[4]; RSFilter *finput = rs_filter_new("RSInputFile", NULL); RSFilter *fdemosaic = rs_filter_new("RSDemosaic", finput); RSFilter *fresample = rs_filter_new("RSResample", fdemosaic); RSFilter *fcst = rs_filter_new("RSColorspaceTransform", fresample); g_object_set(fresample, "width", 256, "height", 256, "bounding-box", TRUE, NULL); g_object_set(finput, "filename", service, "color-space", rs_color_space_new_singleton("RSSrgb"), NULL); rs_filter_set_recursive(RS_FILTER(fdemosaic), "demosaic-allow-downscale", TRUE, NULL); RSFilterRequest *request = rs_filter_request_new(); rs_filter_request_set_roi(request, FALSE); rs_filter_request_set_quick(request, TRUE); for(c=0;c<4;c++) pre_mul[c] = (gfloat) meta->cam_mul[c] * 1.5f; rs_filter_param_set_float4(RS_FILTER_PARAM(request), "premul", pre_mul); rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", rs_color_space_new_singleton("RSSrgb")); RSFilterResponse *response = rs_filter_get_image8(fcst, request); pixbuf = rs_filter_response_get_image8(response); g_object_unref(finput); g_object_unref(fdemosaic); g_object_unref(fresample); g_object_unref(fcst); g_object_unref(request); g_object_unref(response); return pixbuf; } static gboolean sony_load_meta(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta) { SonyMeta sony; sony.sony_offset = 0; sony.sony_length = 0; sony.sony_key = 0; meta->make = MAKE_SONY; memcpy(&sony, meta, sizeof(RSMetadata)); gboolean ret = tif_load_meta(service, rawfile, offset, RS_METADATA(&sony)); memcpy(meta, &sony, sizeof(RSMetadata)); return ret; } G_MODULE_EXPORT void rs_plugin_load(RSPlugin *plugin) { rs_filetype_register_meta_loader(".cr2", "Canon CR2", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".nef", "Nikon NEF", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".nrw", "Nikon NEF 2", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".tif", "Canon TIFF", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".rwl", "Leica", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".arw", "Sony", sony_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".sr2", "Sony", sony_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".srf", "Sony", sony_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".kdc", "Kodak", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".dcr", "Kodak", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".orf", "Olympus", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".raw", "Panasonic raw", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".rw2", "Panasonic raw 2", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".pef", "Pentax raw", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".dng", "Adobe Digital negative", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".mef", "Mamiya", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".3fr", "Hasselblad", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".erf", "Epson", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".srw", "Samsung", tif_load_meta, 10, RS_LOADER_FLAGS_RAW); rs_filetype_register_meta_loader(".tiff", "Generic TIFF meta loader", tiff_load_meta, 10, RS_LOADER_FLAGS_RAW); } rawstudio-2.0/plugins/meta-tiff/Makefile.in0000644000175000017500000004211011547430040015713 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = plugins/meta-tiff DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" LTLIBRARIES = $(lib_LTLIBRARIES) meta_tiff_la_DEPENDENCIES = am_meta_tiff_la_OBJECTS = tiff-meta.lo meta_tiff_la_OBJECTS = $(am_meta_tiff_la_OBJECTS) meta_tiff_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(meta_tiff_la_LDFLAGS) $(LDFLAGS) -o $@ DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(meta_tiff_la_SOURCES) DIST_SOURCES = $(meta_tiff_la_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = $(datadir)/rawstudio/plugins/ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ plugindir = $(libdir)/rawstudio/plugins AM_CFLAGS = \ -Wall\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ lib_LTLIBRARIES = meta_tiff.la meta_tiff_la_LIBADD = @PACKAGE_LIBS@ meta_tiff_la_LDFLAGS = -module -avoid-version meta_tiff_la_SOURCES = tiff-meta.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu plugins/meta-tiff/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu plugins/meta-tiff/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done meta_tiff.la: $(meta_tiff_la_OBJECTS) $(meta_tiff_la_DEPENDENCIES) $(meta_tiff_la_LINK) -rpath $(libdir) $(meta_tiff_la_OBJECTS) $(meta_tiff_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiff-meta.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: for dir in "$(DESTDIR)$(libdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/COPYING0000644000175000017500000004313311526533646011367 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 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 St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. rawstudio-2.0/config.guess0000755000175000017500000012763711371534605012662 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. timestamp='2009-12-30' # This file 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[456]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else echo ${UNAME_MACHINE}-unknown-linux-gnueabi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: rawstudio-2.0/Makefile.am0000644000175000017500000000044711547425312012362 00000000000000## Process this file with automake to produce Makefile.in SUBDIRS = librawstudio plugins src po pixmaps profiles desktopdir = $(datadir)/applications desktop_DATA = rawstudio.desktop EXTRA_DIST = \ autogen.sh \ ChangeLog \ rawstudio.desktop \ gettext.h \ .version ChangeLog: svn2cl -i rawstudio-2.0/src/0000755000175000017500000000000011547430076011173 500000000000000rawstudio-2.0/src/rs-batch.c0000644000175000017500000010460211547376317012774 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include #include #include #include #include "application.h" #include "rs-batch.h" #include "conf_interface.h" #include "gettext.h" #include "gtk-helper.h" #include "gtk-interface.h" #include "filename.h" #include "rs-cache.h" #include "rs-photo.h" #include "rs-actions.h" #include "rs-store.h" extern GtkWindow *rawstudio_window; static GtkWidget *make_batchview(RS_QUEUE *queue); static void size_update_infolabel(RS_QUEUE *queue); static gchar *batch_queue_filename = NULL; static void batch_queue_update_sensivity(RS_QUEUE *queue); static void batch_queue_save(RS_QUEUE *queue) { xmlTextWriterPtr writer; GtkTreeIter iter; gchar *filename; gint setting_id; g_assert(queue != NULL); g_assert(batch_queue_filename != NULL); writer = xmlNewTextWriterFilename(batch_queue_filename, 0); if (!writer) return; xmlTextWriterSetIndent(writer, 1); xmlTextWriterStartDocument(writer, NULL, "ISO-8859-1", NULL); xmlTextWriterStartElement(writer, BAD_CAST "rawstudio-batch-queue"); if (gtk_tree_model_get_iter_first(queue->list, &iter)) do { gtk_tree_model_get(queue->list, &iter, RS_QUEUE_ELEMENT_FILENAME, &filename, RS_QUEUE_ELEMENT_SETTING_ID, &setting_id, -1); xmlTextWriterStartElement(writer, BAD_CAST "entry"); xmlTextWriterWriteFormatElement(writer, BAD_CAST "filename", "%s", filename); xmlTextWriterWriteFormatElement(writer, BAD_CAST "snapshot", "%d", setting_id); xmlTextWriterEndElement(writer); g_free(filename); } while(gtk_tree_model_iter_next(queue->list, &iter)); xmlTextWriterEndDocument(writer); xmlFreeTextWriter(writer); return; } static void batch_queue_load(RS_QUEUE *queue) { xmlDocPtr doc; xmlNodePtr cur; xmlNodePtr entry = NULL; xmlChar *val; g_assert(queue != NULL); if (!batch_queue_filename) batch_queue_filename = g_build_filename(rs_confdir_get(), "batch-queue.xml", NULL); if (!g_file_test(batch_queue_filename, G_FILE_TEST_IS_REGULAR)) return; doc = xmlParseFile(batch_queue_filename); if (!doc) return; cur = xmlDocGetRootElement(doc); cur = cur->xmlChildrenNode; while(cur) { if ((!xmlStrcmp(cur->name, BAD_CAST "entry"))) { xmlChar *filename = NULL; gint setting_id = -1; entry = cur->xmlChildrenNode; while (entry) { if ((!xmlStrcmp(entry->name, BAD_CAST "filename"))) { filename = xmlNodeListGetString(doc, entry->xmlChildrenNode, 1); } if ((!xmlStrcmp(entry->name, BAD_CAST "snapshot"))) { val = xmlNodeListGetString(doc, entry->xmlChildrenNode, 1); setting_id = atoi((char *)val); if (setting_id > 2) setting_id = 2; if (setting_id < 0) setting_id = 0; xmlFree(val); } entry = entry->next; } if (filename && (setting_id >= 0)) { rs_batch_add_to_queue(queue, (gchar *) filename, setting_id); xmlFree(filename); } } cur = cur->next; } xmlFreeDoc(doc); return; } RS_QUEUE* rs_batch_new_queue(RS_BLOB *rs) { gchar *tmp; RS_QUEUE *queue = g_new(RS_QUEUE, 1); queue->rs = rs; queue->output = NULL; queue->list = GTK_TREE_MODEL(gtk_list_store_new(5, G_TYPE_STRING,G_TYPE_STRING, G_TYPE_INT,G_TYPE_STRING, GDK_TYPE_PIXBUF)); queue->directory = rs_conf_get_string(CONF_BATCH_DIRECTORY); if (queue->directory == NULL) { rs_conf_set_string(CONF_BATCH_DIRECTORY, DEFAULT_CONF_BATCH_DIRECTORY); queue->directory = rs_conf_get_string(CONF_BATCH_DIRECTORY); } queue->filename = rs_conf_get_string(CONF_BATCH_FILENAME); if (queue->filename == NULL) { rs_conf_set_string(CONF_BATCH_FILENAME, DEFAULT_CONF_BATCH_FILENAME); queue->filename = rs_conf_get_string(CONF_BATCH_FILENAME); } queue->size_lock = LOCK_SCALE; queue->size = 100; queue->size_window = NULL; queue->scale = 100; queue->width = 600; queue->height = 600; /* Load last values */ rs_conf_get_integer(CONF_BATCH_SIZE_SCALE, &queue->scale); rs_conf_get_integer(CONF_BATCH_SIZE_WIDTH, &queue->width); rs_conf_get_integer(CONF_BATCH_SIZE_HEIGHT, &queue->height); tmp = rs_conf_get_string(CONF_BATCH_SIZE_LOCK); if (tmp) { if (g_str_equal(tmp, "bounding-box")) queue->size_lock = LOCK_BOUNDING_BOX; else if (g_str_equal(tmp, "width")) queue->size_lock = LOCK_WIDTH; else if (g_str_equal(tmp, "height")) queue->size_lock = LOCK_HEIGHT; g_free(tmp); } return queue; } gboolean rs_batch_add_to_queue(RS_QUEUE *queue, const gchar *filename, const gint setting_id) { gboolean ret = FALSE; if (!rs_batch_exists_in_queue(queue, filename, setting_id)) { RSMetadata *metadata; gchar *filename_short, *setting_id_abc; GdkPixbuf *pixbuf = NULL, *missing_thumb, *pixbuf_temp; filename_short = g_path_get_basename(filename); switch(setting_id) { case 0: setting_id_abc = _("A"); break; case 1: setting_id_abc = _("B"); break; case 2: setting_id_abc = _("C"); break; default: return ret; } missing_thumb = gtk_widget_render_icon(GTK_WIDGET(rawstudio_window), GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_DIALOG, NULL); metadata = rs_metadata_new_from_file(filename); pixbuf = rs_metadata_get_thumbnail(metadata); g_object_unref(metadata); if (pixbuf) { gint w,h,temp,size = 48; w = gdk_pixbuf_get_width(pixbuf); h = gdk_pixbuf_get_height(pixbuf); if (w > h) { temp = 1000*h/w; pixbuf_temp = gdk_pixbuf_scale_simple(pixbuf, size, size*temp/1000, GDK_INTERP_BILINEAR); g_object_unref(pixbuf); pixbuf = pixbuf_temp; } else { temp = 1000*w/h; pixbuf_temp = gdk_pixbuf_scale_simple(pixbuf, size*temp/1000, size, GDK_INTERP_BILINEAR); g_object_unref(pixbuf); pixbuf = pixbuf_temp; } } else { pixbuf = missing_thumb; g_object_ref (pixbuf); } g_object_unref(missing_thumb); if (!rs_batch_exists_in_queue(queue, filename, setting_id)) { GtkTreeIter iter; gtk_list_store_append (GTK_LIST_STORE(queue->list), &iter); gtk_list_store_set (GTK_LIST_STORE(queue->list), &iter, RS_QUEUE_ELEMENT_FILENAME, filename, RS_QUEUE_ELEMENT_FILENAME_SHORT, filename_short, RS_QUEUE_ELEMENT_SETTING_ID, setting_id, RS_QUEUE_ELEMENT_SETTING_ID_ABC, setting_id_abc, RS_QUEUE_ELEMENT_THUMBNAIL, pixbuf, -1); ret = TRUE; } g_object_unref(pixbuf); g_free(filename_short); } batch_queue_save(queue); batch_queue_update_sensivity(queue); return ret; } gboolean rs_batch_remove_from_queue(RS_QUEUE *queue, const gchar *filename, gint setting_id) { gboolean ret = FALSE; GtkTreeIter iter; gchar *filename_temp = NULL; gint setting_id_temp; gtk_tree_model_get_iter_first(GTK_TREE_MODEL(queue->list), &iter); if (gtk_list_store_iter_is_valid(GTK_LIST_STORE(queue->list), &iter)) { do { gtk_tree_model_get(queue->list, &iter, RS_QUEUE_ELEMENT_FILENAME, &filename_temp, RS_QUEUE_ELEMENT_SETTING_ID, &setting_id_temp, -1); if (g_str_equal(filename, filename_temp)) { if (setting_id == setting_id_temp) { gtk_list_store_remove(GTK_LIST_STORE(queue->list), &iter); ret = TRUE; } } g_free(filename_temp); /* Break out of the loop if we got a hit */ if (ret) break; } while (gtk_tree_model_iter_next(queue->list, &iter)); } batch_queue_save(queue); rs_core_actions_update_menu_items(queue->rs); /* FIXME: should be done with a signal */ batch_queue_update_sensivity(queue); return ret; } gboolean rs_batch_exists_in_queue(RS_QUEUE *queue, const gchar *filename, gint setting_id) { gboolean ret = FALSE; GtkTreeIter iter; gchar *filename_temp; gint setting_id_temp; gtk_tree_model_get_iter_first(queue->list, &iter); if (gtk_list_store_iter_is_valid(GTK_LIST_STORE(queue->list), &iter)) { do { gtk_tree_model_get(queue->list, &iter, RS_QUEUE_ELEMENT_FILENAME, &filename_temp, RS_QUEUE_ELEMENT_SETTING_ID, &setting_id_temp, -1); if (g_str_equal(filename, filename_temp)) { if (setting_id == setting_id_temp) ret = TRUE; } g_free(filename_temp); } while (gtk_tree_model_iter_next(queue->list, &iter) && !ret); } return ret; } static gboolean window_destroy(GtkWidget *widget, GdkEvent *event, gpointer user_data) { gboolean *abort_render = (gboolean *) user_data; *abort_render = TRUE; return(TRUE); } static void cancel_clicked(GtkButton *button, gpointer user_data) { gboolean *abort_render = (gboolean *) user_data; *abort_render = TRUE; return; } void rs_batch_process(RS_QUEUE *queue) { RS_PHOTO *photo = NULL; GtkTreeIter iter; gchar *filename_in; gint setting_id; GtkWidget *preview = gtk_image_new(); GdkPixbuf *pixbuf = NULL; gint width = -1, height = -1; gdouble scale = -1.0; gchar *parsed_filename, *basename, *parsed_dir; GString *filename; GString *status = g_string_new(NULL); GtkWidget *window; GtkWidget *label = gtk_label_new(NULL); GtkWidget *vbox = gtk_vbox_new(FALSE, 4); GtkWidget *cancel; gboolean abort_render = FALSE; GTimeVal start_time; GTimeVal now_time = {0,0}; gint time, eta; GtkWidget *eta_label = gtk_label_new(NULL); gchar *eta_text, *title_text; gint h = 0, m = 0, s = 0; gint done = 0, left = 0; RSFilter *finput = rs_filter_new("RSInputImage16", NULL); RSFilter *fdemosaic = rs_filter_new("RSDemosaic", finput); RSFilter *ffujirotate = rs_filter_new("RSFujiRotate", fdemosaic); RSFilter *flensfun = rs_filter_new("RSLensfun", ffujirotate); RSFilter *frotate = rs_filter_new("RSRotate", flensfun); RSFilter *fcrop = rs_filter_new("RSCrop", frotate); RSFilter *fcache = rs_filter_new("RSCache", fcrop); RSFilter *fresample= rs_filter_new("RSResample", fcache); RSFilter *ftransform_input = rs_filter_new("RSColorspaceTransform", fresample); RSFilter *fdcp= rs_filter_new("RSDcp", ftransform_input); RSFilter *fdenoise= rs_filter_new("RSDenoise", fdcp); RSFilter *ftransform_display = rs_filter_new("RSColorspaceTransform", fdenoise); RSFilter *fend = ftransform_display; RSFilterResponse *filter_response; RSColorSpace *display_color_space; gchar* cs_name; if ((cs_name = rs_conf_get_string("display-colorspace"))) display_color_space = rs_color_space_new_singleton(cs_name); else display_color_space = rs_color_space_new_singleton("RSSrgb"); /* FIXME: This is just a temporary hack to make batch work */ #if 0 { RSIccProfile *profile; profile = NULL; gchar *profile_filename = rs_conf_get_cms_profile(CMS_PROFILE_INPUT); if (profile_filename) { profile = rs_icc_profile_new_from_file(profile_filename); g_free(profile_filename); } /*if (!profile) profile = rs_icc_profile_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "profiles" G_DIR_SEPARATOR_S "generic_camera_profile.icc");*/ g_object_set(finput, "icc-profile", profile, NULL); g_object_unref(profile); profile = NULL; profile_filename = rs_conf_get_cms_profile(CMS_PROFILE_EXPORT); if (profile_filename) { profile = rs_icc_profile_new_from_file(profile_filename); g_free(profile_filename); } if (!profile) profile = rs_icc_profile_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "profiles" G_DIR_SEPARATOR_S "sRGB.icc"); g_object_set(fend, "icc-profile", profile, NULL); g_object_unref(profile); } #endif gdk_threads_enter(); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_transient_for(GTK_WINDOW(window), rawstudio_window); gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_destroy_with_parent(GTK_WINDOW(window), TRUE); gtk_window_resize(GTK_WINDOW(window), 250, 250); g_signal_connect((gpointer) window, "delete_event", G_CALLBACK(window_destroy), &abort_render); cancel = gtk_button_new_with_label(_("Cancel")); g_signal_connect (G_OBJECT(cancel), "clicked", G_CALLBACK(cancel_clicked), &abort_render); gtk_container_add (GTK_CONTAINER (window), vbox); gtk_box_pack_start (GTK_BOX (vbox), gui_framed(preview, _("Last image:"), GTK_SHADOW_IN), TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), eta_label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vbox), cancel, FALSE, FALSE, 0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 15); gtk_widget_show_all(window); while (gtk_events_pending()) gtk_main_iteration(); g_mkdir_with_parents(queue->directory, 00755); g_get_current_time(&start_time); while(gtk_tree_model_get_iter_first(queue->list, &iter) && (!abort_render)) { left = rs_batch_num_entries(queue); if (done > 0 && now_time.tv_sec > 0) { time = (gint) (now_time.tv_sec-start_time.tv_sec); eta = (time/done)*left; h = (eta/3600); eta %= 3600; m = (eta/60); eta %= 60; s = eta; eta_text = g_strdup_printf(_("Time left: %dh %dm %ds"), h, m, s); title_text = g_strdup_printf(_("Processing Image %d/%d"), done+1, done+left); } else { eta_text = g_strdup(_("Time left: ...")); title_text = g_strdup_printf(_("Processing Image 1/%d."), left); } gtk_window_set_title(GTK_WINDOW(window), title_text); gtk_label_set_text(GTK_LABEL(eta_label), eta_text); g_free(eta_text); g_free(title_text); done++; gtk_tree_model_get(queue->list, &iter, RS_QUEUE_ELEMENT_FILENAME, &filename_in, RS_QUEUE_ELEMENT_SETTING_ID, &setting_id, -1); basename = g_path_get_basename(filename_in); g_string_printf(status, _("Loading %s ..."), basename); gtk_label_set_text(GTK_LABEL(label), status->str); while (gtk_events_pending()) gtk_main_iteration(); g_free(basename); gdk_threads_leave(); photo = rs_photo_load_from_file(filename_in); if (photo) { rs_metadata_load_from_file(photo->metadata, filename_in); rs_cache_load(photo); /* Build new filename */ if (NULL == g_strrstr(queue->filename, "%p")) { filename = g_string_new(queue->directory); g_string_append(filename, G_DIR_SEPARATOR_S); g_string_append(filename, queue->filename); } else filename = g_string_new(queue->filename); g_string_append(filename, "."); g_string_append(filename, rs_output_get_extension(queue->output)); parsed_filename = filename_parse(filename->str, filename_in, setting_id); /* Create directory, if it doesn't exist */ parsed_dir = g_path_get_dirname(parsed_filename); if (FALSE == g_file_test(parsed_dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) if (g_mkdir_with_parents(parsed_dir, 0x1ff)) { gdk_threads_enter(); gui_status_notify(_("Could not create output directory.")); break; } GList *filters = g_list_append(NULL, fend); rs_photo_apply_to_filters(photo, filters, setting_id); g_list_free(filters); rs_filter_set_recursive(fend, "image", photo->input_response, "filename", photo->filename, "bounding-box", TRUE, "width", 250, "height", 250, NULL); /* Render preview image */ RSFilterRequest *request = rs_filter_request_new(); rs_filter_request_set_quick(RS_FILTER_REQUEST(request), FALSE); /* FIXME: Should be set to output colorspace, not forced to sRGB */ rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", display_color_space); filter_response = rs_filter_get_image8(fend, request); pixbuf = rs_filter_response_get_image8(filter_response); gdk_threads_enter(); if (pixbuf) { gtk_image_set_from_pixbuf(GTK_IMAGE(preview), pixbuf); g_object_unref(pixbuf); } g_object_unref(request); g_object_unref(filter_response); if (left > 1) { GtkTreeIter iter2 = iter; if (gtk_tree_model_iter_next (queue->list, &iter2)) { gtk_tree_model_get(queue->list, &iter2, RS_QUEUE_ELEMENT_FILENAME, &filename_in, -1); rs_io_idle_prefetch_file(filename_in, 0xC01A); } } /* Build text for small preview-window */ basename = g_path_get_basename(parsed_filename); g_string_printf(status, _("Saving %s ..."), basename); gtk_label_set_text(GTK_LABEL(label), status->str); while (gtk_events_pending()) gtk_main_iteration(); g_free(basename); gdk_threads_leave(); width = 65535; height = 65535; /* Calculate new size */ switch (queue->size_lock) { case LOCK_SCALE: scale = queue->scale/100.0; rs_filter_get_size_simple(fcrop, RS_FILTER_REQUEST_QUICK, &width, &height); width = (gint) (((gdouble) width) * scale); height = (gint) (((gdouble) height) * scale); break; case LOCK_WIDTH: width = queue->width; break; case LOCK_HEIGHT: height = queue->height; break; case LOCK_BOUNDING_BOX: width = queue->width; height = queue->height; break; } rs_filter_set_recursive(fend, "width", width, "height", height, NULL); /* Save the image */ if (g_object_class_find_property(G_OBJECT_GET_CLASS(queue->output), "filename")) g_object_set(queue->output, "filename", parsed_filename, NULL); rs_output_set_from_conf(queue->output, "batch"); g_assert(RS_IS_OUTPUT(queue->output)); g_assert(RS_IS_FILTER(fend)); gboolean exported = rs_output_execute(queue->output, fend); gdk_threads_enter(); if (exported) rs_store_set_flags(NULL, photo->filename, NULL, NULL, &exported); else { gui_status_notify(_("Could not export photo.")); break; } g_free(parsed_filename); g_string_free(filename, TRUE); g_object_unref(photo); photo = NULL; } gtk_list_store_remove(GTK_LIST_STORE(queue->list), &iter); batch_queue_save(queue); g_get_current_time(&now_time); } gtk_widget_destroy(window); batch_queue_update_sensivity(queue); gdk_threads_leave(); g_object_unref(finput); g_object_unref(fdemosaic); g_object_unref(ffujirotate); g_object_unref(flensfun); g_object_unref(frotate); g_object_unref(fcrop); g_object_unref(fcache); g_object_unref(fresample); g_object_unref(fdcp); g_object_unref(fdenoise); g_object_unref(ftransform_input); g_object_unref(ftransform_display); } static void cursor_changed(GtkTreeView *tree_view, gpointer user_data) { batch_queue_update_sensivity((RS_QUEUE *) user_data); } static GtkWidget * make_batchview(RS_QUEUE *queue) { GtkWidget *scroller; GtkWidget *view; GtkCellRenderer *renderer_text, *renderer_pixbuf; GtkTreeViewColumn *column_filename, *column_setting_id, *column_pixbuf; scroller = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroller), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); view = gtk_tree_view_new_with_model(queue->list); queue->view = GTK_TREE_VIEW(view); gtk_tree_view_set_reorderable(queue->view, TRUE); gtk_container_add (GTK_CONTAINER (scroller), view); renderer_text = gtk_cell_renderer_text_new(); renderer_pixbuf = gtk_cell_renderer_pixbuf_new(); column_pixbuf = gtk_tree_view_column_new_with_attributes (_("Icon"), renderer_pixbuf, "pixbuf", RS_QUEUE_ELEMENT_THUMBNAIL, NULL); gtk_tree_view_column_set_resizable(column_pixbuf, TRUE); gtk_tree_view_column_set_sizing(column_pixbuf, GTK_TREE_VIEW_COLUMN_AUTOSIZE); column_filename = gtk_tree_view_column_new_with_attributes (_("Filename"), renderer_text, "text", RS_QUEUE_ELEMENT_FILENAME_SHORT, NULL); gtk_tree_view_column_set_resizable(column_filename, TRUE); gtk_tree_view_column_set_sizing(column_filename, GTK_TREE_VIEW_COLUMN_AUTOSIZE); column_setting_id = gtk_tree_view_column_new_with_attributes (_("Setting"), renderer_text, "text", RS_QUEUE_ELEMENT_SETTING_ID_ABC, NULL); gtk_tree_view_column_set_resizable(column_setting_id, TRUE); gtk_tree_view_column_set_sizing(column_setting_id, GTK_TREE_VIEW_COLUMN_AUTOSIZE); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column_pixbuf); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column_filename); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column_setting_id); g_signal_connect(G_OBJECT(view), "cursor-changed", G_CALLBACK(cursor_changed), queue); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW (view), FALSE); return scroller; } static void batch_button_remove_clicked(GtkWidget *button, RS_QUEUE *queue) { GtkTreePath *path; GtkTreeViewColumn *column; gtk_tree_view_get_cursor(queue->view,&path,&column); if(path && column) { GtkTreeIter iter; if(gtk_tree_model_get_iter(queue->list,&iter,path)) { gtk_list_store_remove(GTK_LIST_STORE(queue->list), &iter); batch_queue_save(queue); } } rs_core_actions_update_menu_items(queue->rs); /* FIXME: should be done with a signal */ batch_queue_update_sensivity(queue); return; } static void batch_button_remove_all_clicked(GtkWidget *button, RS_QUEUE *queue) { gtk_list_store_clear(GTK_LIST_STORE(queue->list)); batch_queue_save(queue); batch_queue_update_sensivity(queue); return; } static void batch_button_start_clicked(GtkWidget *button, RS_QUEUE *queue) { rs_core_action_group_activate("ProcessBatch"); } static void batch_queue_update_sensivity(RS_QUEUE *queue) { GtkTreePath *selected_path; GtkTreeIter iter; /* If we have any entries, enable "Start" and "Remove all" */ if (gtk_tree_model_get_iter_first(queue->list, &iter)) { rs_core_action_group_set_sensivity("ProcessBatch", TRUE); gtk_widget_set_sensitive(queue->start_button, TRUE); gtk_widget_set_sensitive(queue->remove_all_button, TRUE); } else { rs_core_action_group_set_sensivity("ProcessBatch", FALSE); gtk_widget_set_sensitive(queue->start_button, FALSE); gtk_widget_set_sensitive(queue->remove_all_button, FALSE); } /* If anything is selected, enable "Remove" */ gtk_tree_view_get_cursor(queue->view, &selected_path, NULL); if(selected_path) { gtk_widget_set_sensitive(queue->remove_button, TRUE); gtk_tree_path_free(selected_path); } else gtk_widget_set_sensitive(queue->remove_button, FALSE); } GtkWidget * make_batchbuttons(RS_QUEUE *queue) { GtkWidget *box; box = gtk_hbox_new(FALSE,4); queue->start_button = gui_button_new_from_stock_with_label(GTK_STOCK_EXECUTE, _("Start")); g_signal_connect ((gpointer) queue->start_button, "clicked", G_CALLBACK (batch_button_start_clicked), queue); queue->remove_button = gui_button_new_from_stock_with_label(GTK_STOCK_REMOVE, _("Remove")); g_signal_connect ((gpointer) queue->remove_button, "clicked", G_CALLBACK (batch_button_remove_clicked), queue); queue->remove_all_button = gui_button_new_from_stock_with_label(GTK_STOCK_REMOVE, _("Remove all")); g_signal_connect ((gpointer) queue->remove_all_button, "clicked", G_CALLBACK (batch_button_remove_all_clicked), queue); gtk_box_pack_start(GTK_BOX (box), queue->start_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX (box), queue->remove_button, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX (box), queue->remove_all_button, FALSE, FALSE, 0); return box; } static void chooser_changed(GtkFileChooser *chooser, gpointer user_data) { RS_QUEUE *queue = (RS_QUEUE *) user_data; g_free(queue->directory); queue->directory = gtk_file_chooser_get_filename(chooser); rs_conf_set_string(CONF_BATCH_DIRECTORY, queue->directory); return; } static void filetype_changed(gpointer active, gpointer user_data) { RS_QUEUE *queue = (RS_QUEUE *) user_data; GType filetype = GPOINTER_TO_INT(active); if (!filetype) return; if (queue->output) g_object_unref(queue->output); queue->output = rs_output_new(g_type_name(filetype)); } static void size_lockbox_changed(gpointer selected, gpointer user_data) { RS_QUEUE *queue = (RS_QUEUE *) user_data; gint i; queue->size_lock = GPOINTER_TO_INT(selected); for(i=0;i<3;i++) { gtk_widget_hide(queue->size_width[i]); gtk_widget_hide(queue->size_height[i]); gtk_widget_hide(queue->size_scale[i]); } /* Show needed spinners */ switch (queue->size_lock) { case LOCK_WIDTH: for(i=0;i<3;i++) gtk_widget_show(queue->size_width[i]); break; case LOCK_HEIGHT: for(i=0;i<3;i++) gtk_widget_show(queue->size_height[i]); break; case LOCK_SCALE: for(i=0;i<3;i++) gtk_widget_show(queue->size_scale[i]); break; case LOCK_BOUNDING_BOX: for(i=0;i<3;i++) { gtk_widget_show(queue->size_width[i]); gtk_widget_show(queue->size_height[i]); } break; } size_update_infolabel(queue); return; } static void size_width_changed(GtkSpinButton *spinbutton, RS_QUEUE *queue) { queue->width = gtk_spin_button_get_value_as_int(spinbutton); size_update_infolabel(queue); rs_conf_set_integer(CONF_BATCH_SIZE_WIDTH, queue->width); } static void size_height_changed(GtkSpinButton *spinbutton, RS_QUEUE *queue) { queue->height = gtk_spin_button_get_value_as_int(spinbutton); size_update_infolabel(queue); rs_conf_set_integer(CONF_BATCH_SIZE_HEIGHT, queue->height); } static void size_scale_changed(GtkSpinButton *spinbutton, RS_QUEUE *queue) { queue->scale = gtk_spin_button_get_value_as_int(spinbutton); size_update_infolabel(queue); rs_conf_set_integer(CONF_BATCH_SIZE_SCALE, queue->scale); } static void size_close_clicked(GtkButton *button, RS_QUEUE *queue) { gtk_widget_hide(queue->size_window); } static void edit_settings_clicked(GtkButton *button, RS_QUEUE *queue) { RSOutput *output = queue->output; GtkWidget *dialog = gtk_dialog_new_with_buttons (_("Edit output settings"), NULL, GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); GtkWidget *content = gtk_dialog_get_content_area (GTK_DIALOG (dialog)); GtkWidget *settings = rs_output_get_parameter_widget(output, "batch"); gtk_container_add (GTK_CONTAINER (content), settings); gtk_widget_show_all(dialog); gtk_dialog_run(GTK_DIALOG(dialog)); } static void batch_size_selection(GtkWidget *button, RS_QUEUE *queue) { RS_CONFBOX *lockbox; GtkWidget *vbox = gtk_vbox_new(FALSE, 4); GtkWidget *table; GtkWidget *close; /* Only open one at a time */ if (queue->size_window) { /* Leave the window at its last position */ gtk_window_set_position(GTK_WINDOW(queue->size_window), GTK_WIN_POS_NONE); gtk_widget_show(queue->size_window); gtk_window_present(GTK_WINDOW(queue->size_window)); return; } /* Make window */ queue->size_window = gtk_window_new(GTK_WINDOW_TOPLEVEL); g_signal_connect(G_OBJECT(queue->size_window), "delete_event", G_CALLBACK(gtk_widget_hide_on_delete), queue); gtk_window_set_title (GTK_WINDOW(queue->size_window), _("Photo size")); gtk_window_set_position(GTK_WINDOW(queue->size_window), GTK_WIN_POS_MOUSE); gtk_widget_realize (queue->size_window); gdk_window_set_type_hint(queue->size_window->window, GDK_WINDOW_TYPE_HINT_UTILITY); gtk_window_set_transient_for(GTK_WINDOW(queue->size_window), rawstudio_window); /* Chooser */ lockbox = gui_confbox_new(CONF_BATCH_SIZE_LOCK); gui_confbox_add_entry(lockbox, "scale", _("Constant scale"), GINT_TO_POINTER(LOCK_SCALE)); gui_confbox_add_entry(lockbox, "width", _("Constant width"), GINT_TO_POINTER(LOCK_WIDTH)); gui_confbox_add_entry(lockbox, "height", _("Constant height"), GINT_TO_POINTER(LOCK_HEIGHT)); gui_confbox_add_entry(lockbox, "bounding-box", _("Maximum size"), GINT_TO_POINTER(LOCK_BOUNDING_BOX)); gui_confbox_load_conf(lockbox, "scale"); gtk_widget_show(gui_confbox_get_widget(lockbox)); gtk_box_pack_start (GTK_BOX (vbox), gui_confbox_get_widget(lockbox), FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(vbox), 10); /* Spinners */ table = gtk_table_new(3, 3, FALSE); gtk_table_set_col_spacings(GTK_TABLE(table), 0); gtk_table_set_row_spacings(GTK_TABLE(table), 0); gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, TRUE, 0); queue->size_width[0] = gtk_label_new(_("Photo width:")); queue->size_width[1] = gtk_spin_button_new_with_range(10.0, 10000.0, 1.0); queue->size_width[2] = gtk_label_new(_("pixels")); gtk_spin_button_set_value(GTK_SPIN_BUTTON(queue->size_width[1]), (gdouble) queue->width); g_signal_connect(G_OBJECT(queue->size_width[1]), "value_changed", G_CALLBACK(size_width_changed), queue); gtk_table_attach_defaults(GTK_TABLE(table), queue->size_width[0], 0, 1, 0, 1); gtk_table_attach_defaults(GTK_TABLE(table), queue->size_width[1], 1, 2, 0, 1); gtk_table_attach_defaults(GTK_TABLE(table), queue->size_width[2], 2, 3, 0, 1); queue->size_height[0] = gtk_label_new(_("Photo height:")); queue->size_height[1] = gtk_spin_button_new_with_range(10.0, 10000.0, 1.0); queue->size_height[2] = gtk_label_new(_("pixels")); gtk_spin_button_set_value(GTK_SPIN_BUTTON(queue->size_height[1]), (gdouble) queue->height); g_signal_connect(G_OBJECT(queue->size_height[1]), "value_changed", G_CALLBACK(size_height_changed), queue); gtk_table_attach_defaults(GTK_TABLE(table), queue->size_height[0], 0, 1, 1, 2); gtk_table_attach_defaults(GTK_TABLE(table), queue->size_height[1], 1, 2, 1, 2); gtk_table_attach_defaults(GTK_TABLE(table), queue->size_height[2], 2, 3, 1, 2); queue->size_scale[0] = gtk_label_new(_("Photo scale:")); queue->size_scale[1] = gtk_spin_button_new_with_range(10.0, 10000.0, 1.0); queue->size_scale[2] = gtk_label_new(_("%")); gtk_spin_button_set_value(GTK_SPIN_BUTTON(queue->size_scale[1]), (gdouble) queue->scale); g_signal_connect(G_OBJECT(queue->size_scale[1]), "value_changed", G_CALLBACK(size_scale_changed), queue); gtk_table_attach_defaults(GTK_TABLE(table), queue->size_scale[0], 0, 1, 2, 3); gtk_table_attach_defaults(GTK_TABLE(table), queue->size_scale[1], 1, 2, 2, 3); gtk_table_attach_defaults(GTK_TABLE(table), queue->size_scale[2], 2, 3, 2, 3); /* Align everything nicely */ gtk_misc_set_alignment(GTK_MISC(queue->size_height[0]), 1.0, 0.5); gtk_misc_set_alignment(GTK_MISC(queue->size_height[2]), 0.0, 0.5); gtk_misc_set_alignment(GTK_MISC(queue->size_width[0]), 1.0, 0.5); gtk_misc_set_alignment(GTK_MISC(queue->size_width[2]), 0.0, 0.5); gtk_misc_set_alignment(GTK_MISC(queue->size_scale[0]), 1.0, 0.5); gtk_misc_set_alignment(GTK_MISC(queue->size_scale[2]), 0.0, 0.5); /* Close button */ close = gtk_button_new_from_stock(GTK_STOCK_CLOSE); g_signal_connect (G_OBJECT(close), "clicked", G_CALLBACK (size_close_clicked), queue); gtk_box_pack_end (GTK_BOX (vbox), gui_aligned(close, 1.0, 0.5, 0.0, 0.0), FALSE, TRUE, 0); gtk_container_add (GTK_CONTAINER (queue->size_window), vbox); gtk_widget_show_all(queue->size_window); gtk_window_present(GTK_WINDOW(queue->size_window)); size_lockbox_changed(gui_confbox_get_active(lockbox), queue); gui_confbox_set_callback(lockbox, queue, size_lockbox_changed); } static void size_update_infolabel(RS_QUEUE *queue) { GString *gs = g_string_new(""); switch (queue->size_lock) { case LOCK_WIDTH: g_string_printf(gs, _("Constant width:\n%d"), queue->width); break; case LOCK_HEIGHT: g_string_printf(gs, _("Constant height:\n%d"), queue->height); break; case LOCK_SCALE: g_string_printf(gs, _("Constant Scale:\n%d"), queue->scale); g_string_append(gs, "%"); /* FIXME: merge with the above line after release */ break; case LOCK_BOUNDING_BOX: g_string_printf(gs, _("Maximum size:\n%d x %d"), queue->width, queue->height); break; } gtk_label_set_justify(GTK_LABEL(queue->size_label), GTK_JUSTIFY_CENTER); gtk_label_set_label(GTK_LABEL(queue->size_label), gs->str); g_string_free(gs, TRUE); return; } static GtkWidget * make_batch_options(RS_QUEUE *queue) { GtkWidget *chooser; GtkWidget *hbox = gtk_hbox_new(FALSE, 0); GtkWidget *vbox = gtk_vbox_new(FALSE, 4); GtkWidget *filename; RS_CONFBOX *filetype_confbox; GtkWidget *size_button; gpointer active; chooser = gtk_file_chooser_button_new(_("Choose output directory"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); if (g_path_is_absolute(queue->directory)) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(chooser), queue->directory); g_signal_connect (chooser, "current_folder_changed", G_CALLBACK (chooser_changed), queue); gtk_box_pack_start (GTK_BOX (vbox), gui_framed(chooser, _("Output directory:"), GTK_SHADOW_NONE), FALSE, FALSE, 0); filename = rs_filename_chooser_button_new(&queue->filename, CONF_BATCH_FILENAME); gtk_box_pack_start (GTK_BOX (vbox), gui_framed(filename, _("Filename template:"), GTK_SHADOW_NONE), FALSE, FALSE, 0); filetype_confbox = gui_confbox_filetype_new(CONF_BATCH_FILETYPE); gui_confbox_set_callback(filetype_confbox, queue, filetype_changed); gtk_box_pack_start (GTK_BOX (vbox), gui_confbox_get_widget(filetype_confbox), FALSE, TRUE, 0); active = gui_confbox_get_active(filetype_confbox); if (!active) active = GUINT_TO_POINTER(g_type_from_name("RSJpegfile")); filetype_changed(active, queue); GtkWidget *edit_settings = gtk_button_new_with_label(_("Edit output settings")); g_signal_connect ((gpointer) edit_settings, "clicked", G_CALLBACK (edit_settings_clicked), queue); gtk_box_pack_start (GTK_BOX (vbox), edit_settings, FALSE, TRUE, 0); /* Export size */ hbox = gtk_hbox_new(FALSE, 1); queue->size_label = gtk_label_new(NULL); size_update_infolabel(queue); size_button = gtk_button_new(); gtk_button_set_label(GTK_BUTTON(size_button), _("Change")); g_signal_connect ((gpointer) size_button, "clicked", G_CALLBACK (batch_size_selection), queue); gtk_box_pack_start (GTK_BOX (hbox), queue->size_label, FALSE, FALSE, 1); gtk_box_pack_end (GTK_BOX (hbox), size_button, FALSE, FALSE, 1); gtk_box_pack_start (GTK_BOX (vbox), gui_framed(hbox, _("Export dimensions"), GTK_SHADOW_IN), FALSE, TRUE, 0); return(vbox); } GtkWidget * make_batchbox(RS_QUEUE *queue) { GtkWidget *batchbox; batchbox = gtk_vbox_new(FALSE,4); gtk_box_pack_start (GTK_BOX (batchbox), make_batch_options(queue), FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (batchbox), make_batchview(queue), TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (batchbox), make_batchbuttons(queue), FALSE, FALSE, 0); batch_queue_load(queue); batch_queue_update_sensivity(queue); return batchbox; } /** * Returns the number of entries in the batch queue * @param queue A RS_QUEUE * @return The number of entries in the queue */ gint rs_batch_num_entries(RS_QUEUE *queue) { gint num = 0; GtkTreeIter iter; gtk_tree_model_get_iter_first(queue->list, &iter); if (gtk_list_store_iter_is_valid(GTK_LIST_STORE(queue->list), &iter)) { do { num++; } while (gtk_tree_model_iter_next(queue->list, &iter)); } return num; } rawstudio-2.0/src/rs-dir-selector.h0000644000175000017500000000412111526533645014303 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_DIR_SELECTOR_H #define RS_DIR_SELECTOR_H #include typedef struct _RSDirSelector RSDirSelector; typedef struct _RSDirSelectorClass RSDirSelectorClass; struct _RSDirSelectorClass { GtkScrolledWindowClass parent_class; }; GType rs_dir_selector_get_type (void); /** * Creates a new RSDirSelection widget * @return A new RSDirSelector */ extern GtkWidget *rs_dir_selector_new(void); extern void rs_dir_selector_set_root(RSDirSelector *selector, const gchar *root); extern void rs_dir_selector_expand_path(RSDirSelector *selector, const gchar *expand); #define RS_DIR_SELECTOR_TYPE_WIDGET (rs_dir_selector_get_type ()) #define RS_DIR_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_DIR_SELECTOR_TYPE_WIDGET, RSDirSelector)) #define RS_DIR_SELECTOR_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), RS_DIR_SELECTOR_WIDGET, RSDirSelectorClass)) #define RS_IS_DIR_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_DIR_SELECTOR_TYPE_WIDGET)) #define RS_IS_DIR_SELECTOR_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), RS_DIR_SELECTOR_TYPE_WIDGET)) #define RS_DIR_SELECTOR_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_DIR_SELECTOR_TYPE_WIDGET, RSDirSelector)) #endif /* RS_DIR_SELECTOR_H */ rawstudio-2.0/src/gtk-helper.c0000644000175000017500000004756311541462052013331 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include #ifndef WIN32 #include #endif #include "application.h" #include "conf_interface.h" #include "gtk-interface.h" #include "filename.h" #include "gtk-helper.h" #include "rs-preview-widget.h" #include #include struct _RS_CONFBOX { GtkWidget *widget; GtkListStore *model; const gchar *conf_key; gpointer user_data; void (*callback)(gpointer active, gpointer user_data); }; static void gui_confbox_changed(GtkComboBox *filetype_combo, gpointer callback_data); static gboolean gui_confbox_deleted(GtkWidget *widget, GdkEvent *event, gpointer callback_data); static gboolean gui_confbox_select_value(RS_CONFBOX *confbox, gchar *value); static inline guint8 convert_color_channel (guint8 src, guint8 alpha); static gboolean label_new_with_mouseover_cb(GtkWidget *widget, GdkEventCrossing *event, gpointer user_data); static gboolean rs_block_keyboard = FALSE; enum { COMBO_CONF_ID = 0, COMBO_TEXT, COMBO_PTR, COMBO_ROWS, }; static void gui_confbox_changed(GtkComboBox *combo, gpointer callback_data) { RS_CONFBOX *confbox = (RS_CONFBOX *) callback_data; GtkTreeIter iter; GtkTreeModel *model; gchar *conf_id; gpointer ptr; gtk_combo_box_get_active_iter(GTK_COMBO_BOX(confbox->widget), &iter); model = gtk_combo_box_get_model(GTK_COMBO_BOX(confbox->widget)); gtk_tree_model_get(model, &iter, COMBO_CONF_ID, &conf_id, COMBO_PTR, &ptr, -1); rs_conf_set_string(confbox->conf_key, conf_id); if (confbox->callback) confbox->callback(ptr, confbox->user_data); return; } static gboolean gui_confbox_deleted(GtkWidget *widget, GdkEvent *event, gpointer callback_data) { RS_CONFBOX *confbox = (RS_CONFBOX *) callback_data; gui_confbox_destroy(confbox); return(TRUE); } gpointer gui_confbox_get_active(RS_CONFBOX *confbox) { GtkTreeIter iter; GtkTreeModel *model; gpointer ptr; if(gtk_combo_box_get_active_iter(GTK_COMBO_BOX(confbox->widget), &iter)) { model = gtk_combo_box_get_model(GTK_COMBO_BOX(confbox->widget)); gtk_tree_model_get(model, &iter, COMBO_PTR, &ptr, -1); return(ptr); } else return(NULL); } void gui_confbox_add_entry(RS_CONFBOX *confbox, const gchar *conf_id, const gchar *text, gpointer *user_data) { GtkTreeIter iter; gtk_list_store_append (confbox->model, &iter); gtk_list_store_set (confbox->model, &iter, COMBO_CONF_ID, conf_id, COMBO_TEXT, text, COMBO_PTR, user_data, -1); return; } gboolean gui_confbox_select_value(RS_CONFBOX *confbox, gchar *value) { gchar *conf_id; GtkTreeModel *model; GtkTreePath *path; GtkTreeIter iter; gboolean found = FALSE; model = gtk_combo_box_get_model(GTK_COMBO_BOX(confbox->widget)); path = gtk_tree_path_new_first(); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_path_free(path); do { gtk_tree_model_get(model, &iter, COMBO_CONF_ID, &conf_id, -1); if (g_str_equal(conf_id, value)) { gtk_combo_box_set_active_iter(GTK_COMBO_BOX(confbox->widget), &iter); found = TRUE; break; } } while(gtk_tree_model_iter_next (model, &iter)); return found; } void gui_confbox_load_conf(RS_CONFBOX *confbox, gchar *default_value) { gchar *value; value = rs_conf_get_string(confbox->conf_key); if (value) { if (!gui_confbox_select_value(confbox, value)) gui_confbox_select_value(confbox, default_value); g_free(value); } else gui_confbox_select_value(confbox, default_value); return; } void gui_confbox_set_callback(RS_CONFBOX *confbox, gpointer user_data, void (*callback)(gpointer active, gpointer user_data)) { confbox->user_data = user_data; confbox->callback = callback; return; } RS_CONFBOX * gui_confbox_new(const gchar *conf_key) { RS_CONFBOX *confbox; GtkCellRenderer *renderer; confbox = g_new(RS_CONFBOX, 1); confbox->widget = gtk_combo_box_new(); confbox->model = gtk_list_store_new(COMBO_ROWS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_POINTER); gtk_combo_box_set_model (GTK_COMBO_BOX(confbox->widget), GTK_TREE_MODEL (confbox->model)); renderer = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (confbox->widget), renderer, TRUE); gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (confbox->widget), renderer, "text", COMBO_TEXT, NULL); confbox->conf_key = conf_key; g_signal_connect ((gpointer) confbox->widget, "changed", G_CALLBACK (gui_confbox_changed), confbox); g_signal_connect ((gpointer) confbox->widget, "delete_event", G_CALLBACK(gui_confbox_deleted), confbox); confbox->user_data = NULL; confbox->callback = NULL; return(confbox); } void gui_confbox_destroy(RS_CONFBOX *confbox) { gtk_widget_destroy(confbox->widget); g_free(confbox); return; } GtkWidget * gui_confbox_get_widget(RS_CONFBOX *confbox) { return(confbox->widget); } RS_CONFBOX * gui_confbox_filetype_new(const gchar *conf_key) { GType *savers; guint n_savers = 0, i; RS_CONFBOX *confbox; confbox = gui_confbox_new(conf_key); savers = g_type_children (RS_TYPE_OUTPUT, &n_savers); for (i = 0; i < n_savers; i++) { RSOutputClass *klass; gchar *name = g_strdup(g_type_name(savers[i])); /* FIXME: Stop leaking! */ GType type = g_type_from_name(name); klass = g_type_class_ref(savers[i]); gui_confbox_add_entry(confbox, name, klass->display_name, GINT_TO_POINTER(type)); g_type_class_unref(klass); } g_free(savers); gui_confbox_load_conf(confbox, "RSJpegfile"); return confbox; } void checkbox_set_conf(GtkToggleButton *togglebutton, gpointer user_data) { const gchar *path = user_data; rs_conf_set_boolean(path, togglebutton->active); return; } GtkWidget * checkbox_from_conf(const gchar *conf, gchar *label, gboolean default_value) { gboolean check = default_value; GtkWidget *checkbox; rs_conf_get_boolean(conf, &check); checkbox = gtk_check_button_new_with_label(label); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox), check); g_signal_connect ((gpointer) checkbox, "toggled", G_CALLBACK (checkbox_set_conf), (gpointer) conf); return(checkbox); } GtkWidget *gui_tooltip_no_window(GtkWidget *widget, gchar *tip_tip, gchar *tip_private) { GtkWidget *e; GtkTooltips *tip; tip = gtk_tooltips_new(); e = gtk_event_box_new(); gtk_tooltips_set_tip(tip, e, tip_tip, tip_private); gtk_widget_show(widget); gtk_container_add(GTK_CONTAINER(e), widget); return e; } void gui_tooltip_window(GtkWidget *widget, gchar *tip_tip, gchar *tip_private) { GtkTooltips *tip; tip = gtk_tooltips_new(); gtk_tooltips_set_tip(tip, widget, tip_tip, tip_private); gtk_widget_show(widget); return; } void gui_batch_directory_entry_changed(GtkEntry *entry, gpointer user_data) { rs_conf_set_string(CONF_BATCH_DIRECTORY, gtk_entry_get_text(entry)); return; } void gui_batch_filename_entry_changed(GtkComboBox *combobox, gpointer user_data) { rs_conf_set_string(CONF_BATCH_FILENAME, gtk_combo_box_get_active_text(combobox)); return; } void gui_batch_filetype_combobox_changed(gpointer active, gpointer user_data) { return; } void gui_set_block_keyboard(gboolean block_keyboard) { rs_block_keyboard = block_keyboard; } static GdkEventKey* replace_key_events(const GdkEventKey *in) { GdkEventKey *out = g_memdup(in, sizeof(GdkEventKey)); static guint zero_keyval = 0; static guint one_keyval = 0; static guint zero_hardware = 0; static guint one_hardware = 0; if (!one_keyval) { GdkKeymapKey *keys; gint n_keys; zero_keyval = gdk_keyval_from_name("0"); if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), zero_keyval, &keys, &n_keys)) { zero_hardware = keys[0].keycode; g_free(keys); } one_keyval = gdk_keyval_from_name("1"); if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), one_keyval, &keys, &n_keys)) { one_hardware = keys[0].keycode; g_free(keys); } } /* Replace 'Num-*' with '*' */ if (in->keyval == 65450) { /* TODO: Find some way to figure that out, since state is often different */ } /* Replace Numpad 1,2,3 with ordinary numbers */ if (in->keyval >= 65457 && in->keyval <= 65459) { out->keyval = one_keyval+(in->keyval-65457); out->hardware_keycode = one_hardware+(in->keyval-65457); } /* Replace Numpad 0 with ordinary numbers */ if (in->keyval == 65456) { out->keyval = zero_keyval; out->hardware_keycode = zero_hardware; } return out; } /* copied verbatim from Gimp: app/widgets/gimpdock.c */ gboolean window_key_press_event (GtkWidget *widget, GdkEventKey *event) { GtkWindow *window = GTK_WINDOW (widget); GtkWidget *focus = gtk_window_get_focus (window); gboolean handled = FALSE; /* we're overriding the GtkWindow implementation here to give * the focus widget precedence over unmodified accelerators * before the accelerator activation scheme. */ /* Eat the event, if we are told so */ if (! handled && event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK)) handled = gtk_window_activate_key (window, event); /* control/alt accelerators get all key events first */ if (! handled && rs_block_keyboard) handled = TRUE; /* invoke text widgets */ if (! handled && G_UNLIKELY (GTK_IS_EDITABLE (focus) || GTK_IS_TEXT_VIEW (focus))) handled = gtk_window_propagate_key_event (window, event); GdkEventKey *new_event = replace_key_events(event); /* invoke focus widget handlers */ if (! handled) handled = gtk_window_propagate_key_event (window, new_event); /* invoke non-(control/alt) accelerators */ if (! handled && ! (new_event->state & (GDK_CONTROL_MASK | GDK_MOD1_MASK))) handled = gtk_window_activate_key (window, new_event); /* chain up, bypassing gtk_window_key_press(), to invoke binding set */ if (! handled) handled = GTK_WIDGET_CLASS (g_type_class_peek (g_type_parent (GTK_TYPE_WINDOW)))->key_press_event (widget, new_event); g_free(new_event); return handled; } /** * Function to help gtk_menu_popup(), positiones the popup menu below a widget * Should be used like this: gtk_menu_popup(GTK_MENU(menu), NULL, NULL, pos_menu_below_widget, widget, 0, GDK_CURRENT_TIME); */ void pos_menu_below_widget (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data) { GtkWidget *widget = GTK_WIDGET (user_data); gint origin_x, origin_y; gdk_window_get_origin (widget->window, &origin_x, &origin_y); *x = origin_x + widget->allocation.x; *y = origin_y + widget->allocation.y + widget->allocation.height; *push_in = TRUE; return; } /** * Put a GtkFrame around a widget * @param widget The widget to frame * @param title Title for the frame * @param shadowtype A GtkShadowType * @return A new GtkFrame */ GtkWidget * gui_framed(GtkWidget *widget, const gchar *title, GtkShadowType shadowtype) { GtkWidget *frame; frame = gtk_frame_new(title); gtk_frame_set_shadow_type(GTK_FRAME(frame), shadowtype); gtk_container_add (GTK_CONTAINER (frame), widget); return(frame); } GtkWidget * gui_aligned(GtkWidget *widget, const gfloat xalign, const gfloat yalign, const gfloat xscale, const gfloat yscale) { GtkWidget *alignment; g_assert(GTK_IS_WIDGET(widget)); alignment = gtk_alignment_new(xalign, yalign, xscale, yscale); gtk_container_add (GTK_CONTAINER (alignment), widget); return alignment; } /** * Build and show a popup-menu * @param widget A widget to pop up below or NULL to pop upat mouse pointer * @param user_data Pointer to pass to callback * @param ... Pairs of gchar labels and callbaks, terminated by -1 * @return The newly created menu */ GtkWidget * gui_menu_popup(GtkWidget *widget, gpointer user_data, ...) { va_list ap; GCallback cb; gchar *label; GtkWidget *item, *menu = gtk_menu_new(); gint n = 0; va_start(ap, user_data); /* Loop through arguments, abort on -1 */ while (1) { label = va_arg(ap, gchar *); if (GPOINTER_TO_INT(label) == -1) break; cb = va_arg(ap, GCallback); if (GPOINTER_TO_INT(cb) == -1) break; item = gtk_menu_item_new_with_label (label); gtk_widget_show (item); gtk_menu_attach (GTK_MENU (menu), item, 0, 1, n, n+1); n++; g_signal_connect (item, "activate", cb, user_data); } va_end(ap); if (widget) gtk_menu_popup(GTK_MENU(menu), NULL, NULL, pos_menu_below_widget, widget, 0, GDK_CURRENT_TIME); else gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); return (menu); } void gui_select_theme(RS_THEME theme) { static RS_THEME current_theme = STANDARD_GTK_THEME; static gchar **default_rc_files = NULL; static GStaticMutex lock = G_STATIC_MUTEX_INIT; GtkSettings *settings; g_static_mutex_lock(&lock); /* Copy default RC files */ if (!default_rc_files) { gchar **def; gint i; def = gtk_rc_get_default_files(); for(i=0;def[i];i++); /* Count */ default_rc_files = g_new0(gchar *, i+1); for(i=0;def[i];i++) /* Copy */ default_rc_files[i] = g_strdup(def[i]); } /* Change theme if needed */ if (theme != current_theme) { settings = gtk_settings_get_default(); switch (theme) { case STANDARD_GTK_THEME: gtk_rc_set_default_files(default_rc_files); break; case RAWSTUDIO_THEME: gtk_rc_add_default_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "rawstudio.gtkrc"); break; } current_theme = theme; /* Reread everything */ if (settings) gtk_rc_reparse_all_for_settings(settings, TRUE); } g_static_mutex_unlock(&lock); } /** * http://davyd.ucc.asn.au/projects/gtk-utils/cairo_convert_to_pixbuf.html */ static inline guint8 convert_color_channel (guint8 src, guint8 alpha) { return alpha ? ((src << 8) - src) / alpha : 0; } /** * cairo_convert_to_pixbuf: * Converts from a Cairo image surface to a GdkPixbuf. Why does GTK+ not * implement this? * http://davyd.ucc.asn.au/projects/gtk-utils/cairo_convert_to_pixbuf.html */ GdkPixbuf * cairo_convert_to_pixbuf (cairo_surface_t *surface) { GdkPixbuf *pixbuf; int width, height; int srcstride, dststride; guchar *srcpixels, *dstpixels; guchar *srcpixel, *dstpixel; int n_channels; int x, y; switch (cairo_image_surface_get_format (surface)) { case CAIRO_FORMAT_ARGB32: case CAIRO_FORMAT_RGB24: break; default: g_critical ("This Cairo surface format not supported"); return NULL; break; } width = cairo_image_surface_get_width (surface); height = cairo_image_surface_get_height (surface); srcstride = cairo_image_surface_get_stride (surface); srcpixels = cairo_image_surface_get_data (surface); pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, (cairo_image_surface_get_format (surface) == CAIRO_FORMAT_ARGB32), 8, width, height); dststride = gdk_pixbuf_get_rowstride (pixbuf); dstpixels = gdk_pixbuf_get_pixels (pixbuf); n_channels = gdk_pixbuf_get_n_channels (pixbuf); for (y = 0; y < height; y++) { for (x = 0; x < width; x++) { srcpixel = srcpixels + y * srcstride + x * 4; dstpixel = dstpixels + y * dststride + x * n_channels; dstpixel[0] = convert_color_channel (srcpixel[2], srcpixel[3]); dstpixel[1] = convert_color_channel (srcpixel[1], srcpixel[3]); dstpixel[2] = convert_color_channel (srcpixel[0], srcpixel[3]); dstpixel[3] = srcpixel[3]; } } return pixbuf; } /** * Creates a new GtkButton widget. * @param stock_id A stock id registered with GTK+ * @param label The text to show besides the icon * @return a new GtkButton */ GtkWidget * gui_button_new_from_stock_with_label(const gchar *stock_id, const gchar *label) { GtkWidget *button; GtkWidget *stock; g_assert(stock_id); g_assert(label); stock = gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_BUTTON); button = gtk_button_new_with_label(label); gtk_button_set_image(GTK_BUTTON(button), stock); return button; } static gboolean label_new_with_mouseover_cb(GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) { /* Do some mangling to get the GtkLabel */ GtkLabel *label = GTK_LABEL(gtk_bin_get_child(GTK_BIN(widget))); const gchar *key; /* Get the relevant key - if any */ switch (event->type) { case GDK_ENTER_NOTIFY: key = "rs-mouseover-enter"; gtk_widget_set_state(widget, GTK_STATE_PRELIGHT); break; case GDK_LEAVE_NOTIFY: key = "rs-mouseover-leave"; gtk_widget_set_state(widget, GTK_STATE_NORMAL); break; default: key = NULL; break; } /* Set new text */ if (key) gtk_label_set_text(label, g_object_get_data(G_OBJECT(label), key)); /* Propagate this event, otherwise tooltip may not be shown */ return FALSE; } /** * This will create a new GtkLabel that can alternate text when the pointer is * hovering above it. * @param normal_text The text to display when pointer is not hovering above * @param hover_text The text to display when pointer is hovering above the label * @return A new GtkLabel */ GtkWidget * gui_label_new_with_mouseover(const gchar *normal_text, const gchar *hover_text) { GtkWidget *eventbox; GtkWidget *label; gint max_width; g_assert(normal_text != NULL); g_assert(hover_text != NULL); label = gtk_label_new(normal_text); /* Align right */ gtk_misc_set_alignment(GTK_MISC(label), 1.0, 0.5); /* Calculate the maximum amount of characters displayed to avoid flickering */ max_width = MAX(g_utf8_strlen(normal_text, -1), g_utf8_strlen(hover_text, -1)); gtk_label_set_width_chars(GTK_LABEL(label), max_width); /* Keep these in memory - AND free them with the GtkLabel */ g_object_set_data_full(G_OBJECT(label), "rs-mouseover-leave", g_strdup(normal_text), g_free); g_object_set_data_full(G_OBJECT(label), "rs-mouseover-enter", g_strdup(hover_text), g_free); /* Use an event box, since GtkLabel has no window of its own */ eventbox = gtk_event_box_new(); /* Listen for enter/leave events */ gtk_widget_set_events(eventbox, GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK); g_signal_connect(eventbox, "enter-notify-event", G_CALLBACK(label_new_with_mouseover_cb), NULL); g_signal_connect(eventbox, "leave-notify-event", G_CALLBACK(label_new_with_mouseover_cb), NULL); gtk_container_add(GTK_CONTAINER(eventbox), label); return eventbox; } void gui_box_toggle_callback(GtkExpander *expander, gchar *key) { #ifndef WIN32 GConfClient *client = gconf_client_get_default(); gboolean expanded = gtk_expander_get_expanded(expander); /* Save state to gconf */ gconf_client_set_bool(client, key, expanded, NULL); #endif } #ifndef WIN32 void gui_box_notify(GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data) { GtkExpander *expander = GTK_EXPANDER(user_data); if (entry->value) { gboolean expanded = gconf_value_get_bool(entry->value); gtk_expander_set_expanded(expander, expanded); } } #endif GtkWidget * gui_box(const gchar *title, GtkWidget *in, gchar *key, gboolean default_expanded) { GtkWidget *expander, *label; gboolean expanded; rs_conf_get_boolean_with_default(key, &expanded, default_expanded); expander = gtk_expander_new(NULL); if (key) { #ifndef WIN32 GConfClient *client = gconf_client_get_default(); gchar *name = g_build_filename("/apps", PACKAGE, key, NULL); g_signal_connect_after(expander, "activate", G_CALLBACK(gui_box_toggle_callback), name); gconf_client_notify_add(client, name, gui_box_notify, expander, NULL, NULL); #endif } gtk_expander_set_expanded(GTK_EXPANDER(expander), expanded); label = gtk_label_new(title); gtk_expander_set_label_widget (GTK_EXPANDER (expander), label); gtk_label_set_use_markup (GTK_LABEL (label), TRUE); gtk_container_add (GTK_CONTAINER (expander), in); return expander; } rawstudio-2.0/src/rs-cache.h0000644000175000017500000000277011526533645012762 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_CACHE_H #define RS_CACHE_H #include extern gchar *rs_cache_get_name(const gchar *src); extern void rs_cache_save(RS_PHOTO *photo, const RSSettingsMask mask); extern void rs_cache_save_settings(RSSettings *rss, const RSSettingsMask mask, xmlTextWriterPtr writer); extern guint rs_cache_load(RS_PHOTO *photo); extern guint rs_cache_load_setting(RSSettings *rss, xmlDocPtr doc, xmlNodePtr cur, gint version); extern void rs_cache_load_quick(const gchar *filename, gint *priority, gboolean *exported); extern void rs_cache_save_flags(const gchar *filename, const guint *priority, const gboolean *exported); #endif /* RS_CACHE_H */ rawstudio-2.0/src/rs-pixbuf.c0000644000175000017500000000416111526533645013203 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 void rs_pixbuf_draw_hline(GdkPixbuf *pixbuf, guint x, guint y, guint length, guint R, guint G, guint B, guint A) { gint width, height; guint rowstride; guchar *pixels; gint channels; gint i; rowstride = gdk_pixbuf_get_rowstride (pixbuf); pixels = gdk_pixbuf_get_pixels (pixbuf); width = gdk_pixbuf_get_width (pixbuf); height = gdk_pixbuf_get_height (pixbuf); channels = gdk_pixbuf_get_n_channels (pixbuf); for (i = x*channels; i < (length+x)*channels; i+=channels) { pixels[y*rowstride+i+0] = R; pixels[y*rowstride+i+1] = G; pixels[y*rowstride+i+2] = B; if (channels == 4) pixels[y*rowstride+i+3] = A; } } void rs_pixbuf_draw_vline(GdkPixbuf *pixbuf, guint x, guint y, guint length, guint R, guint G, guint B, guint A) { gint width, height; guint rowstride; guchar *pixels; gint channels; gint i; rowstride = gdk_pixbuf_get_rowstride (pixbuf); pixels = gdk_pixbuf_get_pixels (pixbuf); width = gdk_pixbuf_get_width (pixbuf); height = gdk_pixbuf_get_height (pixbuf); channels = gdk_pixbuf_get_n_channels (pixbuf); for (i = y; i < y+length; i++) { pixels[i*rowstride+x*channels+0] = R; pixels[i*rowstride+x*channels+1] = G; pixels[i*rowstride+x*channels+2] = B; if (channels == 4) pixels[i*rowstride+x*channels+3] = A; } } rawstudio-2.0/src/rs-store.c0000644000175000017500000023057611541462463013051 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include #include #include #include #include #include #include "application.h" #include "conf_interface.h" #include "gettext.h" #include "rs-store.h" #include "gtk-helper.h" #include "gtk-progress.h" #include "gtk-interface.h" #include "rs-cache.h" #include "rs-pixbuf.h" #include "eog-pixbuf-cell-renderer.h" #include "rs-photo.h" #include "rs-actions.h" #ifdef WIN32 #undef near #endif /* How many different icon views do we have (tabs) */ #define NUM_VIEWS 6 #define GROUP_XML_FILE "groups.xml" #if GTK_CHECK_VERSION(2,8,0) #define EYECANDY 1 #else #define EYECANDY 0 #endif #if EYECANDY #define DROPSHADOWOFFSET 6 #else #define DROPSHADOWOFFSET 0 #endif /* Overlay icons */ static GdkPixbuf *icon_priority_1 = NULL; static GdkPixbuf *icon_priority_2 = NULL; static GdkPixbuf *icon_priority_3 = NULL; static GdkPixbuf *icon_priority_D = NULL; static GdkPixbuf *icon_exported = NULL; static GdkPixbuf *icon_default = NULL; enum { PIXBUF_COLUMN, /* The displayed pixbuf */ PIXBUF_CLEAN_COLUMN, /* The clean thumbnail */ TEXT_COLUMN, /* Icon text, truncated to max length */ TEXT_COLUMN_FULL, /* Icon text, not truncated */ FULLNAME_COLUMN, /* Full path to image */ PRIORITY_COLUMN, EXPORTED_COLUMN, METADATA_COLUMN, /* RSMetadata for image */ TYPE_COLUMN, GROUP_LIST_COLUMN, NUM_COLUMNS }; enum { RS_STORE_TYPE_FILE, RS_STORE_TYPE_GROUP, RS_STORE_TYPE_GROUP_MEMBER }; struct _RSStore { GtkHBox parent; GtkNotebook *notebook; GtkWidget *iconview[NUM_VIEWS]; GtkWidget *label[NUM_VIEWS]; GtkWidget *current_iconview; guint current_priority; GtkListStore *store; gulong counthandler; gchar *last_path; gboolean cancelled; RS_STORE_SORT_METHOD sort_method; GString *tooltip_text; GtkTreePath *tooltip_last_path; volatile gint jobs_to_do; gboolean counter_blocked; /* Only access when thread has gdk lock */ gint open_selected; /* Contains status message ID, if enabled, 0 otherwise */ }; /* Define the boiler plate stuff using the predefined macro */ G_DEFINE_TYPE (RSStore, rs_store, GTK_TYPE_HBOX); enum { THUMB_ACTIVATED_SIGNAL, GROUP_ACTIVATED_SIGNAL, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = { 0 }; typedef struct _worker_job { RSStore *store; gchar *filename; GtkTreeIter iter; gchar *name; GtkTreeModel *model; } WORKER_JOB; /* FIXME: Remember to remove stores from this too! */ static GList *all_stores = NULL; /* Priorities to show */ const static guint priorities[NUM_VIEWS] = {PRIO_ALL, PRIO_1, PRIO_2, PRIO_3, PRIO_U, PRIO_D}; #if NUM_VIEWS != 6 #error This must be updated #endif static gboolean scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer user_data); static void selection_changed(GtkIconView *iconview, gpointer data); static void thumbnail_overlay(GdkPixbuf *pixbuf, GdkPixbuf *lowerleft, GdkPixbuf *lowerright, GdkPixbuf *topleft, GdkPixbuf *topright, gint shadow); static void thumbnail_update(GdkPixbuf *pixbuf, GdkPixbuf *pixbuf_clean, gint priority, gboolean exported, gint shadow); static void switch_page(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer data); static void selection_changed(GtkIconView *iconview, gpointer data); static GtkWidget *make_iconview(GtkWidget *iconview, RSStore *store, gint prio); static gboolean model_filter_prio(GtkTreeModel *model, GtkTreeIter *iter, gpointer data); static gint model_sort_name(GtkTreeModel *model, GtkTreeIter *tia, GtkTreeIter *tib, gpointer userdata); static gint model_sort_timestamp(GtkTreeModel *model, GtkTreeIter *tia, GtkTreeIter *tib, gpointer userdata); static gint model_sort_iso(GtkTreeModel *model, GtkTreeIter *tia, GtkTreeIter *tib, gpointer userdata); static gint model_sort_aperture(GtkTreeModel *model, GtkTreeIter *tia, GtkTreeIter *tib, gpointer userdata); static gint model_sort_focallength(GtkTreeModel *model, GtkTreeIter *tia, GtkTreeIter *tib, gpointer userdata); static gint model_sort_shutterspeed(GtkTreeModel *model, GtkTreeIter *tia, GtkTreeIter *tib, gpointer userdata); static void count_priorities_del(GtkTreeModel *treemodel, GtkTreePath *path, gpointer data); static void count_priorities(GtkTreeModel *treemodel, GtkTreePath *do_not_use1, GtkTreeIter *do_not_use2, gpointer data); static void icon_get_selected_iters(GtkIconView *iconview, GtkTreePath *path, gpointer user_data); static void icon_get_selected_names(GtkIconView *iconview, GtkTreePath *path, gpointer user_data); static gboolean tree_foreach_names(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter, gpointer data); static gboolean tree_find_filename(GtkTreeModel *store, const gchar *filename, GtkTreeIter *iter, GtkTreePath **path); void cairo_draw_thumbnail(cairo_t *cr, GdkPixbuf *pixbuf, gint x, gint y, gint width, gint height, gdouble alphas); GdkPixbuf * store_group_update_pixbufs(GdkPixbuf *pixbuf, GdkPixbuf *pixbuf_clean); void store_group_select_n(GtkListStore *store, GtkTreeIter iter, guint n); gboolean store_iter_is_group(GtkListStore *store, GtkTreeIter *iter); void store_save_groups(GtkListStore *store); void store_load_groups(GtkListStore *store); void store_group_photos_by_iters(GtkListStore *store, GList *members); void store_group_photos_by_filenames(GtkListStore *store, GList *members); static GList *store_iter_list_to_filename_list(GtkListStore *store, GList *iters); void store_group_select_name(GtkListStore *store, const gchar *filename); void store_group_find_name(GtkListStore *store, const gchar *name, GtkTreeIter *iter, gint *n); void store_get_members(GtkListStore *store, GtkTreeIter *iter, GList **members); void store_get_type(GtkListStore *store, GtkTreeIter *iter, gint *type); void store_get_fullname(GtkListStore *store, GtkTreeIter *iter, gchar **fullname); void store_set_members(GtkListStore *store, GtkTreeIter *iter, GList *members); void got_metadata(RSMetadata *metadata, gpointer user_data); /** * Class initializer */ static void rs_store_class_init(RSStoreClass *klass) { GtkWidgetClass *widget_class; GtkObjectClass *object_class; widget_class = GTK_WIDGET_CLASS(klass); object_class = GTK_OBJECT_CLASS(klass); signals[THUMB_ACTIVATED_SIGNAL] = g_signal_new ("thumb-activated", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); signals[GROUP_ACTIVATED_SIGNAL] = g_signal_new ("group-activated", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); if (!icon_priority_1) { icon_priority_1 = gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "overlay_priority1.png", NULL); icon_priority_2 = gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "overlay_priority2.png", NULL); icon_priority_3 = gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "overlay_priority3.png", NULL); icon_priority_D = gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "overlay_deleted.png", NULL); icon_exported = gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "overlay_exported.png", NULL); } } /** * Instance initialization */ static void rs_store_init(RSStore *store) { GtkHBox *hbox = GTK_HBOX(store); gint n; gchar label_text[NUM_VIEWS][63]; GtkWidget *label_tt[NUM_VIEWS]; GtkCellRenderer *cell_renderer; gboolean show_filenames; GtkWidget *label_priorities; store->counter_blocked = FALSE; store->open_selected = 0; store->notebook = GTK_NOTEBOOK(gtk_notebook_new()); store->store = gtk_list_store_new (NUM_COLUMNS, GDK_TYPE_PIXBUF, GDK_TYPE_PIXBUF, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, G_TYPE_BOOLEAN, G_TYPE_OBJECT, G_TYPE_INT, G_TYPE_POINTER); for (n=0;niconview[n] = gtk_icon_view_new(); /* Pack everything up nicely, we need the space for what matters */ #if GTK_CHECK_VERSION(2,18,0) gtk_icon_view_set_item_padding(GTK_ICON_VIEW(store->iconview[n]), 0); #endif /* GTK_CHECK_VERSION(2,18,0) */ gtk_icon_view_set_margin(GTK_ICON_VIEW(store->iconview[n]), 1); gtk_icon_view_set_row_spacing(GTK_ICON_VIEW(store->iconview[n]), 0); /* New cell-renderer for thumbnails */ cell_renderer = eog_pixbuf_cell_renderer_new(); /* Use our own cell renderer */ gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (store->iconview[n]), cell_renderer, FALSE); /* Set everything up nice */ g_object_set (cell_renderer, "follow-state", TRUE, "height", -1, "width", -1, "yalign", 0.5, "xalign", 0.5, NULL); /* Set pixbuf column */ gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (store->iconview[n]), cell_renderer, "pixbuf", PIXBUF_COLUMN, NULL); /* New filter */ filter = gtk_tree_model_filter_new(GTK_TREE_MODEL (store->store), NULL); /* Set the function used to determine "visibility" */ gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER (filter), model_filter_prio, GINT_TO_POINTER (priorities[n]), NULL); /* Attach the model to iconview */ gtk_icon_view_set_model (GTK_ICON_VIEW (store->iconview[n]), filter); store->label[n] = gtk_label_new(NULL); switch (n) { case 0: /* All */ g_sprintf(label_text[n], _("* (%d)"), 0); label_tt[n] = gui_tooltip_no_window(store->label[n], _("All photos (excluding deleted)"), NULL); break; case 1: /* 1 */ g_sprintf(label_text[n], _("1 (%d)"), 0); label_tt[n] = gui_tooltip_no_window(store->label[n], _("Priority 1 photos"), NULL); break; case 2: /* 2 */ g_sprintf(label_text[n], _("2 (%d)"), 0); label_tt[n] = gui_tooltip_no_window(store->label[n], _("Priority 2 photos"), NULL); break; case 3: /* 3 */ g_sprintf(label_text[n], _("3 (%d)"), 0); label_tt[n] = gui_tooltip_no_window(store->label[n], _("Priority 3 photos"), NULL); break; case 4: /* Unsorted */ g_sprintf(label_text[n], _("U (%d)"), 0); label_tt[n] = gui_tooltip_no_window(store->label[n], _("Unprioritized photos"), NULL); break; case 5: /* Deleted */ g_sprintf(label_text[n], _("D (%d)"), 0); label_tt[n] = gui_tooltip_no_window(store->label[n], _("Deleted photos"), NULL); break; #if NUM_VIEWS != 6 #error You need to update this switch statement #endif } gtk_label_set_markup(GTK_LABEL(store->label[n]), label_text[n]); gtk_misc_set_alignment(GTK_MISC(store->label[n]), 0.0, 0.5); /* Add everything to the notebook */ gtk_notebook_append_page(store->notebook, make_iconview(store->iconview[n], store, priorities[n]), label_tt[n]); } /* Load show filenames state from config */ rs_conf_get_boolean_with_default(CONF_SHOW_FILENAMES, &show_filenames, DEFAULT_CONF_SHOW_FILENAMES); rs_store_set_show_filenames(store, show_filenames); /* Default to page 0 */ store->current_iconview = store->iconview[0]; store->current_priority = priorities[0]; gtk_notebook_set_tab_pos(store->notebook, GTK_POS_LEFT); g_signal_connect(store->notebook, "switch-page", G_CALLBACK(switch_page), store); store->counthandler = g_signal_connect(store->store, "row-changed", G_CALLBACK(count_priorities), store->label); g_signal_connect(store->store, "row-deleted", G_CALLBACK(count_priorities_del), store->label); all_stores = g_list_append(all_stores, store); /* Due to popular demand, I will now add a very nice GTK+ label to the left of the notebook. We hope this will give our users an even better understanding of our interface. I was thinking about adding a button instead that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I believe this will be better for the end user */ label_priorities = gtk_label_new(_("Priorities")); gtk_label_set_angle(GTK_LABEL(label_priorities), 90); gtk_box_pack_start(GTK_BOX (hbox), label_priorities, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX (hbox), GTK_WIDGET(store->notebook), TRUE, TRUE, 0); store->last_path = NULL; gint sort_method = RS_STORE_SORT_BY_NAME; rs_conf_get_integer(CONF_STORE_SORT_METHOD, &sort_method); rs_store_set_sort_method(store, sort_method); store->tooltip_text = g_string_new("..."); store->tooltip_last_path = NULL; } static gboolean scroll_event(GtkWidget *widget, GdkEventScroll *event, gpointer user_data) { gboolean handled = FALSE; GtkAdjustment *adj = gtk_scrolled_window_get_hadjustment(GTK_SCROLLED_WINDOW(widget)); gdouble value = gtk_adjustment_get_value(adj); /* Lifted from _gtk_range_get_wheel_delta() */ gdouble delta = pow(gtk_adjustment_get_page_size(adj), 2.0 / 3.0); switch (event->direction) { case GDK_SCROLL_UP: gtk_adjustment_set_value(adj, value - delta); handled = TRUE; break; case GDK_SCROLL_DOWN: gtk_adjustment_set_value(adj, CLAMP(value + delta, 0, gtk_adjustment_get_upper(adj) - gtk_adjustment_get_page_size(adj))); handled = TRUE; break; default: break; } return handled; } static void switch_page(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, gpointer data) { RSStore *store = RS_STORE(data); store->current_iconview = store->iconview[page_num]; store->current_priority = priorities[page_num]; return; } static void preload_iter(GtkTreeModel *model, GtkTreeIter *iter) { gchar *filename; gtk_tree_model_get(model, iter, FULLNAME_COLUMN, &filename, -1); rs_io_idle_prefetch_file(filename, PRELOAD_CLASS); } static void predict_preload(RSStore *store, gboolean initial) { GList *selected = NULL; gint n, near = 5; GtkTreeIter iter; GtkIconView *iconview = GTK_ICON_VIEW(store->current_iconview); GtkTreePath *path, *next, *prev; GtkTreeModel *model = gtk_icon_view_get_model (iconview); rs_io_idle_cancel_class(PRELOAD_CLASS); /* Get a list of selected icons */ selected = gtk_icon_view_get_selected_items(iconview); if (g_list_length(selected) == 1) { /* Preload current image - this is stupid thou! */ path = g_list_nth_data(selected, 0); if (gtk_tree_model_get_iter(gtk_icon_view_get_model (iconview), &iter, path)) preload_iter(model, &iter); /* Near */ next = gtk_tree_path_copy(path); prev = gtk_tree_path_copy(path); for(n=0;n 0) { g_list_foreach (selected, (GFunc) gtk_tree_path_free, NULL); g_list_free (selected); } } gboolean rs_store_set_open_selected(RSStore *store, gboolean open_selected) { const static GdkColor red = {0, 0xffff, 0x0000, 0x0000 }; if (!store || !RS_IS_STORE(store)) return TRUE; /* just return, if already at requested state */ if (store->open_selected == 0 && open_selected) return TRUE; if (store->open_selected != 0 && !open_selected) return FALSE; /* Re-enable */ if (store->open_selected != 0) { gui_status_pop(store->open_selected); store->open_selected = 0; gtk_widget_modify_bg(GTK_WIDGET(store->notebook),GTK_STATE_NORMAL, NULL); selection_changed(GTK_ICON_VIEW(store->current_iconview), store); } else /* Disable */ { store->open_selected = gui_status_push(_("NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable.")); gtk_widget_modify_bg(GTK_WIDGET(store->notebook),GTK_STATE_NORMAL, &red); } return open_selected; } extern gboolean rs_store_is_photo_selected(RSStore *store, const gchar *filename) { if (!RS_IS_STORE(store) || NULL == filename) return FALSE; GList *selected = rs_store_get_selected_names(store); GList *current = selected; gboolean ret = FALSE; if (NULL == selected) ret = TRUE; while (NULL != current) { if (0 == g_strcmp0(current->data, filename)) ret = TRUE; current = g_list_next(current); } g_list_foreach(selected, (GFunc) g_free, NULL); g_list_free(selected); return ret; } static void selection_changed(GtkIconView *iconview, gpointer data) { RSStore *store = RS_STORE(data); GtkTreeModel *model = GTK_TREE_MODEL(store->store); GtkTreeIter iter; gint type; gchar *name; GList *group_member_list; GList *filename_list; GList *selected = NULL; gint num_selected; /* Get list of selected icons */ selected = rs_store_get_selected_iters(store); num_selected = g_list_length(selected); /* Emit signal if only one thumbnail is selected */ if (num_selected == 1 && store->open_selected == 0) { iter = * (GtkTreeIter *) g_list_nth_data(selected, 0); /* Get type of row */ gtk_tree_model_get(model, &iter, TYPE_COLUMN, &type, -1); switch (type) { case RS_STORE_TYPE_GROUP: gtk_tree_model_get(model, &iter, GROUP_LIST_COLUMN, &group_member_list, -1); filename_list = store_iter_list_to_filename_list(store->store, group_member_list); g_signal_emit(G_OBJECT(data), signals[GROUP_ACTIVATED_SIGNAL], 0, filename_list); g_list_free(filename_list); break; default: gtk_tree_model_get(GTK_TREE_MODEL(store->store), &iter, FULLNAME_COLUMN, &name, -1); g_signal_emit(G_OBJECT(data), signals[THUMB_ACTIVATED_SIGNAL], 0, name); break; } predict_preload(data, FALSE); } rs_core_actions_update_menu_items(rs_get_blob()); g_list_foreach(selected, (GFunc)g_free, NULL); g_list_free(selected); } #if GTK_CHECK_VERSION(2,12,0) static gboolean query_tooltip(GtkWidget *widget, gint x, gint y, gboolean keyboard_mode, GtkTooltip *tooltip, gpointer user_data) { gboolean ret = FALSE; RSStore *store = RS_STORE(user_data); GtkIconView *iconview = GTK_ICON_VIEW(widget); GtkTreeModel *model; GtkTreePath *path; GtkScrolledWindow *scrolled_window; GtkAdjustment *adj; GtkTreeIter iter; /* Remember the scrollbar - but we only need the horizontal (for now) */ scrolled_window = GTK_SCROLLED_WINDOW(gtk_widget_get_parent(widget)); adj = GTK_ADJUSTMENT(gtk_scrolled_window_get_hadjustment(scrolled_window)); x += (gint) gtk_adjustment_get_value(adj); /* See if there's an icon at current position */ path = gtk_icon_view_get_path_at_pos(GTK_ICON_VIEW(widget), x, y); if (path) { /* If we differ, render a new tooltip text */ if (!store->tooltip_last_path || (gtk_tree_path_compare(path, store->tooltip_last_path)!=0)) { if (store->tooltip_last_path) gtk_tree_path_free(store->tooltip_last_path); store->tooltip_last_path = path; model = gtk_icon_view_get_model (iconview); if (path && gtk_tree_model_get_iter(model, &iter, path)) { RSMetadata *metadata; gint type; gchar *name; gchar *filename; gtk_tree_model_get (model, &iter, TYPE_COLUMN, &type, TEXT_COLUMN_FULL, &name, FULLNAME_COLUMN, &filename, METADATA_COLUMN, &metadata, -1); RSLibrary *library = rs_library_get_singleton(); gboolean autotag; rs_conf_get_boolean_with_default(CONF_LIBRARY_AUTOTAG, &autotag, DEFAULT_CONF_LIBRARY_AUTOTAG); GList *tags = rs_library_photo_tags(library, filename, autotag); if (metadata) switch(type) { case RS_STORE_TYPE_GROUP: g_string_printf(store->tooltip_text, "FIXME: group"); break; default: g_string_printf(store->tooltip_text, _("%s\n\n"), name); if (metadata->make_ascii != NULL) g_string_append_printf(store->tooltip_text, _("Make: %s\n"), metadata->make_ascii); if (metadata->model_ascii != NULL) g_string_append_printf(store->tooltip_text, _("Model: %s\n"), metadata->model_ascii); if (metadata->focallength > 0) g_string_append_printf(store->tooltip_text, _("Focal length: %dmm\n"), metadata->focallength); if (metadata->shutterspeed > 0.0 && metadata->shutterspeed < 4) g_string_append_printf(store->tooltip_text, _("Shutter speed: %.1fs\n"), 1.0/metadata->shutterspeed); else if (metadata->shutterspeed >= 4) g_string_append_printf(store->tooltip_text, _("Shutter speed: 1/%.0fs\n"), metadata->shutterspeed); if (metadata->aperture > 0.0) g_string_append_printf(store->tooltip_text, _("Aperture: F/%.01f\n"), metadata->aperture); if (metadata->iso != 0) g_string_append_printf(store->tooltip_text, _("ISO: %u\n"), metadata->iso); if (metadata->time_ascii != NULL) g_string_append_printf(store->tooltip_text, _("Time: %s"), metadata->time_ascii); if (g_list_length(tags) > 0) { gint num = g_list_length(tags); gint n; g_string_append_printf(store->tooltip_text, "\nTags:"); for(n = 0; n < num; n++) { g_string_append_printf(store->tooltip_text, "\n - %s", (gchar *) g_list_nth_data(tags, n)); } g_string_append_printf(store->tooltip_text, ""); g_list_free(tags); } g_object_unref(metadata); g_free(name); g_free(filename); break; } } } /* If we're hovering over an icon, we would like to show the tooltip */ ret = TRUE; } gtk_tooltip_set_markup(tooltip, store->tooltip_text->str); return ret; } #endif /* GTK_CHECK_VERSION(2,12,0) */ static GtkWidget * make_iconview(GtkWidget *iconview, RSStore *store, gint prio) { GtkWidget *scroller; /* We must be abletoselect multiple icons */ gtk_icon_view_set_selection_mode(GTK_ICON_VIEW (iconview), GTK_SELECTION_MULTIPLE); #if GTK_CHECK_VERSION(2,12,0) /* Enable tooltips */ g_object_set (iconview, "has-tooltip", TRUE, NULL); g_signal_connect(iconview, "query-tooltip", G_CALLBACK(query_tooltip), store); #endif /* pack them as close af possible */ gtk_icon_view_set_column_spacing(GTK_ICON_VIEW (iconview), 0); /* Let us know if selection changes */ g_signal_connect((gpointer) iconview, "selection_changed", G_CALLBACK (selection_changed), store); scroller = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroller), GTK_POLICY_AUTOMATIC, GTK_POLICY_NEVER); /* Handle scroll events not handled by scroller to allow scrolling in horizontal iconview */ g_signal_connect_after(scroller, "scroll-event", G_CALLBACK(scroll_event), NULL); gtk_container_add (GTK_CONTAINER (scroller), iconview); return(scroller); } static gboolean model_filter_prio(GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { gint p,t; gint prio = GPOINTER_TO_INT (data); gtk_tree_model_get (model, iter, PRIORITY_COLUMN, &p, TYPE_COLUMN, &t, -1); if (t == RS_STORE_TYPE_GROUP_MEMBER) return FALSE; else { switch(prio) { case PRIO_ALL: switch (p) { case PRIO_D: return(FALSE); break; default: return(TRUE); break; } case PRIO_U: switch (p) { case PRIO_1: case PRIO_2: case PRIO_3: case PRIO_D: return(FALSE); break; default: return(TRUE); break; } default: if (prio==p) return(TRUE); break; } return(FALSE); } } static gint model_sort_name(GtkTreeModel *model, GtkTreeIter *tia, GtkTreeIter *tib, gpointer userdata) { gint ret; gchar *a, *b; gtk_tree_model_get(model, tia, TEXT_COLUMN_FULL, &a, -1); gtk_tree_model_get(model, tib, TEXT_COLUMN_FULL, &b, -1); if (!a[0] && !b[0]) ret = 0; else if (!a[0]) ret = 1; else if (!b[0]) ret = -1; else ret = g_utf8_collate(a,b); g_free(a); g_free(b); return(ret); } static gint model_sort_timestamp(GtkTreeModel *model, GtkTreeIter *tia, GtkTreeIter *tib, gpointer userdata) { gint ret; RSMetadata *a, *b; gtk_tree_model_get(model, tia, METADATA_COLUMN, &a, -1); gtk_tree_model_get(model, tib, METADATA_COLUMN, &b, -1); if ((a!=NULL) && (b!=NULL) && (a->timestamp != b->timestamp)) ret = a->timestamp - b->timestamp; else ret = model_sort_name(model, tia, tib, userdata); if (a!=NULL) g_object_unref(a); if (b!=NULL) g_object_unref(b); return(ret); } static gint model_sort_iso(GtkTreeModel *model, GtkTreeIter *tia, GtkTreeIter *tib, gpointer userdata) { gint ret; RSMetadata *a, *b; gtk_tree_model_get(model, tia, METADATA_COLUMN, &a, -1); gtk_tree_model_get(model, tib, METADATA_COLUMN, &b, -1); if ((a!=NULL) && (b!=NULL) && (a->iso != b->iso)) ret = a->iso - b->iso; else ret = model_sort_name(model, tia, tib, userdata); if (a!=NULL) g_object_unref(a); if (b!=NULL) g_object_unref(b); return(ret); } static gint model_sort_aperture(GtkTreeModel *model, GtkTreeIter *tia, GtkTreeIter *tib, gpointer userdata) { gint ret; RSMetadata *a, *b; gtk_tree_model_get(model, tia, METADATA_COLUMN, &a, -1); gtk_tree_model_get(model, tib, METADATA_COLUMN, &b, -1); if ((a!=NULL) && (b!=NULL) && (a->aperture != b->aperture)) ret = a->aperture*10.0 - b->aperture*10.0; else ret = model_sort_name(model, tia, tib, userdata); if (a!=NULL) g_object_unref(a); if (b!=NULL) g_object_unref(b); return(ret); } static gint model_sort_focallength(GtkTreeModel *model, GtkTreeIter *tia, GtkTreeIter *tib, gpointer userdata) { gint ret; RSMetadata *a, *b; gtk_tree_model_get(model, tia, METADATA_COLUMN, &a, -1); gtk_tree_model_get(model, tib, METADATA_COLUMN, &b, -1); if ((a!=NULL) && (b!=NULL) && (a->focallength != b->focallength)) ret = a->focallength*10.0 - b->focallength*10.0; else ret = model_sort_name(model, tia, tib, userdata); if (a!=NULL) g_object_unref(a); if (b!=NULL) g_object_unref(b); return(ret); } static gint model_sort_shutterspeed(GtkTreeModel *model, GtkTreeIter *tia, GtkTreeIter *tib, gpointer userdata) { gint ret; RSMetadata *a, *b; gtk_tree_model_get(model, tia, METADATA_COLUMN, &a, -1); gtk_tree_model_get(model, tib, METADATA_COLUMN, &b, -1); if ((a!=NULL) && (b!=NULL) && (a->shutterspeed != b->shutterspeed)) ret = b->shutterspeed*10.0 - a->shutterspeed*10.0; else ret = model_sort_name(model, tia, tib, userdata); if (a!=NULL) g_object_unref(a); if (b!=NULL) g_object_unref(b); return(ret); } static void count_priorities_del(GtkTreeModel *treemodel, GtkTreePath *path, gpointer data) { count_priorities(treemodel, path, NULL, data); return; } static void count_priorities(GtkTreeModel *treemodel, GtkTreePath *do_not_use1, GtkTreeIter *do_not_use2, gpointer data) { GtkWidget **label = (GtkWidget **) data; GtkTreeIter iter; GtkTreePath *path; gint priority, type; gint count_1 = 0; gint count_2 = 0; gint count_3 = 0; gint count_u = 0; gint count_d = 0; gint count_all; gchar label_text[NUM_VIEWS][63]; gint i; path = gtk_tree_path_new_first(); if (gtk_tree_model_get_iter(treemodel, &iter, path)) { do { gtk_tree_model_get(treemodel, &iter, PRIORITY_COLUMN, &priority, -1); gtk_tree_model_get(treemodel, &iter, TYPE_COLUMN, &type, -1); if (type != RS_STORE_TYPE_GROUP_MEMBER) { switch (priority) { case PRIO_1: count_1++; break; case PRIO_2: count_2++; break; case PRIO_3: count_3++; break; case PRIO_U: count_u++; break; case PRIO_D: count_d++; break; } } } while(gtk_tree_model_iter_next (treemodel, &iter)); } gtk_tree_path_free(path); count_all = count_1+count_2+count_3+count_u; g_sprintf(label_text[0], _("* (%d)"), count_all); g_sprintf(label_text[1], _("1 (%d)"), count_1); g_sprintf(label_text[2], _("2 (%d)"), count_2); g_sprintf(label_text[3], _("3 (%d)"), count_3); g_sprintf(label_text[4], _("U (%d)"), count_u); g_sprintf(label_text[5], _("D (%d)"), count_d); #if NUM_VIEWS != 6 #error Update this accordingly #endif for(i=0;i max_name_length) { /* Find offset to character number max_name_length-3 and terminate*/ gchar *end = g_utf8_offset_to_pointer(name, max_name_length-3); end[0] = end[1] = end[2] = '.'; end[3] = 0; } /* Global default icon */ if (!icon_default) icon_default = gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "icons" G_DIR_SEPARATOR_S PACKAGE ".png", NULL); /* Add file to store */ gdk_threads_enter(); gtk_list_store_append (store->store, &iter); gtk_list_store_set (store->store, &iter, METADATA_COLUMN, NULL, PIXBUF_COLUMN, icon_default, PIXBUF_CLEAN_COLUMN, icon_default, TEXT_COLUMN, name, TEXT_COLUMN_FULL, name_full, FULLNAME_COLUMN, fullname, -1); gdk_threads_leave(); /* Push an asynchronous job for loading the thumbnail */ job = g_new(WORKER_JOB, 1); job->store = g_object_ref(store); job->iter = iter; job->filename = g_strdup(fullname); job->name = g_strdup(name); job->model = g_object_ref(GTK_TREE_MODEL(store->store)); rs_io_idle_read_metadata(job->filename, METADATA_CLASS, got_metadata, job); g_atomic_int_inc(&store->jobs_to_do); } static gint load_directory(RSStore *store, const gchar *path, RSLibrary *library, const gboolean load_8bit, const gboolean load_recursive) { const gchar *name; gchar *fullname; GDir *dir; gint count = 0; gchar *path_normalized = rs_normalize_path(path); if (!path_normalized) return 0; rs_io_idle_restore_tags(path_normalized, RESTORE_TAGS_CLASS); dir = g_dir_open(path_normalized, 0, NULL); /* FIXME: check errors */ while((dir != NULL) && (name = g_dir_read_name(dir))) { /* Ignore "hidden" files and directories */ if (name[0] == '.') continue; fullname = g_build_filename(path, name, NULL); if (rs_filetype_can_load(fullname)) { rs_store_load_file(store, fullname); count++; } else if (load_recursive && g_file_test(fullname, G_FILE_TEST_IS_DIR)) count += load_directory(store, fullname, library, load_8bit, load_recursive); g_free(fullname); } g_free(path_normalized); if (dir) g_dir_close(dir); return count; } /* Public functions */ /** * Creates a new RSStore * @return A new RSStore */ GtkWidget * rs_store_new(void) { return g_object_new (RS_STORE_TYPE_WIDGET, NULL); } /** * Remove thumbnail(s) from store * @param store A RSStore * @param filename The name of the thumbnail to remove or NULL * @param iter The iter of the thumbnail to remove or NULL (If both name and iter is NULL, ALL thumbnails will be removed) */ void rs_store_remove(RSStore *store, const gchar *filename, GtkTreeIter *iter) { GtkTreeIter i; /* Empty the loader queue */ if (!filename && !iter) { rs_io_idle_cancel_class(METADATA_CLASS); rs_io_idle_cancel_class(PRELOAD_CLASS); } /* If we got no store, iterate though all */ if (!store) { gint i; for (i=0;istore), filename, &i, NULL)) iter = &i; /* We got iter, just remove it */ if (iter) gtk_list_store_remove(GTK_LIST_STORE(GTK_TREE_MODEL(store->store)), iter); /* If both are NULL, remove everything */ if ((filename == NULL) && (iter == NULL)) { gint i; /* If we remove everything we have to block selection-changed signal */ for(i=0;iiconview[i], selection_changed, store); gtk_list_store_clear(store->store); for(i=0;iiconview[i], selection_changed, store); } gdk_threads_leave(); } /** * Load thumbnails from a directory into the store * @param store A RSStore * @param path The path to load * @return The number of files loaded or -1 */ gint rs_store_load_directory(RSStore *store, const gchar *path) { RSLibrary *library = rs_library_get_singleton(); static gboolean running = FALSE; static GStaticMutex lock = G_STATIC_MUTEX_INIT; GtkTreeSortable *sortable; gboolean load_8bit = FALSE; gboolean load_recursive = DEFAULT_CONF_LOAD_RECURSIVE; gint items=0, n; g_return_val_if_fail(RS_IS_STORE(store), -1); if (!path) { if (store->last_path) path = store->last_path; else return -1; } else { if (store->last_path) g_free(store->last_path); store->last_path = g_strdup(path); } /* We should really only be running one instance at a time */ g_static_mutex_lock(&lock); if (running) return -1; running = TRUE; g_static_mutex_unlock(&lock); rs_conf_get_boolean(CONF_LOAD_GDK, &load_8bit); rs_conf_get_boolean(CONF_LOAD_RECURSIVE, &load_recursive); if (!rs_conf_get_string(CONF_LWD)) load_recursive = FALSE; /* Disable sort while loading - this greatly reduces the change of triggering a GTK crash bug */ sortable = GTK_TREE_SORTABLE(store->store); gtk_tree_sortable_set_sort_column_id(sortable, GTK_TREE_SORTABLE_UNSORTED_SORT_COLUMN_ID, GTK_SORT_ASCENDING); g_atomic_int_set(&store->jobs_to_do, 0); gtk_label_set_markup(GTK_LABEL(store->label[0]), _("* (-)")); gtk_label_set_markup(GTK_LABEL(store->label[1]), _("1 (-)")); gtk_label_set_markup(GTK_LABEL(store->label[2]), _("2 (-)")); gtk_label_set_markup(GTK_LABEL(store->label[3]), _("3 (-)")); gtk_label_set_markup(GTK_LABEL(store->label[4]), _("U (-)")); gtk_label_set_markup(GTK_LABEL(store->label[5]), _("D (-)")); g_signal_handler_block(store->store, store->counthandler); store->counter_blocked = TRUE; /* While we're loading, we keep the IO lock to ourself. We need to read very basic meta and directory data */ rs_io_lock(); items = load_directory(store, path, library, load_8bit, load_recursive); rs_io_unlock(); /* unset model and make sure we have enough columns */ gdk_threads_enter(); rs_store_set_iconview_size(store, items); /* Sort the store */ rs_store_set_sort_method(store, store->sort_method); /* set model for all 6 iconviews */ for(n=0;nstore), NULL); gtk_tree_model_filter_set_visible_func(GTK_TREE_MODEL_FILTER (tree), model_filter_prio, GINT_TO_POINTER (priorities[n]), NULL); gtk_icon_view_set_model (GTK_ICON_VIEW (store->iconview[n]), tree); } #ifdef EXPERIMENTAL /* load group file and group photos */ store_load_groups(store->store); #endif gdk_threads_leave(); /* Start the preloader */ predict_preload(store, TRUE); g_static_mutex_lock(&lock); running = FALSE; g_static_mutex_unlock(&lock); /* Return the number of files successfully recognized */ return items; } /** * Set priority and exported flags of a thumbnail * @param store A RSStore * @param filename The name of the thumbnail to remove or NULL * @param iter The iter of the thumbnail to remove or NULL * @param priority The priority or NULL to leave unchanged * @param exported The exported status or NULL to leave unchanged * @return TRUE if succeeded */ gboolean rs_store_set_flags(RSStore *store, const gchar *filename, GtkTreeIter *iter, const guint *priority, const gboolean *exported) { GtkTreeIter i; if (!store) { gint i; gboolean ret = FALSE; for (i=0;istore), filename, &i, NULL)) iter = &i; if (iter) { guint prio; gboolean expo; GdkPixbuf *pixbuf; GdkPixbuf *pixbuf_clean; gchar *fullname; gtk_tree_model_get(GTK_TREE_MODEL(store->store), iter, PIXBUF_COLUMN, &pixbuf, PIXBUF_CLEAN_COLUMN, &pixbuf_clean, PRIORITY_COLUMN, &prio, EXPORTED_COLUMN, &expo, FULLNAME_COLUMN, &fullname, -1); if (priority) prio = *priority; if (exported) expo = *exported; thumbnail_update(pixbuf, pixbuf_clean, prio, expo, DROPSHADOWOFFSET); gtk_list_store_set (store->store, iter, PRIORITY_COLUMN, prio, EXPORTED_COLUMN, expo, -1); /* Update the cache */ if (priority || exported) rs_cache_save_flags(fullname, priority, exported); return TRUE; } return FALSE; } GtkIconView* rs_store_get_current_iconview(RSStore *store) { g_return_val_if_fail(RS_IS_STORE(store), NULL); return GTK_ICON_VIEW(store->current_iconview); } /** * Select a image * @param store A RSStore * @param name The filename to select * @param deselect_others Should other images be de-selected - this will also make the iconview scroll to the new icon. */ gboolean rs_store_set_selected_name(RSStore *store, const gchar *filename, gboolean deselect_others) { gboolean ret = FALSE; GtkTreePath *path = NULL; g_return_val_if_fail(RS_IS_STORE(store), FALSE); g_return_val_if_fail(filename, FALSE); if (deselect_others) gtk_icon_view_unselect_all(GTK_ICON_VIEW(store->current_iconview)); tree_find_filename(GTK_TREE_MODEL(store->store), filename, NULL, &path); if (path) { /* Get model for current icon-view */ GtkTreeModel *model = gtk_icon_view_get_model (GTK_ICON_VIEW(store->current_iconview)); /* Get the path in iconview and free path */ GtkTreePath *iconpath = gtk_tree_model_filter_convert_child_path_to_path(GTK_TREE_MODEL_FILTER(model), path); gtk_tree_path_free(path); /* Select the icon */ gtk_icon_view_select_path(GTK_ICON_VIEW(store->current_iconview), iconpath); gtk_icon_view_set_cursor(GTK_ICON_VIEW(store->current_iconview), iconpath, NULL, FALSE); /* Free the iconview path */ gtk_tree_path_free(iconpath); ret = TRUE; } return ret; } /** * Get a list of currently selected thumbnail iters * @param store A RSStore * @return a GList or NULL */ GList * rs_store_get_selected_iters(RSStore *store) { GList *selected = NULL; g_return_val_if_fail(RS_IS_STORE(store), NULL); /* Get list of selected icons */ gtk_icon_view_selected_foreach(GTK_ICON_VIEW(store->current_iconview), icon_get_selected_iters, &selected); return selected; } /** * Get a list of currently selected thumbnail names * @param store A RSStore * @return a GList or NULL */ GList * rs_store_get_selected_names(RSStore *store) { GList *selected = NULL; g_return_val_if_fail(RS_IS_STORE(store), NULL); /* Get list of selected icons */ gtk_icon_view_selected_foreach(GTK_ICON_VIEW(store->current_iconview), icon_get_selected_names, &selected); selected = rs_store_sort_selected(selected); return selected; } /** * Get a list of photo names * @param store A RSStore * @param selected GList for selected thumbs or NULL * @param visible GList for visible (in currently selected iconview) thumbs or NULL * @param all GList for all photos or NULL */ void rs_store_get_names(RSStore *store, GList **selected, GList **visible, GList **all) { GtkTreeModel *model; g_assert(RS_IS_STORE(store)); model = gtk_icon_view_get_model (GTK_ICON_VIEW(store->current_iconview)); if (selected) gtk_icon_view_selected_foreach(GTK_ICON_VIEW(store->current_iconview), icon_get_selected_names, selected); if (visible) gtk_tree_model_foreach(model, tree_foreach_names, visible); if (all) gtk_tree_model_foreach(GTK_TREE_MODEL(store->store), tree_foreach_names, all); return; } /** * Show filenames in the thumbnail browser * @param store A RSStore * @param show_filenames If TRUE filenames will be visible */ void rs_store_set_show_filenames(RSStore *store, gboolean show_filenames) { gint i; g_assert(RS_IS_STORE(store)); for (i=0;iiconview[i]), TEXT_COLUMN); else gtk_icon_view_set_text_column (GTK_ICON_VIEW (store->iconview[i]), -1); } return; } /** * Return a GList of iters with a specific priority * @param store A RSStore * @param priority The priority of interest * @return A GList of GtkTreeIters */ GList * rs_store_get_iters_with_priority(RSStore *store, guint priority) { GtkTreePath *path; guint prio; GList *list = NULL; GtkTreeIter iter; g_assert(RS_IS_STORE(store)); path = gtk_tree_path_new_first(); while(gtk_tree_model_get_iter(GTK_TREE_MODEL(store->store), &iter, path)) { prio = PRIO_U; gtk_tree_model_get(GTK_TREE_MODEL(store->store), &iter, PRIORITY_COLUMN, &prio, -1); if (prio == priority) { GtkTreeIter *i = g_new(GtkTreeIter, 1); *i = iter; list = g_list_prepend(list, i); } gtk_tree_path_next(path); } return list; } /** * Get the filename of an image * @param store A RSStore * @param iter The iter of the thumbnail * @return a filename or NULL if failed */ gchar * rs_store_get_name(RSStore *store, GtkTreeIter *iter) { GtkTreeModel *model; gchar *fullname = NULL; g_assert(RS_IS_STORE(store)); g_assert(iter != NULL); model = gtk_icon_view_get_model (GTK_ICON_VIEW(store->current_iconview)); gtk_tree_model_get(GTK_TREE_MODEL(store->store), iter, FULLNAME_COLUMN, &fullname, -1); return(fullname); } /** * Get the filename of the previous or next thumbnail * @param store A RSStore * @param current_filename Current filename or NULL if none * @param direction 1: previous, 2: next * @return filename of next or previous file, NULL if none. */ const gchar* rs_store_get_prevnext(RSStore *store, const gchar *current_filename, guint direction) { gboolean ret = FALSE; GList *selected; GtkIconView *iconview; GtkTreeIter iter; GtkTreePath *path = NULL, *newpath = NULL; gchar *new_name = NULL; GtkTreeModel *model = gtk_icon_view_get_model (GTK_ICON_VIEW(store->current_iconview)); g_assert(RS_IS_STORE(store)); /* get the iconview */ iconview = GTK_ICON_VIEW(store->current_iconview); /* Get a list of selected icons */ selected = gtk_icon_view_get_selected_items(iconview); if (g_list_length(selected) == 1) { path = g_list_nth_data(selected, 0); newpath = gtk_tree_path_copy(path); if (direction == 1) /* Previous */ { ret = gtk_tree_path_prev(newpath); } else /* Next */ { gtk_tree_path_next(newpath); ret = gtk_tree_model_get_iter(gtk_icon_view_get_model (iconview), &iter, newpath); } } /* If we got a filename, try to select prev/next from that */ else if (current_filename) { /* Get current GtkTreeModelFilter */ if (tree_find_filename(GTK_TREE_MODEL(store->store), current_filename, NULL, &newpath)) { if ((path = gtk_tree_model_filter_convert_child_path_to_path(GTK_TREE_MODEL_FILTER(model), newpath))) { ret = TRUE; if (direction == 1) /* Previous */ { if (!gtk_tree_path_prev(path)) ret = FALSE; } else { gtk_tree_path_next(path); if (!gtk_tree_model_get_iter(GTK_TREE_MODEL(store->store), &iter, path)) ret = FALSE; } } if (newpath) gtk_tree_path_free(newpath); newpath = path; } } /* If we got no hit, fall back to this */ if (ret == FALSE) { /* If nothing is selected, select first thumbnail */ newpath = gtk_tree_path_new_first(); if (gtk_tree_model_get_iter(model, &iter, newpath)) ret = TRUE; } if (newpath && ret) { GtkTreeIter i; if (gtk_tree_model_get_iter(model, &i, newpath)) gtk_tree_model_get(model, &i, FULLNAME_COLUMN, &new_name, -1); /* Free the new path */ gtk_tree_path_free(newpath); } /* Free list of selected */ g_list_foreach (selected, (GFunc) gtk_tree_path_free, NULL); g_list_free (selected); return new_name; } /** * Selects the previous or next thumbnail * @param store A RSStore * @param current_filename Current filename or NULL if none * @param direction 1: previous, 2: next */ gboolean rs_store_select_prevnext(RSStore *store, const gchar *current_filename, guint direction) { g_assert(RS_IS_STORE(store)); const gchar* new_name = rs_store_get_prevnext(store, current_filename, direction); if (new_name) return rs_store_set_selected_name(store, new_name, TRUE); return FALSE; } /** * Switches to the page number page_num * @note Should behave like gtk_notebook_set_current_page() * @param store A RSStore * @param page_num index of the page to switch to, starting from 0. If negative, the last page will be used. If greater than the number of pages in the notebook, nothing will be done. */ void rs_store_set_current_page(RSStore *store, gint page_num) { gtk_notebook_set_current_page(store->notebook, page_num); } /** * Returns the page number of the current page. * @note Should behave like gtk_notebook_get_current_page() * @param store A RSStore * @return the index (starting from 0) of the current page in the notebook. If the notebook has no pages, then -1 will be returned. */ gint rs_store_get_current_page(RSStore *store) { return gtk_notebook_get_current_page(store->notebook); } /** * Sets the sorting method in a RSStore * @param store A RSStore * @param sort A sort method from the RS_STORE_SORT_BY-family of enums */ void rs_store_set_sort_method(RSStore *store, RS_STORE_SORT_METHOD sort_method) { GtkTreeSortable *sortable; gint sort_column = TEXT_COLUMN_FULL; GtkTreeIterCompareFunc sort_func = model_sort_name; g_assert(RS_IS_STORE(store)); store->sort_method = sort_method; rs_conf_set_integer(CONF_STORE_SORT_METHOD, sort_method); switch (sort_method) { case RS_STORE_SORT_BY_NAME: sort_column = TEXT_COLUMN_FULL; sort_func = model_sort_name; break; case RS_STORE_SORT_BY_TIMESTAMP: sort_column = METADATA_COLUMN; sort_func = model_sort_timestamp; break; case RS_STORE_SORT_BY_ISO: sort_column = METADATA_COLUMN; sort_func = model_sort_iso; break; case RS_STORE_SORT_BY_APERTURE: sort_column = METADATA_COLUMN; sort_func = model_sort_aperture; break; case RS_STORE_SORT_BY_FOCALLENGTH: sort_column = METADATA_COLUMN; sort_func = model_sort_focallength; break; case RS_STORE_SORT_BY_SHUTTERSPEED: sort_column = METADATA_COLUMN; sort_func = model_sort_shutterspeed; break; } sortable = GTK_TREE_SORTABLE(store->store); gtk_tree_sortable_set_sort_func(sortable, sort_column, sort_func, store, NULL); gtk_tree_sortable_set_sort_column_id(sortable, sort_column, GTK_SORT_ASCENDING); } /** * Get the sorting method for a RSStore * @param store A RSStore * @return A sort method from the RS_STORE_SORT_BY-family of enums */ extern RS_STORE_SORT_METHOD rs_store_get_sort_method(RSStore *store) { g_assert(RS_IS_STORE(store)); return store->sort_method; } void cairo_draw_thumbnail(cairo_t *cr, GdkPixbuf *pixbuf, gint x, gint y, gint width, gint height, gdouble alpha) { gdouble greyvalue = 0.9; cairo_set_source_rgba(cr, greyvalue, greyvalue, greyvalue, 1.0); cairo_rectangle(cr, x, y, width, height); cairo_fill(cr); gdk_cairo_set_source_pixbuf(cr, pixbuf, (x+2), (y+2)); cairo_paint(cr); cairo_set_source_rgba(cr, 0.5, 0.5, 0.5, alpha); cairo_rectangle(cr, x+1, y+1, width-2, height-2); cairo_fill(cr); return; } void calc_rotated_coordinats(gdouble a, gdouble b, gdouble R, gdouble *a2, gdouble *b2) { gdouble c, A; c = sqrt(a*a+b*b); A = atan(a/b)+R; *a2 = sin(A)*c; *b2 = cos(A)*c; } GdkPixbuf * store_group_update_pixbufs(GdkPixbuf *pixbuf, GdkPixbuf *pixbuf_clean) { gint width, height; GdkPixbuf *new_pixbuf; width = gdk_pixbuf_get_width(pixbuf_clean); height = gdk_pixbuf_get_height(pixbuf_clean); new_pixbuf = gdk_pixbuf_new(gdk_pixbuf_get_colorspace(pixbuf_clean), TRUE, gdk_pixbuf_get_bits_per_sample(pixbuf_clean), width, height); #if GTK_CHECK_VERSION(2,8,0) && defined(EXPERIMENTAL) gdouble a2, b2, scale, bb_x1, bb_x2, bb_y1, bb_y2, bb_height, bb_width, xoffset, yoffset, border = 1; /* We have a bit more room with landscape-mode photos than with portrait-mode*/ if (height > width) scale = 0.9; else scale = 1.0; /* upper left of left rotation - we need a2 */ calc_rotated_coordinats((0-(width/2)), 128, -0.1, &a2, &b2); bb_x1 = a2; /* upper left of right rotation - we need b2 */ calc_rotated_coordinats((0-(width/2)), 128, 0.2, &a2, &b2); bb_y1 = b2; /* upper right of right rotation - we need b2 */ calc_rotated_coordinats((width/2), 128, 0.2, &a2, &b2); bb_x2 = a2; /* lower right of right rotation - we need b2 */ calc_rotated_coordinats((width/2),(128-height), 0.2, &a2, &b2); bb_y2 = b2; /* Calculate the magic numbers - it will work from scale 0.7 and up */ bb_height = ((bb_y1-bb_y2)+border*2)*scale; bb_width = ((bb_x1*-1+bb_x2+10)+border*2)*scale; xoffset = (bb_x2+bb_x1)/2/scale*-1; yoffset = (128-(bb_y1-(128)))/scale*-1; cairo_surface_t *surface; cairo_t *cr; surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, bb_width, bb_height); cr = cairo_create(surface); cairo_translate(cr, (bb_width/2), 128); cairo_scale(cr, scale, scale); cairo_rotate(cr, -0.1); cairo_draw_thumbnail(cr, pixbuf_clean, (width/-2)+xoffset, yoffset, width, height, 0.7); cairo_rotate(cr, 0.2); cairo_draw_thumbnail(cr, pixbuf_clean, (width/-2)+xoffset, yoffset, width, height, 0.7); cairo_rotate(cr, 0.1); cairo_draw_thumbnail(cr, pixbuf_clean, (width/-2)+xoffset, yoffset, width, height, 0.7); cairo_rotate(cr, -0.2); cairo_draw_thumbnail(cr, pixbuf_clean, (width/-2)+xoffset, yoffset, width, height, 0.0); cairo_destroy(cr); new_pixbuf = cairo_convert_to_pixbuf(surface); cairo_surface_destroy(surface); #else guint rowstride; guchar *pixels; gint channels; gint new_width, new_height; GdkPixbuf *pixbuf_scaled; width -= 6; height -= 6; rowstride = gdk_pixbuf_get_rowstride (new_pixbuf); pixels = gdk_pixbuf_get_pixels (new_pixbuf); new_width = gdk_pixbuf_get_width (new_pixbuf); new_height = gdk_pixbuf_get_height (new_pixbuf); channels = gdk_pixbuf_get_n_channels (new_pixbuf); // draw horizontal lines rs_pixbuf_draw_hline(new_pixbuf, 0, 0, width+2, 0x00, 0x00, 0x00, 0xFF); rs_pixbuf_draw_hline(new_pixbuf, width+2, 2, 2, 0x00, 0x00, 0x00, 0xFF); rs_pixbuf_draw_hline(new_pixbuf, width+4, 4, 2, 0x00, 0x00, 0x00, 0xFF); rs_pixbuf_draw_hline(new_pixbuf, 0, height+1, width+2, 0x00, 0x00, 0x00, 0xFF); rs_pixbuf_draw_hline(new_pixbuf, 2, height+3, width+2, 0x00, 0x00, 0x00, 0xFF); rs_pixbuf_draw_hline(new_pixbuf, 4, height+5, width+2, 0x00, 0x00, 0x00, 0xFF); // draw vertical lines rs_pixbuf_draw_vline(new_pixbuf, 0, 0, height+2, 0x00, 0x00, 0x00, 0xFF); rs_pixbuf_draw_vline(new_pixbuf, 2, height+2, 2, 0x00, 0x00, 0x00, 0xFF); rs_pixbuf_draw_vline(new_pixbuf, 4, height+4, 2, 0x00, 0x00, 0x00, 0xFF); rs_pixbuf_draw_vline(new_pixbuf, width+1, 0, height+2, 0x00, 0x00, 0x00, 0xFF); rs_pixbuf_draw_vline(new_pixbuf, width+3, 2, height+2, 0x00, 0x00, 0x00, 0xFF); rs_pixbuf_draw_vline(new_pixbuf, width+5, 4, height+2, 0x00, 0x00, 0x00, 0xFF); // fill spots with white rs_pixbuf_draw_hline(new_pixbuf, 3, height+2, width, 0xFF, 0xFF, 0xFF, 0xFF); rs_pixbuf_draw_hline(new_pixbuf, 5, height+4, width, 0xFF, 0xFF, 0xFF, 0xFF); rs_pixbuf_draw_vline(new_pixbuf, width+2, 3, height, 0xFF, 0xFF, 0xFF, 0xFF); rs_pixbuf_draw_vline(new_pixbuf, width+4, 5, height, 0xFF, 0xFF, 0xFF, 0xFF); pixbuf_scaled = gdk_pixbuf_scale_simple(pixbuf_clean, width, height, GDK_INTERP_BILINEAR); gdk_pixbuf_copy_area(pixbuf_scaled, 0, 0, width, height, new_pixbuf, 1, 1); #endif return new_pixbuf; } void store_group_select_n(GtkListStore *store, GtkTreeIter iter, guint n) { GList *members; GtkTreeIter *child_iter; GdkPixbuf *pixbuf = NULL; GdkPixbuf *pixbuf_clean = NULL; gchar *fullname = NULL; gchar *name = NULL; gchar *name_full = NULL; guint priority; gboolean exported; store_get_members(store, &iter, &members); child_iter = (GtkTreeIter *) g_list_nth_data(members, n); gtk_tree_model_get(GTK_TREE_MODEL(store), child_iter, PIXBUF_COLUMN, &pixbuf, PIXBUF_CLEAN_COLUMN, &pixbuf_clean, TEXT_COLUMN, &name, TEXT_COLUMN, &name_full, FULLNAME_COLUMN, &fullname, PRIORITY_COLUMN, &priority, EXPORTED_COLUMN, &exported, -1); pixbuf_clean = store_group_update_pixbufs(pixbuf, pixbuf_clean); pixbuf = gdk_pixbuf_copy(pixbuf_clean); thumbnail_update(pixbuf, pixbuf_clean, priority, exported, DROPSHADOWOFFSET); gtk_list_store_set (store, &iter, PIXBUF_COLUMN, pixbuf, PIXBUF_CLEAN_COLUMN, pixbuf_clean, TEXT_COLUMN, name, TEXT_COLUMN_FULL, name_full, FULLNAME_COLUMN, fullname, PRIORITY_COLUMN, priority, EXPORTED_COLUMN, exported, -1); store_save_groups(store); return; } /** * Marks a selection of thumbnails as a group * @param store A RSStore */ void rs_store_group_photos(RSStore *store) { GList *selected = NULL; gint selected_groups; selected = rs_store_get_selected_iters(store); selected_groups = rs_store_selection_n_groups(store, selected); gtk_icon_view_unselect_all(GTK_ICON_VIEW(store->current_iconview)); // Or automatic load of photo == wait time if (selected_groups == 0) { store_group_photos_by_iters(store->store, selected); } else { GtkTreeIter *group = NULL, *s = NULL; GList *members = NULL, *newmembers = NULL; while (selected) { s = selected->data; if (store_iter_is_group(store->store, s)) { store_get_members(store->store, s, &members); newmembers = g_list_concat(newmembers, members); if (group) { gtk_list_store_remove(store->store, s); selected = g_list_remove(selected, s); selected = g_list_previous(selected); } else group = s; } else { newmembers = g_list_append(newmembers, s); gtk_list_store_set(store->store, s, TYPE_COLUMN, RS_STORE_TYPE_GROUP_MEMBER, -1); } selected = g_list_next(selected); } gtk_list_store_set(store->store, group, GROUP_LIST_COLUMN, newmembers, -1); } store_save_groups(store->store); } /** * Ungroup a group or selection of groups * @param store A RSStore */ void rs_store_ungroup_photos(RSStore *store) { GList *members; GtkTreeIter *child_iter; GList *selected; gint n,m; GtkTreeIter *iter; selected = rs_store_get_selected_iters(store); for( n = 0; n < g_list_length(selected); n++) { if (store_iter_is_group(store->store, g_list_nth_data(selected, n))) { iter = (GtkTreeIter *) g_list_nth_data(selected, n); store_get_members(store->store, iter, &members); for( m = 0; m < g_list_length(members); m++) { child_iter = (GtkTreeIter *) g_list_nth_data(members, m); gtk_list_store_set(store->store, child_iter, TYPE_COLUMN, RS_STORE_TYPE_FILE, -1); } gtk_list_store_remove(store->store, iter); } } store_save_groups(store->store); } gboolean store_iter_is_group(GtkListStore *store, GtkTreeIter *iter) { gint t; store_get_type(store, iter, &t); if (t == RS_STORE_TYPE_GROUP) return TRUE; else return FALSE; } gint rs_store_selection_n_groups(RSStore *store, GList *selected) { gint n, group = 0; for(n = 0; n < g_list_length(selected); n++) { if (store_iter_is_group(store->store, g_list_nth_data(selected, n))) group++; } return group; } void store_save_groups(GtkListStore *store) { gchar *dotdir = NULL, *filename = NULL; GtkTreeIter iter; xmlTextWriterPtr writer; gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter); store_get_fullname(store, &iter, &filename); dotdir = rs_dotdir_get(filename); if (!dotdir) return; GString *gs = g_string_new(dotdir); g_string_append(gs, G_DIR_SEPARATOR_S); g_string_append(gs, GROUP_XML_FILE); gchar *xmlfile = gs->str; g_string_free(gs, FALSE); writer = xmlNewTextWriterFilename(xmlfile, 0); if (!writer) return; xmlTextWriterSetIndent(writer, 1); xmlTextWriterStartDocument(writer, NULL, "UTF-8", NULL); xmlTextWriterStartElement(writer, BAD_CAST "rawstudio-groups"); if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter)) do { if (store_iter_is_group(store, &iter)) { gchar *selected = NULL; GList *members, *filenames; xmlTextWriterStartElement(writer, BAD_CAST "group"); // Find selected member and place this first in XML store_get_fullname(store, &iter, &selected); xmlTextWriterWriteFormatElement(writer, BAD_CAST "member", "%s", selected); store_get_members(store, &iter, &members); gint m; filenames = store_iter_list_to_filename_list(store, members); for( m = 0; m < g_list_length(filenames); m++) { filename = g_list_nth_data(filenames, m); if (!g_str_equal(selected, filename)) xmlTextWriterWriteFormatElement(writer, BAD_CAST "member", "%s", filename); } xmlTextWriterEndElement(writer); } } while(gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter)); xmlTextWriterEndDocument(writer); xmlFreeTextWriter(writer); return; } void store_load_groups(GtkListStore *store) { gchar *dotdir = NULL, *filename = NULL; xmlDocPtr doc; xmlNodePtr cur; xmlNodePtr group = NULL; GtkTreeIter iter; GList *members = NULL; g_assert(store != NULL); gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter); /* Don't try opening groups when there is no loaded photos in the store. */ if(!gtk_list_store_iter_is_valid(store, &iter)) return; store_get_fullname(store, &iter, &filename); dotdir = rs_dotdir_get(filename); if (!dotdir) return; GString *gs = g_string_new(dotdir); g_string_append(gs, G_DIR_SEPARATOR_S); g_string_append(gs, GROUP_XML_FILE); gchar *xmlfile = gs->str; g_string_free(gs, FALSE); if (!g_file_test(xmlfile, G_FILE_TEST_IS_REGULAR)) return; doc = xmlParseFile(xmlfile); if (!doc) return; cur = xmlDocGetRootElement(doc); cur = cur->xmlChildrenNode; while(cur) { if ((!xmlStrcmp(cur->name, BAD_CAST "group"))) { xmlChar *member = NULL; group = cur->xmlChildrenNode; while (group) { if ((!xmlStrcmp(group->name, BAD_CAST "member"))) { member = xmlNodeListGetString(doc, group->xmlChildrenNode, 1); if (member) { filename = (char *) member; members = g_list_append(members, filename); } member = NULL; } group = group->next; } store_group_photos_by_filenames(store, members); members = NULL; } cur = cur->next; } xmlFreeDoc(doc); return; } void store_group_photos_by_iters(GtkListStore *store, GList *members) { GtkTreeIter iter; gint n; gtk_list_store_append (store, &iter); gtk_list_store_set (store, &iter, PIXBUF_COLUMN, NULL, PIXBUF_CLEAN_COLUMN, NULL, TEXT_COLUMN, "", TEXT_COLUMN_FULL, "", FULLNAME_COLUMN, NULL, PRIORITY_COLUMN, 0, EXPORTED_COLUMN, 0, TYPE_COLUMN, RS_STORE_TYPE_GROUP, GROUP_LIST_COLUMN, members, -1); store_group_select_n(store, iter, 0); for(n = 0; n < g_list_length(members); n++) { gtk_list_store_set(store, g_list_nth_data(members,n), TYPE_COLUMN, RS_STORE_TYPE_GROUP_MEMBER, -1); } } void store_group_photos_by_filenames(GtkListStore *store, GList *members) { GList *members_iter = NULL; GtkTreeIter iter; GtkTreeIter *iter_copy; while (members) { tree_find_filename(GTK_TREE_MODEL(store), (gchar *) members->data, &iter, NULL); iter_copy = gtk_tree_iter_copy(&iter); members_iter = g_list_append(members_iter, iter_copy); members = g_list_next(members); } store_group_photos_by_iters(store, members_iter); } GList * rs_store_sort_selected(GList *selected) { return g_list_sort(selected, (GCompareFunc) g_utf8_collate); } void rs_store_auto_group(RSStore *store) { gchar *filename = NULL; gint timestamp = 0, timestamp_old = 0; gint exposure; RSMetadata *meta; GList *filenames = NULL; GtkTreeIter iter; // TODO: remove all existing groups in iconview. gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store->store), &iter); do { store_get_fullname(GTK_LIST_STORE(store->store), &iter, &filename); meta = rs_metadata_new_from_file(filename); if (!meta->timestamp) return; timestamp = meta->timestamp; exposure = (1/meta->shutterspeed); if (timestamp > timestamp_old + 1) { if (g_list_length(filenames) > 1) store_group_photos_by_filenames(store->store, filenames); g_list_free(filenames); filenames = NULL; } timestamp_old = timestamp + exposure; g_free(meta); filenames = g_list_append(filenames, filename); } while (gtk_tree_model_iter_next(GTK_TREE_MODEL(store->store), &iter)); store_group_photos_by_filenames(store->store, filenames); g_list_free(filenames); filenames = NULL; } static GList * store_iter_list_to_filename_list(GtkListStore *store, GList *iters) { gint n; gchar *filename = NULL; GList *filenames = NULL; for (n=0; nstore, filename); } void store_group_ungroup_name(GtkListStore *store, const gchar *name) { GtkTreeIter iter, *child_iter; gint n = -1; GList *members; store_group_find_name(store, name, &iter, &n); gtk_tree_model_get (GTK_TREE_MODEL(store), &iter, GROUP_LIST_COLUMN, &members, -1); child_iter = (GtkTreeIter *) g_list_nth_data(members, n); gtk_list_store_set(store, child_iter, TYPE_COLUMN, RS_STORE_TYPE_FILE, -1); members = g_list_remove(members, g_list_nth_data(members,n)); /* If group now only has one member, we destroy the group */ if (g_list_length(members) == 1) { child_iter = (GtkTreeIter *) g_list_nth_data(members, 0); gtk_list_store_set(store, child_iter, TYPE_COLUMN, RS_STORE_TYPE_FILE, -1); gtk_list_store_remove (store, &iter); } store_set_members(store, &iter, members); store_save_groups(store); } void rs_store_group_ungroup_name(RSStore *store, const gchar *filename) { store_group_ungroup_name(store->store, filename); } void store_get_members(GtkListStore *store, GtkTreeIter *iter, GList **members) { gtk_tree_model_get (GTK_TREE_MODEL(store), iter, GROUP_LIST_COLUMN, members, -1); } void store_get_type(GtkListStore *store, GtkTreeIter *iter, gint *type) { gtk_tree_model_get (GTK_TREE_MODEL(store), iter, TYPE_COLUMN, type, -1); } void store_get_fullname(GtkListStore *store, GtkTreeIter *iter, gchar **fullname) { gtk_tree_model_get (GTK_TREE_MODEL(store), iter, FULLNAME_COLUMN, fullname, -1); } void store_set_members(GtkListStore *store, GtkTreeIter *iter, GList *members) { gtk_list_store_set (store, iter, GROUP_LIST_COLUMN, members, -1); } /* This function is grabbed from http://stevehanov.ca/blog/index.php?id=53 */ void cairo_image_surface_blur( cairo_surface_t* surface, double radius ) { // Steve Hanov, 2009 // Released into the public domain. // get width, height int width = cairo_image_surface_get_width( surface ); int height = cairo_image_surface_get_height( surface ); unsigned char* dst = (unsigned char*)malloc(width*height*4); unsigned* precalc = (unsigned*)malloc(width*height*sizeof(unsigned)); unsigned char* src = cairo_image_surface_get_data( surface ); double mul=1.f/((radius*2)*(radius*2)); int channel; // The number of times to perform the averaging. According to wikipedia, // three iterations is good enough to pass for a gaussian. const int MAX_ITERATIONS = 3; int iteration; memcpy( dst, src, width*height*4 ); for ( iteration = 0; iteration < MAX_ITERATIONS; iteration++ ) { for( channel = 0; channel < 4; channel++ ) { int x,y; // precomputation step. unsigned char* pix = src; unsigned* pre = precalc; pix += channel; for (y=0;y0) tot+=pre[-1]; if (y>0) tot+=pre[-width]; if (x>0 && y>0) tot-=pre[-width-1]; *pre++=tot; pix += 4; } } // blur step. pix = dst + (int)radius * width * 4 + (int)radius * 4 + channel; for (y=radius;y= width ? width - 1 : x + radius; int b = y + radius >= height ? height - 1 : y + radius; int tot = precalc[r+b*width] + precalc[l+t*width] - precalc[l+b*width] - precalc[r+t*width]; *pix=(unsigned char)(tot*mul); pix += 4; } pix += (int)radius * 2 * 4; } } memcpy( src, dst, width*height*4 ); } free( dst ); free( precalc ); } cairo_surface_t * cairo_surface_make_shadow(cairo_surface_t *surface) { GdkPixbuf *pixbuf = cairo_convert_to_pixbuf(surface); guchar *pixels = gdk_pixbuf_get_pixels(pixbuf); int x, y; for (y = 0; gdk_pixbuf_get_height(pixbuf) > y; y++) { for (x = 0; gdk_pixbuf_get_rowstride(pixbuf) > x; x+=4) { pixels[y*gdk_pixbuf_get_rowstride(pixbuf)+x+0] = 50; pixels[y*gdk_pixbuf_get_rowstride(pixbuf)+x+1] = 50; pixels[y*gdk_pixbuf_get_rowstride(pixbuf)+x+2] = 50; if (pixels[y*gdk_pixbuf_get_rowstride(pixbuf)+x+3] > 0) pixels[y*gdk_pixbuf_get_rowstride(pixbuf)+x+3] = 255; else pixels[y*gdk_pixbuf_get_rowstride(pixbuf)+x+3] = 0; } } cairo_surface_t *surface_new = cairo_image_surface_create(cairo_image_surface_get_format(surface), cairo_image_surface_get_width(surface), cairo_image_surface_get_height(surface)); cairo_t *cr = cairo_create(surface_new); gdk_cairo_set_source_pixbuf(cr, pixbuf, 0, 0); cairo_paint(cr); g_object_unref(pixbuf); cairo_destroy(cr); return surface_new; } GdkPixbuf * get_thumbnail_eyecandy(GdkPixbuf *thumbnail, gint shadow) { gint border = shadow*3; gint frame = 4; /* MAGIC CONSTANT - see cairo_draw_thumbnail() */ gdouble scale = 1.0; gint width = gdk_pixbuf_get_width(thumbnail)+frame; gint height = gdk_pixbuf_get_height(thumbnail)+frame; cairo_surface_t *surface, *surface2; cairo_t *cr; gint calc_width = width+border*2+shadow; gint calc_height = height+border*2+shadow; surface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, calc_width*scale, calc_height*scale); cr = cairo_create(surface); cairo_scale(cr, scale, scale); cairo_draw_thumbnail(cr, thumbnail, border+shadow, border+shadow, width, height, 0.0); surface2 = cairo_surface_make_shadow(surface); cairo_surface_destroy(surface); cairo_destroy(cr); cr = cairo_create(surface2); cairo_image_surface_blur(surface2, (int)(shadow*scale)); cairo_draw_thumbnail(cr, thumbnail, border, border, width, height, 0.0); cairo_destroy(cr); GdkPixbuf *pixbuf = cairo_convert_to_pixbuf(surface2); GdkPixbuf *pixbuf_cropped = gdk_pixbuf_new(GDK_COLORSPACE_RGB, TRUE, 8, width+shadow*5, height+shadow*5); gdk_pixbuf_copy_area(pixbuf, shadow, shadow, width+shadow*5, height+shadow*5, pixbuf_cropped, 0, 0); cairo_surface_destroy(surface2); g_object_unref(pixbuf); return pixbuf_cropped; } void rs_store_update_thumbnail(RSStore *store, const gchar *filename, GdkPixbuf *pixbuf) { GdkPixbuf *pixbuf_clean; GtkTreeIter i; guint prio; gboolean expo; if (!pixbuf || !filename || !store || !store->store) return; if (tree_find_filename(GTK_TREE_MODEL(store->store), filename, &i, NULL)) { #if EYECANDY pixbuf = get_thumbnail_eyecandy(pixbuf, DROPSHADOWOFFSET); #endif pixbuf_clean = gdk_pixbuf_copy(pixbuf); gtk_tree_model_get(GTK_TREE_MODEL(store->store), &i, PRIORITY_COLUMN, &prio, EXPORTED_COLUMN, &expo, -1); gdk_threads_enter(); thumbnail_update(pixbuf, pixbuf_clean, prio, expo, DROPSHADOWOFFSET); gtk_list_store_set(GTK_LIST_STORE(store->store), &i, PIXBUF_COLUMN, pixbuf, PIXBUF_CLEAN_COLUMN, pixbuf_clean, -1); gdk_threads_leave(); #if GTK_CHECK_VERSION(2,8,0) g_object_unref(pixbuf); #endif } } void got_metadata(RSMetadata *metadata, gpointer user_data) { WORKER_JOB *job = user_data; gboolean exported; gint priority; GdkPixbuf *pixbuf, *pixbuf_clean, *pixbuf2; pixbuf = rs_metadata_get_thumbnail(metadata); if (pixbuf==NULL) { /* We will use this, if no thumbnail can be loaded */ pixbuf2 = gtk_widget_render_icon(GTK_WIDGET(job->store), GTK_STOCK_MISSING_IMAGE, GTK_ICON_SIZE_DIALOG, NULL); pixbuf = gdk_pixbuf_copy(pixbuf2); g_object_unref(pixbuf2); } #if EYECANDY else { pixbuf2 = get_thumbnail_eyecandy(pixbuf, DROPSHADOWOFFSET); g_object_unref(pixbuf); pixbuf = pixbuf2; } #endif pixbuf_clean = gdk_pixbuf_copy(pixbuf); rs_cache_load_quick(job->filename, &priority, &exported); /* Update thumbnail */ thumbnail_update(pixbuf, pixbuf_clean, priority, exported, DROPSHADOWOFFSET); g_assert(pixbuf != NULL); g_assert(pixbuf_clean != NULL); /* Add the new thumbnail to the store */ gdk_threads_enter(); gtk_list_store_set(GTK_LIST_STORE(job->model), &job->iter, METADATA_COLUMN, metadata, PIXBUF_COLUMN, pixbuf, PIXBUF_CLEAN_COLUMN, pixbuf_clean, PRIORITY_COLUMN, priority, EXPORTED_COLUMN, exported, -1); gdk_threads_leave(); /* Add to library */ rs_library_add_photo_with_metadata(rs_library_get_singleton(), job->filename, metadata); /* The GtkListStore should have ref'ed these */ g_object_unref(pixbuf); g_object_unref(pixbuf_clean); if (g_atomic_int_dec_and_test(&job->store->jobs_to_do)) { gdk_threads_enter(); /* FIXME: Refilter as this point - not before */ if (job->store->counter_blocked) g_signal_handler_unblock(job->store->store, job->store->counthandler); job->store->counter_blocked = FALSE; count_priorities(GTK_TREE_MODEL(job->store->store), NULL, NULL, job->store->label); RS_STORE_SORT_METHOD sort_method; if (rs_conf_get_integer(CONF_STORE_SORT_METHOD, (gint*)&sort_method)) rs_store_set_sort_method(job->store, sort_method); else rs_store_set_sort_method(job->store, RS_STORE_SORT_BY_NAME); gdk_threads_leave(); } /* Clean up the job */ g_free(job->filename); g_object_unref(job->store); g_object_unref(job->model); g_free(job); } void rs_store_set_iconview_size(RSStore *store, gint size) { gint n; for (n=0;niconview[n]), size); } gint rs_store_get_iconview_size(RSStore *store) { gint n; for (n=0;niconview[n]))); return n; } rawstudio-2.0/src/gtk-interface.h0000644000175000017500000000441111543674627014017 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 GTK_INTERFACE_H #define GTK_INTERFACE_H enum { OP_NONE = 0, OP_BUSY, OP_MOVE }; extern void gui_set_busy(gboolean rawstudio_is_busy); extern gboolean gui_is_busy(void); extern void gui_status_notify(const char *text); extern guint gui_status_push(const char *text) G_GNUC_WARN_UNUSED_RESULT; extern void gui_status_pop(const guint msgid); extern void icon_set_flags(const gchar *filename, GtkTreeIter *iter, const guint *priority, const gboolean *exported); extern void gui_dialog_simple(gchar *title, gchar *message); extern GtkUIManager *gui_get_uimanager(void); extern void gui_set_values(RS_BLOB *rs, gint x, gint y); extern int gui_init(int argc, char **argv, RS_BLOB *rs); extern void gui_setprio(RS_BLOB *rs, guint prio); extern void gui_widget_show(GtkWidget *widget, gboolean show, const gchar *conf_fullscreen_key, const gchar *conf_windowed_key); extern gboolean gui_fullscreen_changed(GtkWidget *widget, gboolean is_fullscreen, const gchar *action, gboolean default_fullscreen, gboolean default_windowed, const gchar *conf_fullscreen_key, const gchar *conf_windowed_key); extern void gui_make_preference_window(RS_BLOB *rs); extern void rs_window_set_title(const char *str); extern void gui_select_preview_screen(RS_BLOB *rs); extern void gui_disable_preview_screen(RS_BLOB *rs); extern GtkWindow *rawstudio_window; extern GdkGC *dashed; extern GdkGC *grid; #endif /* GTK_INTERFACE_H */ rawstudio-2.0/src/rs-actions.h0000644000175000017500000000452011526533645013352 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_ACTIONS_H #define RS_ACTIONS_H /** * Get the core action group * @return A pointer to the core action group */ extern GtkActionGroup *rs_get_core_action_group(RS_BLOB *rs); /** * Set sensivity of an action * @param name The name of the action * @param sensitive The sensivity of the action */ extern void rs_core_action_group_set_sensivity(const gchar *name, gboolean sensitive); /** * Activate an action * @param name The action to activate */ extern void rs_core_action_group_activate(const gchar *name); /** * Set visibility of an action * @param name The name of the action * @param visibility The visibilty of the action */ extern void rs_core_action_group_set_visibility(const gchar *name, gboolean visibility); /** * Add actions to global action group, see documentation for gtk_action_group_add_actions */ extern void rs_core_action_group_add_actions(const GtkActionEntry *entries, guint n_entries, gpointer user_data); /** * Add radio action to global action group, see documentation for gtk_action_group_add_radio_actions() */ extern void rs_core_action_group_add_radio_actions(const GtkRadioActionEntry *entries, guint n_entries, gint value, GCallback on_change, gpointer user_data); /** * Get a GtkAction by name * @param name The name of the action * @return A GtkAction or NULL (should not be unreffed) */ extern GtkAction *rs_core_action_group_get_action(const gchar *name); extern void rs_core_actions_update_menu_items(RS_BLOB *rs); #endif /* RS_ACTIONS_H */ rawstudio-2.0/src/rs-tethered-shooting.c0000644000175000017500000010535011543245175015341 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include #include #include #include "rs-tethered-shooting.h" #include #include #include #include "filename.h" #include #include #ifdef WITH_GCONF #include #endif #include "conf_interface.h" #include "gtk-helper.h" #include "rs-photo.h" #include "rs-cache.h" enum { NAME_COLUMN, VALUE_COLUMN, N_COLUMNS }; enum { ASYNC_THREAD_TYPE_NONE, ASYNC_THREAD_TYPE_MONITOR, ASYNC_THREAD_TYPE_INTERVAL }; typedef struct { Camera *camera; GPContext *context; GtkWidget *window; GtkListStore *camera_store; GtkTextBuffer *status_buffer; GtkComboBox *camera_selector; GtkTextView *status_textview; RS_BLOB *rs; GThread *async_thread_id; gboolean keep_thread_running; gint thread_type; GtkWidget *interval_toggle_button; gint interval_toggle_button_signal; } TetherInfo; typedef struct { GtkWidget *example_label; GtkWidget *event; const gchar *output_type; const gchar *filename; } CAMERA_FILENAME; static void shutdown_async_thread(TetherInfo *t); static void closeconnection(TetherInfo *t); static void start_interval_shooting(GObject *entry, gpointer user_data); static void append_status_va_list(TetherInfo *t, const gchar *format, va_list args) { gdk_threads_lock(); gchar result_buffer[512]; gint str_len = g_vsnprintf(result_buffer, 512, format, args); GtkTextIter iter; gtk_text_buffer_get_end_iter(t->status_buffer, &iter); gtk_text_buffer_insert(t->status_buffer, &iter, result_buffer, str_len); gtk_text_buffer_get_end_iter(t->status_buffer, &iter); if (t->status_textview) { /* get the current ( cursor )mark name */ GtkTextMark* insert_mark = gtk_text_buffer_get_insert (t->status_buffer); /* move mark and selection bound to the end */ gtk_text_buffer_place_cursor(t->status_buffer, &iter); /* scroll to the end view */ gtk_text_view_scroll_to_mark( GTK_TEXT_VIEW (t->status_textview), insert_mark, 0.0, TRUE, 0.0, 1.0); } gdk_threads_unlock(); } static void append_status(TetherInfo *t, const gchar *format, ...) { va_list argptr; va_start(argptr,format); append_status_va_list(t, format, argptr); va_end(argptr); } static void ctx_error_func (GPContext *context, const char *format, va_list args, void *data) { gdk_threads_lock(); TetherInfo *t = (TetherInfo*)data; append_status (t, _("Gphoto2 reported Context Error:\n")); append_status_va_list(t, format, args); append_status (t, "\n"); if (t->async_thread_id && t->async_thread_id != g_thread_self()) shutdown_async_thread(t); t->keep_thread_running = FALSE; gdk_threads_unlock(); } static void ctx_status_func (GPContext *context, const char *format, va_list args, void *data) { TetherInfo *t = (TetherInfo*)data; gdk_threads_lock(); append_status_va_list(t, format, args); append_status (t, "\n"); gdk_threads_unlock(); } int enumerate_cameras(GtkListStore *camera_store, GPContext *context) { int ret, i, count; CameraList *xlist = NULL; GPPortInfoList *portinfolist = NULL; CameraAbilitiesList *abilities = NULL; GtkTreeIter iter; count = 0; ret = gp_list_new (&xlist); if (ret < GP_OK) goto out; if (!portinfolist) { /* Load all the port drivers we have... */ ret = gp_port_info_list_new (&portinfolist); if (ret < GP_OK) goto out; ret = gp_port_info_list_load (portinfolist); if (ret < 0) goto out; ret = gp_port_info_list_count (portinfolist); if (ret < 0) goto out; } /* Load all the camera drivers we have... */ ret = gp_abilities_list_new (&abilities); if (ret < GP_OK) goto out; ret = gp_abilities_list_load (abilities, context); if (ret < GP_OK) goto out; /* ... and autodetect the currently attached cameras. */ ret = gp_abilities_list_detect (abilities, portinfolist, xlist, context); if (ret < GP_OK) goto out; /* Filter out the "usb:" entry */ ret = gp_list_count (xlist); if (ret < GP_OK) goto out; for (i=0;icamera);\ t->camera = NULL;\ return A;} gpointer start_thread_monitor(gpointer _thread_info); static int enable_capture(TetherInfo *t) { int retval; if (!t->camera) return -1; g_debug("Get root config."); CameraWidget *rootconfig; // okay, not really CameraWidget *actualrootconfig; CameraWidget *child; retval = gp_camera_get_config(t->camera, &rootconfig, t->context); CHECKRETVAL(retval); actualrootconfig = rootconfig; /* Enable on Canon */ if (retval >= 0) { retval = gp_widget_get_child_by_name(rootconfig, "main", &child); } if (retval >= 0) { rootconfig = child; retval = gp_widget_get_child_by_name(rootconfig, "settings", &child); } if (retval >= 0) { rootconfig = child; retval = gp_widget_get_child_by_name(rootconfig, "capture", &child); } if (retval >= 0) { CameraWidget *capture = child; const char *widgetinfo; gp_widget_get_name(capture, &widgetinfo); const char *widgetlabel; gp_widget_get_label(capture, &widgetlabel); int widgetid; gp_widget_get_id(capture, &widgetid); CameraWidgetType widgettype; gp_widget_get_type(capture, &widgettype); int one=1; retval = gp_widget_set_value(capture, &one); append_status(t, _("Enabling capture mode for Canon cameras.\n")); } /* Nikon may need this*/ retval = gp_widget_get_child_by_name(actualrootconfig, "main", &child); if (retval >= 0) { rootconfig = child; retval = gp_widget_get_child_by_name(rootconfig, "settings", &child); } if (retval >= 0) { rootconfig = child; retval = gp_widget_get_child_by_name(rootconfig, "recordingmedia", &child); } if (retval >= 0) { CameraWidget *capture = child; CameraWidgetType widgettype; gp_widget_get_type(capture, &widgettype); const gchar* one = "SDRAM"; retval = gp_widget_set_value(capture, one); append_status(t, _("Enabling capture mode for Nikon cameras.\n")); } g_debug("Enabling capture."); retval = gp_camera_set_config(t->camera, actualrootconfig, t->context); CHECKRETVAL(retval); g_debug("Capture Enabled."); append_status(t, _("Capture Enabled.\n")); return GP_OK; } static int open_camera (TetherInfo *t, const char *model, const char *port) { Camera **camera = &t->camera; int ret, m, p; CameraAbilities a; GPPortInfo pi; GPPortInfoList *portinfolist = NULL; CameraAbilitiesList *abilities = NULL; ret = gp_camera_new (camera); CHECKRETVAL(ret); /* First lookup the model / driver */ m = gp_abilities_list_lookup_model (abilities, model); if (m < GP_OK) return ret; ret = gp_abilities_list_get_abilities (abilities, m, &a); CHECKRETVAL(ret); ret = gp_camera_set_abilities (*camera, a); CHECKRETVAL(ret); /* Then associate the camera with the specified port */ p = gp_port_info_list_lookup_path (portinfolist, port); switch (p) { case GP_ERROR_UNKNOWN_PORT: append_status (t, _("The port you specified ('%s') can not be found."), port); break; default: break; } CHECKRETVAL(ret); ret = gp_port_info_list_get_info (portinfolist, p, &pi); CHECKRETVAL(ret); ret = gp_camera_set_port_info (*camera, pi); CHECKRETVAL(ret); return GP_OK; } static void add_tags_to_photo(TetherInfo* t, RS_PHOTO *photo) { const gchar* photo_tags = rs_conf_get_string("tether-tags-for-new-images"); if (!photo_tags) return; g_assert(photo != NULL); g_assert(photo->metadata != NULL); RSLibrary *lib = rs_library_get_singleton(); rs_library_add_photo_with_metadata(lib, photo->filename, photo->metadata); gchar** split_tags = g_strsplit_set(photo_tags, " .,/;:~^*|&",0); int i = 0; while (split_tags[i] != NULL) { gint tag_id = rs_library_add_tag(lib, split_tags[i]); rs_io_idle_add_tag(photo->filename, tag_id, FALSE, -1); i++; } rs_io_idle_add_tag(photo->filename, -2, FALSE, -1); g_strfreev(split_tags); } static gchar* add_file_to_store(TetherInfo* t, const char* tmp_name) { RSMetadata *metadata; gchar *lwd; gchar* org_template = rs_conf_get_string("tether-export-filename"); lwd = rs_conf_get_string(CONF_LWD); GString *filename_template = g_string_new(lwd); g_string_append(filename_template, G_DIR_SEPARATOR_S); g_string_append(filename_template, org_template); g_string_append(filename_template, g_strrstr(tmp_name, ".")); gchar* filename = filename_parse(g_string_free(filename_template, FALSE),tmp_name, 0); GFile* src = g_file_new_for_path(tmp_name); GFile* dst = g_file_new_for_path(filename); gdk_threads_unlock(); if (!g_file_move(src, dst, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, NULL)) { gdk_threads_lock(); append_status(t, _("Moving file to current directory failed!\n")); return NULL; } g_object_unref(src); g_object_unref(dst); gdk_threads_lock(); rs_store_set_iconview_size(t->rs->store, rs_store_get_iconview_size(t->rs->store)+1); rs_store_load_file(t->rs->store, filename); /* Make sure we rotate this right */ gdk_threads_unlock(); metadata = rs_metadata_new_from_file(filename); g_object_unref(metadata); gdk_threads_lock(); return filename; } #define RS_NUM_SETTINGS 3 static gint transfer_file_captured(TetherInfo* t, CameraFilePath* camera_file_path) { CameraFile *canonfile; int fd, retval, i; append_status(t,_("Downloading and adding image.\n")); char *tmp_name_ptr; tmp_name_ptr = g_build_filename(g_get_tmp_dir(), g_strdup_printf("rs-tether-%d.tmp", g_random_int()), NULL); if (NULL == tmp_name_ptr) return GP_ERROR; char *extension = g_strrstr(camera_file_path->name, "."); tmp_name_ptr = g_strconcat(tmp_name_ptr, extension, NULL); fd = open(tmp_name_ptr, O_CREAT | O_WRONLY, 0644); if (fd == -1) { append_status(t,_("Could not open temporary file on disk for writing")); return GP_ERROR; } gdk_threads_unlock(); retval = gp_file_new_from_fd(&canonfile, fd); CHECKRETVAL(retval); retval = gp_camera_file_get(t->camera, camera_file_path->folder, camera_file_path->name, GP_FILE_TYPE_NORMAL, canonfile, t->context); CHECKRETVAL(retval); retval = gp_camera_file_delete(t->camera, camera_file_path->folder, camera_file_path->name, t->context); CHECKRETVAL(retval); gdk_threads_lock(); /* Copy settings */ gboolean copy_settings = TRUE; rs_conf_get_boolean_with_default("tether-copy-current-settings", ©_settings, FALSE); RSSettings *settings_buffer[RS_NUM_SETTINGS]; if (copy_settings && t->rs->photo) { for (i = 0; i < RS_NUM_SETTINGS; i++) { settings_buffer[i] = rs_settings_new(); rs_settings_copy(t->rs->photo->settings[i], MASK_ALL, settings_buffer[i]); } } else copy_settings = FALSE; gp_file_free(canonfile); gchar *filename = add_file_to_store(t, tmp_name_ptr); if (!filename) return GP_ERROR; gdk_threads_unlock(); RS_PHOTO *photo = rs_photo_new(); photo->filename = g_strdup(filename); /* Paste settings */ if (copy_settings) { for (i = 0; i < RS_NUM_SETTINGS; i++) { rs_settings_copy(settings_buffer[i], MASK_ALL, photo->settings[i]); g_object_unref(settings_buffer[i]); } rs_cache_save(photo, MASK_ALL); } /* Add Tags */ add_tags_to_photo(t, photo); g_object_unref(photo); photo = NULL; gdk_threads_lock(); gboolean minimize = TRUE; rs_conf_get_boolean_with_default("tether-minimize-window", &minimize, TRUE); /* Open image, if this has been selected */ gboolean open_image = TRUE; rs_conf_get_boolean_with_default("tether-open-image", &open_image, TRUE); if (open_image) { if (!rs_store_set_selected_name(t->rs->store, filename, TRUE)) { append_status(t, _("Could not open image!\n")); minimize = FALSE; } } /* Minimize window */ if (minimize) gtk_window_iconify(GTK_WINDOW(t->window)); g_free(tmp_name_ptr); return GP_OK; } #undef RS_NUM_SETTINGS static gint capture_to_file(TetherInfo* t) { int retval; CameraFilePath camera_file_path; append_status(t, _("Capturing.\n")); retval = gp_camera_capture(t->camera, GP_CAPTURE_IMAGE, &camera_file_path, t->context); CHECKRETVAL(retval); retval = transfer_file_captured(t, &camera_file_path); return retval; } /* * Threads are purely synchronized by gdk_threads_lock/unlock * Whenever they are idle, or doing heavy non-gui processing or IO, * the lock is released. */ gpointer start_thread_monitor(gpointer _thread_info) { TetherInfo *t = (TetherInfo*) _thread_info; gdk_threads_enter(); int retval; while (t->keep_thread_running) { Camera *cam = t->camera; CameraEventType type; void * event_data = NULL; if (NULL == cam) { t->keep_thread_running = FALSE; continue; } gdk_threads_leave(); retval = gp_camera_wait_for_event(cam, 100, &type, &event_data, t->context); gdk_threads_enter(); if (retval < GP_OK) { append_status(t, _("Monitor recieved error %d, while waiting for camera.\nError text is: %s\n"), retval, gp_result_as_string(retval)); t->keep_thread_running = FALSE; } else { if (type == GP_EVENT_FILE_ADDED) { CameraFilePath* camera_file_path = (CameraFilePath*)event_data; retval = transfer_file_captured(t, camera_file_path); if (retval < GP_OK) { append_status(t, _("Recieved error %d, while downloading image from camera.\nError text is: %s\n"), retval, gp_result_as_string(retval)); t->keep_thread_running = FALSE; } else append_status(t, _("File Downloaded Succesfully.\n")); } } } append_status(t, _("Camera monitor shutting down.\n")); gdk_threads_leave(); t->thread_type = ASYNC_THREAD_TYPE_NONE; return NULL; } gpointer start_thread_interval(gpointer _thread_info) { TetherInfo *t = (TetherInfo*) _thread_info; gdk_threads_enter(); int retval; GTimer* capture_timer = g_timer_new(); while (t->keep_thread_running) { retval = capture_to_file(t); if (retval < GP_OK) { append_status(t, _("Recieved error %d, while capturing image.\nError text is: %s\n"), retval, gp_result_as_string(retval)); t->keep_thread_running = FALSE; } if (t->keep_thread_running) { gdouble interval = 10.0; rs_conf_get_double("tether-interval-interval", &interval); gboolean take_next = g_timer_elapsed(capture_timer, NULL) > interval; if (take_next) append_status(t, _("Warning: It took longer time to capture the image than the set interval\nIt took %.1f seconds to download the image.\nConsider increasing the interval.\n"), g_timer_elapsed(capture_timer, NULL) + 0.1); append_status(t, _("Waiting for next image.\n")); while (t->keep_thread_running && !take_next) { if (g_timer_elapsed(capture_timer, NULL) > interval) take_next = TRUE; else { gdk_threads_leave(); /* Sleep 100ms */ g_usleep(100*1000); gdk_threads_enter(); } } g_timer_reset(capture_timer); if (t->keep_thread_running) { GTK_CATCHUP(); gdk_threads_leave(); /* Sleep 10ms, just to let GUI become responsive */ g_usleep(10*1000); gdk_threads_enter(); } } } g_signal_handler_disconnect(G_OBJECT(t->interval_toggle_button), t->interval_toggle_button_signal); t->interval_toggle_button_signal = g_signal_connect(G_OBJECT(t->interval_toggle_button), "clicked", G_CALLBACK(start_interval_shooting), t); gtk_button_set_label(GTK_BUTTON(t->interval_toggle_button), _("Start Shooting")); append_status(t, _("Interval shooting shutting down.\n")); gdk_threads_leave(); g_timer_destroy(capture_timer); t->thread_type = ASYNC_THREAD_TYPE_NONE; return NULL; } static void closeconnection(TetherInfo *t) { if (!t->camera) return; append_status(t, _("Disconnecting current camera\n")); gp_camera_exit (t->camera, t->context); gp_camera_free (t->camera); t->camera = NULL; } static void initcamera(TetherInfo *t, GtkTreeIter *iter) { gint ret; /* This call will autodetect cameras, take the * first one from the list and use it. It will ignore * any others... See the *multi* examples on how to * detect and use more than the first one. */ const char *name, *value; gtk_tree_model_get(GTK_TREE_MODEL(t->camera_store), iter, NAME_COLUMN, &name, VALUE_COLUMN, &value, -1); ret = open_camera(t, name, value); if (ret < GP_OK) { append_status(t,_("Camera %s on port %s failed to open\n"), name, value); return; } ret = gp_camera_init (t->camera, t->context); if (ret < GP_OK) { append_status(t,_("ERROR: Init camera returned %d.\nError text is:%s\n"), ret, gp_result_as_string(ret)); gp_camera_free (t->camera); t->camera = NULL; return; } enable_capture(t); } static void update_example(CAMERA_FILENAME *filename) { gchar *parsed; gchar *final = ""; GtkLabel *example = GTK_LABEL(filename->example_label); parsed = filename_parse(filename->filename, "filename", 0); final = g_strdup_printf("%s.ext", parsed); gtk_label_set_markup(example, final); g_free(parsed); g_free(final); } /* When entering this, we must have gdk locked */ static void shutdown_async_thread(TetherInfo *t) { if (t->async_thread_id && t->keep_thread_running) { t->keep_thread_running = FALSE; gdk_threads_leave(); g_thread_join(t->async_thread_id); gdk_threads_enter(); t->async_thread_id = NULL; append_status(t, _("Shutting down asynchronous thread\n")); } } static void refresh_cameralist(GObject *entry, gpointer user_data) { TetherInfo *t = (TetherInfo*)user_data; shutdown_async_thread(t); closeconnection(t); gtk_list_store_clear(t->camera_store); int i = enumerate_cameras(t->camera_store, t->context); append_status(t, _("Found %d cameras\n"), i); if (i > 0) gtk_combo_box_set_active(GTK_COMBO_BOX(t->camera_selector), 0); else gtk_combo_box_set_active(GTK_COMBO_BOX(t->camera_selector), -1); } static void connect_camera(GObject *entry, gpointer user_data) { TetherInfo *t = (TetherInfo*)user_data; shutdown_async_thread(t); closeconnection(t); GtkTreeIter iter; if (gtk_combo_box_get_active_iter(t->camera_selector, &iter)) initcamera(t,&iter); else append_status(t, _("No camera selected - Cannot connect!\n")); } static void take_photo(GObject *entry, gpointer user_data) { TetherInfo *t = (TetherInfo*)user_data; gint ret_val; if (!t->camera) connect_camera(entry, user_data); if (!t->camera) return; if (t->keep_thread_running) { append_status(t, _("Shutting down running thread to enable remote capture.\n")); shutdown_async_thread(t); } ret_val = capture_to_file(t); if (ret_val < GP_OK) { append_status(t, _("Recieved error %d, while capturing image.\nError text is: %s\n"), ret_val, gp_result_as_string(ret_val)); closeconnection(t); } } static void tags_entry_changed(GtkEntry *entry, gpointer user_data) { const gchar* tags = gtk_entry_get_text(GTK_ENTRY(entry)); rs_conf_set_string("tether-tags-for-new-images", tags); } static void spin_button_entry_changed(GtkEntry *entry, gpointer user_data) { gdouble value = gtk_spin_button_get_value(GTK_SPIN_BUTTON(entry)); rs_conf_set_double(user_data, value); } static void filename_entry_changed(GtkEntry *entry, gpointer user_data) { CAMERA_FILENAME *filename = (CAMERA_FILENAME *) user_data; filename->filename = gtk_entry_get_text(entry); update_example(filename); } static void start_monitor(GObject *entry, gpointer user_data) { TetherInfo *t = (TetherInfo*)user_data; if (!t->camera) connect_camera(entry, user_data); if (!t->camera) return; if ((t->async_thread_id || t->keep_thread_running) && t->thread_type != ASYNC_THREAD_TYPE_MONITOR) { append_status(t, _("Shutting down already running thread.\n")); shutdown_async_thread(t); } if (!t->async_thread_id || !t->keep_thread_running) { t->keep_thread_running = TRUE; append_status(t, _("Staring Monitor Thread.\n")); t->thread_type = ASYNC_THREAD_TYPE_MONITOR; t->async_thread_id = g_thread_create(start_thread_monitor, t, TRUE, NULL); } else append_status(t, _("Monitor Thread already running.\n")); } static void close_button_pressed(GtkEntry *entry, gpointer user_data) { TetherInfo *t = (TetherInfo*)user_data; shutdown_async_thread(t); closeconnection(t); gp_context_unref(t->context); gtk_widget_destroy(t->window); } static void close_main_window(GtkEntry *entry, GdkEvent *event, gpointer user_data) { TetherInfo *t = (TetherInfo*)user_data; shutdown_async_thread(t); if (t->camera) closeconnection(t); gp_context_unref(t->context); gtk_widget_destroy(GTK_WIDGET(entry)); } static void stop_interval_shooting(GObject *entry, gpointer user_data) { TetherInfo *t = (TetherInfo*)user_data; if (t->keep_thread_running && t->thread_type == ASYNC_THREAD_TYPE_INTERVAL) { append_status(t, _("Shutting down interval capture thread.\n")); shutdown_async_thread(t); } } static void disconnect_camera_action(GObject *entry, gpointer user_data) { TetherInfo *t = (TetherInfo*)user_data; if (!t->camera) { append_status(t, _("No camera connected.\n")); return; } shutdown_async_thread(t); closeconnection(t); } static void start_interval_shooting(GObject *entry, gpointer user_data) { TetherInfo *t = (TetherInfo*)user_data; if (!t->camera) connect_camera(entry, user_data); if (!t->camera) return; if (t->keep_thread_running) shutdown_async_thread(t); t->thread_type = ASYNC_THREAD_TYPE_INTERVAL; t->keep_thread_running = TRUE; append_status(t, _("Staring Interval Shooting Thread.\n")); g_signal_handler_disconnect(G_OBJECT(t->interval_toggle_button), t->interval_toggle_button_signal); t->interval_toggle_button_signal = g_signal_connect(G_OBJECT(t->interval_toggle_button), "clicked", G_CALLBACK(stop_interval_shooting), t); gtk_button_set_label(GTK_BUTTON(t->interval_toggle_button), _("Stop Shooting")); GTK_CATCHUP(); t->async_thread_id = g_thread_create(start_thread_interval, t, TRUE, NULL); } static void build_tether_gui(TetherInfo *t) { GtkWidget *button; GtkWidget* label; GtkBox *box, *h_box; GtkWidget *filename_hbox; GtkWidget *filename_label; GtkWidget *filename_chooser; GtkWidget *filename_entry; GtkWidget *check_button; GtkWidget *example_hbox; GtkWidget *example_label1; GtkWidget *example_label2; CAMERA_FILENAME *filename; GtkWidget *status_window; GtkWidget *status_textview; GtkWidget *tags_entry; GtkWidget *number_spin; /* A box to hold everything */ GtkBox *main_box = GTK_BOX(gtk_vbox_new (FALSE, 7)); /* A box for main constrols */ box = GTK_BOX(gtk_vbox_new (FALSE, 5)); label = gtk_label_new(_("Select camera:")); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_misc_set_padding (GTK_MISC(label), 7,3); gtk_box_pack_start(box, label, FALSE, FALSE, 0); /* Camera */ h_box = GTK_BOX(gtk_hbox_new (FALSE, 0)); /* Camera selector box */ GtkWidget *camera_selector = gtk_combo_box_new_with_model(GTK_TREE_MODEL(t->camera_store)); GtkCellRenderer *cell = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (camera_selector), cell, TRUE); gtk_cell_layout_add_attribute (GTK_CELL_LAYOUT (camera_selector), cell, "text", NAME_COLUMN); gtk_box_pack_start(h_box, camera_selector, TRUE, TRUE, 2); gtk_combo_box_set_active(GTK_COMBO_BOX(camera_selector), 0); t->camera_selector = GTK_COMBO_BOX(camera_selector); /* Refresh / Connect buttons */ button = gtk_button_new_from_stock(GTK_STOCK_REFRESH); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(refresh_cameralist), t); gtk_box_pack_start(h_box, button, FALSE, FALSE, 1); /* Add this box */ gtk_box_pack_start(box, GTK_WIDGET(h_box), FALSE, FALSE, 5); /* "Take photo" & Monitor button */ h_box = GTK_BOX(gtk_hbox_new (FALSE, 0)); button = gtk_button_new_from_stock(GTK_STOCK_CONNECT); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(connect_camera), t); gtk_box_pack_start(h_box, button, FALSE, FALSE, 1); button = gtk_button_new_with_label(_("Take Photo")); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(take_photo), t); gtk_button_set_alignment (GTK_BUTTON(button), 0.0, 0.5); gtk_box_pack_start(h_box, button, FALSE, FALSE, 5); button = gtk_button_new_with_label(_("Monitor Camera")); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(start_monitor), t); gtk_button_set_alignment (GTK_BUTTON(button), 0.0, 0.5); gtk_box_pack_start(h_box, button, FALSE, FALSE, 5); button = gtk_button_new_with_label(_("Disconnect Camera")); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(disconnect_camera_action), t); gtk_button_set_alignment (GTK_BUTTON(button), 0.0, 0.5); gtk_box_pack_start(h_box, button, FALSE, FALSE, 5); /* Add this box */ gtk_box_pack_start(box, GTK_WIDGET(h_box), FALSE, FALSE, 5); /* Status window */ label = gtk_label_new(_("Status:")); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); gtk_box_pack_start(box, label, FALSE, FALSE, 5); status_window = gtk_scrolled_window_new(NULL, NULL); gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(status_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); /* Status text */ status_textview = gtk_text_view_new_with_buffer(t->status_buffer); gtk_text_view_set_editable(GTK_TEXT_VIEW(status_textview), FALSE); gtk_text_view_set_cursor_visible(GTK_TEXT_VIEW(status_textview), FALSE); gtk_container_add ( GTK_CONTAINER(status_window), status_textview); gtk_box_pack_start(GTK_BOX(box), status_window, TRUE, FALSE, 0); t->status_textview = GTK_TEXT_VIEW(status_textview); /* Add main box */ gtk_box_pack_start(GTK_BOX(main_box), gui_box(_("Master Control"), GTK_WIDGET(box), "tether_controls", TRUE), FALSE, FALSE, 0); /* FILENAME & TAGS */ box = GTK_BOX(gtk_vbox_new (FALSE, 5)); /* Filename template*/ filename = g_new0(CAMERA_FILENAME, 1); filename_hbox = gtk_hbox_new(FALSE, 0); filename_label = gtk_label_new(_("Filename template:")); filename_chooser = rs_filename_chooser_button_new(NULL, "tether-export-filename"); filename_entry = g_object_get_data(G_OBJECT(filename_chooser), "entry"); g_signal_connect(filename_entry, "changed", G_CALLBACK(filename_entry_changed), filename); filename->filename = gtk_entry_get_text(GTK_ENTRY(filename_entry)); gtk_misc_set_alignment(GTK_MISC(filename_label), 0.0, 0.5); gtk_box_pack_start(GTK_BOX(filename_hbox), filename_label, FALSE, TRUE, 5); gtk_box_pack_start(GTK_BOX(filename_hbox), filename_chooser, FALSE, TRUE, 5); gtk_box_pack_start(GTK_BOX(box), filename_hbox, FALSE, TRUE, 0); /* Example filename */ example_hbox = gtk_hbox_new(FALSE, 0); example_label1 = gtk_label_new(_("Filename example:")); example_label2 = gtk_label_new(NULL); filename->example_label = example_label2; gtk_misc_set_alignment(GTK_MISC(example_label1), 0.0, 0.5); gtk_misc_set_alignment(GTK_MISC(example_label2), 0.0, 0.5); gtk_box_pack_start(GTK_BOX(example_hbox), example_label1, FALSE, TRUE, 5); gtk_box_pack_start(GTK_BOX(example_hbox), example_label2, FALSE, TRUE, 5); gtk_box_pack_start(GTK_BOX(box), example_hbox, FALSE, TRUE, 0); update_example(filename); h_box = GTK_BOX(gtk_hbox_new (FALSE, 0)); label = gtk_label_new(_("Tags for new images:")); gtk_box_pack_start(GTK_BOX(h_box), label, FALSE, TRUE, 5); tags_entry = gtk_entry_new(); gchar* tags = rs_conf_get_string("tether-tags-for-new-images"); if (tags) gtk_entry_set_text(GTK_ENTRY(tags_entry), tags); g_signal_connect(tags_entry, "changed", G_CALLBACK(tags_entry_changed), NULL); gtk_box_pack_start(GTK_BOX(h_box), tags_entry, TRUE, TRUE, 5); gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(h_box), FALSE, TRUE, 0); /* Add filename& tags box */ gtk_box_pack_start(GTK_BOX(main_box), gui_box(_("Filename & Tags"), GTK_WIDGET(box), "tether_filename_tags", TRUE), FALSE, FALSE, 0); /* INTERVAL SHOOTING */ box = GTK_BOX(gtk_vbox_new (FALSE, 2)); h_box = GTK_BOX(gtk_hbox_new (FALSE, 0)); label = gtk_label_new(_("Seconds between each shot:")); gtk_box_pack_start(h_box, label, FALSE, FALSE, 5); number_spin = gtk_spin_button_new_with_range(1.0, 24.0*60*60, 0.2); gdouble interval = 10.0; rs_conf_get_double("tether-interval-interval", &interval); gtk_spin_button_set_value (GTK_SPIN_BUTTON(number_spin), interval); g_signal_connect(number_spin, "changed", G_CALLBACK(spin_button_entry_changed), "tether-interval-interval"); gtk_box_pack_start(h_box, number_spin, FALSE, FALSE, 7); gtk_box_pack_start(box, GTK_WIDGET(h_box), FALSE, FALSE, 2); h_box = GTK_BOX(gtk_hbox_new (FALSE, 0)); button = gtk_button_new_with_label(_("Start Shooting")); t->interval_toggle_button_signal = g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(start_interval_shooting), t); gtk_button_set_alignment (GTK_BUTTON(button), 0.0, 0.5); gtk_box_pack_start(h_box, button, FALSE, FALSE, 5); t->interval_toggle_button = button; gtk_box_pack_start(box, GTK_WIDGET(h_box), FALSE, FALSE, 2); /* Add interval shooting box */ gtk_box_pack_start(GTK_BOX(main_box), gui_box(_("Interval Shooting"), GTK_WIDGET(box), "tether_interval_shooting_box", TRUE), FALSE, FALSE, 0); /* PREFERENCES */ box = GTK_BOX(gtk_vbox_new (FALSE, 5)); h_box = GTK_BOX(gtk_hbox_new (FALSE, 0)); check_button = checkbox_from_conf("tether-minimize-window", _("Minimize this window after capture"), TRUE); gtk_button_set_alignment (GTK_BUTTON(check_button), 0.0, 0.5); gtk_box_pack_start(h_box, check_button, FALSE, FALSE, 5); check_button = checkbox_from_conf("tether-copy-current-settings", _("Copy settings from active to new image"), FALSE); gtk_button_set_alignment (GTK_BUTTON(check_button), 0.0, 0.5); gtk_box_pack_start(h_box, check_button, FALSE, FALSE, 5); gtk_box_pack_start(box, GTK_WIDGET(h_box), FALSE, FALSE, 0); h_box = GTK_BOX(gtk_hbox_new (FALSE, 0)); check_button = checkbox_from_conf("tether-open-image", _("Open new images after capture"), TRUE); gtk_button_set_alignment (GTK_BUTTON(check_button), 0.0, 0.5); gtk_box_pack_start(h_box, check_button, FALSE, FALSE, 5); gtk_box_pack_start(box, GTK_WIDGET(h_box), FALSE, FALSE, 0); /* Add preferences box */ gtk_box_pack_start(GTK_BOX(main_box), gui_box(_("Preferences"), GTK_WIDGET(box), "tether_preferences", TRUE), FALSE, FALSE, 0); /* Close button */ h_box = GTK_BOX(gtk_hbox_new (FALSE, 0)); button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(close_button_pressed), t); gtk_box_pack_end(h_box, button, FALSE, FALSE, 5); gtk_box_pack_end(GTK_BOX(main_box), GTK_WIDGET(h_box), FALSE, FALSE, 5); /* All all to window */ gtk_container_set_border_width (GTK_CONTAINER(t->window), 5); gtk_container_add(GTK_CONTAINER(t->window), GTK_WIDGET(main_box)); } void rs_tethered_shooting_open(RS_BLOB *rs) { GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), _("Rawstudio Tethered Shooting")); gtk_window_set_transient_for(GTK_WINDOW(window), GTK_WINDOW(rs->window)); gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER_ON_PARENT); gchar* filename_template = rs_conf_get_string("tether-export-filename"); /* Initialize filename_template to default if nothing is saved in config */ if (!filename_template) rs_conf_set_string("tether-export-filename","Rawstudio_%2c"); else g_free(filename_template); TetherInfo *tether_info = NULL; if (tether_info == NULL) { tether_info = g_malloc0(sizeof(TetherInfo)); } tether_info->window = window; tether_info->rs = rs; tether_info->status_buffer = gtk_text_buffer_new(NULL); tether_info->keep_thread_running = FALSE; tether_info->thread_type = ASYNC_THREAD_TYPE_NONE; gtk_text_buffer_set_text(tether_info->status_buffer,_("Welcome to Tethered shooting!\nMake sure your camera is NOT mounted in your operating system.\n"),-1); g_signal_connect(window, "delete-event", G_CALLBACK(close_main_window), tether_info); /* Initialize context */ tether_info->context = gp_context_new(); gp_context_set_error_func (tether_info->context, ctx_error_func, tether_info); gp_context_set_status_func (tether_info->context, ctx_status_func, tether_info); /* Enumerate cameras */ tether_info->camera_store = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING); int i = enumerate_cameras(tether_info->camera_store, tether_info->context); append_status(tether_info, _("Found %d cameras\n"), i); build_tether_gui(tether_info); gtk_window_resize(GTK_WINDOW(window), 500, 400); gtk_widget_show_all(GTK_WIDGET(window)); } rawstudio-2.0/src/rs-tethered-shooting.h0000644000175000017500000000202511526533645015344 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_TETHERED_SHOOTING_H #define RS_TETHERED_SHOOTING_H #include "application.h" extern void rs_tethered_shooting_open(RS_BLOB* rs); #endif /* RS_TETHERED_SHOOTING_H */ rawstudio-2.0/src/rs-dir-selector.c0000644000175000017500000002570411526533645014310 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include "rs-dir-selector.h" enum { COL_NAME = 0, COL_PATH, NUM_COLS }; struct _RSDirSelector { GtkScrolledWindow parent; GtkWidget *view; gchar *root; }; G_DEFINE_TYPE (RSDirSelector, rs_dir_selector, GTK_TYPE_SCROLLED_WINDOW); static void realize(GtkWidget *widget, gpointer data); static void dir_selector_add_element(GtkTreeStore *treestore, GtkTreeIter *iter, const gchar *name, const gchar *path); static void row_activated(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer user_data); static void row_expanded(GtkTreeView *view, GtkTreeIter *iter, GtkTreePath *path, gpointer user_data); static void row_collapsed(GtkTreeView *view, GtkTreeIter *iter, GtkTreePath *path, gpointer user_data); static void move_cursor(GtkTreeView *view, GtkMovementStep movement, gint direction, gpointer user_data); static GtkTreeModel *create_and_fill_model (const gchar *root); static gboolean directory_contains_directories(const gchar *filepath); enum { DIRECTORY_ACTIVATED_SIGNAL, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = { 0 }; /** * Class initializer */ static void rs_dir_selector_class_init(RSDirSelectorClass *klass) { GtkWidgetClass *widget_class; GtkObjectClass *object_class; widget_class = GTK_WIDGET_CLASS(klass); object_class = GTK_OBJECT_CLASS(klass); signals[DIRECTORY_ACTIVATED_SIGNAL] = g_signal_new ("directory-activated", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST, 0, NULL, NULL, g_cclosure_marshal_VOID__STRING, G_TYPE_NONE, 1, G_TYPE_STRING); } /** * Instance initialization */ static void rs_dir_selector_init(RSDirSelector *selector) { GtkTreeViewColumn *col; GtkCellRenderer *renderer; GtkScrolledWindow *scroller = GTK_SCROLLED_WINDOW(selector); g_object_set (G_OBJECT (selector), "hadjustment", NULL, "vadjustment", NULL, NULL); gtk_scrolled_window_set_policy (scroller, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); selector->view = gtk_tree_view_new(); col = gtk_tree_view_column_new(); gtk_tree_view_append_column(GTK_TREE_VIEW(selector->view), col); renderer = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start(col, renderer, TRUE); gtk_tree_view_column_add_attribute (col, renderer, "text", COL_NAME); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW(selector->view), FALSE); g_signal_connect(selector->view, "row-activated", G_CALLBACK(row_activated), selector); g_signal_connect(selector->view, "row-expanded", G_CALLBACK(row_expanded), NULL); g_signal_connect(selector->view, "row-collapsed", G_CALLBACK(row_collapsed), NULL); g_signal_connect(selector->view, "move-cursor", G_CALLBACK(move_cursor), NULL); gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(selector->view)), GTK_SELECTION_SINGLE); rs_dir_selector_set_root(selector, "/"); gtk_signal_connect(GTK_OBJECT(selector), "realize", G_CALLBACK(realize), NULL); gtk_container_add (GTK_CONTAINER (scroller), selector->view); return; } static void realize(GtkWidget *widget, gpointer data) { RSDirSelector *selector = RS_DIR_SELECTOR(widget); GtkTreeSelection *selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(selector->view)); if (!selection) return; if (gtk_tree_selection_count_selected_rows(selection) == 1) { GList *selected = gtk_tree_selection_get_selected_rows(selection, NULL); gtk_tree_view_scroll_to_cell(GTK_TREE_VIEW(selector->view), g_list_nth_data(selected, 0), NULL, TRUE, 0.2, 0.0); g_list_foreach (selected, (GFunc) gtk_tree_path_free, NULL); g_list_free (selected); } } /** * Adds an element to treestore * @param treestore A GtkTreeStore * @param iter A GtkTreeIter * @param name A gchar * @param path A gchar */ static void dir_selector_add_element(GtkTreeStore *treestore, GtkTreeIter *iter, const gchar *name, const gchar *path) { GtkTreeIter this, child; gtk_tree_store_append(treestore, &this, iter); gtk_tree_store_set(treestore, &this, COL_NAME, name, COL_PATH, path, -1); if (path && directory_contains_directories(path)) { gtk_tree_store_append(treestore, &child, &this); gtk_tree_store_set(treestore, &child, -1); } } /** * Callback after activating a row * @param view A GtkTreeView * @param path A GtkTreePath * @param col A GtkTreeViewColumn * @param user_data A gpointer */ static void row_activated(GtkTreeView *view, GtkTreePath *path, GtkTreeViewColumn *col, gpointer user_data) { GtkTreeModel *model; GtkTreeIter iter; gchar *filepath; model = gtk_tree_view_get_model(view); gtk_tree_model_get_iter(model, &iter, path); gtk_tree_model_get(GTK_TREE_MODEL(model), &iter, COL_PATH, &filepath, -1); g_signal_emit (G_OBJECT (user_data), signals[DIRECTORY_ACTIVATED_SIGNAL], 0, filepath); } /** * Callback after expanding a row * @param view A GtkTreeView * @param iter A GtkTreeIter * @param path A GtkTreePath * @param user_data A gpointer */ static void row_expanded(GtkTreeView *view, GtkTreeIter *iter, GtkTreePath *path, gpointer user_data) { GtkTreeModel *model; GtkTreeIter empty; gchar *filepath; gchar *file; GDir *dir; GString *gs = NULL; /* Set busy cursor */ GdkCursor* cursor = gdk_cursor_new(GDK_WATCH); gdk_window_set_cursor(gtk_widget_get_toplevel(GTK_WIDGET(view))->window, cursor); gdk_cursor_unref(cursor); gdk_flush(); model = gtk_tree_view_get_model(view); gtk_tree_model_iter_children(GTK_TREE_MODEL(model), &empty, iter); gtk_tree_model_get(GTK_TREE_MODEL(model), iter, COL_PATH, &filepath, -1); dir = g_dir_open(filepath, 0, NULL); if (dir) { while ((file = (gchar *) g_dir_read_name(dir))) { gs = g_string_new(filepath); g_string_append(gs, file); g_string_append(gs, "/"); if (g_file_test(gs->str, G_FILE_TEST_IS_DIR)) { if (file[0] == '.') { /* Fixme: If hidden files should be shown too */ } else { dir_selector_add_element(GTK_TREE_STORE(model), iter, file, gs->str); } } g_string_free(gs, TRUE); } g_dir_close(dir); g_free(filepath); } gdk_window_set_cursor(gtk_widget_get_toplevel(GTK_WIDGET(view))->window, NULL); gtk_tree_store_remove(GTK_TREE_STORE(model), &empty); } /** * Callback after collapsing a row * @param view A GtkTreeView * @param iter A GtkTreeIter * @param path A GtkTreePath * @param user_data A gpointer */ static void row_collapsed(GtkTreeView *view, GtkTreeIter *iter, GtkTreePath *path, gpointer user_data) { GtkTreeModel *model; GtkTreeIter child; model = gtk_tree_view_get_model(view); while (gtk_tree_model_iter_children(GTK_TREE_MODEL(model), &child, iter)) { gtk_tree_store_remove(GTK_TREE_STORE(model), &child); } dir_selector_add_element(GTK_TREE_STORE(model), iter, NULL, NULL); } /** * Callback after moving cursor * @param view A GtkTreeView * @param iter A GtkMovementStep * @param path A gint * @param user_data A gpointer */ static void move_cursor(GtkTreeView *view, GtkMovementStep movement, gint direction, gpointer user_data) { if (movement == GTK_MOVEMENT_VISUAL_POSITIONS) { GtkTreePath *path; gtk_tree_view_get_cursor(view, &path, NULL); if (direction == 1) /* RIGHT */ { gtk_tree_view_expand_row(view, path, FALSE); } else if (direction == -1) /* LEFT */ { gtk_tree_view_collapse_row(view, path); } gtk_tree_path_free(path); } } /** * Creates a GtkTreeStore and fills it with data * @param root A gchar * @return A GtkTreeModel */ static GtkTreeModel * create_and_fill_model (const gchar *root) { GtkTreeStore *treestore; treestore = gtk_tree_store_new(NUM_COLS, G_TYPE_STRING, G_TYPE_STRING); dir_selector_add_element(treestore, NULL, root, root); return GTK_TREE_MODEL(treestore); } /** * Creates a GtkWidget * @return A GtkWidget */ GtkWidget * rs_dir_selector_new() { return g_object_new (RS_DIR_SELECTOR_TYPE_WIDGET, NULL); } /** * Sets root * @param root A gchar */ void rs_dir_selector_set_root(RSDirSelector *selector, const gchar *root) { GtkTreeModel *model; GtkTreeSortable *sortable; model = create_and_fill_model(root); sortable = GTK_TREE_SORTABLE(model); gtk_tree_sortable_set_sort_column_id(sortable, COL_NAME, GTK_SORT_ASCENDING); gtk_tree_view_set_model(GTK_TREE_VIEW(selector->view), model); g_object_unref(model); /* destroy model automatically with view */ } /** * Expands to path * @param path to expand */ void rs_dir_selector_expand_path(RSDirSelector *selector, const gchar *expand) { GtkTreeView *view = GTK_TREE_VIEW(selector->view); GtkTreeModel *model = gtk_tree_view_get_model(view); GtkTreePath *path = gtk_tree_path_new_first(); GtkTreeIter iter; gchar *filepath = NULL; GString *gs; if (g_path_is_absolute(expand)) { gs = g_string_new(expand); } else { gs = g_string_new(g_get_current_dir()); g_string_append(gs, G_DIR_SEPARATOR_S); g_string_append(gs, expand); } g_string_append(gs, G_DIR_SEPARATOR_S); while (gtk_tree_model_get_iter(model, &iter, path)) { gtk_tree_model_get(model, &iter, COL_PATH, &filepath, -1); if (filepath && g_str_has_prefix(gs->str, filepath)) { gtk_tree_view_expand_row(GTK_TREE_VIEW(view), path, FALSE); gtk_tree_path_down(path); } else { gtk_tree_path_next(path); } } g_string_free(gs, TRUE); if (GTK_WIDGET_REALIZED(GTK_WIDGET(selector))) gtk_tree_view_scroll_to_cell(view, path, NULL, TRUE, 0.2, 0.0); else { /* Save this, realize() will catch it later */ GtkTreeSelection *selection = gtk_tree_view_get_selection(view); if (gtk_tree_model_get_iter(model, &iter, path)) gtk_tree_selection_select_iter(selection, &iter); } gtk_tree_path_free(path); } static gboolean directory_contains_directories(const gchar *filepath) { GDir *dir; GString *gs = NULL; gchar *file; dir = g_dir_open(filepath, 0, NULL); if (dir) { while ((file = (gchar *) g_dir_read_name(dir))) { gs = g_string_new(filepath); g_string_append(gs, file); g_string_append(gs, "/"); if (file[0] == '.') { /* Fixme: If hidden files should be shown too */ } else { if (g_file_test(gs->str, G_FILE_TEST_IS_DIR)) { g_dir_close(dir); g_string_free(gs, TRUE); return TRUE; } } g_string_free(gs, TRUE); } g_dir_close(dir); } return FALSE; } rawstudio-2.0/src/rs-save-dialog.c0000644000175000017500000004463111547406736014112 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include "application.h" #include "gtk-helper.h" #include "rs-save-dialog.h" #include "rs-photo.h" #include "conf_interface.h" #include "rs-store.h" G_DEFINE_TYPE (RSSaveDialog, rs_save_dialog, GTK_TYPE_WINDOW) static void file_type_changed(gpointer active, gpointer user_data); static void save_clicked(GtkButton *button, gpointer user_data); static void cancel_clicked(GtkButton *button, gpointer user_data); static GtkWidget *size_pref_new(RSSaveDialog *dialog); static void rs_save_dialog_dispose (GObject *object) { RSSaveDialog *dialog = RS_SAVE_DIALOG(object); if (!dialog->dispose_has_run) { if (dialog->output) { g_assert(G_IS_OBJECT(dialog->output)); g_object_unref(dialog->output); } gui_confbox_destroy(dialog->type_box); g_object_unref(dialog->finput); g_object_unref(dialog->fdemosaic); g_object_unref(dialog->flensfun); g_object_unref(dialog->ftransform_input); g_object_unref(dialog->frotate); g_object_unref(dialog->fcrop); g_object_unref(dialog->fresample); g_object_unref(dialog->fdcp); g_object_unref(dialog->fdenoise); g_object_unref(dialog->ftransform_display); if (dialog->photo) g_object_unref(dialog->photo); dialog->dispose_has_run = TRUE; /* Chain up */ G_OBJECT_CLASS (rs_save_dialog_parent_class)->dispose (object); } } static void rs_save_dialog_class_init (RSSaveDialogClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = rs_save_dialog_dispose; } static void rs_save_dialog_init (RSSaveDialog *dialog) { GtkWindow *window = GTK_WINDOW(dialog); GtkWidget *button_box; GType *savers; guint n_savers = 0, i; GtkWidget *button_save = gtk_button_new_from_stock(GTK_STOCK_SAVE); GtkWidget *button_cancel = gtk_button_new_from_stock(GTK_STOCK_CANCEL); const gchar *folder = rs_conf_get_string(CONF_EXPORT_AS_FOLDER); g_signal_connect(button_save, "clicked", G_CALLBACK(save_clicked), dialog); g_signal_connect(button_cancel, "clicked", G_CALLBACK(cancel_clicked), dialog); gtk_window_set_type_hint(window, GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_position(window, GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_resize(window, 750, 550); /* FIXME: Calculate some sensible size - maybe even remember user resizes */ gtk_window_set_title (window, _("Export File")); dialog->dispose_has_run = FALSE; dialog->output = NULL; dialog->file_pref = NULL; dialog->w_original = 666; dialog->h_original = 666; dialog->keep_aspect = TRUE; dialog->vbox = gtk_vbox_new(FALSE, 0); dialog->chooser = gtk_file_chooser_widget_new(GTK_FILE_CHOOSER_ACTION_SAVE); if (folder) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog->chooser), folder); dialog->type_box = gui_confbox_new((const gchar *) "save-as-filetype"); dialog->pref_bin = gtk_alignment_new(0.0, 0.5, 1.0, 1.0); button_box = gtk_hbutton_box_new(); gtk_button_box_set_layout (GTK_BUTTON_BOX(button_box), GTK_BUTTONBOX_END); gtk_container_add (GTK_CONTAINER(button_box), button_cancel); gtk_container_add (GTK_CONTAINER(button_box), button_save); /* Try to mimic a real GtkSaveDialog */ gtk_container_set_border_width(GTK_CONTAINER(window), 5); gtk_container_set_border_width(GTK_CONTAINER(dialog->vbox), 2); gtk_box_set_spacing(GTK_BOX(dialog->vbox), 2); gtk_container_set_border_width(GTK_CONTAINER(dialog->chooser), 5); gtk_container_set_border_width(GTK_CONTAINER(button_box), 5); gtk_box_set_spacing(GTK_BOX(button_box), 6); gtk_container_set_border_width(GTK_CONTAINER(dialog->pref_bin), 5); /* Pack everything nicely */ gtk_container_add(GTK_CONTAINER(window), dialog->vbox); gtk_box_pack_start(GTK_BOX(dialog->vbox), gui_confbox_get_widget(dialog->type_box), FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(dialog->vbox), dialog->chooser, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(dialog->vbox), dialog->pref_bin, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(dialog->vbox), size_pref_new(dialog), FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(dialog->vbox), button_box, FALSE, TRUE, 0); gtk_widget_show_all(dialog->vbox); /* Set default action */ GTK_WIDGET_SET_FLAGS(button_save, GTK_CAN_DEFAULT); gtk_window_set_default(window, button_save); gui_confbox_set_callback(dialog->type_box, dialog, file_type_changed); savers = g_type_children (RS_TYPE_OUTPUT, &n_savers); for (i = 0; i < n_savers; i++) { RSOutputClass *klass; gchar *name = g_strdup(g_type_name(savers[i])); klass = g_type_class_ref(savers[i]); gui_confbox_add_entry(dialog->type_box, name, klass->display_name, GINT_TO_POINTER(savers[i])); g_type_class_unref(klass); } g_free(savers); /* Load default fromconf, or use RSJpegfile */ gui_confbox_load_conf(dialog->type_box, "RSJpegfile"); /* Setup our filter chain for saving */ dialog->finput = rs_filter_new("RSInputImage16", NULL); dialog->fdemosaic = rs_filter_new("RSDemosaic", dialog->finput); dialog->flensfun = rs_filter_new("RSLensfun", dialog->fdemosaic); dialog->ftransform_input = rs_filter_new("RSColorspaceTransform", dialog->flensfun); dialog->frotate = rs_filter_new("RSRotate",dialog->ftransform_input) ; dialog->fcrop = rs_filter_new("RSCrop", dialog->frotate); dialog->fresample= rs_filter_new("RSResample", dialog->fcrop); dialog->fdcp = rs_filter_new("RSDcp", dialog->fresample); dialog->fdenoise= rs_filter_new("RSDenoise", dialog->fdcp); dialog->ftransform_display = rs_filter_new("RSColorspaceTransform", dialog->fdenoise); dialog->fend = dialog->ftransform_display; /* FIXME: Set correct ICC-profiles */ // g_object_set(dialog->filter_input, "icc-profile", profile, NULL); // g_object_set(dialog->filter_basic_render, "icc-profile", profile, NULL); } RSSaveDialog * rs_save_dialog_new (void) { return g_object_new (RS_TYPE_SAVE_DIALOG, NULL); } void rs_save_dialog_set_photo(RSSaveDialog *dialog, RS_PHOTO *photo, gint snapshot) { g_assert(RS_IS_SAVE_DIALOG(dialog)); g_assert(RS_IS_PHOTO(photo)); /* This should be enough to calculate "original" size */ rs_filter_set_recursive(dialog->fend, "image", photo->input_response, "angle", photo->angle, "orientation", photo->orientation, "rectangle", photo->crop, "filename", photo->filename, NULL); if (dialog->photo) g_object_unref(dialog->photo); dialog->photo = g_object_ref(photo); gint w, h; gdouble percent = 100.0f; rs_conf_get_double(CONF_EXPORT_AS_SIZE_PERCENT, &percent); rs_filter_get_size_simple(dialog->fcrop, RS_FILTER_REQUEST_QUICK, &w, &h); dialog->w_original = w; dialog->h_original = h; gtk_spin_button_set_value(dialog->w_spin, percent * dialog->w_original / 100.0); gtk_spin_button_set_value(dialog->h_spin, percent * dialog->h_original / 100.0); gtk_spin_button_set_value(dialog->p_spin, percent); gchar* basename = g_path_get_basename(photo->filename); gchar* output = g_strrstr(basename, "."); /* Terminate basename at last "." */ if (output != NULL) *output = '\0'; /* Find extension */ const gchar *ext = "jpg"; if (dialog->output && g_object_class_find_property(G_OBJECT_GET_CLASS(dialog->output), "filename")) ext = rs_output_get_extension(RS_OUTPUT(dialog->output)); gchar* name_ext = g_strdup_printf("%s.%s",basename, ext); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog->chooser), name_ext); g_free(basename); g_free(name_ext); dialog->snapshot = snapshot; } static void file_type_changed(gpointer active, gpointer user_data) { RSSaveDialog *dialog = RS_SAVE_DIALOG(user_data); const gchar *identifier = g_type_name(GPOINTER_TO_INT(active)); if (dialog->output) g_object_unref(dialog->output); dialog->output = rs_output_new(identifier); if (dialog->file_pref) gtk_widget_destroy(dialog->file_pref); dialog->file_pref = rs_output_get_parameter_widget(dialog->output, "save-as"); if (g_object_class_find_property(G_OBJECT_GET_CLASS(dialog->output), "filename")) { gtk_widget_show(dialog->chooser); gchar* cur_file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog->chooser)); if( cur_file) { gchar* basename = g_path_get_basename(cur_file); gchar* output = g_strrstr(basename, "."); /* Terminate basename at last "." */ if (output != NULL) *output = '\0'; gchar* name_ext = g_strdup_printf("%s.%s",basename, rs_output_get_extension(RS_OUTPUT(dialog->output))); gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog->chooser), name_ext); g_free(cur_file); g_free(basename); g_free(name_ext); } } else gtk_widget_hide(dialog->chooser); gtk_container_add(GTK_CONTAINER(dialog->pref_bin), dialog->file_pref); gtk_widget_show_all(dialog->file_pref); } /* Function to open a dialog box displaying the message provided. */ static void show_save_error ( const gchar *message, const char* filename ) { GtkWidget *dialog; /* Create the widget */ gdk_threads_enter(); dialog = gtk_message_dialog_new ( NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, _("File not saved!")); gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(dialog), message, filename); gtk_dialog_run ( GTK_DIALOG ( dialog ) ); gtk_widget_destroy ( dialog ); gdk_threads_leave(); } static gpointer job(RSJobQueueSlot *slot, gpointer data) { gfloat actual_scale; RSSaveDialog *dialog = RS_SAVE_DIALOG(data); gchar *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog->chooser)); if (!filename) return NULL; gchar *description = g_strdup_printf(_("Exporting to %s"), filename); rs_job_update_description(slot, description); g_free(description); gint input_width; rs_filter_get_size_simple(dialog->fcrop, RS_FILTER_REQUEST_QUICK, &input_width, NULL); actual_scale = ((gdouble) dialog->save_width / (gdouble) input_width); /* Set input profile */ RSDcpFile *dcp_profile = rs_photo_get_dcp_profile(dialog->photo); RSIccProfile *icc_profile = rs_photo_get_icc_profile(dialog->photo); if (dcp_profile != NULL) { g_object_set(dialog->fdcp, "profile", dcp_profile, NULL); } if (icc_profile != NULL) { RSColorSpace *icc_space = rs_color_space_icc_new_from_icc(icc_profile); g_object_set(dialog->finput, "color-space", icc_space, NULL); } /* Look up lens */ RSMetadata *meta = rs_photo_get_metadata(dialog->photo); RSLensDb *lens_db = rs_lens_db_get_default(); RSLens *lens = rs_lens_db_lookup_from_metadata(lens_db, meta); /* Apply lens information to RSLensfun */ if (lens) { rs_filter_set_recursive(dialog->fend, "make", meta->make_ascii, "model", meta->model_ascii, "lens", lens, "focal", (gfloat) meta->focallength, "aperture", meta->aperture, "tca_kr", dialog->photo->settings[dialog->snapshot]->tca_kr, "tca_kb", dialog->photo->settings[dialog->snapshot]->tca_kb, "vignetting", dialog->photo->settings[dialog->snapshot]->vignetting, NULL); g_object_unref(lens); } g_object_unref(meta); rs_filter_set_recursive(dialog->fend, "width", dialog->save_width, "height", dialog->save_height, "settings", dialog->photo->settings[dialog->snapshot], NULL); rs_job_update_progress(slot, 0.15); if (g_object_class_find_property(G_OBJECT_GET_CLASS(dialog->output), "filename")) g_object_set(dialog->output, "filename", filename, NULL); gboolean exported = rs_output_execute(dialog->output, dialog->fend); if(!exported) show_save_error(_("Could not save file: %s\n\nCheck that you have write permissions to this folder."),filename); rs_job_update_progress(slot, 0.75); /* Set the exported flag */ if (exported) rs_store_set_flags(NULL, dialog->photo->filename, NULL, NULL, &exported); gdk_threads_enter(); gtk_widget_destroy(GTK_WIDGET(dialog)); gdk_threads_leave(); g_free(filename); return NULL; } static void save_clicked(GtkButton *button, gpointer user_data) { RSSaveDialog *dialog = RS_SAVE_DIALOG(user_data); gchar *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog->chooser)); if (filename) { if (g_file_test(filename, G_FILE_TEST_EXISTS) && g_object_class_find_property(G_OBJECT_GET_CLASS(dialog->output), "filename")) { GtkWidget *q_dialog; q_dialog = gtk_message_dialog_new ( GTK_WINDOW(dialog), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, _("Overwrite File?")); gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG(q_dialog), _("The file '%s' already exists.\n\nDo you want to overwrite the file?"), filename); gint response = gtk_dialog_run ( GTK_DIALOG ( q_dialog ) ); gtk_widget_destroy ( q_dialog ); if (GTK_RESPONSE_YES != response) { g_free(filename); return; } } gchar *dirname = g_path_get_dirname(filename); rs_conf_set_string(CONF_EXPORT_AS_FOLDER, dirname); g_free(filename); g_free(dirname); /* Just hide it for now, we destroy it in job() */ gtk_widget_hide_all(GTK_WIDGET(dialog)); rs_job_queue_add_job(job, g_object_ref(dialog), FALSE); } } static void cancel_clicked(GtkButton *button, gpointer user_data) { RSSaveDialog *dialog = RS_SAVE_DIALOG(user_data); gtk_widget_destroy(GTK_WIDGET(dialog)); } static void size_pref_aspect_changed(GtkToggleButton *togglebutton, gpointer user_data) { RSSaveDialog *dialog = RS_SAVE_DIALOG(user_data); dialog->keep_aspect = togglebutton->active; if (dialog->keep_aspect) { gdouble percent = 100.0f; rs_conf_get_double(CONF_EXPORT_AS_SIZE_PERCENT, &percent); gtk_spin_button_set_value(dialog->w_spin, percent * dialog->w_original / 100.0); gtk_spin_button_set_value(dialog->h_spin, percent * dialog->h_original / 100.0); gtk_spin_button_set_value(dialog->p_spin, percent); } return; } static void size_pref_w_changed(GtkSpinButton *spinbutton, gpointer user_data) { RSSaveDialog *dialog = RS_SAVE_DIALOG(user_data); gdouble ratio; if (dialog->keep_aspect) { g_signal_handler_block(dialog->h_spin, dialog->h_signal); g_signal_handler_block(dialog->p_spin, dialog->p_signal); ratio = gtk_spin_button_get_value(spinbutton)/dialog->w_original; gtk_spin_button_set_value(dialog->h_spin, dialog->h_original*ratio); gtk_spin_button_set_value(dialog->p_spin, 100.0*ratio); g_signal_handler_unblock(dialog->p_spin, dialog->p_signal); g_signal_handler_unblock(dialog->h_spin, dialog->h_signal); } return; } static void size_pref_h_changed(GtkSpinButton *spinbutton, gpointer user_data) { RSSaveDialog *dialog = RS_SAVE_DIALOG(user_data); gdouble ratio; if (dialog->keep_aspect) { g_signal_handler_block(dialog->w_spin, dialog->w_signal); g_signal_handler_block(dialog->p_spin, dialog->p_signal); ratio = gtk_spin_button_get_value(spinbutton)/dialog->h_original; gtk_spin_button_set_value(dialog->w_spin, dialog->w_original*ratio); gtk_spin_button_set_value(dialog->p_spin, 100.0*ratio); g_signal_handler_unblock(dialog->p_spin, dialog->p_signal); g_signal_handler_unblock(dialog->w_spin, dialog->w_signal); } return; } static void size_pref_p_changed(GtkSpinButton *spinbutton, gpointer user_data) { RSSaveDialog *dialog = RS_SAVE_DIALOG(user_data); gdouble ratio; g_signal_handler_block(dialog->w_spin, dialog->w_signal); g_signal_handler_block(dialog->h_spin, dialog->h_signal); ratio = gtk_spin_button_get_value(spinbutton)/100.0; gtk_spin_button_set_value(dialog->w_spin, dialog->w_original*ratio); gtk_spin_button_set_value(dialog->h_spin, dialog->h_original*ratio); g_signal_handler_unblock(dialog->w_spin, dialog->w_signal); g_signal_handler_unblock(dialog->h_spin, dialog->h_signal); rs_conf_set_double(CONF_EXPORT_AS_SIZE_PERCENT,gtk_spin_button_get_value(spinbutton)); return; } static void spin_set_value(GtkSpinButton *spinbutton, gpointer user_data) { gint *value = (gint *) user_data; *value = gtk_spin_button_get_value_as_int(spinbutton); return; } static GtkWidget * size_pref_new(RSSaveDialog *dialog) { GtkWidget *vbox, *hbox; GtkWidget *checkbox; gdouble percent = 100.0f; rs_conf_get_double(CONF_EXPORT_AS_SIZE_PERCENT, &percent); checkbox = gtk_check_button_new_with_label(_("Keep aspect")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbox), dialog->keep_aspect); g_signal_connect ((gpointer) checkbox, "toggled", G_CALLBACK (size_pref_aspect_changed), dialog); dialog->w_spin = GTK_SPIN_BUTTON(gtk_spin_button_new_with_range(1.0, 65535.0, 1.0)); dialog->h_spin = GTK_SPIN_BUTTON(gtk_spin_button_new_with_range(1.0, 65535.0, 1.0)); dialog->p_spin = GTK_SPIN_BUTTON(gtk_spin_button_new_with_range(1.0, 1000.0, 1.0)); gtk_spin_button_set_value(dialog->w_spin, (gdouble) dialog->save_width); gtk_spin_button_set_value(dialog->h_spin, (gdouble) dialog->save_height); gtk_spin_button_set_value(dialog->p_spin, percent); dialog->w_signal = g_signal_connect(G_OBJECT(dialog->w_spin), "value_changed", G_CALLBACK(size_pref_w_changed), dialog); dialog->h_signal = g_signal_connect(G_OBJECT(dialog->h_spin), "value_changed", G_CALLBACK(size_pref_h_changed), dialog); dialog->p_signal = g_signal_connect(G_OBJECT(dialog->p_spin), "value_changed", G_CALLBACK(size_pref_p_changed), dialog); g_signal_connect(G_OBJECT(dialog->w_spin), "value_changed", G_CALLBACK(spin_set_value), &dialog->save_width); g_signal_connect(G_OBJECT(dialog->h_spin), "value_changed", G_CALLBACK(spin_set_value), &dialog->save_height); hbox = gtk_hbox_new(FALSE, 3); gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new_with_mnemonic(_("Width:")), FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET(dialog->w_spin), FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new_with_mnemonic(_("Height:")), FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET(dialog->h_spin), FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), gtk_label_new_with_mnemonic(_("Percent:")), FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET(dialog->p_spin), FALSE, TRUE, 0); vbox = gtk_vbox_new(FALSE, 3); gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET(checkbox), FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET(hbox), FALSE, TRUE, 0); return(vbox); } rawstudio-2.0/src/gtk-progress.h0000644000175000017500000000306411526533645013721 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ typedef struct _RS_PROGRESS RS_PROGRESS; /* Defined in gtk-progress.c */ RS_PROGRESS *gui_progress_new(const gchar *title, gint items); /** * Shows a new progress bar with an initial delay, otherwise behaves like gui_progress_new() * @param title The title to use for the progress bar * @param items How many items must be processed * @param delay The delay in milliseconds * @return A new RS_PROGRESS */ RS_PROGRESS * gui_progress_new_with_delay(const gchar *title, gint items, gint delay); void gui_progress_free(RS_PROGRESS *rsp); void gui_progress_advance_one(RS_PROGRESS *rsp); void gui_progress_set_current(RS_PROGRESS *rsp, gint current); void gui_progress_add_widget(RS_PROGRESS *rsp, GtkWidget *widget); rawstudio-2.0/src/Makefile.am0000644000175000017500000000252611526533645013157 00000000000000## Process this file with automake to produce Makefile.in INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ AM_CFLAGS =\ -Wall -fno-strict-aliasing\ -DWITH_GCONF\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) uidir = $(datadir)/rawstudio/ ui_DATA = ui.xml rawstudio.gtkrc bin_PROGRAMS = rawstudio EXTRA_DIST = \ $(ui_DATA) rawstudio_SOURCES = \ application.c application.h \ rs-actions.c rs-actions.h \ gtk-helper.c gtk-helper.h \ gtk-interface.c gtk-interface.h \ rs-save-dialog.c rs-save-dialog.h \ gtk-progress.c gtk-progress.h \ rs-camera-db.c rs-camera-db.h \ rs-cache.c rs-cache.h \ rs-batch.c rs-batch.h \ rs-toolbox.c rs-toolbox.h \ rs-navigator.c rs-navigator.h \ rs-photo.c rs-photo.h \ rs-tiff.c rs-tiff.h \ filename.c filename.h \ rs-store.c rs-store.h \ rs-preview-widget.c rs-preview-widget.h \ rs-loupe.c rs-loupe.h \ rs-histogram.c rs-histogram.h \ eog-pixbuf-cell-renderer.c eog-pixbuf-cell-renderer.h \ rs-pixbuf.c rs-pixbuf.h \ rs-external-editor.c rs-external-editor.h \ rs-dir-selector.c rs-dir-selector.h \ rs-tag-gui.c rs-tag-gui.h\ rs-tethered-shooting.c rs-tethered-shooting.h rawstudio_LDADD = ../librawstudio/librawstudio-@VERSION@.la @PACKAGE_LIBS@ @LIBJPEG@ @LIBTIFF@ $(INTLLIBS) rawstudio-2.0/src/rs-tag-gui.h0000644000175000017500000000326311526533645013252 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_TAG_GUI_H #define RS_TAG_GUI_H #include #include #include #include "application.h" #include G_BEGIN_DECLS #define RS_TYPE_LIBRARY rs_library_get_type() #define RS_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_LIBRARY, RSLibrary)) #define RS_LIBRARY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_LIBRARY, RSLibraryClass)) #define RS_IS_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_LIBRARY)) #define RS_IS_LIBRARY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_LIBRARY)) #define RS_LIBRARY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_LIBRARY, RSLibraryClass)) GtkWidget *rs_tag_gui_toolbox_new(RSLibrary *library, RSStore *store); GtkWidget *rs_library_tag_entry_new(RSLibrary *library); G_END_DECLS #endif /* RS_TAG_GUI_H */ rawstudio-2.0/src/rs-photo.c0000644000175000017500000005670211547416453013047 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include /* memset() */ #include "rs-photo.h" #include "rs-cache.h" #include "rs-camera-db.h" #include "rs-profile-factory.h" #include "rs-profile-camera.h" static void rs_photo_class_init (RS_PHOTOClass *klass); G_DEFINE_TYPE (RS_PHOTO, rs_photo, G_TYPE_OBJECT); enum { SPATIAL_CHANGED, SETTINGS_CHANGED, PROFILE_CHANGED, LENS_CHANGED, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = { 0 }; static GObjectClass *parent_class = NULL; static void photo_settings_changed_cb(RSSettings *settings, RSSettingsMask mask, gpointer user_data); static void rs_photo_dispose (GObject *obj) { RS_PHOTO *self = (RS_PHOTO *)obj; if (self->dispose_has_run) return; self->dispose_has_run = TRUE; G_OBJECT_CLASS (parent_class)->dispose (obj); } static void rs_photo_finalize (GObject *obj) { gint c; RS_PHOTO *photo = (RS_PHOTO *)obj; if (photo->filename) g_free(photo->filename); if (photo->metadata) g_object_unref(photo->metadata); if (photo->input) g_object_unref(photo->input); if (photo->input_response) g_object_unref(photo->input_response); for(c=0;c<3;c++) { g_signal_handler_disconnect(photo->settings[c], photo->settings_signal[c]); g_object_unref(photo->settings[c]); } if (photo->crop) g_free(photo->crop); if (photo->auto_wb_mul) g_free(photo->auto_wb_mul); /* Chain up to the parent class */ G_OBJECT_CLASS (parent_class)->finalize (obj); } static void rs_photo_class_init (RS_PHOTOClass *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); gobject_class->dispose = rs_photo_dispose; gobject_class->finalize = rs_photo_finalize; signals[SETTINGS_CHANGED] = g_signal_new ("settings-changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, /* Is this right? */ NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); signals[SPATIAL_CHANGED] = g_signal_new ("spatial-changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, /* Is this right? */ NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[PROFILE_CHANGED] = g_signal_new ("profile-changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, /* Is this right? */ NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); signals[LENS_CHANGED] = g_signal_new ("lens-changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, /* Is this right? */ NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); parent_class = g_type_class_peek_parent (klass); } static void rs_photo_init (RS_PHOTO *photo) { guint c; photo->filename = NULL; photo->input = NULL; photo->input_response = NULL; ORIENTATION_RESET(photo->orientation); photo->priority = PRIO_U; photo->metadata = rs_metadata_new(); for(c=0;c<3;c++) { photo->settings[c] = rs_settings_new(); photo->settings_signal[c] = g_signal_connect(photo->settings[c], "settings-changed", G_CALLBACK(photo_settings_changed_cb), photo); } photo->crop = NULL; photo->thumbnail_filter = NULL; photo->angle = 0.0; photo->exported = FALSE; photo->auto_wb_mul = NULL; photo->embedded_profile = NULL; } static void photo_settings_changed_cb(RSSettings *settings, RSSettingsMask mask, gpointer user_data) { gint i; RS_PHOTO *photo = RS_PHOTO(user_data); if (mask) /* Find changed snapshot */ for(i=0;i<3;i++) if (settings == photo->settings[i]) { g_signal_emit(photo, signals[SETTINGS_CHANGED], 0, mask|(i<<24)); break; } } /** * Allocates a new RS_PHOTO * @return A new RS_PHOTO */ RS_PHOTO * rs_photo_new() { RS_PHOTO *photo; photo = g_object_new(RS_TYPE_PHOTO, NULL); return photo; } /** * Rotates a RS_PHOTO * @param photo A RS_PHOTO * @param quarterturns How many quarters to turn * @param angle The angle in degrees (360 is whole circle) to turn the image */ void rs_photo_rotate(RS_PHOTO *photo, const gint quarterturns, const gdouble angle) { gint n; if (!photo) return; photo->angle += angle; if (photo->crop) { gint w,h; rs_image16_transform_getwh(photo->input, NULL, photo->angle, photo->orientation, &w, &h); rs_rect_rotate(photo->crop, photo->crop, w, h, quarterturns); } for(n=0;norientation); g_signal_emit(photo, signals[SPATIAL_CHANGED], 0, NULL); } /** * Sets a new crop of a RS_PHOTO * @param photo A RS_PHOTO * @param crop The new crop or NULL to remove previous cropping */ void rs_photo_set_crop(RS_PHOTO *photo, const RS_RECT *crop) { if (!photo) return; if (photo->crop) g_free(photo->crop); photo->crop = NULL; if (crop) { photo->crop = g_new(RS_RECT, 1); *photo->crop = *crop; } g_signal_emit(photo, signals[SPATIAL_CHANGED], 0, NULL); } /** * Gets the crop of a RS_PHOTO * @param photo A RS_PHOTO * @return The crop as a RS_RECT or NULL if the photo is uncropped */ RS_RECT * rs_photo_get_crop(RS_PHOTO *photo) { if (!photo) return NULL; return photo->crop; } gboolean rs_photo_get_original_size(RS_PHOTO *photo, gboolean rotated, gint* width, gint* height) { if (!photo) return FALSE; g_assert(RS_IS_PHOTO(photo)); if (!photo->input) return FALSE; g_assert(RS_IS_IMAGE16(photo->input)); if (rotated && ((photo->orientation&1) == 1)) { *width = photo->input->h; *height = photo->input->w; } else { *width = photo->input->w; *height = photo->input->h; } return TRUE; } /** * Set the angle of a RS_PHOTO * @param photo A RS_PHOTO * @param angle The new angle * @param relative If set to TRUE, angle will be relative to existing angle */ extern void rs_photo_set_angle(RS_PHOTO *photo, gdouble angle, gboolean relative) { gdouble previous; if (!photo) return; if (photo->orientation&4) angle = -angle; previous = photo->angle; if (relative) photo->angle += angle; else photo->angle = angle; if (ABS(previous - photo->angle) > 0.01) g_signal_emit(photo, signals[SPATIAL_CHANGED], 0, NULL); } /** * Get the angle of a RS_PHOTO * @param photo A RS_PHOTO * @return The current angle */ extern gdouble rs_photo_get_angle(RS_PHOTO *photo) { if (!photo) return 0.0; return photo->angle; } /* Macro to create functions for getting single parameters */ #define RS_PHOTO_GET_GDOUBLE_VALUE(setting) \ gdouble \ rs_photo_get_##setting(RS_PHOTO *photo, const gint snapshot) \ { \ g_assert (RS_IS_PHOTO(photo)); \ g_assert ((snapshot>=0) && (snapshot<=2)); \ return photo->settings[snapshot]->setting; \ } RS_PHOTO_GET_GDOUBLE_VALUE(exposure) RS_PHOTO_GET_GDOUBLE_VALUE(saturation) RS_PHOTO_GET_GDOUBLE_VALUE(hue) RS_PHOTO_GET_GDOUBLE_VALUE(contrast) RS_PHOTO_GET_GDOUBLE_VALUE(warmth) RS_PHOTO_GET_GDOUBLE_VALUE(tint) RS_PHOTO_GET_GDOUBLE_VALUE(sharpen) RS_PHOTO_GET_GDOUBLE_VALUE(denoise_luma) RS_PHOTO_GET_GDOUBLE_VALUE(denoise_chroma) #undef RS_PHOTO_GET_GDOUBLE_VALUE /* Macro to create functions for changing single parameters */ #define RS_PHOTO_SET_GDOUBLE_VALUE(setting, uppersetting) \ void \ rs_photo_set_##setting(RS_PHOTO *photo, const gint snapshot, const gdouble value) \ { \ /*if (!photo) return;*/ \ /*g_return_if_fail ((snapshot>=0) && (snapshot<=2));*/ \ photo->settings[snapshot]->setting = value; \ g_signal_emit(photo, signals[SETTINGS_CHANGED], 0, MASK_##uppersetting|(snapshot<<24)); \ } RS_PHOTO_SET_GDOUBLE_VALUE(exposure, EXPOSURE) RS_PHOTO_SET_GDOUBLE_VALUE(saturation, SATURATION) RS_PHOTO_SET_GDOUBLE_VALUE(hue, HUE) RS_PHOTO_SET_GDOUBLE_VALUE(contrast, CONTRAST) RS_PHOTO_SET_GDOUBLE_VALUE(warmth, WARMTH) RS_PHOTO_SET_GDOUBLE_VALUE(tint, TINT) RS_PHOTO_SET_GDOUBLE_VALUE(sharpen, SHARPEN) /* FIXME: denoise! */ #undef RS_PHOTO_SET_GDOUBLE_VALUE /** * Apply settings to a RS_PHOTO from a RSSettings * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param rs_settings The settings to apply * @param mask A mask for defining which settings to apply */ void rs_photo_apply_settings(RS_PHOTO *photo, const gint snapshot, RSSettings *settings, RSSettingsMask mask) { g_assert(RS_IS_PHOTO(photo)); g_assert(RS_IS_SETTINGS(settings)); g_assert((snapshot>=0) && (snapshot<=2)); if (mask == 0) return; rs_settings_copy(settings, mask, photo->settings[snapshot]); /* Check if we need to update WB to camera or auto */ if (mask & MASK_WB && photo->input && photo->settings[snapshot]->wb_ascii) { if (g_strcmp0(photo->settings[snapshot]->wb_ascii, PRESET_WB_CAMERA) == 0) rs_photo_set_wb_from_camera(photo, snapshot); } } /** * Apply photo settings to a list of filters from an RSSettings * @param photo A RS_PHOTO * @param filters Which filters to apply the settings to * @param snapshot Which snapshot to affect * @param mask A mask for defining which settings to apply */ void rs_photo_apply_to_filters(RS_PHOTO *photo, GList *filters, const gint snapshot) { g_assert(RS_IS_PHOTO(photo)); if (!filters) return; gint nfilters = g_list_length(filters); gint i= 0; for (i = 0; i < nfilters; i++) { RSFilter *filter = RS_FILTER(g_list_nth_data(filters, i)); /* Set input profile */ RSDcpFile *dcp_profile = rs_photo_get_dcp_profile(photo); if (dcp_profile != NULL) rs_filter_set_recursive(filter, "profile", dcp_profile, NULL); else rs_filter_set_recursive(filter, "use-profile", FALSE, NULL); if (g_strcmp0(photo->settings[snapshot]->wb_ascii, PRESET_WB_CAMERA) == 0) rs_photo_set_wb_from_camera(photo, snapshot); rs_filter_set_recursive(filter, "settings", photo->settings[snapshot], "rectangle", rs_photo_get_crop(photo), "angle", rs_photo_get_angle(photo), "orientation", photo->orientation, NULL); /* Look up lens */ RSMetadata *meta = rs_photo_get_metadata(photo); RSLensDb *lens_db = rs_lens_db_get_default(); RSLens *lens = rs_lens_db_lookup_from_metadata(lens_db, meta); /* Apply lens information to RSLensfun */ if (lens) { rs_filter_set_recursive(filter, "make", meta->make_ascii, "model", meta->model_ascii, "lens", lens, "focal", (gfloat) meta->focallength, "aperture", meta->aperture, "tca_kr", photo->settings[0]->tca_kr, "tca_kb", photo->settings[0]->tca_kb, "vignetting", photo->settings[0]->vignetting, NULL); g_object_unref(lens); } } } /** * Flips a RS_PHOTO * @param photo A RS_PHOTO */ void rs_photo_flip(RS_PHOTO *photo) { if (!photo) return; if (photo->crop) { gint w,h; rs_image16_transform_getwh(photo->input, NULL, photo->angle, photo->orientation, &w, &h); rs_rect_flip(photo->crop, photo->crop, w, h); } ORIENTATION_FLIP(photo->orientation); g_signal_emit(photo, signals[SPATIAL_CHANGED], 0, NULL); } /** * Mirrors a RS_PHOTO * @param photo A RS_PHOTO */ void rs_photo_mirror(RS_PHOTO *photo) { if (!photo) return; if (photo->crop) { gint w,h; rs_image16_transform_getwh(photo->input, NULL, photo->angle, photo->orientation, &w, &h); rs_rect_mirror(photo->crop, photo->crop, w, h); } ORIENTATION_MIRROR(photo->orientation); g_signal_emit(photo, signals[SPATIAL_CHANGED], 0, NULL); } /** * Assign a DCP profile to a photo * @param photo A RS_PHOTO * @param dcp A DCP profile */ void rs_photo_set_dcp_profile(RS_PHOTO *photo, RSDcpFile *dcp) { g_assert(RS_IS_PHOTO(photo)); photo->dcp = dcp; photo->icc = NULL; g_signal_emit(photo, signals[PROFILE_CHANGED], 0, photo->dcp); } /** * Get the assigned DCP profile for a RS_PHOTO * @param photo A RS_PHOTO * @return A DCP profile or NULL */ extern RSDcpFile *rs_photo_get_dcp_profile(RS_PHOTO *photo) { g_assert(RS_IS_PHOTO(photo)); return photo->dcp; } /** * Assign a ICC profile to a photo * @param photo A RS_PHOTO * @param dcp An ICC profile */ void rs_photo_set_icc_profile(RS_PHOTO *photo, RSIccProfile *icc) { g_assert(RS_IS_PHOTO(photo)); photo->icc = icc; photo->dcp = NULL; g_signal_emit(photo, signals[PROFILE_CHANGED], 0, photo->icc); } /** * Indicate that the lens has changed. * @param photo A RS_PHOTO */ void rs_photo_lens_updated(RS_PHOTO *photo) { g_assert(RS_IS_PHOTO(photo)); g_signal_emit(photo, signals[LENS_CHANGED], 0, 0); } /** * Get the assigned ICC profile for a RS_PHOTO * @param photo A RS_PHOTO * @return An ICC profile or NULL */ RSIccProfile *rs_photo_get_icc_profile(RS_PHOTO *photo) { g_assert(RS_IS_PHOTO(photo)); return photo->icc; } /** * Sets the white balance of a RS_PHOTO using warmth and tint variables * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param warmth * @param tint */ void rs_photo_set_wb_from_wt(RS_PHOTO *photo, const gint snapshot, const gdouble warmth, const gdouble tint) { g_assert(RS_IS_PHOTO(photo)); g_return_if_fail ((snapshot>=0) && (snapshot<=2)); rs_settings_set_wb(photo->settings[snapshot], warmth, tint, NULL); g_signal_emit(photo, signals[SETTINGS_CHANGED], 0, MASK_WB|(snapshot<<24)); } /** * Sets the white balance of a RS_PHOTO using multipliers * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param mul A pointer to an array of at least 3 multipliers */ void rs_photo_set_wb_from_mul(RS_PHOTO *photo, const gint snapshot, const gdouble *mul, const gchar *ascii) { gint c; gdouble max=0.0, warmth, tint; gdouble buf[3]; g_assert(RS_IS_PHOTO(photo)); g_return_if_fail ((snapshot>=0) && (snapshot<=2)); g_assert(mul != NULL); for (c=0; c < 3; c++) buf[c] = mul[c]; for (c=0; c < 3; c++) if (max < buf[c]) max = buf[c]; for(c=0;c<3;c++) buf[c] /= max; buf[R] *= (1.0/buf[G]); buf[B] *= (1.0/buf[G]); buf[G] = 1.0; tint = (buf[B] + buf[R] - 4.0)/-2.0; warmth = (buf[R]/(2.0-tint))-1.0; rs_settings_set_wb(photo->settings[snapshot], warmth, tint, ascii); } /** * Sets the white balance by neutralizing the colors provided * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param r The red color * @param g The green color * @param b The blue color */ void rs_photo_set_wb_from_color(RS_PHOTO *photo, const gint snapshot, const gdouble r, const gdouble g, const gdouble b) { gdouble warmth, tint; g_assert(RS_IS_PHOTO(photo)); g_return_if_fail ((snapshot>=0) && (snapshot<=2)); warmth = (b-r)/(r+b); /* r*(1+warmth) = b*(1-warmth) */ tint = -g/(r+r*warmth)+2.0; /* magic */ rs_photo_set_wb_from_wt(photo, snapshot, warmth, tint); } static RS_IMAGE16 * calculate_auto_wb_data(RS_PHOTO *photo) { RSFilter *tmp_filter = rs_filter_new("RSResample", photo->auto_wb_filter); g_object_set(tmp_filter, "bounding-box", TRUE, "width", 256, "height", 256, NULL); RSFilterRequest *request = rs_filter_request_new(); rs_filter_request_set_quick(RS_FILTER_REQUEST(request), TRUE); RSFilterResponse *response = rs_filter_get_image(tmp_filter, request); g_object_unref(request); RS_IMAGE16 *auto_wb_data = rs_filter_response_get_image(response); g_object_unref(response); g_object_unref(tmp_filter); return auto_wb_data; } /** * Autoadjust white balance of a RS_PHOTO using the greyworld algorithm * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect */ void rs_photo_set_wb_auto(RS_PHOTO *photo, const gint snapshot) { if (photo->auto_wb_mul) if (photo->auto_wb_mul[0] != 0.0 && photo->auto_wb_mul[1] != 0.0 && photo->auto_wb_mul[2] != 0.0 && photo->auto_wb_mul[3] != 0.0) { rs_photo_set_wb_from_mul(photo, snapshot, photo->auto_wb_mul, PRESET_WB_AUTO); return; } if (!photo->auto_wb_mul) photo->auto_wb_mul = g_new0(gdouble, 4); if (!photo->auto_wb_filter) return; RS_IMAGE16 *input = calculate_auto_wb_data(photo); gint row, col, x, y, c, val; gint sum[8]; gdouble pre_mul[4]; gdouble dsum[8]; g_assert(RS_IS_PHOTO(photo)); g_return_if_fail ((snapshot>=0) && (snapshot<=2)); for (c=0; c < 8; c++) dsum[c] = 0.0; for (row=0; row < input->h-15; row += 8) for (col=0; col < input->w-15; col += 8) { memset (sum, 0, sizeof sum); for (y=row; y < row+8; y++) for (x=col; x < col+8; x++) for(c=0;c<3;c++) { val = input->pixels[y*input->rowstride+x*4+c]; if (!val) continue; if (val > 65100) goto skip_block; /* I'm sorry mom */ sum[c] += val; sum[c+4]++; } for (c=0; c < 8; c++) dsum[c] += sum[c]; skip_block: continue; } for(c=0;c<4;c++) if (dsum[c]) { pre_mul[c] = dsum[c+4] / dsum[c]; photo->auto_wb_mul[c] = pre_mul[c]; } rs_photo_set_wb_from_mul(photo, snapshot, pre_mul, PRESET_WB_AUTO); } /** * Autoadjust white balance from the in-camera settings * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @return TRUE on success, FALSE on error */ gboolean rs_photo_set_wb_from_camera(RS_PHOTO *photo, const gint snapshot) { gboolean ret = FALSE; g_assert(RS_IS_PHOTO(photo)); if (!((snapshot>=0) && (snapshot<=2))) return FALSE; if (!photo->dcp) { rs_settings_commit_start(photo->settings[snapshot]); g_object_set(photo->settings[snapshot], "dcp-temp", 5000.0, "dcp-tint", 0.0, "wb_ascii", PRESET_WB_CAMERA, "recalc_temp", FALSE, NULL); rs_settings_commit_stop(photo->settings[snapshot]); } else if (photo->metadata->cam_mul[R] != -1.0) { rs_photo_set_wb_from_mul(photo, snapshot, photo->metadata->cam_mul, PRESET_WB_CAMERA); ret = TRUE; } return ret; } /** * Loads a photo in to a RS_PHOTO including metadata * @param filename The filename to load * @return A RS_PHOTO on success, NULL on error */ RS_PHOTO * rs_photo_load_from_file(const gchar *filename) { RS_PHOTO *photo = NULL; RSFilterResponse *response; RSSettingsMask mask; gint i; response = rs_filetype_load(filename); if (response && RS_IS_FILTER_RESPONSE(response) && rs_filter_response_has_image(response)) { photo = rs_photo_new(); /* Set filename */ photo->filename = g_strdup(filename); /* Set input image */ photo->input = rs_filter_response_get_image(response); photo->input_response = response; } /* If photo available, read & process metadata */ if (photo) { /* Load metadata */ if (rs_metadata_load(photo->metadata, filename)) { /* Rotate photo inplace */ switch (photo->metadata->orientation) { case 90: ORIENTATION_90(photo->orientation); break; case 180: ORIENTATION_180(photo->orientation); break; case 270: ORIENTATION_270(photo->orientation); break; } } /* Load defaults */ rs_camera_db_photo_set_defaults(rs_camera_db_get_singleton(), photo); /* Load cache */ mask = rs_cache_load(photo); /* If we have no cache, try to set some sensible defaults */ for (i=0;i<3;i++) { /* White balance */ if (!(mask & MASK_WB)) photo->settings[i]->wb_ascii = g_strdup(PRESET_WB_CAMERA); /* Contrast */ if (!(mask & MASK_CONTRAST) && (photo->metadata->contrast != -1.0)) rs_photo_set_contrast(photo, i, photo->metadata->contrast); /* Saturation */ if (!(mask & MASK_SATURATION) && (photo->metadata->saturation != -1.0)) rs_photo_set_saturation(photo, i, photo->metadata->saturation); } if (photo && photo->input_response) { photo->embedded_profile = rs_filter_param_get_object_with_type(RS_FILTER_PARAM(photo->input_response), "embedded-colorspace", RS_TYPE_COLOR_SPACE); if (photo->embedded_profile) { photo->icc = NULL; photo->dcp = NULL; rs_filter_param_set_object(RS_FILTER_PARAM(photo->input_response), "colorspace", photo->embedded_profile); } if (photo->icc) { RSColorSpace *cs = rs_color_space_icc_new_from_icc(photo->icc); rs_filter_param_set_object(RS_FILTER_PARAM(photo->input_response), "colorspace", cs); photo->dcp = NULL; } } /* Load default DCP */ if (!photo->dcp && !photo->icc && !photo->embedded_profile && photo->metadata && photo->metadata->model_ascii) { RSProfileFactory *factory = rs_profile_factory_new_default(); const gchar* unique_id = NULL; if (photo->metadata->make_ascii) unique_id = rs_profile_camera_find(photo->metadata->make_ascii, photo->metadata->model_ascii); if (!unique_id) unique_id = g_strdup(photo->metadata->model_ascii); GSList *profiles = rs_profile_factory_find_from_model(factory, unique_id); /* Select alphabetically first profile */ if (g_slist_length(profiles) > 0) { GSList *i = profiles; do { RSDcpFile* dcp = RS_DCP_FILE(i->data); if (photo->dcp) { if (g_strcmp0(rs_dcp_file_get_name(dcp),rs_dcp_file_get_name(photo->dcp)) < 0) photo->dcp = dcp; } else photo->dcp = dcp; i = i->next; } while (i != NULL); g_slist_free(profiles); } g_free((void*)unique_id); } } return photo; } /** * Get the metadata belonging to the RS_PHOTO * @param photo A RS_PHOTO * @return A RSMetadata, this must be unref'ed */ extern RSMetadata *rs_photo_get_metadata(RS_PHOTO *photo) { return g_object_ref(photo->metadata); } /** * Closes a RS_PHOTO - this basically means saving cache * @param photo A RS_PHOTO */ void rs_photo_close(RS_PHOTO *photo) { GdkPixbuf *pixbuf=NULL; GdkPixbuf *pixbuf2=NULL; if (!photo) return; rs_cache_save(photo, MASK_ALL); if (photo->metadata && photo->thumbnail_filter) { RSFilterRequest *request = rs_filter_request_new(); rs_filter_request_set_roi(request, FALSE); rs_filter_request_set_quick(request, TRUE); rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", rs_color_space_new_singleton("RSSrgb")); RSFilterResponse *response = rs_filter_get_image8(photo->thumbnail_filter, request); pixbuf = rs_filter_response_get_image8(response); /* Scale to a bounding box of 128x128 pixels */ gdouble ratio = ((gdouble) gdk_pixbuf_get_width(pixbuf))/((gdouble) gdk_pixbuf_get_height(pixbuf)); if (ratio>1.0) pixbuf2 = gdk_pixbuf_scale_simple(pixbuf, 128, (gint) (128.0/ratio), GDK_INTERP_BILINEAR); else pixbuf2 = gdk_pixbuf_scale_simple(pixbuf, (gint) (128.0*ratio), 128, GDK_INTERP_BILINEAR); g_object_unref(pixbuf); g_object_unref(request); g_object_unref(response); if (photo->metadata->thumbnail) g_object_unref(photo->metadata->thumbnail); photo->metadata->thumbnail = pixbuf2; rs_metadata_cache_save(photo->metadata, photo->filename); } } void rs_photo_rotate_rect_inverse(RS_PHOTO *photo, RS_RECT *coords) { RS_MATRIX3 affine; gdouble minx, miny; gdouble maxx, maxy; g_assert(RS_IS_PHOTO(photo)); g_assert(photo->input); /* Start clean */ matrix3_identity(&affine); /* Rotate + orientation-angle */ matrix3_affine_rotate(&affine, photo->angle+(photo->orientation&3)*90.0); /* Flip if needed */ if (photo->orientation&4) matrix3_affine_scale(&affine, 1.0, -1.0); /* We use the inverse matrix for our transform */ matrix3_affine_invert(&affine); /* Translate points */ matrix3_affine_get_minmax(&affine, &minx, &miny, &maxx, &maxy, 0.0, 0.0, (gdouble) (photo->input->w-1), (gdouble) (photo->input->h-1)); minx -= 0.5; /* This SHOULD be the correct rounding :) */ miny -= 0.5; matrix3_affine_translate(&affine, -minx, -miny); matrix3_affine_get_minmax(&affine, &minx, &miny, &maxx, &maxy, coords->x1, coords->y1, coords->x2, coords->y2); coords->x1 = minx; coords->y1 = miny; coords->x2 = maxx; coords->y2 = maxy; } rawstudio-2.0/src/rs-toolbox.c0000644000175000017500000012240211547416453013373 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #ifndef WIN32 #include #endif #include "gettext.h" #include "rs-toolbox.h" #include "gtk-interface.h" #include "gtk-helper.h" #include "rs-settings.h" #include "rs-curve.h" #include "rs-image.h" #include "rs-histogram.h" #include "rs-utils.h" #include "rs-photo.h" #include "conf_interface.h" #include "rs-actions.h" #include "rs-lens-db-editor.h" #include "rs-profile-camera.h" #include "rs-actions.h" #include "rs-camera-db.h" /* Some helpers for creating the basic sliders */ typedef struct { const gchar *property_name; gfloat step; RSSettingsMask mask; } BasicSettings; const static BasicSettings basic[] = { { "exposure", 0.05, MASK_EXPOSURE}, { "saturation", 0.05, MASK_SATURATION}, { "hue", 1.5, MASK_HUE }, { "contrast", 0.05, MASK_CONTRAST }, { "dcp-temp", 10.0, MASK_DCP_TEMP }, { "dcp-tint", 1.0, MASK_DCP_TINT}, { "sharpen", 0.5, MASK_SHARPEN }, { "denoise_luma", 0.5, MASK_DENOISE_LUMA}, { "denoise_chroma", 0.5, MASK_DENOISE_CHROMA }, }; #define NBASICS (9) const static BasicSettings channelmixer[] = { { "channelmixer_red", 1.0, MASK_CHANNELMIXER_RED }, { "channelmixer_green", 1.0, MASK_CHANNELMIXER_GREEN }, { "channelmixer_blue", 1.0, MASK_CHANNELMIXER_BLUE }, }; #define NCHANNELMIXER (3) const static BasicSettings lens[] = { { "tca_kr", 0.025, MASK_TCA_KR }, { "tca_kb", 0.025, MASK_TCA_KB }, { "vignetting", 0.025, MASK_VIGNETTING }, }; #define NLENS (3) struct _RSToolbox { GtkScrolledWindow parent; RSProfileSelector *selector; GtkWidget *notebook; GtkBox *toolbox; GtkRange *ranges[3][NBASICS]; GtkRange *channelmixer[3][NCHANNELMIXER]; GtkRange *lens[3][NLENS]; GtkWidget *lenslabel[3]; GtkWidget *lensbutton[3]; RSLens *rs_lens; RSSettings *settings[3]; GtkWidget *curve[3]; GtkWidget *transforms; gint selected_snapshot; RS_PHOTO *photo; RSFilter* histogram_input; GtkWidget *histogram; rs_profile_camera last_camera; #ifndef WIN32 guint histogram_connection; /* Got GConf notification */ GConfClient *gconf; #endif gboolean mute_from_sliders; gboolean mute_from_photo; }; G_DEFINE_TYPE (RSToolbox, rs_toolbox, GTK_TYPE_SCROLLED_WINDOW) enum { SNAPSHOT_CHANGED, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = { 0 }; static void dcp_profile_selected(RSProfileSelector *selector, RSDcpFile *dcp, RSToolbox *toolbox); static void icc_profile_selected(RSProfileSelector *selector, RSIccProfile *icc, RSToolbox *toolbox); static void add_profile_selected(RSProfileSelector *selector, RSToolbox *toolbox); #ifndef WIN32 static void conf_histogram_height_changed(GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data); #endif static void notebook_switch_page(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, RSToolbox *toolbox); static void basic_range_value_changed(GtkRange *range, gpointer user_data); static gboolean basic_range_reset(GtkWidget *widget, GdkEventButton *event, gpointer user_data); static GtkRange *basic_slider(RSToolbox *toolbox, const gint snapshot, GtkTable *table, const gint row, const BasicSettings *basic); static void curve_changed(GtkWidget *widget, gpointer user_data); static GtkWidget *new_snapshot_page(RSToolbox *toolbox, const gint snapshot); static GtkWidget *new_transform(RSToolbox *toolbox, gboolean show); static void toolbox_copy_from_photo(RSToolbox *toolbox, const gint snapshot, const RSSettingsMask mask, RS_PHOTO *photo); static void photo_settings_changed(RS_PHOTO *photo, RSSettingsMask mask, gpointer user_data); static void photo_wb_changed(RSSettings *settings, gpointer user_data); static void photo_spatial_changed(RS_PHOTO *photo, gpointer user_data); static void photo_finalized(gpointer data, GObject *where_the_object_was); static void toolbox_copy_from_photo(RSToolbox *toolbox, const gint snapshot, const RSSettingsMask mask, RS_PHOTO *photo); static void toolbox_lens_set_label(RSToolbox *toolbox, gint snapshot); static void rs_toolbox_finalize (GObject *object) { RSToolbox *toolbox = RS_TOOLBOX(object); #ifndef WIN32 gconf_client_notify_remove(toolbox->gconf, toolbox->histogram_connection); g_object_unref(toolbox->gconf); #endif g_free(toolbox->last_camera.make); g_free(toolbox->last_camera.model); if (G_OBJECT_CLASS (rs_toolbox_parent_class)->finalize) G_OBJECT_CLASS (rs_toolbox_parent_class)->finalize (object); } static void rs_toolbox_class_init (RSToolboxClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); signals[SNAPSHOT_CHANGED] = g_signal_new ("snapshot-changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); object_class->finalize = rs_toolbox_finalize; } static void rs_toolbox_init (RSToolbox *self) { GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW(self); gint page; GtkWidget *label[3]; GtkWidget *viewport; gint height; /* A box to hold everything */ self->toolbox = GTK_BOX(gtk_vbox_new (FALSE, 1)); self->selector = rs_profile_selector_new(); g_object_set(self->selector, "width-request", 75, NULL); g_signal_connect(self->selector, "dcp-selected", G_CALLBACK(dcp_profile_selected), self); g_signal_connect(self->selector, "icc-selected", G_CALLBACK(icc_profile_selected), self); g_signal_connect(self->selector, "add-selected", G_CALLBACK(add_profile_selected), self); gtk_box_pack_start(self->toolbox, GTK_WIDGET(self->selector), FALSE, FALSE, 0); for(page=0;page<3;page++) self->settings[page] = NULL; /* Set up our scrolled window */ gtk_scrolled_window_set_policy(scrolled_window, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); gtk_scrolled_window_set_hadjustment(scrolled_window, NULL); gtk_scrolled_window_set_vadjustment(scrolled_window, NULL); #ifndef WIN32 /* Get a GConfClient */ self->gconf = gconf_client_get_default(); #endif /* Snapshot labels */ label[0] = gtk_label_new(_(" A ")); label[1] = gtk_label_new(_(" B ")); label[2] = gtk_label_new(_(" C ")); /* A notebook for the snapshots */ self->notebook = gtk_notebook_new(); g_signal_connect(self->notebook, "switch-page", G_CALLBACK(notebook_switch_page), self); /* Iterate over 3 snapshots */ for(page=0;page<3;page++) gtk_notebook_append_page(GTK_NOTEBOOK(self->notebook), new_snapshot_page(self, page), label[page]); gtk_box_pack_start(self->toolbox, self->notebook, FALSE, FALSE, 0); self->transforms = new_transform(self, TRUE); gtk_box_pack_start(self->toolbox, self->transforms, FALSE, FALSE, 0); /* Histogram */ self->histogram = rs_histogram_new(); if (!rs_conf_get_integer(CONF_HISTHEIGHT, &height)) height = 70; gtk_widget_set_size_request(self->histogram, 64, height); /* FIXME: Get height from gconf */ gtk_box_pack_start(self->toolbox, gui_box(_("Histogram"), self->histogram, "show_histogram", TRUE), FALSE, FALSE, 0); /* Watch out for gconf-changes */ #ifndef WIN32 self->histogram_connection = gconf_client_notify_add(self->gconf, "/apps/" PACKAGE "/histogram_height", conf_histogram_height_changed, self, NULL, NULL); #endif /* Pack everything nice with scrollers */ viewport = gtk_viewport_new (gtk_scrolled_window_get_hadjustment (scrolled_window), gtk_scrolled_window_get_vadjustment (scrolled_window)); gtk_container_add (GTK_CONTAINER (viewport), GTK_WIDGET(self->toolbox)); gtk_container_add (GTK_CONTAINER (scrolled_window), viewport); rs_toolbox_set_selected_snapshot(self, 0); rs_toolbox_set_photo(self, NULL); self->mute_from_sliders = FALSE; self->mute_from_photo = FALSE; } static void dcp_profile_selected(RSProfileSelector *selector, RSDcpFile *dcp, RSToolbox *toolbox) { if (toolbox->photo) rs_photo_set_dcp_profile(toolbox->photo, dcp); } static void icc_profile_selected(RSProfileSelector *selector, RSIccProfile *icc, RSToolbox *toolbox) { if (toolbox->photo) rs_photo_set_icc_profile(toolbox->photo, icc); } static void add_profile_selected(RSProfileSelector *selector, RSToolbox *toolbox) { rs_core_action_group_activate("AddProfile"); } #ifndef WIN32 static void conf_histogram_height_changed(GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data) { RSToolbox *toolbox = RS_TOOLBOX(user_data); if (entry->value) { gint height = gconf_value_get_int(entry->value); height = CLAMP(height, 30, 500); gtk_widget_set_size_request(toolbox->histogram, 64, height); } } #endif static void notebook_switch_page(GtkNotebook *notebook, GtkNotebookPage *page, guint page_num, RSToolbox *toolbox) { toolbox->selected_snapshot = page_num; /* Propagate event */ g_signal_emit(toolbox, signals[SNAPSHOT_CHANGED], 0, toolbox->selected_snapshot); if (toolbox->photo) photo_settings_changed(toolbox->photo, page_num<<24|MASK_ALL, toolbox); } static void basic_range_value_changed(GtkRange *range, gpointer user_data) { RSToolbox *toolbox = RS_TOOLBOX(user_data); if (!toolbox->mute_from_sliders && toolbox->photo) { /* Remember which snapshot we belong to */ gint snapshot = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(range), "rs-snapshot")); gfloat value = gtk_range_get_value(range); BasicSettings *basic = g_object_get_data(G_OBJECT(range), "rs-basic"); if (snapshot != 0 && (basic->mask & (MASK_TCA_KR | MASK_TCA_KB | MASK_VIGNETTING)) != 0) return; else g_object_set(toolbox->photo->settings[snapshot], basic->property_name, value, NULL); } if (toolbox->photo) { GtkAdjustment *adjustment = gtk_range_get_adjustment(range); gdouble upper = gtk_adjustment_get_upper(adjustment); /* Always label ... What?! */ GtkLabel *label = g_object_get_data(G_OBJECT(range), "rs-value-label"); if (upper >= 99.0) gui_label_set_text_printf(label, "%.0f", gtk_range_get_value(range)); else gui_label_set_text_printf(label, "%.2f", gtk_range_get_value(range)); } } static gboolean basic_range_reset(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { BasicSettings *basic = g_object_get_data(G_OBJECT(user_data), "rs-basic"); RSToolbox *toolbox = g_object_get_data(G_OBJECT(user_data), "rs-toolbox"); gint snapshot = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(user_data), "rs-snapshot")); g_assert(basic != NULL); g_assert(RS_IS_TOOLBOX(toolbox)); gint mask = basic->mask; /* If we reset warmth or tint slider, we go back to camera whitebalance */ if (toolbox->photo && 0 != (mask & MASK_WB)) { rs_photo_set_wb_from_camera(toolbox->photo, snapshot); } else if (toolbox->photo) { RSCameraDb *db = rs_camera_db_get_singleton(); gpointer p; RSSettings *s[3]; if (rs_camera_db_photo_get_defaults(db, toolbox->photo, s, &p) && s[snapshot] && RS_IS_SETTINGS(s[snapshot])) { rs_settings_copy(s[snapshot], mask, toolbox->photo->settings[snapshot]); } else rs_object_class_property_reset(G_OBJECT(toolbox->photo->settings[snapshot]), basic->property_name); if (snapshot != 0 && (mask & (MASK_TCA_KR | MASK_TCA_KB |MASK_VIGNETTING)) != 0) rs_settings_copy(s[snapshot], mask, toolbox->photo->settings[0]); } return TRUE; } static gboolean value_label_scroll(GtkWidget *widget, GdkEventScroll *event, gpointer user_data) { GtkRange *range = GTK_RANGE(user_data); gdouble value = gtk_range_get_value(range); if (event->direction == GDK_SCROLL_UP) gtk_range_set_value(range, value+0.01); else gtk_range_set_value(range, value-0.01); return TRUE; } static gboolean value_enterleaveclick(GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) { switch (event->type) { case GDK_ENTER_NOTIFY: gtk_widget_set_state(gtk_bin_get_child(GTK_BIN(widget)), GTK_STATE_PRELIGHT); break; case GDK_LEAVE_NOTIFY: gtk_widget_set_state(gtk_bin_get_child(GTK_BIN(widget)), GTK_STATE_NORMAL); break; case GDK_BUTTON_PRESS: { GtkRange *range = GTK_RANGE(user_data); GtkWidget *popup; /* Check if we can find a hidden window and just re-use that */ if ((popup = g_object_get_data(G_OBJECT(range), "rs-popup"))) { gtk_window_present(GTK_WINDOW(popup)); break; } const gchar *blurp = g_object_get_data(G_OBJECT(range), "rs-blurb"); GtkAdjustment* adjustment = gtk_range_get_adjustment(range); GtkWidget *spinner = gtk_spin_button_new(adjustment, gtk_adjustment_get_step_increment(adjustment)/10.0, (gtk_adjustment_get_upper(adjustment) > 99.0) ? 0 : 3); popup = gtk_window_new(GTK_WINDOW_TOPLEVEL); GtkWidget *label = gtk_label_new(blurp); GtkWidget *box = gtk_hbox_new(FALSE, 10); gtk_window_set_title(GTK_WINDOW(popup), blurp); gtk_window_set_position(GTK_WINDOW(popup), GTK_WIN_POS_MOUSE); gtk_window_set_transient_for(GTK_WINDOW(popup), rawstudio_window); gtk_window_set_type_hint(GTK_WINDOW(popup), GDK_WINDOW_TYPE_HINT_UTILITY); gtk_box_pack_start(GTK_BOX(box), label, FALSE, TRUE, 5); gtk_box_pack_start(GTK_BOX(box), GTK_WIDGET(spinner), FALSE, TRUE, 0); gtk_container_set_border_width(GTK_CONTAINER(box), 10); gtk_container_add(GTK_CONTAINER(popup), box); /* We save this for later by hiding it instead of closing */ g_object_set_data(G_OBJECT(range), "rs-popup", popup); g_signal_connect (popup, "delete-event", G_CALLBACK(gtk_widget_hide_on_delete), NULL); gtk_widget_show_all(popup); } default: break; } /* Propagate - might result in a hover */ return FALSE; } static GtkRange * basic_slider(RSToolbox *toolbox, const gint snapshot, GtkTable *table, const gint row, const BasicSettings *basic) { static RSSettings *settings; static GStaticMutex lock = G_STATIC_MUTEX_INIT; g_static_mutex_lock(&lock); if (!settings) settings = rs_settings_new(); g_static_mutex_unlock(&lock); GParamSpec *spec = g_object_class_find_property(G_OBJECT_GET_CLASS(settings), basic->property_name); GParamSpecFloat *fspec = G_PARAM_SPEC_FLOAT(spec); GtkWidget *label = gui_label_new_with_mouseover(g_param_spec_get_nick(spec), _("Reset")); gtk_widget_set_tooltip_text(label, g_strconcat(g_param_spec_get_blurb(spec),_(". Click to reset value"), NULL)); GtkWidget *seperator1 = gtk_vseparator_new(); GtkWidget *seperator2 = gtk_vseparator_new(); GtkWidget *scale = gtk_hscale_new_with_range(fspec->minimum, fspec->maximum, basic->step); GtkWidget *event = gtk_event_box_new(); GtkWidget *value_label = gtk_label_new(NULL); gtk_widget_set_tooltip_text(value_label, g_strconcat(g_param_spec_get_blurb(spec),_(". Click to edit value"), NULL)); gtk_scale_set_draw_value(GTK_SCALE(scale), FALSE); /* Set default value */ gtk_range_set_value(GTK_RANGE(scale), fspec->default_value); gtk_widget_set_sensitive(scale, FALSE); /* Remember which snapshot we belong to */ g_object_set_data(G_OBJECT(scale), "rs-snapshot", GINT_TO_POINTER(snapshot)); g_object_set_data(G_OBJECT(scale), "rs-basic", (gpointer) basic); g_object_set_data(G_OBJECT(scale), "rs-value-label", value_label); g_object_set_data(G_OBJECT(scale), "rs-toolbox", toolbox); g_object_set_data(G_OBJECT(scale), "rs-blurb", (gpointer) g_param_spec_get_blurb(spec)); gtk_scale_set_value_pos(GTK_SCALE(scale), GTK_POS_RIGHT); g_signal_connect(scale, "value-changed", G_CALLBACK(basic_range_value_changed), toolbox); gtk_widget_set_events(label, GDK_BUTTON_PRESS_MASK); g_signal_connect(label, "button_press_event", G_CALLBACK (basic_range_reset), GTK_RANGE(scale)); if (fspec->maximum >= 99.0) gui_label_set_text_printf(GTK_LABEL(value_label), "%.0f", fspec->default_value); else gui_label_set_text_printf(GTK_LABEL(value_label), "%.2f", fspec->default_value); gtk_label_set_width_chars(GTK_LABEL(value_label), 5); gtk_widget_set_events(event, GDK_SCROLL_MASK|GDK_ENTER_NOTIFY_MASK|GDK_LEAVE_NOTIFY_MASK|GDK_BUTTON_PRESS_MASK); gtk_container_add(GTK_CONTAINER(event), value_label); g_signal_connect(event, "scroll-event", G_CALLBACK (value_label_scroll), GTK_RANGE(scale)); g_signal_connect(event, "button-press-event", G_CALLBACK (value_enterleaveclick), GTK_RANGE(scale)); g_signal_connect(event, "enter-notify-event", G_CALLBACK(value_enterleaveclick), NULL); g_signal_connect(event, "leave-notify-event", G_CALLBACK(value_enterleaveclick), NULL); gtk_table_attach(table, label, 0, 1, row, row+1, GTK_SHRINK|GTK_FILL, GTK_SHRINK, 0, 0); gtk_table_attach(table, seperator1, 1, 2, row, row+1, GTK_SHRINK, GTK_FILL, 0, 0); gtk_table_attach(table, scale, 2, 3, row, row+1, GTK_EXPAND|GTK_FILL, GTK_SHRINK, 0, 0); gtk_table_attach(table, seperator2, 3, 4, row, row+1, GTK_SHRINK, GTK_FILL, 0, 0); gtk_table_attach(table, event, 4, 5, row, row+1, GTK_SHRINK, GTK_SHRINK, 0, 0); return GTK_RANGE(scale); } static void curve_changed(GtkWidget *widget, gpointer user_data) { RSToolbox *toolbox = RS_TOOLBOX(user_data); /* Remember which snapshot we belong to */ gint snapshot = GPOINTER_TO_INT(g_object_get_data(G_OBJECT(widget), "rs-snapshot")); if (toolbox->mute_from_sliders) return; /* Copy curve to photo if any */ if (toolbox->photo) { gfloat *knots; guint nknots; toolbox->mute_from_photo = TRUE; rs_curve_widget_get_knots(RS_CURVE_WIDGET(toolbox->curve[snapshot]), &knots, &nknots); rs_settings_set_curve_knots(toolbox->photo->settings[snapshot], knots, nknots); g_free(knots); toolbox->mute_from_photo = FALSE; } } static void curve_context_callback_save(GtkMenuItem *menuitem, gpointer user_data) { RSCurveWidget *curve = RS_CURVE_WIDGET(user_data); GtkWidget *fc; gchar *dir; fc = gtk_file_chooser_dialog_new (_("Export File"), NULL, GTK_FILE_CHOOSER_ACTION_SAVE, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT, NULL); gtk_dialog_set_default_response(GTK_DIALOG(fc), GTK_RESPONSE_ACCEPT); #if GTK_CHECK_VERSION(2,8,0) gtk_file_chooser_set_do_overwrite_confirmation (GTK_FILE_CHOOSER (fc), TRUE); #endif /* Set default directory */ dir = g_build_filename(rs_confdir_get(), "curves", NULL); g_mkdir_with_parents(dir, 00755); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (fc), dir); g_free(dir); if (gtk_dialog_run (GTK_DIALOG (fc)) == GTK_RESPONSE_ACCEPT) { char *filename; filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (fc)); if (filename) { if (!g_str_has_suffix(filename, ".rscurve")) { GString *gs; gs = g_string_new(filename); g_string_append(gs, ".rscurve"); g_free(filename); filename = gs->str; g_string_free(gs, FALSE); } rs_curve_widget_save(curve, filename); g_free(filename); } } gtk_widget_destroy(fc); } static void curve_context_callback_open(GtkMenuItem *menuitem, gpointer user_data) { RSCurveWidget *curve = RS_CURVE_WIDGET(user_data); GtkWidget *fc; gchar *dir; fc = gtk_file_chooser_dialog_new (_("Open curve ..."), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); gtk_dialog_set_default_response(GTK_DIALOG(fc), GTK_RESPONSE_ACCEPT); /* Set default directory */ dir = g_build_filename(rs_confdir_get(), "curves", NULL); g_mkdir_with_parents(dir, 00755); gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (fc), dir); g_free(dir); if (gtk_dialog_run (GTK_DIALOG (fc)) == GTK_RESPONSE_ACCEPT) { char *filename; filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (fc)); if (filename) { rs_curve_widget_load(curve, filename); g_free(filename); } } gtk_widget_destroy(fc); } static void curve_context_callback_reset(GtkMenuItem *menuitem, gpointer user_data) { RSCurveWidget *curve = RS_CURVE_WIDGET(user_data); gulong handler = g_signal_handler_find(curve, G_SIGNAL_MATCH_FUNC, 0, 0, NULL, curve_changed, NULL); g_signal_handler_block(curve, handler); rs_curve_widget_reset(curve); rs_curve_widget_add_knot(curve, 0.0,0.0); g_signal_handler_unblock(curve, handler); rs_curve_widget_add_knot(curve, 1.0,1.0); } static void curve_context_callback_white_black_point(GtkMenuItem *menuitem, gpointer user_data) { /* FIXME: Stub. Convert this to an action */ } static void curve_context_callback_preset(GtkMenuItem *menuitem, gpointer user_data) { RSCurveWidget *curve = RS_CURVE_WIDGET(user_data); gchar *filename; filename = g_object_get_data(G_OBJECT(menuitem), "filename"); if (filename) { gchar *fullname = g_build_filename(rs_confdir_get(), "curves", filename, NULL); rs_curve_widget_load(curve, fullname); g_free(fullname); } } static void rs_gtk_menu_item_set_label(GtkMenuItem *menu_item, const gchar *label) { #if GTK_CHECK_VERSION(2,16,0) gtk_menu_item_set_label(menu_item, label); #else GtkWidget *child = gtk_bin_get_child(GTK_BIN(menu_item)); gtk_label_set_label(GTK_LABEL(child), label ? label : ""); #endif /* GTK_CHECK_VERSION(2,16,0) */ } static void curve_context_callback(GtkWidget *widget, gpointer user_data) { GtkWidget *i, *menu = gtk_menu_new(); gint n=0; const gchar *filename; GList *list = NULL; gchar *dirpath = g_build_filename(rs_confdir_get(), "curves", NULL); GDir *dir = g_dir_open(dirpath, 0, NULL); if (dir) { while((filename = g_dir_read_name(dir))) if (g_str_has_suffix(filename, ".rscurve")) list = g_list_prepend(list, g_strdup(filename)); g_dir_close(dir); } g_free(dirpath); list = g_list_sort(list, (GCompareFunc) g_strcmp0); GList *p = list; while (p) { gchar *name = (gchar *) p->data; gchar *ext = g_strrstr(name, ".rscurve"); if (ext) { ext[0] = '\0'; if (n == 0) { i = gtk_image_menu_item_new_with_label(_("Select Saved Curve")); gtk_widget_show (i); gtk_menu_attach (GTK_MENU (menu), i, 0, 1, n, n+1); n++; } i = gtk_image_menu_item_new_from_stock(GTK_STOCK_REVERT_TO_SAVED, NULL); rs_gtk_menu_item_set_label(GTK_MENU_ITEM(i), name); gtk_widget_show (i); gtk_menu_attach (GTK_MENU (menu), i, 0, 1, n, n+1); n++; g_signal_connect (i, "activate", G_CALLBACK (curve_context_callback_preset), widget); ext[0] = '.'; g_object_set_data_full(G_OBJECT(i), "filename", name, g_free); } else g_free(name); p = g_list_next(p); } g_list_free(list); /* If any files were added before this, add a seperator */ if (n > 0) { i = gtk_separator_menu_item_new(); gtk_widget_show (i); gtk_menu_attach (GTK_MENU (menu), i, 0, 1, n, n+1); n++; } i = gtk_image_menu_item_new_with_label (_("Select Action")); gtk_widget_show (i); gtk_menu_attach (GTK_MENU (menu), i, 0, 1, n, n+1); n++; i = gtk_image_menu_item_new_from_stock(GTK_STOCK_OPEN, NULL); rs_gtk_menu_item_set_label(GTK_MENU_ITEM(i), _("Open curve ...")); gtk_widget_show (i); gtk_menu_attach (GTK_MENU (menu), i, 0, 1, n, n+1); n++; g_signal_connect (i, "activate", G_CALLBACK (curve_context_callback_open), widget); i = gtk_image_menu_item_new_from_stock(GTK_STOCK_SAVE_AS, NULL); rs_gtk_menu_item_set_label(GTK_MENU_ITEM(i), _("Save curve as ...")); gtk_widget_show (i); gtk_menu_attach (GTK_MENU (menu), i, 0, 1, n, n+1); n++; g_signal_connect (i, "activate", G_CALLBACK (curve_context_callback_save), widget); i = gtk_image_menu_item_new_from_stock(GTK_STOCK_REFRESH, NULL); rs_gtk_menu_item_set_label(GTK_MENU_ITEM(i), _("Reset curve")); gtk_widget_show (i); gtk_menu_attach (GTK_MENU (menu), i, 0, 1, n, n+1); n++; g_signal_connect (i, "activate", G_CALLBACK (curve_context_callback_reset), widget); i = gtk_menu_item_new_with_label (_("Auto adjust curve ends")); gtk_widget_show (i); gtk_menu_attach (GTK_MENU (menu), i, 0, 1, n, n+1); n++; g_signal_connect (i, "activate", G_CALLBACK (curve_context_callback_white_black_point), NULL); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); } static GtkWidget* basic_label(RSToolbox *toolbox, const gint snapshot, GtkTable *table, const gint row, GtkWidget *widget) { GtkWidget *label = gtk_label_new(NULL); if (widget) { GtkWidget *hbox = gtk_hbox_new(FALSE, 2); gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 2); gtk_box_pack_start(GTK_BOX(hbox), widget, TRUE, TRUE, 2); gtk_table_attach(table, hbox, 0, 5, 0, 1, GTK_EXPAND, GTK_FILL, 0, 0); } else { gtk_table_attach(table, label, 0, 5, 0, 1, GTK_EXPAND, GTK_FILL, 0, 0); } return label; } void toolbox_edit_lens_clicked(GtkButton *button, gpointer user_data) { gint i; RSToolbox *toolbox = user_data; if (toolbox->rs_lens) { gtk_dialog_run(rs_lens_db_editor_single_lens(toolbox->rs_lens)); /* Make sure we set to all 3 snapshots */ for(i=0; i<3; i++) toolbox_lens_set_label(toolbox, i); RSLensDb *lens_db = rs_lens_db_get_default(); rs_lens_db_save(lens_db); rs_photo_lens_updated(toolbox->photo); } } static GtkWidget * new_snapshot_page(RSToolbox *toolbox, const gint snapshot) { GtkWidget *vbox = gtk_vbox_new(FALSE, 1); GtkTable *table, *channelmixertable, *lenstable; gint row; table = GTK_TABLE(gtk_table_new(NBASICS, 5, FALSE)); channelmixertable = GTK_TABLE(gtk_table_new(NCHANNELMIXER, 5, FALSE)); lenstable = GTK_TABLE(gtk_table_new(NLENS, 5, FALSE)); /* Add basic sliders */ for(row=0;rowranges[snapshot][row] = basic_slider(toolbox, snapshot, table, row, &basic[row]); for(row=0;rowchannelmixer[snapshot][row] = basic_slider(toolbox, snapshot, channelmixertable, row, &channelmixer[row]); /* ROW HARDCODED TO 0 */ toolbox->lensbutton[snapshot] = gtk_button_new_with_label(_("Edit lens")); toolbox->lenslabel[snapshot] = basic_label(toolbox, snapshot, lenstable, row, toolbox->lensbutton[snapshot]); toolbox_lens_set_label(toolbox, snapshot); gtk_signal_connect(GTK_OBJECT(toolbox->lensbutton[snapshot]), "clicked", G_CALLBACK(toolbox_edit_lens_clicked), toolbox); /* We already used one row in the table for the label, so we'll add 1 to the row argument */ for(row=0;rowlens[snapshot][row] = basic_slider(toolbox, snapshot, lenstable, row+1, &lens[row]); /* Add curve editor */ toolbox->curve[snapshot] = rs_curve_widget_new(); g_object_set_data(G_OBJECT(toolbox->curve[snapshot]), "rs-snapshot", GINT_TO_POINTER(snapshot)); g_signal_connect(toolbox->curve[snapshot], "changed", G_CALLBACK(curve_changed), toolbox); g_signal_connect(toolbox->curve[snapshot], "right-click", G_CALLBACK(curve_context_callback), NULL); /* Pack everything nice */ gtk_box_pack_start(GTK_BOX(vbox), gui_box(_("Basic"), GTK_WIDGET(table), "show_basic", TRUE), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), gui_box(_("Channel Mixer"), GTK_WIDGET(channelmixertable), "show_channelmixer", TRUE), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), gui_box(_("Lens Correction"), GTK_WIDGET(lenstable), "show_lens", TRUE), FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX(vbox), gui_box(_("Curve"), toolbox->curve[snapshot], "show_curve", TRUE), FALSE, FALSE, 0); return vbox; } static void gui_transform_rot90_clicked(GtkWidget *w, RS_BLOB *rs) { rs_core_action_group_activate("RotateClockwise"); } static void gui_transform_rot270_clicked(GtkWidget *w, RS_BLOB *rs) { rs_core_action_group_activate("RotateCounterClockwise"); } static void gui_transform_mirror_clicked(GtkWidget *w, RS_BLOB *rs) { rs_core_action_group_activate("Mirror"); } static void gui_transform_flip_clicked(GtkWidget *w, RS_BLOB *rs) { rs_core_action_group_activate("Flip"); } static GtkWidget * new_transform(RSToolbox *toolbox, gboolean show) { GtkWidget *hbox; GtkWidget *flip; GtkWidget *mirror; GtkWidget *rot90; GtkWidget *rot270; hbox = gtk_hbox_new(FALSE, 0); flip = gtk_button_new_from_stock(RS_STOCK_FLIP); mirror = gtk_button_new_from_stock(RS_STOCK_MIRROR); rot90 = gtk_button_new_from_stock(RS_STOCK_ROTATE_CLOCKWISE); rot270 = gtk_button_new_from_stock(RS_STOCK_ROTATE_COUNTER_CLOCKWISE); gui_tooltip_window(flip, _("Flip the photo over the x-axis"), NULL); gui_tooltip_window(mirror, _("Mirror the photo over the y-axis"), NULL); gui_tooltip_window(rot90, _("Rotate the photo 90 degrees clockwise"), NULL); gui_tooltip_window(rot270, _("Rotate the photo 90 degrees counter clockwise"), NULL); g_signal_connect(flip, "clicked", G_CALLBACK (gui_transform_flip_clicked), NULL); g_signal_connect(mirror, "clicked", G_CALLBACK (gui_transform_mirror_clicked), NULL); g_signal_connect(rot90, "clicked", G_CALLBACK (gui_transform_rot90_clicked), NULL); g_signal_connect(rot270, "clicked", G_CALLBACK (gui_transform_rot270_clicked), NULL); gtk_box_pack_start(GTK_BOX (hbox), flip, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX (hbox), mirror, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX (hbox), rot270, FALSE, FALSE, 0); gtk_box_pack_start(GTK_BOX (hbox), rot90, FALSE, FALSE, 0); return gui_box(_("Transforms"), hbox, "show_transforms", show); } GtkWidget * rs_toolbox_new(void) { return g_object_new (RS_TYPE_TOOLBOX, NULL); } static void photo_profile_changed(RS_PHOTO *photo, gpointer profile, gpointer user_data) { RSToolbox *toolbox = RS_TOOLBOX(user_data); if (toolbox->mute_from_sliders) return; /* Update histogram */ rs_histogram_redraw(RS_HISTOGRAM_WIDGET(toolbox->histogram)); /* Update histogram in curve editor */ rs_curve_draw_histogram(RS_CURVE_WIDGET(toolbox->curve[toolbox->selected_snapshot])); /* Update GUI */ if (rs_photo_get_dcp_profile(photo)) rs_profile_selector_select_profile(toolbox->selector, rs_photo_get_dcp_profile(photo)); if (rs_photo_get_icc_profile(photo)) rs_profile_selector_select_profile(toolbox->selector, rs_photo_get_icc_profile(photo)); } static void photo_settings_changed(RS_PHOTO *photo, RSSettingsMask mask, gpointer user_data) { const gint snapshot = mask>>24; mask &= 0x00ffffff; RSToolbox *toolbox = RS_TOOLBOX(user_data); if (!toolbox->mute_from_photo) toolbox_copy_from_photo(toolbox, snapshot, mask, photo); if (mask) { rs_filter_set_recursive(toolbox->histogram_input, "bounding-box", TRUE, "orientation", photo->orientation, "rectangle", rs_photo_get_crop(photo), "angle", rs_photo_get_angle(photo), "settings", photo->settings[toolbox->selected_snapshot], NULL); } /* Update histogram */ rs_histogram_redraw(RS_HISTOGRAM_WIDGET(toolbox->histogram)); /* Update histogram in curve editor */ rs_curve_draw_histogram(RS_CURVE_WIDGET(toolbox->curve[toolbox->selected_snapshot])); } static void photo_wb_changed(RSSettings *settings, gpointer user_data) { RSToolbox *toolbox = RS_TOOLBOX(user_data); if (toolbox->mute_from_photo) return; gint snapshot; for(snapshot=0;snapshot<3;snapshot++) { if (settings == toolbox->photo->settings[snapshot]) { photo_settings_changed(toolbox->photo, MASK_WB|(snapshot<<24), toolbox); } } } static void photo_spatial_changed(RS_PHOTO *photo, gpointer user_data) { RSToolbox *toolbox = RS_TOOLBOX(user_data); /* Force update of histograms */ photo_settings_changed(photo, MASK_ALL, toolbox); /* FIXME: Deal with curve */ } static void photo_finalized(gpointer data, GObject *where_the_object_was) { gint snapshot,i; RSToolbox *toolbox = RS_TOOLBOX(data); toolbox->photo = NULL; /* Reset all sliders and make them insensitive */ for(snapshot=0;snapshot<3;snapshot++) { for(i=0;iranges[snapshot][i]), FALSE); } for(i=0;ichannelmixer[snapshot][i]), FALSE); } for(i=0;ilens[snapshot][i]), FALSE); } rs_curve_widget_reset(RS_CURVE_WIDGET(toolbox->curve[snapshot])); rs_curve_widget_add_knot(RS_CURVE_WIDGET(toolbox->curve[snapshot]), 0.0,0.0); rs_curve_widget_add_knot(RS_CURVE_WIDGET(toolbox->curve[snapshot]), 1.0,1.0); } } static void toolbox_copy_from_photo(RSToolbox *toolbox, const gint snapshot, const RSSettingsMask mask, RS_PHOTO *photo) { gint i; if (mask) { toolbox->mute_from_sliders = TRUE; /* Update basic sliders */ for(i=0;iphoto->settings[snapshot], basic[i].property_name, &value, NULL); gtk_range_set_value(toolbox->ranges[snapshot][i], value); } /* Update channel mixer */ for(i=0;iphoto->settings[snapshot], channelmixer[i].property_name, &value, NULL); gtk_range_set_value(toolbox->channelmixer[snapshot][i], value); } /* Update lens */ for(i=0;iphoto->settings[snapshot], lens[i].property_name, &value, NULL); gtk_range_set_value(toolbox->lens[snapshot][i], value); /* NOTICE: This disables sliders on B+C pages */ if (snapshot != 0) gtk_widget_set_sensitive(GTK_WIDGET(toolbox->lens[snapshot][i]), FALSE); } /* Update curve */ if(mask & MASK_CURVE) { gfloat *knots = rs_settings_get_curve_knots(toolbox->photo->settings[snapshot]); gint nknots = rs_settings_get_curve_nknots(toolbox->photo->settings[snapshot]); rs_curve_widget_reset(RS_CURVE_WIDGET(toolbox->curve[snapshot])); rs_curve_widget_set_knots(RS_CURVE_WIDGET(toolbox->curve[snapshot]), knots, nknots); g_free(knots); } toolbox->mute_from_sliders = FALSE; } } void toolbox_lens_set_label(RSToolbox *toolbox, gint snapshot) { const gchar *lens_text = NULL; if(toolbox->rs_lens) { if (!rs_lens_get_lensfun_model(toolbox->rs_lens)) lens_text = _("Lens Unknown"); else if (!rs_lens_get_lensfun_enabled(toolbox->rs_lens)) lens_text = _("Lens Disabled"); else lens_text = rs_lens_get_lensfun_model(toolbox->rs_lens); gtk_widget_set_sensitive(GTK_WIDGET(toolbox->lensbutton[snapshot]), TRUE); } else if(toolbox->photo) { if (!toolbox->photo->metadata->lens_identifier) lens_text = _("No Lens Information"); else lens_text = _("Camera Unknown"); gtk_widget_set_sensitive(GTK_WIDGET(toolbox->lensbutton[snapshot]), FALSE); } else { lens_text = _("No Photo"); gtk_widget_set_sensitive(GTK_WIDGET(toolbox->lensbutton[snapshot]), FALSE); } GString *temp = g_string_new(lens_text); if (temp->len > 25) { temp = g_string_set_size(temp, 22); temp = g_string_append(temp, "..."); } gtk_label_set_markup(GTK_LABEL(toolbox->lenslabel[snapshot]), g_strdup_printf("%s", temp->str)); GtkTooltips *tooltips = gtk_tooltips_new(); gtk_tooltips_set_tip(tooltips, toolbox->lenslabel[snapshot], lens_text, NULL); } void rs_toolbox_set_photo(RSToolbox *toolbox, RS_PHOTO *photo) { gint snapshot; gint i; g_assert (RS_IS_TOOLBOX(toolbox)); g_assert (RS_IS_PHOTO(photo) || (photo == NULL)); if (toolbox->photo) g_object_weak_unref(G_OBJECT(toolbox->photo), (GWeakNotify) photo_finalized, toolbox); toolbox->photo = photo; toolbox->mute_from_sliders = TRUE; if (toolbox->photo) { g_object_weak_ref(G_OBJECT(toolbox->photo), (GWeakNotify) photo_finalized, toolbox); g_signal_connect(G_OBJECT(toolbox->photo), "settings-changed", G_CALLBACK(photo_settings_changed), toolbox); g_signal_connect(G_OBJECT(toolbox->photo), "spatial-changed", G_CALLBACK(photo_spatial_changed), toolbox); g_signal_connect(G_OBJECT(toolbox->photo), "profile-changed", G_CALLBACK(photo_profile_changed), toolbox); for(snapshot=0;snapshot<3;snapshot++) { /* Copy all settings */ g_signal_connect(G_OBJECT(toolbox->photo->settings[snapshot]), "wb-recalculated", G_CALLBACK(photo_wb_changed), toolbox); toolbox_copy_from_photo(toolbox, snapshot, MASK_ALL, toolbox->photo); toolbox->mute_from_sliders = TRUE; /* Set the basic types sensitive */ for(i=0;iranges[snapshot][i]), TRUE); for(i=0;ichannelmixer[snapshot][i]), TRUE); if (photo->metadata->lens_identifier) { RSLensDb *lens_db = rs_lens_db_get_default(); toolbox->rs_lens = rs_lens_db_get_from_identifier(lens_db, photo->metadata->lens_identifier); } else { toolbox->rs_lens = NULL; } toolbox_lens_set_label(toolbox, snapshot); for(i=0;ilens[snapshot][i]), TRUE); } } else /* This will reset everything */ photo_finalized(toolbox, NULL); /* Enable Embedded Profile, if present */ gboolean embedded_present = photo && (!!photo->embedded_profile); if (embedded_present && photo->input_response) { RSProfileFactory *factory = rs_profile_factory_new_default(); RSColorSpace *input_space = rs_filter_param_get_object_with_type(RS_FILTER_PARAM(photo->input_response), "embedded-colorspace", RS_TYPE_COLOR_SPACE); if (input_space) { const RSIccProfile *icc_profile; icc_profile = rs_color_space_get_icc_profile(input_space, TRUE); rs_profile_factory_set_embedded_profile(factory, icc_profile); embedded_present = TRUE; } else { rs_profile_factory_set_embedded_profile(factory, NULL); } } /* Update profile selector */ if (photo && photo->metadata) { RSProfileFactory *factory = rs_profile_factory_new_default(); GtkTreeModelFilter *filter; if (g_strcmp0(photo->metadata->make_ascii, toolbox->last_camera.make) != 0 || g_strcmp0(photo->metadata->model_ascii, toolbox->last_camera.model) != 0) { g_free(toolbox->last_camera.make); g_free(toolbox->last_camera.model); toolbox->last_camera.make = g_strdup(photo->metadata->make_ascii); toolbox->last_camera.model = g_strdup(photo->metadata->model_ascii); toolbox->last_camera.unique_id = rs_profile_camera_find(photo->metadata->make_ascii, photo->metadata->model_ascii); } if (embedded_present) filter = rs_dcp_factory_get_compatible_as_model(factory, "Embedded"); else if (toolbox->last_camera.unique_id) filter = rs_dcp_factory_get_compatible_as_model(factory, toolbox->last_camera.unique_id); else filter = rs_dcp_factory_get_compatible_as_model(factory, photo->metadata->model_ascii); rs_profile_selector_set_model_filter(toolbox->selector, filter); } /* Find current profile and mark it active */ if (photo) { RSDcpFile *dcp_profile = rs_photo_get_dcp_profile(photo); RSIccProfile *icc_profile = rs_photo_get_icc_profile(photo); if (embedded_present) gtk_combo_box_set_active(GTK_COMBO_BOX(toolbox->selector), 0); else if (dcp_profile) rs_profile_selector_select_profile(toolbox->selector, dcp_profile); else if (icc_profile) rs_profile_selector_select_profile(toolbox->selector, icc_profile); } toolbox->mute_from_sliders = FALSE; gtk_widget_set_sensitive(toolbox->transforms, !!(toolbox->photo)); } GtkWidget * rs_toolbox_add_widget(RSToolbox *toolbox, GtkWidget *widget, const gchar *title) { GtkWidget *ret = widget; g_assert(RS_IS_TOOLBOX(toolbox)); g_assert(GTK_IS_WIDGET(widget)); if (title) { ret = gtk_frame_new(title); gtk_container_set_border_width(GTK_CONTAINER(ret), 3); gtk_container_add(GTK_CONTAINER(ret), widget); } gtk_box_pack_start(toolbox->toolbox, ret, FALSE, FALSE, 1); return ret; } gint rs_toolbox_get_selected_snapshot(RSToolbox *toolbox) { g_assert(RS_IS_TOOLBOX(toolbox)); return toolbox->selected_snapshot; } void rs_toolbox_set_selected_snapshot(RSToolbox *toolbox, const gint snapshot) { gtk_notebook_set_page(GTK_NOTEBOOK(toolbox->notebook), snapshot); } void rs_toolbox_set_histogram_input(RSToolbox * toolbox, RSFilter *input, RSColorSpace *display_color_space) { int i; g_assert(RS_IS_TOOLBOX(toolbox)); g_assert(RS_IS_FILTER(input)); toolbox->histogram_input = input; rs_histogram_set_input(RS_HISTOGRAM_WIDGET(toolbox->histogram), input, display_color_space); for( i = 0 ; i < 3 ; i++) rs_curve_set_input(RS_CURVE_WIDGET(toolbox->curve[i]), input, display_color_space); } static void action_changed(GtkRadioAction *radioaction, GtkRadioAction *current, RSToolbox *toolbox) { gtk_notebook_set_current_page(GTK_NOTEBOOK(toolbox->notebook), gtk_radio_action_get_current_value(radioaction)); } static void action_previous(GtkAction *action, RSToolbox *toolbox) { gtk_notebook_prev_page(GTK_NOTEBOOK(toolbox->notebook)); } static void action_next(GtkAction *action, RSToolbox *toolbox) { gtk_notebook_next_page(GTK_NOTEBOOK(toolbox->notebook)); } extern void rs_toolbox_register_actions(RSToolbox *toolbox) { g_assert(RS_IS_TOOLBOX(toolbox)); GtkRadioActionEntry select_snapshot[] = { { "SnapshotA", NULL, _(" A "), NULL, NULL, 0 }, { "SnapshotB", NULL, _(" B "), NULL, NULL, 1 }, { "SnapshotC", NULL, _(" C "), NULL, NULL, 2 }, }; static guint n_select_snapshot = G_N_ELEMENTS (select_snapshot); GtkActionEntry actionentries[] = { { "SnapshotPrevious", GTK_STOCK_GO_BACK, _("_Previous"), "Page_Up", NULL, G_CALLBACK(action_previous) }, { "SnapshotNext", GTK_STOCK_GO_FORWARD, _("_Next"), "Page_Down", NULL, G_CALLBACK(action_next) }, }; static guint n_actionentries = G_N_ELEMENTS (actionentries); rs_core_action_group_add_radio_actions(select_snapshot, n_select_snapshot, 0, G_CALLBACK(action_changed), toolbox); rs_core_action_group_add_actions(actionentries, n_actionentries, toolbox); } extern void rs_toolbox_hover_value_updated(RSToolbox *toolbox, const guchar *rgb_value) { gint i; g_assert(RS_IS_TOOLBOX(toolbox)); rs_histogram_set_highlight(RS_HISTOGRAM_WIDGET(toolbox->histogram), rgb_value); for( i = 0 ; i < 3 ; i++) rs_curve_set_highlight(RS_CURVE_WIDGET(toolbox->curve[i]), rgb_value); } rawstudio-2.0/src/rs-navigator.h0000644000175000017500000000531211526533645013704 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_NAVIGATOR_H #define RS_NAVIGATOR_H #include #include #include G_BEGIN_DECLS #define RS_TYPE_NAVIGATOR rs_navigator_get_type() #define RS_NAVIGATOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_NAVIGATOR, RSNavigator)) #define RS_NAVIGATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_NAVIGATOR, RSNavigatorClass)) #define RS_IS_NAVIGATOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_NAVIGATOR)) #define RS_IS_NAVIGATOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_NAVIGATOR)) #define RS_NAVIGATOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_NAVIGATOR, RSNavigatorClass)) typedef struct { GtkDrawingArea parent; gint widget_width; gint widget_height; gint last_x; gint last_y; GtkAdjustment *vadjustment; GtkAdjustment *hadjustment; gulong vadjustment_signal1; gulong hadjustment_signal1; gulong vadjustment_signal2; gulong hadjustment_signal2; gdouble scale; RSFilter *cache; gint width; gint height; gint x; gint y; gint x_page; gint y_page; RSPreviewWidget *preview; RSColorSpace *display_color_space; } RSNavigator; typedef struct { GtkDrawingAreaClass parent_class; } RSNavigatorClass; GType rs_navigator_get_type(void); RSNavigator *rs_navigator_new(void); void rs_navigator_set_adjustments(RSNavigator *navigator, GtkAdjustment *vadjustment, GtkAdjustment *hadjustment); void rs_navigator_set_source_filter(RSNavigator *navigator, RSFilter *source_filter); void rs_navigator_set_preview_widget(RSNavigator *navigator, RSPreviewWidget *preview); /** * Set display colorspace * @param navigator A RSNavigator * @param colorspace An RSColorSpace that should be used to display the content of the navigator */ void rs_navigator_set_colorspace(RSNavigator *navigator, RSColorSpace *display_color_space); G_END_DECLS #endif /* RS_NAVIGATOR_H */ rawstudio-2.0/src/rs-navigator.c0000644000175000017500000002742511526533645013710 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-navigator.h" G_DEFINE_TYPE (RSNavigator, rs_navigator, GTK_TYPE_DRAWING_AREA) static gboolean button_press_event(GtkWidget *widget, GdkEventButton *event); static gboolean button_release_event(GtkWidget *widget, GdkEventButton *event); static gboolean motion_notify_event(GtkWidget *widget, GdkEventMotion *event); static gboolean expose(GtkWidget *widget, GdkEventExpose *event); static void size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data); static void h_changed(GtkAdjustment *adjustment, RSNavigator *navigator); static void v_changed(GtkAdjustment *adjustment, RSNavigator *navigator); static void h_value_changed(GtkAdjustment *adjustment, RSNavigator *navigator); static void v_value_changed(GtkAdjustment *adjustment, RSNavigator *navigator); static void filter_changed(RSFilter *filter, RSFilterChangedMask mask, RSNavigator *navigator); static void redraw(RSNavigator *navigator); static void rs_navigator_finalize(GObject *object) { RSNavigator *navigator = RS_NAVIGATOR(object); g_object_unref(navigator->cache); g_signal_handler_disconnect(navigator->vadjustment, navigator->vadjustment_signal1); g_signal_handler_disconnect(navigator->vadjustment, navigator->vadjustment_signal2); g_signal_handler_disconnect(navigator->hadjustment, navigator->hadjustment_signal1); g_signal_handler_disconnect(navigator->hadjustment, navigator->hadjustment_signal2); g_object_unref(navigator->vadjustment); g_object_unref(navigator->hadjustment); if (navigator->display_color_space) g_object_unref(navigator->display_color_space); G_OBJECT_CLASS (rs_navigator_parent_class)->finalize (object); } static void rs_navigator_class_init(RSNavigatorClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(klass); object_class->finalize = rs_navigator_finalize; widget_class->button_press_event = button_press_event; widget_class->button_release_event = button_release_event; widget_class->motion_notify_event = motion_notify_event; widget_class->expose_event = expose; } static void rs_navigator_init(RSNavigator *navigator) { navigator->cache = rs_filter_new("RSCache", NULL); g_signal_connect(navigator->cache, "changed", G_CALLBACK(filter_changed), navigator); g_signal_connect(navigator, "size-allocate", G_CALLBACK(size_allocate), NULL); gtk_widget_set_events(GTK_WIDGET(navigator), 0 | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK); gtk_widget_set_app_paintable(GTK_WIDGET(navigator), TRUE); navigator->display_color_space = NULL; } RSNavigator * rs_navigator_new(void) { return g_object_new(RS_TYPE_NAVIGATOR, NULL); } void rs_navigator_set_adjustments(RSNavigator *navigator, GtkAdjustment *vadjustment, GtkAdjustment *hadjustment) { g_assert(RS_IS_NAVIGATOR(navigator)); g_assert(GTK_IS_ADJUSTMENT(vadjustment)); g_assert(GTK_IS_ADJUSTMENT(hadjustment)); navigator->vadjustment = g_object_ref(vadjustment); navigator->hadjustment = g_object_ref(hadjustment); navigator->width = (gint) (gtk_adjustment_get_upper(hadjustment)+0.5); navigator->height = (gint) (gtk_adjustment_get_upper(vadjustment)+0.5); navigator->x = (gint) (gtk_adjustment_get_value(hadjustment)+0.5); navigator->y = (gint) (gtk_adjustment_get_value(vadjustment)+0.5); navigator->vadjustment_signal1 = g_signal_connect(vadjustment, "changed", G_CALLBACK(v_changed), navigator); navigator->vadjustment_signal2 = g_signal_connect(vadjustment, "value-changed", G_CALLBACK(v_value_changed), navigator); navigator->hadjustment_signal1 = g_signal_connect(hadjustment, "changed", G_CALLBACK(h_changed), navigator); navigator->hadjustment_signal2 = g_signal_connect(hadjustment, "value-changed", G_CALLBACK(h_value_changed), navigator); } void rs_navigator_set_source_filter(RSNavigator *navigator, RSFilter *source_filter) { g_assert(RS_IS_NAVIGATOR(navigator)); g_assert(RS_IS_FILTER(source_filter)); rs_filter_set_previous(navigator->cache, source_filter); } void rs_navigator_set_preview_widget(RSNavigator *navigator, RSPreviewWidget *preview) { g_assert(RS_IS_NAVIGATOR(navigator)); g_assert(RS_IS_PREVIEW_WIDGET(preview)); navigator->preview = preview; } static void get_placement(RSNavigator *navigator, GdkRectangle *placement) { rs_filter_get_size_simple(navigator->cache, RS_FILTER_REQUEST_QUICK, &placement->width, &placement->height); placement->x = navigator->widget_width/2 - placement->width/2; placement->y = navigator->widget_height/2 - placement->height/2; } static void move_to(RSNavigator *navigator, gdouble x, gdouble y) { if (navigator->widget_width && navigator->width && navigator->vadjustment && navigator->hadjustment) { GdkRectangle placement; get_placement(navigator, &placement); gdouble dx, dy; x -= placement.x; y -= placement.y; const gdouble scale = ((gdouble) placement.width) / navigator->width; /* Scale back to original size */ dx = ((gdouble) x) / scale; dy = ((gdouble) y) / scale; /* Center pointer */ dx -= navigator->x_page/2; dy -= navigator->y_page/2; /* Clamp */ dx = CLAMP(dx, 0, navigator->width - navigator->x_page - 1); dy = CLAMP(dy, 0, navigator->height - navigator->y_page - 1); /* Modify adjusters */ g_object_set(navigator->hadjustment, "value", dx, NULL); g_object_set(navigator->vadjustment, "value", dy, NULL); } } static gboolean button_press_event(GtkWidget *widget, GdkEventButton *event) { RSNavigator *navigator = RS_NAVIGATOR(widget); rs_preview_widget_quick_start(navigator->preview, TRUE); move_to(navigator, event->x, event->y); return TRUE; } static gboolean button_release_event(GtkWidget *widget, GdkEventButton *event) { RSNavigator *navigator = RS_NAVIGATOR(widget); move_to(navigator, event->x, event->y); rs_preview_widget_quick_end(navigator->preview); return TRUE; } static gboolean motion_notify_event(GtkWidget *widget, GdkEventMotion *event) { RSNavigator *navigator = RS_NAVIGATOR(widget); GdkWindow *window = widget->window; GdkModifierType mask; gint x, y; gdk_window_get_pointer(window, &x, &y, &mask); if ((x == navigator->last_x) && (y == navigator->last_y)) return TRUE; navigator->last_x = x; navigator->last_y = y; if (mask & (GDK_BUTTON1_MASK|GDK_BUTTON2_MASK|GDK_BUTTON3_MASK)) { move_to(navigator, (gdouble) x, (gdouble) y); } return TRUE; } static gboolean expose(GtkWidget *widget, GdkEventExpose *event) { redraw(RS_NAVIGATOR(widget)); return FALSE; } static void size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data) { RSNavigator *navigator = RS_NAVIGATOR(widget); navigator->widget_width = allocation->width; navigator->widget_height = allocation->height; redraw(navigator); } static void h_changed(GtkAdjustment *adjustment, RSNavigator *navigator) { gboolean do_redraw = FALSE; const gint width = (gint) (gtk_adjustment_get_upper(adjustment)+0.5); if (width != navigator->width) { navigator->width = width; do_redraw = TRUE; } const gint x_page = (gint) (gtk_adjustment_get_page_size(adjustment)+0.5); if (x_page != navigator->x_page) { navigator->x_page = x_page; do_redraw = TRUE; } if (do_redraw) redraw(navigator); } static void v_changed(GtkAdjustment *adjustment, RSNavigator *navigator) { gboolean do_redraw = FALSE; const gint height = (gint) (gtk_adjustment_get_upper(adjustment)+0.5); if (height != navigator->height) { navigator->height = height; do_redraw = TRUE; } const gint y_page = (gint) (gtk_adjustment_get_page_size(adjustment)+0.5); if (y_page != navigator->y_page) { navigator->y_page = y_page; do_redraw = TRUE; } if (do_redraw) redraw(navigator); } static void h_value_changed(GtkAdjustment *adjustment, RSNavigator *navigator) { const gint x = (gint) (gtk_adjustment_get_value(adjustment)+0.5); if (x != navigator->x) { navigator->x = x; redraw(navigator); } } static void v_value_changed(GtkAdjustment *adjustment, RSNavigator *navigator) { const gint y = (gint) (gtk_adjustment_get_value(adjustment)+0.5); if (y != navigator->y) { navigator->y = y; redraw(navigator); } } /** * Set display colorspace * @param navigator A RSNavigator * @param colorspace An RSColorSpace that should be used to display the content of the navigator */ void rs_navigator_set_colorspace(RSNavigator *navigator, RSColorSpace *display_color_space) { g_assert(RS_IS_NAVIGATOR(navigator)); g_object_ref(display_color_space); navigator->display_color_space = display_color_space; } static void filter_changed(RSFilter *filter, RSFilterChangedMask mask, RSNavigator *navigator) { redraw(navigator); } static void redraw(RSNavigator *navigator) { if ((navigator->widget_width==0) || (navigator->widget_height==0)) return; if (!GTK_WIDGET_DRAWABLE(GTK_WIDGET(navigator))) return; GtkWidget *widget = GTK_WIDGET(navigator); GdkDrawable *drawable = GDK_DRAWABLE(widget->window); GdkPixmap *blitter = gdk_pixmap_new(drawable, navigator->widget_width, navigator->widget_height, -1); cairo_t *cr = gdk_cairo_create(GDK_DRAWABLE(blitter)); GdkGC *gc = gdk_gc_new(GDK_DRAWABLE(blitter)); if (navigator->cache->previous) { RSFilterRequest *request = rs_filter_request_new(); rs_filter_request_set_quick(RS_FILTER_REQUEST(request), TRUE); rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", navigator->display_color_space); RSFilterResponse *response = rs_filter_get_image8(navigator->cache, request); g_object_unref(request); GdkPixbuf *pixbuf = rs_filter_response_get_image8(response); GdkRectangle placement, rect; rs_filter_get_size_simple(navigator->cache, RS_FILTER_REQUEST_QUICK, &placement.width, &placement.height); placement.x = navigator->widget_width/2 - placement.width/2; placement.y = navigator->widget_height/2 - placement.height/2; const gdouble scale = ((gdouble) placement.width) / navigator->width; cairo_set_source_rgba(cr, 0.5, 0.5, 0.5, 1.0); cairo_paint(cr); cairo_set_antialias(cr, CAIRO_ANTIALIAS_NONE); /* creates a rectangle that matches the photo */ gdk_cairo_rectangle(cr, &placement); /* Translate to image placement */ cairo_translate(cr, placement.x, placement.y); /* Paint the pixbuf */ gdk_cairo_set_source_pixbuf(cr, pixbuf, 0.0, 0.0); cairo_fill_preserve(cr); /* creates a rectangle that matches ROI */ rect.x = scale * navigator->x + 0.5; rect.y = scale * navigator->y + 0.5; rect.width = scale * navigator->x_page + 0.5; rect.height = scale * navigator->y_page + 0.5; gdk_cairo_rectangle(cr, &rect); cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD); cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 0.35); /* fill acording to rule */ cairo_fill_preserve (cr); /* roi rectangle */ cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0); cairo_stroke (cr); /* Draw white rectangle */ cairo_set_source_rgba (cr, 1.0, 1.0, 1.0, 0.5); gdk_cairo_rectangle(cr, &rect); cairo_stroke (cr); g_object_unref(pixbuf); g_object_unref(response); } gdk_draw_drawable(drawable, gc, blitter, 0, 0, 0, 0, navigator->widget_width, navigator->widget_height); g_object_unref(gc); cairo_destroy(cr); } rawstudio-2.0/src/eog-pixbuf-cell-renderer.c0000644000175000017500000002150711526533645016055 00000000000000/* Eye Of Gnome - Pixbuf Cellrenderer * * Lifted from eog-2.20.0 with minor changes, Thanks! - Anders Brander * * Copyright (C) 2007 The GNOME Foundation * * Author: Lucas Rocha * * Based on gnome-control-center code (capplets/appearance/wp-cellrenderer.c) by: * - Denis Washington * - Jens Granseuer * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "eog-pixbuf-cell-renderer.h" #include G_DEFINE_TYPE (EogPixbufCellRenderer, eog_pixbuf_cell_renderer, GTK_TYPE_CELL_RENDERER_PIXBUF) static void eog_pixbuf_cell_renderer_render (GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, GdkRectangle *cell_area, GdkRectangle *expose_area, GtkCellRendererState flags); #define PLACEMENT_TTL 120 /* Seconds to remember */ static GStaticMutex placement_lock = G_STATIC_MUTEX_INIT; static GTree *placement = NULL; static GTimer *placement_age = NULL; static gint placement_cmp(gconstpointer a, gconstpointer b, gpointer user_data) { return GPOINTER_TO_INT(a)-GPOINTER_TO_INT(b); } static void placement_free(gpointer data) { g_slice_free(BangPosition, data); } /** * This is an evil evil evil hack that should never be used by any sane person. * eog_pixbuf_cell_renderer_render() will store the position and the drawable * a pixbuf has been drawn to - this function returns this information in a * BangPositon. This will allow an aggressive caller to bang the GdkDrawable * directly instead of using conventional methods of setting the icon. * Please understand: THE INFORMATION RETURNED CAN BE WRONG AND/OR OUTDATED! * The key used in the tree is simply two XOR'ed pointers, collisions can * easily exist. */ gboolean eog_pixbuf_cell_renderer_get_bang_position(GtkIconView *iconview, GdkPixbuf *pixbuf, BangPosition *bp) { BangPosition *bp_; gboolean result = FALSE; g_static_mutex_lock (&placement_lock); bp_ = g_tree_lookup(placement, GINT_TO_POINTER(GPOINTER_TO_INT(pixbuf)^GPOINTER_TO_INT(iconview))); if (bp_ && GDK_IS_DRAWABLE(bp_->drawable)) { *bp = *bp_; result = TRUE; } g_static_mutex_unlock (&placement_lock); return result; } static void eog_pixbuf_cell_renderer_class_init (EogPixbufCellRendererClass *klass) { GtkCellRendererClass *renderer_class; renderer_class = (GtkCellRendererClass *) klass; renderer_class->render = eog_pixbuf_cell_renderer_render; } static void eog_pixbuf_cell_renderer_init (EogPixbufCellRenderer *renderer) { } GtkCellRenderer * eog_pixbuf_cell_renderer_new (void) { return g_object_new (eog_pixbuf_cell_renderer_get_type (), NULL); } #if GTK_CHECK_VERSION(2,8,0) /* Copied almost verbatim from gtk+-2.12.0/gtk/gtkcellrendererpixbuf.c */ static void gtk_cell_renderer_pixbuf_get_size (GtkCellRenderer *cell, GtkWidget *widget, GdkRectangle *cell_area, gint *x_offset, gint *y_offset, gint *width, gint *height) { GtkCellRendererPixbuf *cellpixbuf = (GtkCellRendererPixbuf *) cell; gint pixbuf_width = 0; gint pixbuf_height = 0; gint calc_width; gint calc_height; if (cellpixbuf->pixbuf) { pixbuf_width = gdk_pixbuf_get_width (cellpixbuf->pixbuf); pixbuf_height = gdk_pixbuf_get_height (cellpixbuf->pixbuf); } if (cellpixbuf->pixbuf_expander_open) { pixbuf_width = MAX (pixbuf_width, gdk_pixbuf_get_width (cellpixbuf->pixbuf_expander_open)); pixbuf_height = MAX (pixbuf_height, gdk_pixbuf_get_height (cellpixbuf->pixbuf_expander_open)); } if (cellpixbuf->pixbuf_expander_closed) { pixbuf_width = MAX (pixbuf_width, gdk_pixbuf_get_width (cellpixbuf->pixbuf_expander_closed)); pixbuf_height = MAX (pixbuf_height, gdk_pixbuf_get_height (cellpixbuf->pixbuf_expander_closed)); } calc_width = (gint) cell->xpad * 2 + pixbuf_width; calc_height = (gint) cell->ypad * 2 + pixbuf_height; if (cell_area && pixbuf_width > 0 && pixbuf_height > 0) { if (x_offset) { *x_offset = (((gtk_widget_get_direction (widget) == GTK_TEXT_DIR_RTL) ? (1.0 - cell->xalign) : cell->xalign) * (cell_area->width - calc_width)); *x_offset = MAX (*x_offset, 0); } if (y_offset) { *y_offset = (cell->yalign * (cell_area->height - calc_height)); *y_offset = MAX (*y_offset, 0); } } else { if (x_offset) *x_offset = 0; if (y_offset) *y_offset = 0; } if (width) *width = calc_width; if (height) *height = calc_height; } #endif /* GTK_CHECK_VERSION(2,8,0) */ static void eog_pixbuf_cell_renderer_render (GtkCellRenderer *cell, GdkWindow *window, GtkWidget *widget, GdkRectangle *background_area, GdkRectangle *cell_area, GdkRectangle *expose_area, GtkCellRendererState flags) { #if GTK_CHECK_VERSION(2,8,0) GtkCellRendererPixbuf *cellpixbuf = (GtkCellRendererPixbuf *) cell; GdkPixbuf *pixbuf; pixbuf = cellpixbuf->pixbuf; GdkRectangle pix_rect; cairo_t *cr; BangPosition *bp; gpointer key; gtk_cell_renderer_pixbuf_get_size (cell, widget, cell_area, &pix_rect.x, &pix_rect.y, &pix_rect.width, &pix_rect.height); pix_rect.x += cell_area->x + cell->xpad; pix_rect.y += cell_area->y + cell->ypad; pix_rect.width -= cell->xpad * 2; pix_rect.height -= cell->ypad * 2; g_static_mutex_lock (&placement_lock); if (placement == NULL) placement = g_tree_new_full(placement_cmp, NULL, NULL, placement_free); if (placement_age == NULL) placement_age = g_timer_new(); if (g_timer_elapsed(placement_age, NULL) > PLACEMENT_TTL) { g_tree_destroy(placement); placement = g_tree_new_full(placement_cmp, NULL, NULL, placement_free); g_timer_start(placement_age); } key = GINT_TO_POINTER(GPOINTER_TO_INT(pixbuf)^GPOINTER_TO_INT(widget)); bp = g_tree_lookup(placement, key); if (bp) { bp->drawable = GDK_DRAWABLE (window); bp->x = pix_rect.x; bp->y = pix_rect.y; } else { bp = g_slice_new(BangPosition); bp->drawable = GDK_DRAWABLE (window); bp->x = pix_rect.x; bp->y = pix_rect.y; g_tree_insert(placement, key, bp); } g_static_mutex_unlock (&placement_lock); if ((flags & (GTK_CELL_RENDERER_SELECTED|GTK_CELL_RENDERER_PRELIT)) != 0) { gint radius = 5; gint x, y, w, h; GtkStateType state; x = background_area->x; y = background_area->y; w = background_area->width; h = background_area->height; /* Sometimes width is -1 - not sure what to do here */ if (w == -1) return; if ((flags & GTK_CELL_RENDERER_SELECTED) != 0) { if (GTK_WIDGET_HAS_FOCUS (widget)) state = GTK_STATE_SELECTED; else state = GTK_STATE_ACTIVE; } else state = GTK_STATE_PRELIGHT; /* draw the selection indicator */ cr = gdk_cairo_create (GDK_DRAWABLE (window)); gdk_cairo_set_source_color (cr, &widget->style->base[state]); cairo_arc (cr, x + radius, y + radius, radius, M_PI, M_PI * 1.5); cairo_arc (cr, x + w - radius, y + radius, radius, M_PI * 1.5, 0); cairo_arc (cr, x + w - radius, y + h - radius, radius, 0, M_PI * 0.5); cairo_arc (cr, x + radius, y + h - radius, radius, M_PI * 0.5, M_PI); cairo_close_path (cr); /* FIXME: this should not be hardcoded to 4 */ cairo_rectangle (cr, x + 4, y + 4, w - 8, h - 8); /*cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD);*/ cairo_fill (cr); cairo_destroy (cr); } /* Always draw the thumbnail */ cr = gdk_cairo_create (window); gdk_cairo_set_source_pixbuf (cr, pixbuf, pix_rect.x, pix_rect.y); gdk_cairo_rectangle (cr, &pix_rect); cairo_fill (cr); cairo_destroy (cr); #else (* GTK_CELL_RENDERER_CLASS (eog_pixbuf_cell_renderer_parent_class)->render) (cell, window, widget, background_area, cell_area, expose_area, flags); #endif /* GTK_CHECK_VERSION(2,8,0) */ } rawstudio-2.0/src/rs-preview-widget.c0000644000175000017500000024536411547416453014664 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include "rs-preview-widget.h" #include "application.h" #include "gtk-interface.h" #include "gtk-helper.h" #include "config.h" #include "conf_interface.h" #include "rs-photo.h" #include "rs-actions.h" #include "rs-toolbox.h" #include "rs-loupe.h" #include "rs-navigator.h" #include enum { ROI_GRID_NONE = 0, ROI_GRID_GOLDEN, ROI_GRID_THIRDS, ROI_GRID_GOLDEN_TRIANGLES1, ROI_GRID_GOLDEN_TRIANGLES2, ROI_GRID_HARMONIOUS_TRIANGLES1, ROI_GRID_HARMONIOUS_TRIANGLES2, }; typedef enum { NORMAL = 0x000F, /* 0000 0000 0000 1111 */ WB_PICKER = 0x0001, /* 0000 0000 0000 0001 */ STRAIGHTEN = 0x0030, /* 0000 0000 0011 0000 */ STRAIGHTEN_START = 0x0020, /* 0000 0000 0010 0000 */ STRAIGHTEN_MOVE = 0x0010, /* 0000 0000 0001 0000 */ CROP = 0x3FC0, /* 0011 1111 1100 0000 */ CROP_START = 0x2000, /* 0010 0000 0000 0000 */ CROP_IDLE = 0x1000, /* 0001 0000 0000 0000 */ CROP_MOVE_ALL = 0x0080, /* 0000 0000 1000 0000 */ CROP_MOVE_CORNER = 0x0040, /* 0000 0000 0100 0000 */ DRAW_ROI = 0x10C0, /* 0001 0000 1100 0000 */ MOVE = 0x4000, /* 0100 0000 0000 0000 */ } STATE; /* In win32 windef32.h will define both near and NEAR */ #undef NEAR #undef near typedef enum { CROP_NEAR_INSIDE = 0x10, /* 0001 0000 */ CROP_NEAR_OUTSIDE = 0x20, /* 0010 0000 */ CROP_NEAR_N = 0x8, /* 0000 1000 */ CROP_NEAR_S = 0x4, /* 0000 0100 */ CROP_NEAR_W = 0x2, /* 0000 0010 */ CROP_NEAR_E = 0x1, /* 0000 0001 */ CROP_NEAR_NW = CROP_NEAR_N | CROP_NEAR_W, CROP_NEAR_NE = CROP_NEAR_N | CROP_NEAR_E, CROP_NEAR_SE = CROP_NEAR_S | CROP_NEAR_E, CROP_NEAR_SW = CROP_NEAR_S | CROP_NEAR_W, CROP_NEAR_CORNER = CROP_NEAR_N | CROP_NEAR_S | CROP_NEAR_W | CROP_NEAR_E, CROP_NEAR_NOTHING = CROP_NEAR_INSIDE | CROP_NEAR_OUTSIDE, } CROP_NEAR; #define NAVIGATOR_WIDTH (170) #define NAVIGATOR_HEIGHT (128) typedef struct { gint x; gint y; } RS_COORD; typedef enum { SPLIT_NONE, SPLIT_HORIZONTAL, SPLIT_VERTICAL, } VIEW_SPLIT; const static gint PADDING = 3; const static gint SPLITTER_WIDTH = 4; #define MAX_VIEWS 2 /* maximum 32! */ #define VIEW_IS_VALID(view) (((view)>=0) && ((view)canvas = GTK_DRAWING_AREA(gtk_drawing_area_new()); g_signal_connect_after (G_OBJECT (preview->canvas), "button_press_event", G_CALLBACK (button), preview); g_signal_connect_after (G_OBJECT (preview->canvas), "button_release_event", G_CALLBACK (button), preview); g_signal_connect (G_OBJECT (preview->canvas), "motion_notify_event", G_CALLBACK (motion), preview); g_signal_connect (G_OBJECT (preview->canvas), "leave_notify_event", G_CALLBACK (leave), preview); /* Let us know about pointer movements */ gtk_widget_set_events(GTK_WIDGET(preview->canvas), 0 | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK | GDK_LEAVE_NOTIFY_MASK); preview->state = WB_PICKER; preview->split = SPLIT_VERTICAL; preview->views = 1; preview->zoom_to_fit = TRUE; preview->exposure_mask = FALSE; preview->crop_near = CROP_NEAR_NOTHING; preview->keep_quick_enabled = FALSE; gchar* name; if ((name = rs_conf_get_string("display-colorspace"))) preview->display_color_space = rs_color_space_new_singleton(name); else preview->display_color_space = rs_color_space_new_singleton("RSSrgb"); preview->vadjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, 0.0, 100.0, 1.0, 10.0, 10.0)); preview->hadjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, 0.0, 100.0, 1.0, 10.0, 10.0)); g_signal_connect(G_OBJECT(preview->vadjustment), "value-changed", G_CALLBACK(adjustment_changed), preview); g_signal_connect(G_OBJECT(preview->hadjustment), "value-changed", G_CALLBACK(adjustment_changed), preview); preview->vscrollbar = gtk_vscrollbar_new(preview->vadjustment); preview->hscrollbar = gtk_hscrollbar_new(preview->hadjustment); gtk_widget_set_events(GTK_WIDGET(preview->vscrollbar), GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK); gtk_widget_set_events(GTK_WIDGET(preview->hscrollbar), GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK); g_signal_connect(preview->vscrollbar, "button-press-event", G_CALLBACK(scrollbar_press), preview); g_signal_connect(preview->hscrollbar, "button-press-event", G_CALLBACK(scrollbar_press), preview); g_signal_connect(preview->vscrollbar, "button-release-event", G_CALLBACK(scrollbar_release), preview); g_signal_connect(preview->hscrollbar, "button-release-event", G_CALLBACK(scrollbar_release), preview); gtk_table_attach(table, GTK_WIDGET(preview->canvas), 0, 1, 0, 1, GTK_EXPAND|GTK_FILL, GTK_EXPAND|GTK_FILL, 0, 0); gtk_table_attach(table, preview->vscrollbar, 1, 2, 0, 1, GTK_SHRINK, GTK_EXPAND|GTK_FILL, 0, 0); gtk_table_attach(table, preview->hscrollbar, 0, 1, 1, 2, GTK_EXPAND|GTK_FILL, GTK_SHRINK, 0, 0); preview->filter_input = NULL; for(i=0;ifilter_resample[i] = rs_filter_new("RSResample", NULL); /* Careful - "make_cbdata" grabs data from "filter_cache1" */ preview->filter_cache1[i] = rs_filter_new("RSCache", preview->filter_resample[i]); preview->filter_transform_input[i] = rs_filter_new("RSColorspaceTransform", preview->filter_cache1[i]); preview->filter_dcp[i] = rs_filter_new("RSDcp", preview->filter_transform_input[i]); preview->filter_cache2[i] = rs_filter_new("RSCache", preview->filter_dcp[i]); preview->filter_denoise[i] = rs_filter_new("RSDenoise", preview->filter_cache2[i]); preview->filter_transform_display[i] = rs_filter_new("RSColorspaceTransform", preview->filter_denoise[i]); preview->filter_cache3[i] = rs_filter_new("RSCache", preview->filter_transform_display[i]); preview->filter_mask[i] = rs_filter_new("RSExposureMask", preview->filter_cache3[i]); preview->filter_end[i] = preview->filter_mask[i]; g_signal_connect(preview->filter_end[i], "changed", G_CALLBACK(filter_changed), preview); rs_filter_set_recursive(preview->filter_end[i], "bounding-box", TRUE, NULL); g_object_set(preview->filter_cache3[i], "latency", 1, NULL); preview->request[i] = rs_filter_request_new(); rs_filter_param_set_object(RS_FILTER_PARAM(preview->request[i]), "colorspace", preview->display_color_space); #if MAX_VIEWS > 3 #error Fix line below #endif preview->snapshot[i] = i; preview->last_roi[i] = NULL; DIRTY(preview->dirty[i], ALL); } #if MAX_VIEWS != 2 #error Fix lines below #endif rs_filter_set_label(preview->filter_resample[0], "RSPreviewWidget-0"); rs_filter_set_label(preview->filter_resample[1], "RSPreviewWidget-1"); preview->loupe_transform_input = rs_filter_new("RSColorspaceTransform", NULL); preview->loupe_filter_dcp = rs_filter_new("RSDcp", preview->loupe_transform_input); preview->loupe_filter_cache = rs_filter_new("RSCache", preview->loupe_filter_dcp); preview->loupe_filter_denoise = rs_filter_new("RSDenoise", preview->loupe_filter_cache); preview->loupe_transform_display = rs_filter_new("RSColorspaceTransform", preview->loupe_filter_denoise); preview->loupe_filter_start = preview->loupe_transform_input; preview->loupe_filter_end = preview->loupe_transform_display; preview->loupe = rs_loupe_new(); g_object_set(preview->loupe_filter_cache, "ignore-roi", TRUE, NULL); preview->photo = NULL; preview->navigator_filter_scale = rs_filter_new("RSResample", NULL); preview->navigator_filter_cache = rs_filter_new("RSCache", preview->navigator_filter_scale); preview->navigator_transform_input = rs_filter_new("RSColorspaceTransform", preview->navigator_filter_cache); preview->navigator_filter_rotate = rs_filter_new("RSRotate", preview->navigator_transform_input); preview->navigator_filter_crop = rs_filter_new("RSCrop", preview->navigator_filter_rotate); preview->navigator_filter_scale2 = rs_filter_new("RSResample", preview->navigator_filter_crop); preview->navigator_filter_cache2 = rs_filter_new("RSCache", preview->navigator_filter_scale2); preview->navigator_filter_dcp = rs_filter_new("RSDcp", preview->navigator_filter_cache2); preview->navigator_filter_cache3 = rs_filter_new("RSCache", preview->navigator_filter_dcp); preview->navigator_transform_display = rs_filter_new("RSColorspaceTransform", preview->navigator_filter_cache3); preview->navigator_filter_end = preview->navigator_transform_display; g_object_set(preview->navigator_filter_cache, "ignore-roi", TRUE, NULL); g_object_set(preview->navigator_filter_cache2, "ignore-roi", TRUE, NULL); g_object_set(preview->navigator_filter_cache3, "ignore-roi", TRUE, NULL); /* We'll take care of double buffering ourself */ gtk_widget_set_double_buffered(GTK_WIDGET(preview), TRUE); g_signal_connect(G_OBJECT(preview->canvas), "expose-event", G_CALLBACK(expose), preview); g_signal_connect(G_OBJECT(preview->canvas), "size-allocate", G_CALLBACK(size_allocate), preview); g_signal_connect(G_OBJECT(preview), "realize", G_CALLBACK(realize), NULL); g_signal_connect(G_OBJECT(preview->canvas), "scroll_event", G_CALLBACK (scroll), preview); #if GTK_CHECK_VERSION(2,12,0) preview->lightsout_window = NULL; #endif preview->prev_inside_image = FALSE; g_object_ref(preview->display_color_space); } /** * Creates a new RSPreviewWidget * @return A new RSPreviewWidget */ GtkWidget * rs_preview_widget_new(GtkWidget *toolbox) { GtkWidget *widget; RSPreviewWidget *preview; widget = g_object_new (RS_PREVIEW_TYPE_WIDGET, NULL); preview = RS_PREVIEW_WIDGET(widget); preview->toolbox = RS_TOOLBOX(toolbox); rs_toolbox_set_histogram_input(preview->toolbox, preview->navigator_filter_end, preview->display_color_space); return widget; } void rs_preview_widget_update_display_colorspace(RSPreviewWidget *preview, gboolean force) { gint i; gchar *name; RSColorSpace *new_cs = rs_color_space_new_singleton("RSSrgb"); if (preview->exposure_mask && (name = rs_conf_get_string("exposure-mask-colorspace"))) new_cs = rs_color_space_new_singleton(name); else if (!preview->exposure_mask && (name = rs_conf_get_string("display-colorspace"))) new_cs = rs_color_space_new_singleton(name); if (new_cs == preview->display_color_space && !force) return; preview->display_color_space = new_cs; rs_toolbox_set_histogram_input(preview->toolbox, preview->navigator_filter_end, preview->display_color_space); if (preview->zoom_to_fit && preview->navigator) rs_navigator_set_colorspace(RS_NAVIGATOR(preview->navigator), preview->display_color_space); rs_loupe_set_colorspace(preview->loupe, preview->display_color_space); for(i=0;idirty[i], ALL); rs_filter_param_set_object(RS_FILTER_PARAM(preview->request[i]), "colorspace", preview->display_color_space); } } /** * Select zoom-to-fit of a RSPreviewWidget * @param preview A RSPreviewWidget * @param zoom_to_fit Set to TRUE to enable zoom-to-fit. */ void rs_preview_widget_set_zoom_to_fit(RSPreviewWidget *preview, gboolean zoom_to_fit) { gint width; gint height; gint view; g_assert(RS_IS_PREVIEW_WIDGET(preview)); if (zoom_to_fit == preview->zoom_to_fit) return; if (zoom_to_fit) { gint max_width, max_height; get_max_size(preview, &max_width, &max_height); rs_filter_set_enabled(preview->filter_resample[0], TRUE); for(view=0;viewviews;view++) { rs_filter_set_recursive(preview->filter_end[view], "width", max_width, "height", max_height, NULL); } /* FIXME: Update scale somehow! */ gtk_widget_hide(preview->vscrollbar); gtk_widget_hide(preview->hscrollbar); if (preview->navigator) { gtk_widget_destroy(preview->navigator); preview->navigator = NULL; } } else { gint real_x, real_y; const gint view = get_view_from_coord(preview, preview->last_x, preview->last_y); const gboolean inside_image = get_image_coord(preview, view, preview->last_x, preview->last_y, NULL, NULL, &real_x, &real_y, NULL, NULL); /* Unsplit if needed */ if (preview->views > 1) rs_core_action_group_activate("Split"); gdk_window_set_cursor(GTK_WIDGET(rawstudio_window)->window, cur_busy); GUI_CATCHUP(); /* Disable resample filter */ rs_filter_set_enabled(preview->filter_resample[0], FALSE); if (preview->photo) { rs_filter_get_size_simple(preview->filter_end[0], preview->request[0], &width, &height); /* Update scrollbars to reflect the change */ gdouble val; val = (gdouble) width; g_object_set(G_OBJECT(preview->hadjustment), "upper", val, NULL); val = (gdouble) height; g_object_set(G_OBJECT(preview->vadjustment), "upper", val, NULL); const gdouble hpage = gtk_adjustment_get_page_size(preview->hadjustment); const gdouble vpage = gtk_adjustment_get_page_size(preview->vadjustment); if (!inside_image) { real_x = 0.5 * width; real_y = 0.5 * height; } gdouble hvalue = MIN((double)width-hpage+10,((gdouble) real_x) - hpage/2.0); gdouble vvalue = MIN((double)height-vpage+10,((gdouble) real_y) - vpage/2.0); /* Modify adjusters */ g_object_set(preview->hadjustment, "value", hvalue, NULL); g_object_set(preview->vadjustment, "value", vvalue, NULL); } gdk_window_set_cursor(GTK_WIDGET(rawstudio_window)->window, NULL); gtk_widget_show(preview->vscrollbar); gtk_widget_show(preview->hscrollbar); rs_filter_get_size_simple(preview->filter_end[0], preview->request[0], &width, &height); rs_filter_set_recursive(preview->filter_end[0], "width", width, "height", height, NULL); gdk_window_set_cursor(GTK_WIDGET(rawstudio_window)->window, NULL); /* Build navigator */ rs_filter_set_recursive(preview->navigator_filter_end, "orientation", preview->photo->orientation, "rectangle", rs_photo_get_crop(preview->photo), "angle", rs_photo_get_angle(preview->photo), "settings", preview->photo->settings[preview->snapshot[0]], NULL); RSNavigator *navigator = rs_navigator_new(); rs_navigator_set_adjustments(navigator, preview->vadjustment, preview->hadjustment); rs_navigator_set_source_filter(navigator, preview->navigator_filter_end); gtk_widget_set_size_request(GTK_WIDGET(navigator), NAVIGATOR_WIDTH, NAVIGATOR_HEIGHT); preview->navigator = rs_toolbox_add_widget(preview->toolbox, GTK_WIDGET(navigator), _("Display Navigation")); rs_navigator_set_preview_widget(navigator, preview); rs_navigator_set_colorspace(navigator, preview->display_color_space); gtk_widget_show_all(GTK_WIDGET(preview->navigator)); } rs_preview_widget_quick_start(preview, FALSE); preview->zoom_to_fit = zoom_to_fit; GtkToggleAction *fit_action = GTK_TOGGLE_ACTION(rs_core_action_group_get_action("ZommToFit")); gtk_toggle_action_set_active(fit_action, zoom_to_fit); rs_filter_set_recursive(RS_FILTER(preview->filter_input), "demosaic-allow-downscale", preview->zoom_to_fit, NULL); } /** * Enable the loupe */ void rs_preview_widget_set_loupe_enabled(RSPreviewWidget *preview, gboolean enabled) { if (preview->loupe_enabled != enabled) { preview->loupe_enabled = enabled; if (!preview->zoom_to_fit) preview->loupe_enabled = FALSE; if (preview->loupe_enabled) { rs_loupe_set_filter(preview->loupe, preview->loupe_filter_end); rs_filter_set_previous(preview->loupe_filter_start, preview->filter_input); /* FIXME: view is hardcoded to 0 */ if (rs_photo_get_dcp_profile(preview->photo)) g_object_set(preview->loupe_filter_dcp, "profile", rs_photo_get_dcp_profile(preview->photo), NULL); else g_object_set(preview->loupe_filter_dcp, "use-profile", FALSE, NULL); rs_filter_set_recursive(preview->loupe_filter_end, "settings", preview->photo->settings[preview->snapshot[0]], NULL); rs_loupe_set_colorspace(preview->loupe, preview->display_color_space); gtk_widget_show_all(GTK_WIDGET(preview->loupe)); } else { if (preview->loupe) gtk_widget_hide_all(GTK_WIDGET(preview->loupe)); } } } /** * Sets active photo of a RSPreviewWidget * @param preview A RSPreviewWidget * @param photo A RS_PHOTO */ void rs_preview_widget_set_photo(RSPreviewWidget *preview, RS_PHOTO *photo) { g_assert(RS_IS_PREVIEW_WIDGET(preview)); preview->photo = photo; if (preview->state & CROP) crop_end(preview, FALSE); if (preview->state & STRAIGHTEN) { preview->state = WB_PICKER; gui_status_pop(preview->status_num); } if (preview->photo) { rs_preview_widget_set_photo_settings(preview); photo->thumbnail_filter = preview->navigator_filter_end; g_signal_connect(G_OBJECT(preview->photo), "lens-changed", G_CALLBACK(lens_changed), preview); g_signal_connect(G_OBJECT(preview->photo), "profile-changed", G_CALLBACK(profile_changed), preview); rs_preview_widget_update_display_colorspace(preview, TRUE); } } /** * Sets settings of active photo of a RSPreviewWidget * @param preview A RSPreviewWidget */ void rs_preview_widget_set_photo_settings(RSPreviewWidget *preview) { gint view; GList *filters = NULL; /* Apply snapshot 0 to histogram & curve */ filters = g_list_append(NULL, preview->loupe_filter_end); filters = g_list_append(filters, preview->navigator_filter_end); rs_photo_apply_to_filters(preview->photo, filters, preview->snapshot[0]); g_list_free(filters); for(view=0;viewrequest[view], TRUE); filters = g_list_append(NULL, preview->filter_end[view]); rs_photo_apply_to_filters(preview->photo, filters, preview->snapshot[view]); g_list_free(filters); } g_object_set(preview->navigator_filter_scale, "bounding-box", TRUE, "width", NAVIGATOR_WIDTH*2, "height", NAVIGATOR_HEIGHT*2, NULL); g_object_set(preview->navigator_filter_scale2, "bounding-box", TRUE, "width", NAVIGATOR_WIDTH, "height", NAVIGATOR_HEIGHT, "never-quick", TRUE, NULL); if (preview->photo) g_signal_connect(G_OBJECT(preview->photo), "settings-changed", G_CALLBACK(settings_changed), preview); /* Mark everything as dirty */ for(view=0;viewviews;view++) DIRTY(preview->dirty[view], ALL); } /** * Set input filter for a RSPreviewWidget * @param preview A RSPreviewWidget * @param filter A filter to listen for */ void rs_preview_widget_set_filter(RSPreviewWidget *preview, RSFilter *filter, RSFilter *fast_filter) { g_assert(RS_IS_PREVIEW_WIDGET(preview)); g_assert(RS_IS_FILTER(filter)); preview->filter_input = filter; rs_filter_set_recursive(RS_FILTER(preview->filter_input), "demosaic-allow-downscale", preview->zoom_to_fit, NULL); rs_filter_set_previous(preview->filter_resample[0], preview->filter_input); rs_filter_set_previous(preview->filter_resample[1], preview->filter_input); if (fast_filter) { g_assert(RS_IS_FILTER(fast_filter)); rs_filter_set_previous(preview->navigator_filter_scale, fast_filter); } else rs_filter_set_previous(preview->navigator_filter_scale, preview->filter_input); } /** * Sets the CMS profile used in preview * @param preview A RSPreviewWidget * @param profile The profile to use */ void rs_preview_widget_set_profile(RSPreviewWidget *preview, RSIccProfile *profile) { gint view; g_assert(RS_IS_PREVIEW_WIDGET(preview)); g_assert(RS_IS_ICC_PROFILE(profile)); for(view=0;viewfilter_end[view], "icc-profile", profile, NULL); rs_filter_set_recursive(preview->loupe_filter_end, "icc-profile", profile, NULL); rs_filter_set_recursive(preview->navigator_filter_end, "icc-profile", profile, NULL); /* FIXME: Implement this properly */ /* 1. Make this assept RSColorSpace */ /* 2. Remove the standard sRGB ICC profile (and others!) */ /* 3. Use RSSrgb instead */ /* 4. Assign the value to preview->display_color_space */ // if (preview->display_color_space) // g_object_unref(preview->display_color_space); // preview->display_color_space = rs_color_space_icc_new_from_icc(profile); // rs_toolbox_set_histogram_input(preview->toolbox, preview->navigator_filter_end, preview->display_color_space); } /** * Sets the background color of a RSPreviewWidget * @param preview A RSPreviewWidget * @param color The new background color */ void rs_preview_widget_set_bgcolor(RSPreviewWidget *preview, GdkColor *color) { GdkRectangle rect; g_return_if_fail (RS_IS_PREVIEW_WIDGET(preview)); g_return_if_fail (color != NULL); preview->bgcolor = *color; gtk_widget_modify_bg(GTK_WIDGET(preview->canvas), GTK_STATE_NORMAL, &preview->bgcolor); if (GTK_WIDGET_REALIZED(GTK_WIDGET(preview->canvas))) { rect.x = 0; rect.y = 0; rect.width = GTK_WIDGET(preview->canvas)->allocation.width; rect.height = GTK_WIDGET(preview->canvas)->allocation.height; redraw(preview, &rect); } } /** * Enables or disables split-view * @param preview A RSPreviewWidget * @param split_screen Enables split-view if TRUE, disables if FALSE */ void rs_preview_widget_set_split(RSPreviewWidget *preview, gboolean split_screen) { gint view, max_width, max_height; g_assert(RS_IS_PREVIEW_WIDGET(preview)); if (split_screen) { preview->split = SPLIT_VERTICAL; preview->views = 2; } else { preview->split = SPLIT_NONE; preview->views = 1; } get_max_size(preview, &max_width, &max_height); for(view=0;viewviews;view++) rs_filter_set_recursive(preview->filter_end[view], "width", max_width, "height", max_height, NULL); rs_preview_widget_set_zoom_to_fit(preview, TRUE); rs_preview_widget_update(preview, TRUE); } #if GTK_CHECK_VERSION(2,12,0) static gboolean lightsout_window_on_expose(GtkWidget *widget, GdkEventExpose *do_not_use_this, RSPreviewWidget *preview) { gint view; gint x, y; gint width, height; cairo_t* cairo_context = NULL; cairo_context = gdk_cairo_create (widget->window); if (!cairo_context) return FALSE; gtk_window_get_size(GTK_WINDOW(widget), &width, &height); cairo_set_source_rgba (cairo_context, 0.0f, 0.0f, 0.0f, 0.8f); cairo_set_operator (cairo_context, CAIRO_OPERATOR_SOURCE); cairo_paint (cairo_context); /* Make sure the window is fullscreen and above everything */ gdk_window_raise(widget->window); gdk_window_set_keep_above(widget->window, TRUE); gdk_window_fullscreen(widget->window); /* Paint the images with alpha=0 */ for(view=0;viewviews;view++) { GdkRectangle rect; get_placement(preview, view, &rect); gdk_window_get_origin(GTK_WIDGET(preview->canvas)->window, &x, &y); cairo_set_source_rgba(cairo_context, 0.0, 0.0, 0.0, 0.0); cairo_rectangle (cairo_context, x+rect.x, y+rect.y, rect.width, rect.height); cairo_fill (cairo_context); } cairo_destroy (cairo_context); /* Set opacity to 100% when we're done drawing */ gtk_window_set_opacity(GTK_WINDOW(widget), 1.0); return FALSE; } #endif #if GTK_CHECK_VERSION(2,12,0) /** * Enables or disables lights out mode * @param preview A RSPreviewWidget * @param lightsout Enables lights out mode if TRUE, disables if FALSE */ void rs_preview_widget_set_lightsout(RSPreviewWidget *preview, gboolean lightsout) { /* FIXME: Make this follow the loaded image(s) somehow */ if (lightsout && !preview->lightsout_window) { GdkScreen *screen = gtk_widget_get_screen(GTK_WIDGET(preview->canvas)); gint width = gdk_screen_get_width(screen); gint height = gdk_screen_get_height(screen); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); GdkColormap* colormap = gdk_screen_get_rgba_colormap(screen); /* Check if the system even supports composite - and bail out if needed */ if (!colormap || !gdk_display_supports_composite(gdk_display_get_default())) { GtkWidget *dialog = gui_dialog_make_from_text( GTK_STOCK_DIALOG_ERROR, _("Light out mode not available"), _("Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing.") ); GtkWidget *button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); gtk_dialog_add_action_widget(GTK_DIALOG(dialog), button, GTK_RESPONSE_ACCEPT); gtk_widget_show_all(dialog); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); return; } /* Set our colormap to the RGBA colormap */ gtk_widget_set_colormap(window, colormap); /* Cover whole screen */ gtk_window_resize(GTK_WINDOW(window), width, height); gtk_window_move(GTK_WINDOW(window), 0, 0); /* Set the input shape to a rectangle covering everything with alpha=0, * to let everything pass through */ GdkPixmap *bitmap = (GdkBitmap*) gdk_pixmap_new (NULL, width, height, 1); cairo_t *cairo_context = gdk_cairo_create (bitmap); cairo_scale (cairo_context, (double) width, (double) height); cairo_set_source_rgba (cairo_context, 1.0f, 1.0f, 1.0f, 0.0f); cairo_set_operator (cairo_context, CAIRO_OPERATOR_SOURCE); cairo_paint (cairo_context); cairo_destroy (cairo_context); gtk_widget_input_shape_combine_mask (GTK_WIDGET(window), NULL, 0, 0); gtk_widget_input_shape_combine_mask (GTK_WIDGET(window), bitmap, 0, 0); g_object_unref(bitmap); g_signal_connect (G_OBJECT (window), "expose-event", G_CALLBACK(lightsout_window_on_expose), preview); gtk_widget_set_app_paintable (window, TRUE); gtk_window_set_decorated (GTK_WINDOW (window), FALSE); gtk_window_set_keep_above(GTK_WINDOW(window), TRUE); gtk_window_set_accept_focus(GTK_WINDOW(window), FALSE); #if GTK_CHECK_VERSION(2,10,0) gtk_window_set_deletable(GTK_WINDOW(window), FALSE); #endif gtk_window_set_skip_pager_hint(GTK_WINDOW(window), TRUE); gtk_window_set_skip_taskbar_hint(GTK_WINDOW(window), TRUE); gtk_window_set_title(GTK_WINDOW(window), "Rawstudio lights out helper"); /* Let the window be completely transparent for now to avoid initial flicker */ gtk_window_set_opacity(GTK_WINDOW(window), 0.0); gtk_widget_show_all(window); preview->lightsout_window = window; } else if (!lightsout && preview->lightsout_window) { gtk_widget_destroy(preview->lightsout_window); preview->lightsout_window = NULL; } } #endif /** * Sets the active snapshot of a RSPreviewWidget * @param preview A RSPreviewWidget * @param view Which view to set (0..1) * @param snapshot Which snapshot to view (0..2) */ void rs_preview_widget_set_snapshot(RSPreviewWidget *preview, const guint view, const gint snapshot) { g_assert(RS_IS_PREVIEW_WIDGET(preview)); g_assert(VIEW_IS_VALID(view)); if (preview->snapshot[view] == snapshot) return; preview->snapshot[view] = snapshot; if (!preview->photo) return; rs_filter_set_recursive(preview->filter_end[view], "settings", preview->photo->settings[preview->snapshot[view]], NULL); DIRTY(preview->dirty[view], SCREEN); rs_preview_widget_update(preview, TRUE); } /** * Enables or disables the exposure mask * @param preview A RSPreviewWidget * @param show_exposure_mask Set to TRUE to enabled */ void rs_preview_widget_set_show_exposure_mask(RSPreviewWidget *preview, gboolean show_exposure_mask) { g_assert(RS_IS_PREVIEW_WIDGET(preview)); if (preview->exposure_mask != show_exposure_mask) { gint view; preview->exposure_mask = show_exposure_mask; rs_preview_widget_update_display_colorspace(preview, FALSE); for(view=0;viewviews;view++) { rs_filter_set_recursive(preview->filter_end[view], "exposure-mask", preview->exposure_mask, NULL); DIRTY(preview->dirty[view], SCREEN); } rs_preview_widget_update(preview, FALSE); } } /** * Gets the status of whether the exposure mask is displayed * @param preview A RSPreviewWidget * @return TRUE is exposure mask is displayed, FALSE otherwise */ gboolean rs_preview_widget_get_show_exposure_mask(RSPreviewWidget *preview, gboolean show_exposure_mask) { g_assert(RS_IS_PREVIEW_WIDGET(preview)); return preview->exposure_mask; } /** * Tells the preview widget to update itself * @param preview A RSPreviewWidget * @param full_redraw Set to TRUE to redraw everything, FALSE to only redraw the image. */ void rs_preview_widget_update(RSPreviewWidget *preview, gboolean full_redraw) { GdkRectangle rect; gint view; g_assert(RS_IS_PREVIEW_WIDGET(preview)); if (!rs_filter_get_size_simple(preview->filter_input, preview->request[0], NULL, NULL)) return; if (!GTK_WIDGET_DRAWABLE(GTK_WIDGET(preview))) return; /* FIXME: Check all views.*/ if (rs_filter_request_get_quick(preview->request[0]) && !preview->keep_quick_enabled) full_redraw = TRUE; rs_preview_widget_update_display_colorspace(preview, FALSE); if (full_redraw) { rect.x = 0; rect.y = 0; rect.width = GTK_WIDGET(preview->canvas)->allocation.width; rect.height = GTK_WIDGET(preview->canvas)->allocation.height; redraw(preview, &rect); for(view=0;viewviews;view++) UNDIRTY(preview->dirty[view], SCREEN); } else { for(view=0;viewviews;view++) { if (ISDIRTY(preview->dirty[view], SCREEN)) { get_placement(preview, view, &rect); if (preview->zoom_to_fit) { redraw(preview, &rect); UNDIRTY(preview->dirty[view], SCREEN); } else { /* Construct full rectangle */ rect.x = 0; rect.y = 0; rect.width = GTK_WIDGET(preview->canvas)->allocation.width; rect.height = GTK_WIDGET(preview->canvas)->allocation.height; redraw(preview, &rect); UNDIRTY(preview->dirty[view], SCREEN); } } } } } /** * Puts a RSPreviewWidget in crop-mode * @param preview A RSPreviewWidget */ void rs_preview_widget_crop_start(RSPreviewWidget *preview) { GtkWidget *vbox; GtkWidget *roi_size_hbox; GtkWidget *label; GtkWidget *roi_grid_hbox; GtkWidget *roi_grid_label; GtkWidget *roi_grid_combobox; GtkWidget *aspect_hbox; GtkWidget *aspect_label; GtkWidget *button_box; GtkWidget *apply_button; GtkWidget *cancel_button; RS_CONFBOX *grid_confbox; RS_CONFBOX *aspect_confbox; g_assert(RS_IS_PREVIEW_WIDGET(preview)); if (!(preview->state & NORMAL)) return; /* predefined aspects */ /* aspect MUST be => 1.0 */ const static gdouble aspect_freeform = 0.0f; const static gdouble aspect_32 = 3.0f/2.0f; const static gdouble aspect_43 = 4.0f/3.0f; const static gdouble aspect_1008 = 10.0f/8.0f; const static gdouble aspect_1610 = 16.0f/10.0f; const static gdouble aspect_169 = 16.0f/9.0f; const static gdouble aspect_83 = 8.0f/3.0f; const static gdouble aspect_11 = 1.0f; static gdouble aspect_org ; aspect_org = (gdouble)preview->photo->input->w / preview->photo->input->h; if (aspect_org < 1.0 && aspect_org != 0.0) aspect_org = 1.0 / aspect_org; static gdouble aspect_iso216; static gdouble aspect_golden; aspect_iso216 = sqrt(2.0f); aspect_golden = (1.0f+sqrt(5.0f))/2.0f; vbox = gtk_vbox_new(FALSE, 4); label = gtk_label_new(_("Size")); gtk_misc_set_alignment(GTK_MISC(label), 0.0, 0.5); roi_size_hbox = gtk_hbox_new(FALSE, 0); /* Default aspect (freeform) */ preview->crop_aspect = 0.0f; preview->crop_size_label = gtk_label_new(_("-")); gtk_box_pack_start (GTK_BOX (roi_size_hbox), label, TRUE, TRUE, 4); gtk_box_pack_start (GTK_BOX (roi_size_hbox), preview->crop_size_label, FALSE, TRUE, 4); gtk_box_pack_start (GTK_BOX (vbox), roi_size_hbox, FALSE, TRUE, 0); roi_grid_hbox = gtk_hbox_new(FALSE, 0); roi_grid_label = gtk_label_new(_("Grid")); gtk_misc_set_alignment(GTK_MISC(roi_grid_label), 0.0, 0.5); grid_confbox = gui_confbox_new(CONF_ROI_GRID); gui_confbox_set_callback(grid_confbox, preview, crop_grid_changed); gui_confbox_add_entry(grid_confbox, "none", _("None"), (gpointer) ROI_GRID_NONE); gui_confbox_add_entry(grid_confbox, "goldensections", _("Golden sections"), (gpointer) ROI_GRID_GOLDEN); gui_confbox_add_entry(grid_confbox, "ruleofthirds", _("Rule of thirds"), (gpointer) ROI_GRID_THIRDS); gui_confbox_add_entry(grid_confbox, "goldentriangles1", _("Golden triangles #1"), (gpointer) ROI_GRID_GOLDEN_TRIANGLES1); gui_confbox_add_entry(grid_confbox, "goldentriangles2", _("Golden triangles #2"), (gpointer) ROI_GRID_GOLDEN_TRIANGLES2); gui_confbox_add_entry(grid_confbox, "harmonioustriangles1", _("Harmonious triangles #1"), (gpointer) ROI_GRID_HARMONIOUS_TRIANGLES1); gui_confbox_add_entry(grid_confbox, "harmonioustriangles2", _("Harmonious triangles #2"), (gpointer) ROI_GRID_HARMONIOUS_TRIANGLES2); gui_confbox_load_conf(grid_confbox, "none"); roi_grid_combobox = gui_confbox_get_widget(grid_confbox); gtk_box_pack_start (GTK_BOX (roi_grid_hbox), roi_grid_label, TRUE, TRUE, 4); gtk_box_pack_start (GTK_BOX (roi_grid_hbox), roi_grid_combobox, FALSE, TRUE, 4); aspect_hbox = gtk_hbox_new(FALSE, 0); aspect_label = gtk_label_new(_("Aspect")); gtk_misc_set_alignment(GTK_MISC(aspect_label), 0.0, 0.5); aspect_confbox = gui_confbox_new(CONF_CROP_ASPECT); gui_confbox_set_callback(aspect_confbox, preview, crop_aspect_changed); gui_confbox_add_entry(aspect_confbox, "freeform", _("Freeform"), (gpointer) &aspect_freeform); gui_confbox_add_entry(aspect_confbox, "original", _("Original Aspect"), (gpointer) &aspect_org); gui_confbox_add_entry(aspect_confbox, "iso216", _("ISO paper (A4)"), (gpointer) &aspect_iso216); gui_confbox_add_entry(aspect_confbox, "3:2", _("3:2 (35mm)"), (gpointer) &aspect_32); gui_confbox_add_entry(aspect_confbox, "4:3", _("4:3"), (gpointer) &aspect_43); gui_confbox_add_entry(aspect_confbox, "10:8", _("10:8 (SXGA)"), (gpointer) &aspect_1008); gui_confbox_add_entry(aspect_confbox, "16:10", _("16:10 (Wide XGA)"), (gpointer) &aspect_1610); gui_confbox_add_entry(aspect_confbox, "16:9", _("16:9 (HDTV)"), (gpointer) &aspect_169); gui_confbox_add_entry(aspect_confbox, "8:3", _("8:3 (Dualhead XGA)"), (gpointer) &aspect_83); gui_confbox_add_entry(aspect_confbox, "1:1", _("1:1"), (gpointer) &aspect_11); gui_confbox_add_entry(aspect_confbox, "goldenrectangle", _("Golden rectangle"), (gpointer) &aspect_golden); gui_confbox_load_conf(aspect_confbox, "freeform"); gtk_box_pack_start (GTK_BOX (aspect_hbox), aspect_label, TRUE, TRUE, 4); gtk_box_pack_start (GTK_BOX (aspect_hbox), gui_confbox_get_widget(aspect_confbox), FALSE, TRUE, 4); button_box = gtk_hbox_new(FALSE, 0); apply_button = gtk_button_new_with_label(_("Crop")); g_signal_connect (G_OBJECT(apply_button), "clicked", G_CALLBACK (crop_apply_clicked), preview); cancel_button = gtk_button_new_with_label(_("Don't crop")); g_signal_connect (G_OBJECT(cancel_button), "clicked", G_CALLBACK (crop_cancel_clicked), preview); gtk_box_pack_start (GTK_BOX (button_box), apply_button, TRUE, TRUE, 4); gtk_box_pack_start (GTK_BOX (button_box), cancel_button, TRUE, TRUE, 4); gtk_box_pack_start (GTK_BOX (vbox), roi_grid_hbox, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), aspect_hbox, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), button_box, FALSE, TRUE, 0); preview->tool = rs_toolbox_add_widget(preview->toolbox, vbox, _("Crop")); gtk_widget_show_all(preview->tool); if (preview->photo->crop) { preview->roi = *preview->photo->crop; rs_photo_set_crop(preview->photo, NULL); preview->state = CROP_IDLE; rs_preview_widget_update(preview, TRUE); } else preview->state = CROP_START; /* Help text for cropping */ preview->status_num = gui_status_push(_("Crop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel crop")); if (!preview->zoom_to_fit) rs_preview_widget_set_zoom_to_fit(preview, TRUE); } /** * Removes crop from the loaded photo * @param preview A RSpreviewWidget */ void rs_preview_widget_uncrop(RSPreviewWidget *preview) { g_assert(RS_IS_PREVIEW_WIDGET(preview)); if (!preview->photo) return; rs_photo_set_crop(preview->photo, NULL); } /** * Puts a RSPreviewWidget in straighten-mode * @param preview A RSPreviewWidget */ void rs_preview_widget_straighten(RSPreviewWidget *preview) { g_assert(RS_IS_PREVIEW_WIDGET(preview)); if (!(preview->state & NORMAL)) return; preview->state = STRAIGHTEN_START; preview->status_num = gui_status_push(_("Straighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels.")); } /** * Removes straighten from the loaded photo * @param preview A RSPreviewWidget */ void rs_preview_widget_unstraighten(RSPreviewWidget *preview) { g_assert(RS_IS_PREVIEW_WIDGET(preview)); rs_photo_set_angle(preview->photo, 0.0, FALSE); } /** * Enables quick mode in display * @param preview A RSPreviewWidget */ void rs_preview_widget_quick_start(RSPreviewWidget *preview, gboolean keep_quick) { gint i; preview->keep_quick_enabled = keep_quick; for(i=0;irequest[i], TRUE); } /** * Disables quick mode in display and redraws screen * @param preview A RSPreviewWidget */ void rs_preview_widget_quick_end(RSPreviewWidget *preview) { gint i; preview->keep_quick_enabled = FALSE; for(i=0;idirty[i], SCREEN); } rs_preview_widget_update(preview, TRUE); } static void get_max_size(RSPreviewWidget *preview, gint *width, gint *height) { gint splitters = preview->views - 1; /* Splitters between the views */ *width = GTK_WIDGET(preview)->allocation.width - PADDING*2; *height = GTK_WIDGET(preview)->allocation.height - PADDING*2; if (preview->split == SPLIT_VERTICAL) *width = (GTK_WIDGET(preview)->allocation.width - splitters*SPLITTER_WIDTH)/preview->views - PADDING*2; if (preview->split == SPLIT_HORIZONTAL) *height = (GTK_WIDGET(preview)->allocation.height - splitters*SPLITTER_WIDTH)/preview->views - PADDING*2; } static gint get_view_from_coord(RSPreviewWidget *preview, const gint x, const gint y) { gint view; if (preview->split == SPLIT_VERTICAL) view = preview->views*x/GTK_WIDGET(preview)->allocation.width; else view = preview->views*y/GTK_WIDGET(preview)->allocation.height; if (view>=MAX_VIEWS) view=MAX_VIEWS-1; /* Clamp */ view = MAX(MIN(view, MAX_VIEWS-1), 0); return view; } static void get_canvas_placement(RSPreviewWidget *preview, const guint view, GdkRectangle *placement) { gint xoffset = 0, yoffset = 0; gint width, height; g_assert(VIEW_IS_VALID(view)); g_assert(placement); if (preview->split == SPLIT_VERTICAL) { xoffset = view * (GTK_WIDGET(preview)->allocation.width/preview->views + SPLITTER_WIDTH/2); width = (GTK_WIDGET(preview)->allocation.width - preview->views*SPLITTER_WIDTH)/preview->views; } if (preview->split == SPLIT_HORIZONTAL) { yoffset = view * (GTK_WIDGET(preview)->allocation.height/preview->views + SPLITTER_WIDTH/2); height = (GTK_WIDGET(preview)->allocation.height - preview->views*SPLITTER_WIDTH)/preview->views; } placement->x = xoffset; placement->y = yoffset; placement->width = width; placement->height = height; } static gboolean get_placement(RSPreviewWidget *preview, const guint view, GdkRectangle *placement) { gint xoffset = 0, yoffset = 0; gint width, height; gint filter_width, filter_height; rs_filter_get_size_simple(preview->filter_end[view], preview->request[view], &filter_width, &filter_height); if (filter_width<1) return FALSE; if (!VIEW_IS_VALID(view)) return FALSE; width = GTK_WIDGET(preview)->allocation.width; height = GTK_WIDGET(preview)->allocation.height; if (preview->split == SPLIT_VERTICAL) { xoffset = view * (GTK_WIDGET(preview)->allocation.width/preview->views + SPLITTER_WIDTH/2); width = (width - preview->views*SPLITTER_WIDTH)/preview->views; } if (preview->split == SPLIT_HORIZONTAL) { yoffset = view * (GTK_WIDGET(preview)->allocation.height/preview->views + SPLITTER_WIDTH/2); height = (height - preview->views*SPLITTER_WIDTH)/preview->views; } placement->x = xoffset + (width - filter_width)/2; placement->y = yoffset + (height - filter_height)/2; placement->width = filter_width; placement->height = filter_height; return TRUE; } /** * Get the image coordinates from canvas-coordinates * @note Output will be clamped to image-space - ie all values are valid * @param preview A RSPreviewWidget * @param view The current view * @param x X coordinate as returned by GDK * @param y Y coordinate as returned by GDK * @param scaled_x A pointer to the scaled x or NULL * @param scaled_y A pointer to the scaled x or NULL * @param real_x A pointer to the "real" x (scale at 100%) or NULL * @param real_y A pointer to the "real" y (scale at 100%) or NULL * @param max_w A pointer to the width of the image at 100% scale or NULL * @param max_h A pointer to the height of the image at 100% scale or NULL * @return TRUE if coordinate is inside image, FALSE otherwise */ static gboolean get_image_coord(RSPreviewWidget *preview, gint view, const gint x, const gint y, gint *scaled_x, gint *scaled_y, gint *real_x, gint *real_y, gint *max_w, gint *max_h) { gboolean ret = FALSE; GdkRectangle placement; gint _scaled_x, _scaled_y; gint _real_x, _real_y; gint _max_w, _max_h; gint filter_width, filter_height; /* FIXME: This is so outdated */ if (!preview->photo) return ret; if (!rs_filter_get_size_simple(preview->filter_end[view], preview->request[view], &filter_width, &filter_height)) return ret; rs_image16_transform_getwh(preview->photo->input, preview->photo->crop, preview->photo->angle, preview->photo->orientation, &_max_w, &_max_h); get_placement(preview, view, &placement); if (preview->zoom_to_fit) { gfloat scale; g_object_get(preview->filter_resample[view], "scale", &scale, NULL); _scaled_x = x - placement.x; _scaled_y = y - placement.y; _real_x = _scaled_x / scale; _real_y = _scaled_y / scale; } else { _scaled_x = x + gtk_adjustment_get_value(preview->hadjustment); _scaled_y = y + gtk_adjustment_get_value(preview->vadjustment); _real_x = _scaled_x; _real_y = _scaled_y; } if ((_scaled_x < filter_width) && (_scaled_y < filter_height) && (_scaled_x >= 0) && (_scaled_y >= 0)) ret = TRUE; if (scaled_x) *scaled_x = MIN(MAX(0, _scaled_x), filter_width); if (scaled_y) *scaled_y = MIN(MAX(0, _scaled_y), filter_height); if (real_x) *real_x = MIN(MAX(0, _real_x), _max_w); if (real_y) *real_y = MIN(MAX(0, _real_y), _max_h); if (max_w) *max_w = _max_w; if (max_h) *max_h = _max_h; return ret; } static cairo_t * redraw_cairo_init(GdkDrawable *drawable, GdkRectangle *dirty_area) { cairo_t *cr = gdk_cairo_create(drawable); /* Clip Cairo to dirty area */ cairo_new_path(cr); cairo_rectangle(cr, dirty_area->x, dirty_area->y, dirty_area->width, dirty_area->height); cairo_clip(cr); cairo_set_antialias(cr, CAIRO_ANTIALIAS_GRAY); return cr; } static void redraw(RSPreviewWidget *preview, GdkRectangle *dirty_area) { GdkRectangle area; GdkRectangle placement; GtkWidget *widget = GTK_WIDGET(preview->canvas); GdkWindow *window = widget->window; GdkDrawable *drawable = GDK_DRAWABLE(window); GdkGC *gc = gdk_gc_new(drawable); gint i; cairo_t *cr = NULL; const static gdouble dashes[] = { 4.0, 4.0, }; gint width, height; #define CAIRO_LINE(cr, x1, y1, x2, y2) do { \ cairo_move_to((cr), (x1), (y1)); \ cairo_line_to((cr), (x2), (y2)); } while (0); gdk_window_begin_paint_rect(window, dirty_area); for(i=0;iviews;i++) { rs_filter_get_size_simple(preview->filter_end[i], preview->request[i], &width, &height); if (preview->zoom_to_fit) get_placement(preview, i, &placement); else { if (width > GTK_WIDGET(preview->canvas)->allocation.width) placement.x = -gtk_adjustment_get_value(preview->hadjustment); else placement.x = ((GTK_WIDGET(preview->canvas)->allocation.width)-width)/2; if (height > GTK_WIDGET(preview->canvas)->allocation.height) placement.y = -gtk_adjustment_get_value(preview->vadjustment); else placement.y = ((GTK_WIDGET(preview->canvas)->allocation.height)-height)/2; placement.width = width; placement.height = height; } /* Render the photo itself */ if (gdk_rectangle_intersect(dirty_area, &placement, &area)) { GdkRectangle roi = area; roi.x -= placement.x; roi.y -= placement.y; if (!preview->last_roi[i]) preview->last_roi[i] = g_new(GdkRectangle, 1); *preview->last_roi[i] = roi; if (preview->zoom_to_fit) rs_filter_request_set_roi(preview->request[i], NULL); else rs_filter_request_set_roi(preview->request[i], &roi); /* Clone, now so it cannot change while filters are being called */ RSFilterRequest *new_request = rs_filter_request_clone(preview->request[i]); RSFilterResponse *response = rs_filter_get_image8(preview->filter_end[i], new_request); GdkPixbuf *buffer = rs_filter_response_get_image8(response); if (buffer) { if (area.x-placement.x >= 0 && area.x-placement.x + area.width <= gdk_pixbuf_get_width(buffer) && area.y-placement.y >= 0 && area.y-placement.y + area.height <= gdk_pixbuf_get_height(buffer)) gdk_draw_pixbuf(drawable, gc, buffer, area.x-placement.x, area.y-placement.y, area.x, area.y, area.width, area.height, GDK_RGB_DITHER_NONE, 0, 0); g_object_unref(buffer); } if(rs_filter_request_get_quick(new_request) && !preview->keep_quick_enabled) { rs_filter_request_set_quick(preview->request[i], FALSE); gdk_window_invalidate_rect(window, &area, FALSE); } else if (preview->photo && NULL==preview->photo->crop && NULL==preview->photo->proposed_crop) { preview->photo->proposed_crop = g_new(RS_RECT,1); if (ABS(preview->photo->angle) < 0.001 && rs_filter_param_get_integer(RS_FILTER_PARAM(response), "proposed-crop-x1", &preview->photo->proposed_crop->x1) && rs_filter_param_get_integer(RS_FILTER_PARAM(response), "proposed-crop-y1", &preview->photo->proposed_crop->y1) && rs_filter_param_get_integer(RS_FILTER_PARAM(response), "proposed-crop-x2", &preview->photo->proposed_crop->x2) && rs_filter_param_get_integer(RS_FILTER_PARAM(response), "proposed-crop-y2", &preview->photo->proposed_crop->y2)) { if (preview->photo->orientation) rs_photo_rotate_rect_inverse(preview->photo, preview->photo->proposed_crop); } else { g_free(preview->photo->proposed_crop); preview->photo->proposed_crop = NULL; } } g_object_unref(new_request); g_object_unref(response); } if (preview->state & DRAW_ROI) { gfloat scale; if (!cr) cr = redraw_cairo_init(drawable, dirty_area); gchar *text; cairo_text_extents_t te; gint x1,y1,x2,y2; /* Translate to screen coordinates */ g_object_get(preview->filter_resample[i], "scale", &scale, NULL); x1 = preview->roi.x1 * scale; y1 = preview->roi.y1 * scale; x2 = preview->roi.x2 * scale; y2 = preview->roi.y2 * scale; text = g_strdup_printf("%d x %d", preview->roi.x2-preview->roi.x1, preview->roi.y2-preview->roi.y1); /* creates a rectangle that matches the photo */ gdk_cairo_rectangle(cr, &placement); /* Translate to photo coordinates */ cairo_translate(cr, placement.x, placement.y); /* creates a rectangle that matches ROI */ cairo_rectangle(cr, x1, y1, x2-x1, y2-y1); /* create fill rule that only fills between the two rectangles */ cairo_set_fill_rule (cr, CAIRO_FILL_RULE_EVEN_ODD); cairo_set_source_rgba(cr, 0.0, 0.0, 0.0, 0.5); /* fill acording to rule */ cairo_fill_preserve (cr); /* center rectangle */ cairo_set_source_rgba (cr, 0.0, 0.0, 0.0, 0.0); cairo_stroke (cr); cairo_set_line_width(cr, 2.0); cairo_set_dash(cr, dashes, 0, 0.0); cairo_set_source_rgba(cr, 0.8, 0.8, 0.8, 0.5); cairo_rectangle(cr, x1, y1, x2-x1, y2-y1); cairo_stroke(cr); cairo_set_line_width(cr, 1.0); cairo_set_dash(cr, dashes, 2, 0.0); cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, 0.6); /* Print size below rectangle */ cairo_select_font_face(cr, "Arial", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); cairo_set_font_size(cr, 12.0); cairo_text_extents (cr, text, &te); if (y2 > (placement.height-18)) cairo_move_to(cr, (x2+x1)/2.0 - te.width/2.0, y2-5.0); else cairo_move_to(cr, (x2+x1)/2.0 - te.width/2.0, y2+14.0); cairo_show_text (cr, text); switch(preview->roi_grid) { case ROI_GRID_NONE: break; case ROI_GRID_GOLDEN: { gdouble goldenratio = ((1+sqrt(5))/2); gint t, golden; /* vertical */ golden = ((x2-x1)/goldenratio); t = (x1+golden); CAIRO_LINE(cr, t, y1, t, y2); t = (x2-golden); CAIRO_LINE(cr, t, y1, t, y2); /* horizontal */ golden = ((y2-y1)/goldenratio); t = (y1+golden); CAIRO_LINE(cr, x1, t, x2, t); t = (y2-golden); CAIRO_LINE(cr, x1, t, x2, t); break; } case ROI_GRID_THIRDS: { gint t; /* vertical */ t = ((x2-x1+1)/3*1+x1); CAIRO_LINE(cr, t, y1, t, y2); t = ((x2-x1+1)/3*2+x1); CAIRO_LINE(cr, t, y1, t, y2); /* horizontal */ t = ((y2-y1+1)/3*1+y1); CAIRO_LINE(cr, x1, t, x2, t); t = ((y2-y1+1)/3*2+y1); CAIRO_LINE(cr, x1, t, x2, t); break; } case ROI_GRID_GOLDEN_TRIANGLES1: { gdouble goldenratio = ((1+sqrt(5))/2); gint t, golden; golden = ((x2-x1)/goldenratio); CAIRO_LINE(cr, x1, y1, x2, y2); t = (x2-golden); CAIRO_LINE(cr, x1, y2, t, y1); t = (x1+golden); CAIRO_LINE(cr, x2, y1, t, y2); break; } case ROI_GRID_GOLDEN_TRIANGLES2: { gdouble goldenratio = ((1+sqrt(5))/2); gint t, golden; golden = ((x2-x1)/goldenratio); CAIRO_LINE(cr, x2, y1, x1, y2); t = (x2-golden); CAIRO_LINE(cr, x1, y1, t, y2); t = (x1+golden); CAIRO_LINE(cr, x2, y2, t, y1); break; } case ROI_GRID_HARMONIOUS_TRIANGLES1: { gdouble goldenratio = ((1+sqrt(5))/2); gint t, golden; golden = ((x2-x1)/goldenratio); CAIRO_LINE(cr, x1, y1, x2, y2); t = (x1+golden); CAIRO_LINE(cr, x1, y2, t, y1); t = (x2-golden); CAIRO_LINE(cr, x2, y1, t, y2); break; } case ROI_GRID_HARMONIOUS_TRIANGLES2: { gdouble goldenratio = ((1+sqrt(5))/2); gint t, golden; golden = ((x2-x1)/goldenratio); CAIRO_LINE(cr, x1, y2, x2, y1); t = (x1+golden); CAIRO_LINE(cr, x1, y1, t, y2); t = (x2-golden); CAIRO_LINE(cr, x2, y2, t, y1); break; } } cairo_stroke(cr); /* Translate "back" */ cairo_translate(cr, -placement.x, -placement.y); gtk_label_set_text(GTK_LABEL(preview->crop_size_label), text); g_free(text); } /* Draw snapshot-identifier */ if (preview->views > 1) { if (!cr) cr = redraw_cairo_init(drawable, dirty_area); GdkRectangle canvas; const gchar *txt; switch (preview->snapshot[i]) { case 0: txt = "A"; break; case 1: txt = "B"; break; case 2: txt = "C"; break; default: txt = "-"; break; } get_canvas_placement(preview, i, &canvas); cairo_set_dash(cr, dashes, 0, 0.0); cairo_select_font_face(cr, "Arial", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD); cairo_set_font_size(cr, 20.0); cairo_set_source_rgba(cr, 0.2, 0.2, 0.2, 0.7); cairo_move_to(cr, canvas.x+3.0, canvas.y+21.0); cairo_text_path(cr, txt); cairo_fill(cr); cairo_set_source_rgba(cr, 0.7, 0.7, 0.7, 1.0); cairo_move_to(cr, canvas.x+3.0, canvas.y+21.0); cairo_text_path(cr, txt); cairo_stroke(cr); } } /* Draw straighten-line */ if (preview->state & STRAIGHTEN_MOVE) { if (!cr) cr = redraw_cairo_init(drawable, dirty_area); cairo_set_line_width(cr, 1.0); cairo_set_dash(cr, dashes, 2, 0.0); cairo_set_source_rgba(cr, 0.8, 0.8, 0.8, 1.0); cairo_move_to(cr, preview->straighten_start.x, preview->straighten_start.y); cairo_line_to(cr, preview->straighten_end.x, preview->straighten_end.y); cairo_stroke(cr); cairo_set_dash(cr, dashes, 2, 10.0); cairo_set_source_rgba(cr, 0.2, 0.2, 0.2, 1.0); cairo_move_to(cr, preview->straighten_start.x, preview->straighten_start.y); cairo_line_to(cr, preview->straighten_end.x, preview->straighten_end.y); cairo_stroke(cr); } /* Draw splitters */ if (preview->views>0) { for(i=1;iviews;i++) { if (preview->split == SPLIT_VERTICAL) gtk_paint_vline(GTK_WIDGET(preview)->style, window, GTK_STATE_NORMAL, NULL, widget, NULL, 0, GTK_WIDGET(preview->canvas)->allocation.height, i * GTK_WIDGET(preview)->allocation.width/preview->views - SPLITTER_WIDTH/2); else if (preview->split == SPLIT_HORIZONTAL) gtk_paint_hline(GTK_WIDGET(preview)->style, window, GTK_STATE_NORMAL, NULL, widget, NULL, 0, GTK_WIDGET(preview->canvas)->allocation.width, i * GTK_WIDGET(preview)->allocation.height/preview->views - SPLITTER_WIDTH/2); } } g_object_unref(gc); if (cr) cairo_destroy(cr); gdk_window_end_paint(window); #undef CAIRO_LINE } static void realize(GtkWidget *widget, gpointer data) { RSPreviewWidget *preview = RS_PREVIEW_WIDGET(widget); if (preview->zoom_to_fit) { gtk_widget_hide(preview->vscrollbar); gtk_widget_hide(preview->hscrollbar); } else { gtk_widget_show(preview->vscrollbar); gtk_widget_show(preview->hscrollbar); } } static gboolean scroll(GtkWidget *widget, GdkEventScroll *event, gpointer user_data) { RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data); if (!preview->zoom_to_fit) { GtkAdjustment *adj; gdouble value; gdouble page_size; gdouble upper; if (event->state & GDK_CONTROL_MASK) adj = preview->hadjustment; else adj = preview->vadjustment; g_object_get(G_OBJECT(adj), "page-size", &page_size, "upper", &upper, NULL); if (event->direction == GDK_SCROLL_UP) value = MIN(gtk_adjustment_get_value(adj)-page_size/5.0, upper-page_size); else value = MIN(gtk_adjustment_get_value(adj)+page_size/5.0, upper-page_size); gtk_adjustment_set_value(adj, value); } return TRUE; } static gboolean expose(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data); redraw(preview, &event->area); return TRUE; } static void size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data) { RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data); gint view, max_width, max_height; const gdouble width = (gdouble) allocation->width; const gdouble height = (gdouble) allocation->height; g_object_set(G_OBJECT(preview->hadjustment), "page_size", width, "page-increment", width/1.2, NULL); g_object_set(G_OBJECT(preview->vadjustment), "page_size", height, "page-increment", height/1.2, NULL); get_max_size(preview, &max_width, &max_height); for(view=0;viewviews;view++) rs_filter_set_recursive(preview->filter_end[view], "width", max_width, "height", max_height, NULL); } static gboolean scrollbar_press(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data); rs_preview_widget_quick_start(preview, TRUE); return FALSE; } static gboolean scrollbar_release(GtkWidget *widget, GdkEventButton *event, gpointer user_data) { RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data); rs_preview_widget_quick_end(preview); return FALSE; } static void adjustment_changed(GtkAdjustment *adjustment, gpointer user_data) { RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data); if (!preview->zoom_to_fit) { /* Update Screen */ DIRTY(preview->dirty[0], SCREEN); rs_preview_widget_update(preview, TRUE); } } static gboolean button(GtkWidget *widget, GdkEventButton *event, RSPreviewWidget *preview) { const gint x = (gint) (event->x+0.5f); const gint y = (gint) (event->y+0.5f); GdkWindow *window = GTK_WIDGET(preview->canvas)->window; const gint view = get_view_from_coord(preview, x, y); GtkUIManager *ui_manager = gui_get_uimanager(); GdkScreen *preview_screen = gtk_widget_get_screen(GTK_WIDGET(preview)); gint screen_number = gdk_screen_get_monitor_at_point(preview_screen, x,y); gint real_x, real_y; gint scaled_x, scaled_y; gboolean inside_image = get_image_coord(preview, view, x, y, &scaled_x, &scaled_y, &real_x, &real_y, NULL, NULL); g_return_val_if_fail(VIEW_IS_VALID(view), FALSE); /* White balance picker */ if (inside_image && (event->type == GDK_BUTTON_PRESS) && (event->button == 1) && (preview->state & WB_PICKER) && !(event->state & GDK_CONTROL_MASK) && g_signal_has_handler_pending(preview, signals[WB_PICKED], 0, FALSE)) { RS_PREVIEW_CALLBACK_DATA cbdata; make_cbdata(preview, view, &cbdata, scaled_x, scaled_y, real_x, real_y); g_signal_emit (G_OBJECT (preview), signals[WB_PICKED], 0, &cbdata); } /* Pop-up-menu */ else if ((event->type == GDK_BUTTON_PRESS) && (event->button==3) && (preview->state & NORMAL)) { /* Hack to mark uncrop and unstraighten as in/sensitive */ rs_core_action_group_activate("PhotoMenu"); if (view==0) { GtkWidget *menu = gtk_ui_manager_get_widget (ui_manager, "/PreviewPopup"); gtk_menu_set_screen(GTK_MENU(menu), preview_screen); gtk_menu_set_monitor(GTK_MENU(menu),screen_number); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); } else { GtkWidget *menu = gtk_ui_manager_get_widget (ui_manager, "/PreviewPopupRight"); gtk_menu_set_screen(GTK_MENU(menu), preview_screen); gtk_menu_set_monitor(GTK_MENU(menu),screen_number); gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL, 0, GDK_CURRENT_TIME); } } /* Crop begin */ else if ((event->type == GDK_BUTTON_PRESS) && (event->button==1) && (preview->state & CROP_START)) { preview->crop_start.x = real_x; preview->crop_start.y = real_y; preview->crop_near = CROP_NEAR_SE; preview->state = CROP_MOVE_CORNER; } /* Crop release */ else if ((event->type == GDK_BUTTON_RELEASE) && (event->button==1) && (preview->state & CROP)) { preview->state = CROP_IDLE; } /* Crop move corner */ else if ((event->type == GDK_BUTTON_PRESS) && (event->button==1) && (preview->state & CROP_IDLE)) { preview->crop_start.x = real_x; preview->crop_start.y = real_y; switch(preview->crop_near) { case CROP_NEAR_N: case CROP_NEAR_S: case CROP_NEAR_W: case CROP_NEAR_E: case CROP_NEAR_INSIDE: preview->state = CROP_MOVE_ALL; break; case CROP_NEAR_NW: preview->crop_start.x = preview->roi.x2; preview->crop_start.y = preview->roi.y2; preview->state = CROP_MOVE_CORNER; break; case CROP_NEAR_NE: preview->crop_start.x = preview->roi.x1; preview->crop_start.y = preview->roi.y2; preview->state = CROP_MOVE_CORNER; break; case CROP_NEAR_SE: preview->crop_start.x = preview->roi.x1; preview->crop_start.y = preview->roi.y1; preview->state = CROP_MOVE_CORNER; break; case CROP_NEAR_SW: preview->crop_start.x = preview->roi.x2; preview->crop_start.y = preview->roi.y1; preview->state = CROP_MOVE_CORNER; break; default: preview->crop_start.x = real_x; preview->crop_start.y = real_y; preview->state = CROP_MOVE_CORNER; break; } } /* Cancel */ else if ((event->type == GDK_BUTTON_PRESS) && (event->button==3) && (!(preview->state & NORMAL))) { if (preview->state & CROP) { if (preview->crop_near == CROP_NEAR_INSIDE) crop_end(preview, TRUE); else crop_end(preview, FALSE); } if (preview->state & STRAIGHTEN_START) gui_status_pop(preview->status_num); preview->state = WB_PICKER; gdk_window_set_cursor(window, cur_normal); } /* Begin straighten */ else if ((event->type == GDK_BUTTON_PRESS) && (event->button==1) && (preview->state & STRAIGHTEN_START)) { preview->straighten_start.x = (gint) (event->x+0.5f); preview->straighten_start.y = (gint) (event->y+0.5f); preview->state = STRAIGHTEN_MOVE; } /* Move straighten */ else if ((event->type == GDK_BUTTON_RELEASE) && (event->button==1) && (preview->state & STRAIGHTEN_MOVE)) { preview->straighten_end.x = (gint) (event->x+0.5f); preview->straighten_end.y = (gint) (event->y+0.5f); preview->state = WB_PICKER; rs_photo_set_angle(preview->photo, preview->straighten_angle, TRUE); gui_status_pop(preview->status_num); } /* Middle mouse -> loupe */ else if ((event->type == GDK_BUTTON_PRESS) && (event->button==2)) { rs_loupe_set_coord(preview->loupe, real_x, real_y); rs_preview_widget_set_loupe_enabled(preview, TRUE); } /* CTRL + left mouse -> loupe */ else if ((event->type == GDK_BUTTON_PRESS) && (event->button==1) && (event->state & GDK_CONTROL_MASK)) { rs_loupe_set_screen(preview->loupe, preview_screen, screen_number); rs_loupe_set_coord(preview->loupe, real_x, real_y); rs_preview_widget_set_loupe_enabled(preview, TRUE); } if (event->type == GDK_BUTTON_RELEASE) rs_preview_widget_set_loupe_enabled(preview, FALSE); return FALSE; } static gboolean motion(GtkWidget *widget, GdkEventMotion *event, gpointer user_data) { RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data); GdkWindow *window = GTK_WIDGET(preview->canvas)->window; gint x, y; gint real_x, real_y; gint scaled_x, scaled_y; gint max_w, max_h; gint view; gint i; GdkModifierType mask; RS_RECT scaled; gboolean inside_image = FALSE; gdk_window_get_pointer(window, &x, &y, &mask); view = get_view_from_coord(preview, x, y); if ((x == preview->last_x) && (y == preview->last_y)) return TRUE; preview->last_x = x; preview->last_y = y; /* Bail in silence */ if (!VIEW_IS_VALID(view)) return TRUE; if (preview->photo) inside_image = get_image_coord(preview, view, x, y, &scaled_x, &scaled_y, &real_x, &real_y, &max_w, &max_h); /* if (preview->state & MOVE) { GtkAdjustment *adj; gdouble val; if (coord_diff.x != 0) { adj = gtk_viewport_get_hadjustment(GTK_VIEWPORT(preview->viewport[0])); val = gtk_adjustment_get_value(adj) + coord_diff.x; if (val > (preview->scaled->w - adj->page_size)) val = preview->scaled->w - adj->page_size; gtk_adjustment_set_value(adj, val); } if (coord_diff.y != 0) { adj = gtk_viewport_get_vadjustment(GTK_VIEWPORT(preview->viewport[0])); val = gtk_adjustment_get_value(adj) + coord_diff.y; if (val > (preview->scaled->h - adj->page_size)) val = preview->scaled->h - adj->page_size; gtk_adjustment_set_value(adj, val); } } */ if ((mask & GDK_BUTTON1_MASK) && (preview->state & CROP_MOVE_CORNER)) { preview->roi.x1 = preview->crop_start.x; preview->roi.y1 = preview->crop_start.y; preview->roi.x2 = real_x; preview->roi.y2 = real_y; rs_rect_normalize(&preview->roi, &preview->roi); /* Update near */ if (real_x > preview->crop_start.x) preview->crop_near = CROP_NEAR_E; else preview->crop_near = CROP_NEAR_W; if (real_y > preview->crop_start.y) preview->crop_near |= CROP_NEAR_S; else preview->crop_near |= CROP_NEAR_N; /* Do aspect restriction */ crop_find_size_from_aspect(&preview->roi, preview->crop_aspect, preview->crop_near); for(i=0;iviews;i++) DIRTY(preview->dirty[i], SCREEN); rs_preview_widget_update(preview, TRUE); } if ((mask & GDK_BUTTON1_MASK) && (preview->state & CROP_MOVE_ALL)) { gint dist_x, dist_y; dist_x = real_x - preview->crop_start.x; dist_y = real_y - preview->crop_start.y; /* check borders */ if ((preview->crop_move.x1 + dist_x) < 0) dist_x = 0 - preview->crop_move.x1; if ((preview->crop_move.y1 + dist_y) < 0) dist_y = 0 - preview->crop_move.y1; if (((preview->crop_move.x2 + dist_x) > max_w)) dist_x = max_w - preview->crop_move.x2; if (((preview->crop_move.y2 + dist_y) > max_h)) dist_y = max_h - preview->crop_move.y2; preview->roi.x1 = preview->crop_move.x1+dist_x; preview->roi.y1 = preview->crop_move.y1+dist_y; preview->roi.x2 = preview->crop_move.x2+dist_x; preview->roi.y2 = preview->crop_move.y2+dist_y; for(i=0;iviews;i++) DIRTY(preview->dirty[i], SCREEN); rs_preview_widget_update(preview, TRUE); } /* Update crop_near if mouse button 1 is NOT pressed */ if ((preview->state & CROP) && !(mask & GDK_BUTTON1_MASK) && (preview->state != CROP_START)) { gfloat scale; g_object_get(preview->filter_resample[view], "scale", &scale, NULL); scaled.x1 = preview->roi.x1 * scale; scaled.y1 = preview->roi.y1 * scale; scaled.x2 = preview->roi.x2 * scale; scaled.y2 = preview->roi.y2 * scale; preview->crop_near = crop_near(&scaled, scaled_x, scaled_y); /* Set cursor accordingly */ switch(preview->crop_near) { case CROP_NEAR_NW: gdk_window_set_cursor(window, cur_nw); break; case CROP_NEAR_NE: gdk_window_set_cursor(window, cur_ne); break; case CROP_NEAR_SE: gdk_window_set_cursor(window, cur_se); break; case CROP_NEAR_SW: gdk_window_set_cursor(window, cur_sw); break; case CROP_NEAR_N: case CROP_NEAR_S: case CROP_NEAR_W: case CROP_NEAR_E: case CROP_NEAR_INSIDE: preview->crop_move = preview->roi; gdk_window_set_cursor(window, cur_fleur); break; default: if (inside_image) gdk_window_set_cursor(window, cur_crop); else gdk_window_set_cursor(window, cur_normal); break; } } if (preview->state == CROP_START) { if (inside_image) gdk_window_set_cursor(window, cur_crop); else gdk_window_set_cursor(window, cur_normal); } if (preview->state & STRAIGHTEN) { if (inside_image) gdk_window_set_cursor(window, cur_rotate); else gdk_window_set_cursor(window, cur_normal); } if ((preview->state & WB_PICKER)) { if (inside_image) gdk_window_set_cursor(window, cur_color_picker); else gdk_window_set_cursor(window, cur_normal); } if ((mask & GDK_BUTTON1_MASK) && (preview->state & STRAIGHTEN_MOVE)) { gint i; gdouble degrees; gint vx, vy; preview->straighten_end.x = x; preview->straighten_end.y = y; vx = preview->straighten_start.x - preview->straighten_end.x; vy = preview->straighten_start.y - preview->straighten_end.y; for(i=0;iviews;i++) DIRTY(preview->dirty[i], SCREEN); rs_preview_widget_update(preview, TRUE); degrees = -atan2(vy,vx)*180/M_PI; if (degrees>=0.0) { if ((degrees>45.0) && (degrees<=135.0)) degrees -= 90.0; else if (degrees>135.0) degrees -= 180.0; } else /* <0.0 */ { if ((degrees < -45.0) && (degrees >= -135.0)) degrees += 90.0; else if (degrees<-135.0) degrees += 180.0; } preview->straighten_angle = degrees; } /* If anyone is listening, go ahead and emit signal */ if (inside_image && g_signal_has_handler_pending(preview, signals[MOTION_SIGNAL], 0, FALSE)) { RS_PREVIEW_CALLBACK_DATA cbdata; if (make_cbdata(preview, view, &cbdata, scaled_x, scaled_y, real_x, real_y)) { g_signal_emit (G_OBJECT (preview), signals[MOTION_SIGNAL], 0, &cbdata); rs_toolbox_hover_value_updated(preview->toolbox, cbdata.pixel8); } } /* Check not to generate superfluous signals "leave"*/ if (inside_image != preview->prev_inside_image) { preview->prev_inside_image = inside_image; if (!inside_image && g_signal_has_handler_pending(preview, signals[LEAVE_SIGNAL], 0, FALSE)) { RS_PREVIEW_CALLBACK_DATA cbdata; if (make_cbdata(preview, view, &cbdata, scaled_x, scaled_y, real_x, real_y)) { g_signal_emit (G_OBJECT (preview), signals[LEAVE_SIGNAL], 0, &cbdata); rs_toolbox_hover_value_updated(preview->toolbox, NULL); } } } /* Update loupe if needed */ if (preview->loupe_enabled) rs_loupe_set_coord(preview->loupe, real_x, real_y); return TRUE; } static gboolean leave(GtkWidget *widget, GdkEventCrossing *event, gpointer user_data) { RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data); /* Check not to generate superfluous signals "leave"*/ if (preview->prev_inside_image) { preview->prev_inside_image = FALSE; if (g_signal_has_handler_pending(preview, signals[LEAVE_SIGNAL], 0, FALSE)) g_signal_emit (G_OBJECT (preview), signals[LEAVE_SIGNAL], 0, NULL); } return TRUE; } static void settings_changed(RS_PHOTO *photo, RSSettingsMask mask, RSPreviewWidget *preview) { gint view; /* Seperate snapshot */ const gint snapshot = mask>>24; mask &= 0x00ffffff; /* Return if no more relevant */ if (photo != preview->photo) return; for(view=0;viewviews;view++) { if (preview->snapshot[view] == snapshot) { DIRTY(preview->dirty[view], SCREEN); if (mask & MASK_TCA || mask & MASK_VIGNETTING) { gfloat tca_kr = 0.0; gfloat tca_kb = 0.0; gfloat vignetting = 0.0; g_object_get(preview->photo->settings[preview->snapshot[view]], "tca_kr", &tca_kr, NULL); g_object_get(preview->photo->settings[preview->snapshot[view]], "tca_kb", &tca_kb, NULL); g_object_get(preview->photo->settings[preview->snapshot[view]], "vignetting", &vignetting, NULL); rs_filter_set_recursive(preview->filter_end[view], "tca_kr", tca_kr, "tca_kb", tca_kb, "vignetting", vignetting, NULL); } } } } static void lens_changed(RS_PHOTO *photo, RSPreviewWidget *preview) { /* For now lensfun is the same for all views, so we update the first */ DIRTY(preview->dirty[0], SCREEN); rs_filter_set_recursive(preview->filter_end[0], "distortion-enabled", TRUE, NULL); } static void profile_changed(RS_PHOTO *photo, gpointer profile, RSPreviewWidget *preview) { gint view; if (photo == preview->photo) { /* Set view profile */ for(view=0;viewfilter_dcp[view], "profile", profile, NULL); else g_object_set(preview->filter_dcp[view], "use-profile", FALSE, NULL); rs_filter_set_recursive(preview->filter_end[view], "settings", preview->photo->settings[preview->snapshot[view]], NULL); } /* Set navigator profile, uses view 0 */ if (RS_IS_DCP_FILE(profile)) g_object_set(preview->navigator_filter_dcp, "profile", profile, NULL); else g_object_set(preview->navigator_filter_dcp, "use-profile", FALSE, NULL); rs_filter_set_recursive(preview->navigator_filter_end, "settings", preview->photo->settings[preview->snapshot[0]], NULL); } } static void filter_changed(RSFilter *filter, RSFilterChangedMask mask, RSPreviewWidget *preview) { gint view; /* See if we can find a matching plugin */ for(view=0;viewviews;view++) { if (filter == preview->filter_end[view]) { if ((view==0) && (mask & RS_FILTER_CHANGED_DIMENSION)) { gint width, height; rs_filter_get_size_simple(preview->filter_end[0], preview->request[0], &width, &height); gdouble val; val = (gdouble) width; g_object_set(G_OBJECT(preview->hadjustment), "upper", val, NULL); val = (gdouble) height; g_object_set(G_OBJECT(preview->vadjustment), "upper", val, NULL); } DIRTY(preview->dirty[view], SCREEN); rs_preview_widget_update(preview, TRUE); } } } static void crop_aspect_changed(gpointer active, gpointer user_data) { gint view; RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data); preview->crop_aspect = *((gdouble *)active); for(view=0;viewviews;view++) DIRTY(preview->dirty[view], SCREEN); rs_preview_widget_update(preview, FALSE); } static void crop_grid_changed(gpointer active, gpointer user_data) { gint view; RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data); preview->roi_grid = GPOINTER_TO_INT(active); for(view=0;viewviews;view++) DIRTY(preview->dirty[view], SCREEN); rs_preview_widget_update(preview, FALSE); } static void crop_apply_clicked(GtkButton *button, gpointer user_data) { RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data); crop_end(preview, TRUE); } static void crop_cancel_clicked(GtkButton *button, gpointer user_data) { RSPreviewWidget *preview = RS_PREVIEW_WIDGET(user_data); crop_end(preview, FALSE); } static void crop_end(RSPreviewWidget *preview, gboolean accept) { gint view; for(view=0;viewviews;view++) DIRTY(preview->dirty[view], SCREEN); if (accept) rs_photo_set_crop(preview->photo, &preview->roi); gtk_widget_destroy(preview->tool); preview->state = WB_PICKER; gdk_window_set_cursor(GTK_WIDGET(preview->canvas)->window, cur_normal); gui_status_pop(preview->status_num); rs_preview_widget_update(preview, TRUE); } static void crop_find_size_from_aspect(RS_RECT *roi, gdouble aspect, CROP_NEAR near) { const gdouble original_w = (gdouble) ABS(roi->x2 - roi->x1 + 1); const gdouble original_h = (gdouble) ABS(roi->y2 - roi->y1 + 1); gdouble corrected_w, corrected_h; gdouble original_aspect = original_w/original_h; if (aspect == 0.0) return; if (original_aspect > 1.0) { /* landscape */ if (original_aspect > aspect) { corrected_h = original_h; corrected_w = original_h * aspect; } else { corrected_w = original_w; corrected_h = original_w / aspect; } } else { /* portrait */ if ((1.0/original_aspect) > aspect) { corrected_w = original_w; corrected_h = original_w * aspect; } else { corrected_h = original_h; corrected_w = original_h / aspect; } } switch(near) { case CROP_NEAR_NW: /* x1,y1 */ roi->x1 = roi->x2 - ((gint)corrected_w) + 1; roi->y1 = roi->y2 - ((gint)corrected_h) + 1; break; case CROP_NEAR_NE: /* x2,y1 */ roi->x2 = roi->x1 + ((gint)corrected_w) - 1; roi->y1 = roi->y2 - ((gint)corrected_h) + 1; break; case CROP_NEAR_SE: /* x2,y2 */ roi->x2 = roi->x1 + ((gint)corrected_w) - 1; roi->y2 = roi->y1 + ((gint)corrected_h) - 1; break; case CROP_NEAR_SW: /* x1,y2 */ roi->x1 = roi->x2 - ((gint)corrected_w) + 1; roi->y2 = roi->y1 + ((gint)corrected_h) - 1; break; default: /* Shut up GCC! */ break; } } static CROP_NEAR crop_near(RS_RECT *roi, gint x, gint y) { CROP_NEAR near = CROP_NEAR_NOTHING; #define NEAR(aim, target) (ABS((target)-(aim))<9) if (NEAR(y, roi->y1)) /* N */ { if (NEAR(x,roi->x1)) /* NW */ near = CROP_NEAR_NW; else if (NEAR(x,roi->x2)) /* NE */ near = CROP_NEAR_NE; else if ((x > roi->x1) && (x < roi->x2)) /* N */ near = CROP_NEAR_N; } else if (NEAR(y, roi->y2)) /* S */ { if (NEAR(x,roi->x1)) /* SW */ near = CROP_NEAR_SW; else if (NEAR(x,roi->x2)) /* SE */ near = CROP_NEAR_SE; else if ((x > roi->x1) && (x < roi->x2)) near = CROP_NEAR_S; } else if (NEAR(x, roi->x1) && (y > roi->y1) && (y < roi->y2)) /* West */ near = CROP_NEAR_W; else if (NEAR(x, roi->x2) && (y > roi->y1) && (y < roi->y2)) /* East */ near = CROP_NEAR_E; if (near == CROP_NEAR_NOTHING) { if (((x>roi->x1) && (xx2)) && ((y>roi->y1) && (yy2)) && (((roi->x2-roi->x1)>2) && ((roi->y2-roi->y1)>2))) near = CROP_NEAR_INSIDE; else near = CROP_NEAR_OUTSIDE; } return near; #undef NEAR } static gboolean make_cbdata(RSPreviewWidget *preview, const gint view, RS_PREVIEW_CALLBACK_DATA *cbdata, gint screen_x, gint screen_y, gint real_x, gint real_y) { gint row, col; gushort *pixel; gdouble r=0.0f, g=0.0f, b=0.0f; if ((view<0) || (view>(preview->views-1))) return FALSE; if (!preview->last_roi[view]) return FALSE; RSFilterRequest *request = rs_filter_request_clone(preview->request[view]); rs_filter_request_set_quick(request, TRUE); if (preview->zoom_to_fit) rs_filter_request_set_roi(request, NULL); rs_filter_set_recursive(RS_FILTER(preview->filter_input), "demosaic-allow-downscale", preview->zoom_to_fit, NULL); RSFilterResponse *response = rs_filter_get_image(preview->filter_cache1[view], request); RS_IMAGE16 *image = rs_filter_response_get_image(response); g_object_unref(response); /* We set input to the cache placed before exposure mask */ response = rs_filter_get_image8(preview->filter_cache3[view], request); GdkPixbuf *buffer = rs_filter_response_get_image8(response); g_object_unref(response); g_object_unref(request); if (!image) return FALSE; if (!buffer) return FALSE; /* Get the real coordinates */ cbdata->pixel = rs_image16_get_pixel(image, screen_x, screen_y, TRUE); cbdata->x = real_x; cbdata->y = real_y; /* Make sure these is within boundaries */ screen_x = CLAMP(screen_x, 0, gdk_pixbuf_get_width(buffer)-1); screen_y = CLAMP(screen_y, 0, gdk_pixbuf_get_height(buffer)-1); cbdata->pixel8[R] = GET_PIXBUF_PIXEL(buffer, screen_x, screen_y)[R]; cbdata->pixel8[G] = GET_PIXBUF_PIXEL(buffer, screen_x, screen_y)[G]; cbdata->pixel8[B] = GET_PIXBUF_PIXEL(buffer, screen_x, screen_y)[B]; /* Find average pixel values from 3x3 pixels */ for(row=-1; row<2; row++) { for(col=-1; col<2; col++) { pixel = rs_image16_get_pixel(image, screen_x+col, screen_y+row, TRUE); r += pixel[R]/65535.0; g += pixel[G]/65535.0; b += pixel[B]/65535.0; } } cbdata->pixelfloat[R] = (gfloat) r/9.0f; cbdata->pixelfloat[G] = (gfloat) g/9.0f; cbdata->pixelfloat[B] = (gfloat) b/9.0f; g_object_unref(buffer); g_object_unref(image); return TRUE; } rawstudio-2.0/src/rs-batch.h0000644000175000017500000000437011526533645012776 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_BATCH_H #define RS_BATCH_H #include "application.h" typedef enum { LOCK_SCALE = 0, LOCK_WIDTH, LOCK_HEIGHT, LOCK_BOUNDING_BOX, } RS_QUEUE_SIZE_LOCK; struct _RS_QUEUE { GtkTreeModel *list; GtkTreeView *view; gchar *directory; gchar *filename; RSOutput *output; RS_QUEUE_SIZE_LOCK size_lock; gdouble size; gint width; gint height; gint scale; GtkWidget *start_button; GtkWidget *remove_button; GtkWidget *remove_all_button; GtkWidget *size_window; GtkWidget *size_label; GtkWidget *size_width[3]; GtkWidget *size_height[3]; GtkWidget *size_scale[3]; RS_BLOB *rs; }; enum { RS_QUEUE_ELEMENT_FILENAME = 0, RS_QUEUE_ELEMENT_FILENAME_SHORT, RS_QUEUE_ELEMENT_SETTING_ID, RS_QUEUE_ELEMENT_SETTING_ID_ABC, RS_QUEUE_ELEMENT_THUMBNAIL }; extern RS_QUEUE* rs_batch_new_queue(RS_BLOB *rs); extern gboolean rs_batch_add_to_queue(RS_QUEUE *queue, const gchar *filename, const gint setting_id); extern gboolean rs_batch_remove_from_queue(RS_QUEUE *queue, const gchar *filename, gint setting_id); extern gboolean rs_batch_exists_in_queue(RS_QUEUE *queue, const gchar *filename, gint setting_id); extern void rs_batch_process(RS_QUEUE *queue); extern GtkWidget *make_batchbox(RS_QUEUE *queue); /** * Returns the number of entries in the batch queue * @param queue A RS_QUEUE * @return The number of entries in the queue */ extern gint rs_batch_num_entries(RS_QUEUE *queue); #endif /* RS_BATCH_H */ rawstudio-2.0/src/rs-loupe.h0000644000175000017500000000515611526533645013044 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_LOUPE_H #define RS_LOUPE_H #include G_BEGIN_DECLS #define RS_TYPE_LOUPE rs_loupe_get_type() #define RS_LOUPE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_LOUPE, RSLoupe)) #define RS_LOUPE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_LOUPE, RSLoupeClass)) #define RS_IS_LOUPE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_LOUPE)) #define RS_IS_LOUPE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_LOUPE)) #define RS_LOUPE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_LOUPE, RSLoupeClass)) typedef struct { GtkWindow parent; RSFilter *filter; GtkWidget *canvas; gint center_x; gint center_y; gboolean left; gboolean atop; RSColorSpace *display_color_space; GdkScreen *display_screen; gint screen_num; } RSLoupe; typedef struct { GtkWindowClass parent_class; } RSLoupeClass; GType rs_loupe_get_type(void); /** * Instantiates a new RSLoupe * @return A new RSLoupe */ RSLoupe *rs_loupe_new(void); /** * Set the RSFilter a RSLoupe will get its image data from * @param loupe A RSLoupe * @param filter A RSFilter */ void rs_loupe_set_filter(RSLoupe *loupe, RSFilter *filter); /** * Set center coordinate of the RSLoupe, this will be clamped to filter size * @param loupe A RSLoupe * @param center_x Center of loupe on the X-axis * @param center_y Center of loupe on the Y-axis */ void rs_loupe_set_coord(RSLoupe *loupe, gint center_x, gint center_y); /** * Set display colorspace * @param loupe A RSLoupe * @param display_color_space An RSColorSpace that should be used to display the content of the loupe */ void rs_loupe_set_colorspace(RSLoupe *loupe, RSColorSpace *display_color_space); void rs_loupe_set_screen(RSLoupe* loupe, GdkScreen* screen, gint num_screen); G_END_DECLS #endif /* RS_LOUPE_H */ rawstudio-2.0/src/rs-tiff.c0000644000175000017500000001030111526533645012627 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include #include #include #include #include "application.h" #include "rs-tiff.h" static void rs_tiff_generic_init(TIFF *output, guint w, guint h, const guint samples_per_pixel, const gchar *profile_filename, gboolean uncompressed); static void rs_tiff_generic_init(TIFF *output, guint w, guint h, const guint samples_per_pixel, const gchar *profile_filename, gboolean uncompressed) { TIFFSetField(output, TIFFTAG_IMAGEWIDTH, w); TIFFSetField(output, TIFFTAG_IMAGELENGTH, h); TIFFSetField(output, TIFFTAG_ORIENTATION, ORIENTATION_TOPLEFT); TIFFSetField(output, TIFFTAG_SAMPLESPERPIXEL, samples_per_pixel); TIFFSetField(output, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG); TIFFSetField(output, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_RGB); if (uncompressed) TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_NONE); else { TIFFSetField(output, TIFFTAG_COMPRESSION, COMPRESSION_DEFLATE); TIFFSetField(output, TIFFTAG_ZIPQUALITY, 9); } if (profile_filename) { gchar *buffer = NULL; gsize length = 0; if (g_file_get_contents(profile_filename, &buffer, &length, NULL)) TIFFSetField(output, TIFFTAG_ICCPROFILE, length, buffer); g_free(buffer); } TIFFSetField(output, TIFFTAG_ROWSPERSTRIP, TIFFDefaultStripSize(output, 0)); } gboolean rs_tiff8_save(GdkPixbuf *pixbuf, const gchar *filename, const gchar *profile_filename, gboolean uncompressed) { TIFF *output; gint row; if((output = TIFFOpen(filename, "w")) == NULL) return(FALSE); rs_tiff_generic_init(output, gdk_pixbuf_get_width(pixbuf), gdk_pixbuf_get_height(pixbuf), 3, profile_filename, uncompressed); TIFFSetField(output, TIFFTAG_BITSPERSAMPLE, 8); for(row=0;roww, image->h, image->channels, profile_filename, uncompressed); TIFFSetField(output, TIFFTAG_BITSPERSAMPLE, 16); for(row=0;rowh;row++) { gushort *buf = GET_PIXEL(image, 0, row); TIFFWriteScanline(output, buf, row, 0); } TIFFClose(output); } else { g_static_mutex_unlock(&filename_lock); return FALSE; } return TRUE ; } RS_IMAGE16 * rs_tiff16_load(const gchar *filename) { RS_IMAGE16 *image = NULL; g_assert(filename != NULL); TIFF* tif = TIFFOpen(filename, "r"); if (tif) { guint w=0, h=0, samples_per_pixel=0, row, bits_per_sample=0; TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &w); TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &h); TIFFGetField(tif, TIFFTAG_SAMPLESPERPIXEL, &samples_per_pixel); TIFFGetField(tif, TIFFTAG_BITSPERSAMPLE, &bits_per_sample); if ((bits_per_sample == 16) && w && h) image = rs_image16_new(w, h, samples_per_pixel, 4); if (image) /* Write directly to pixel data */ for(row=0;row, * * Anders Kvist and Klaus Post * * 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 WIN32 #include #endif typedef struct _RS_CONFBOX RS_CONFBOX; #define gui_label_set_text_printf(label, format, ...) do { \ gchar *__new_text = g_strdup_printf(format, __VA_ARGS__); \ gtk_label_set_text(label, __new_text); \ g_free(__new_text); \ } while (0) extern gpointer gui_confbox_get_active(RS_CONFBOX *confbox); extern void gui_confbox_add_entry(RS_CONFBOX *confbox, const gchar *conf_id, const gchar *text, gpointer *user_data); extern void gui_confbox_load_conf(RS_CONFBOX *confbox, gchar *default_value); extern void gui_confbox_set_callback(RS_CONFBOX *confbox, gpointer user_data, void (*callback)(gpointer active, gpointer user_data)); extern RS_CONFBOX *gui_confbox_new(const gchar *conf_key); extern void gui_confbox_destroy(RS_CONFBOX *confbox); extern GtkWidget *gui_confbox_get_widget(RS_CONFBOX *confbox); extern RS_CONFBOX *gui_confbox_filetype_new(const gchar *conf_key); extern void checkbox_set_conf(GtkToggleButton *togglebutton, gpointer user_data); extern GtkWidget *checkbox_from_conf(const gchar *conf, gchar *label, gboolean default_value); extern GtkWidget *gui_tooltip_no_window(GtkWidget *widget, gchar *tip_tip, gchar *tip_private); extern void gui_tooltip_window(GtkWidget *widget, gchar *tip_tip, gchar *tip_private); extern void gui_batch_directory_entry_changed(GtkEntry *entry, gpointer user_data); extern void gui_batch_filename_entry_changed(GtkComboBox *combobox, gpointer user_data); extern void gui_batch_filetype_combobox_changed(gpointer active, gpointer user_data); extern gboolean window_key_press_event(GtkWidget *widget, GdkEventKey *event); extern void pos_menu_below_widget(GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer user_data); extern GtkWidget *gui_framed(GtkWidget *widget, const gchar *title, GtkShadowType shadowtype); extern GtkWidget *gui_aligned(GtkWidget *widget, const gfloat xalign, const gfloat yalign, const gfloat xscale, const gfloat yscale); extern GdkPixbuf *cairo_convert_to_pixbuf (cairo_surface_t *surface); extern void gui_set_block_keyboard(gboolean block_keyboard); /** * Build and show a popup-menu * @param widget A widget to pop up below or NULL to pop upat mouse pointer * @param user_data Pointer to pass to callback * @param ... Pairs of gchar labels and callbaks, terminated by -1 * @return The newly created menu */ GtkWidget *gui_menu_popup(GtkWidget *widget, gpointer user_data, ...); typedef enum { STANDARD_GTK_THEME, RAWSTUDIO_THEME } RS_THEME; extern void gui_select_theme(RS_THEME theme); /** * Creates a new GtkButton widget. * @param stock_id A stock id registered with GTK+ * @param label The text to show besides the icon * @return a new GtkButton */ extern GtkWidget *gui_button_new_from_stock_with_label(const gchar *stock_id, const gchar *label); /** * This will create a new GtkLabel that can alternate text when the pointer is * hovering above it. * @param normal_text The text to display when pointer is not hovering above * @param hover_text The text to display when pointer is hovering above the label * @return A new GtkLabel */ extern GtkWidget *gui_label_new_with_mouseover(const gchar *normal_text, const gchar *hover_text); extern void gui_box_toggle_callback(GtkExpander *expander, gchar *key); #ifndef WIN32 extern void gui_box_notify(GConfClient *client, guint cnxn_id, GConfEntry *entry, gpointer user_data); #endif extern GtkWidget * gui_box(const gchar *title, GtkWidget *in, gchar *key, gboolean default_expanded); rawstudio-2.0/src/rs-toolbox.h0000644000175000017500000000454011526533645013402 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_TOOLBOX_H #define RS_TOOLBOX_H #include #include #include #include "rs-settings.h" #include "rs-image.h" #include "rs-photo.h" G_BEGIN_DECLS #define RS_TYPE_TOOLBOX rs_toolbox_get_type() #define RS_TOOLBOX(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_TOOLBOX, RSToolbox)) #define RS_TOOLBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_TOOLBOX, RSToolboxClass)) #define RS_IS_TOOLBOX(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_TOOLBOX)) #define RS_IS_TOOLBOX_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_TOOLBOX)) #define RS_TOOLBOX_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_TOOLBOX, RSToolboxClass)) typedef struct _RSToolbox RSToolbox; typedef struct { GtkScrolledWindowClass parent_class; } RSToolboxClass; GType rs_toolbox_get_type (void); extern GtkWidget * rs_toolbox_new (void); extern GtkWidget * rs_toolbox_add_widget(RSToolbox *toolbox, GtkWidget *widget, const gchar *title); extern void rs_toolbox_set_photo(RSToolbox *toolbox, RS_PHOTO *photo); extern gint rs_toolbox_get_selected_snapshot(RSToolbox *toolbox); extern void rs_toolbox_set_selected_snapshot(RSToolbox *toolbox, const gint snapshot); extern void rs_toolbox_set_histogram_input(RSToolbox *toolbox, RSFilter *input, RSColorSpace *display_color_space); extern void rs_toolbox_register_actions(RSToolbox *toolbox); extern void rs_toolbox_hover_value_updated(RSToolbox *toolbox, const guchar *rgb_value); G_END_DECLS #endif /* RS_TOOLBOX_H */ rawstudio-2.0/src/application.h0000644000175000017500000000577411543674627013614 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 APPLICATION_H #define APPLICATION_H #include #include #include #include #include /* Check for thread support */ #if (!defined(G_THREADS_ENABLED) || defined(G_THREADS_IMPL_NONE)) #error GLib was not compiled with thread support, Rawstudio needs threads - sorry. #endif typedef struct _RSStore RSStore; /* Opaque definition, declared in rs-batch.h */ typedef struct _RS_QUEUE RS_QUEUE; typedef struct _photo { GObject parent; gchar *filename; RS_IMAGE16 *input; RSFilterResponse *input_response; RSSettings *settings[3]; gulong settings_signal[3]; gint priority; guint orientation; RSMetadata *metadata; RS_RECT *crop; gdouble angle; gboolean exported; RSColorSpace *embedded_profile; RSDcpFile *dcp; RSIccProfile *icc; gboolean dispose_has_run; RSFilter *thumbnail_filter; RS_RECT *proposed_crop; RSFilter *auto_wb_filter; gdouble *auto_wb_mul; } RS_PHOTO; typedef struct { RS_PHOTO *photo; RSSettings *settings_buffer; RSDcpFile *dcp_buffer; RSIccProfile *icc_buffer; GtkWidget *curve[3]; gint current_setting; RS_QUEUE *queue; RSStore *store; /* These should be moved to a future RS_WINDOW */ GtkWidget *window; gboolean window_fullscreen; GtkWidget *iconbox; GtkWidget *tools; GtkWidget *toolbox; GtkWidget *preview; GtkWidget *window_preview_screen; /* Generic filter chain */ RSFilter *filter_input; RSFilter *filter_demosaic; RSFilter *filter_fuji_rotate; RSFilter *filter_demosaic_cache; RSFilter *filter_lensfun; RSFilter *filter_rotate; RSFilter *filter_crop; RSFilter *filter_end; } RS_BLOB; gboolean rs_photo_save(RS_PHOTO *photo, RSFilter *prior_to_resample, RSOutput *output, gint width, gint height, gboolean keep_aspect, gdouble scale, gint snapshot); gboolean rs_photo_copy_to_clipboard(RS_PHOTO *photo, RSFilter *prior_to_resample, gint width, gint height, gboolean keep_aspect, gdouble scale, gint snapshot); RS_BLOB *rs_new(void); void rs_free(RS_BLOB *rs); /* Cheater function to get the main blob - use carefully! */ RS_BLOB* rs_get_blob(void); void rs_set_photo(RS_BLOB *rs, RS_PHOTO *photo); void rs_white_black_point(RS_BLOB *rs); #endif /* APPLICATION_H */ rawstudio-2.0/src/rs-preview-widget.h0000644000175000017500000001376211534730147014657 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_PREVIEW_WIDGET_H #define RS_PREVIEW_WIDGET_H #include #include "application.h" typedef struct _RSPreviewWidget RSPreviewWidget; typedef struct _RSPreviewWidgetClass RSPreviewWidgetClass; struct _RSPreviewWidgetClass { GtkTableClass parent_class; }; typedef struct _rs_preview_callback_data { gushort *pixel; guchar pixel8[3]; gfloat pixelfloat[3]; gint x; gint y; } RS_PREVIEW_CALLBACK_DATA; extern GType rs_preview_widget_get_type (void); /** * Creates a new RSPreviewWidget * @return A new RSPreviewWidget */ extern GtkWidget *rs_preview_widget_new(GtkWidget *toolbox); /** * Select zoom-to-fit of a RSPreviewWidget * @param preview A RSPreviewWidget * @param zoom_to_fit Set to TRUE to enable zoom-to-fit. */ extern void rs_preview_widget_set_zoom_to_fit(RSPreviewWidget *preview, gboolean zoom_to_fit); /** * Sets active photo of a RSPreviewWidget * @param preview A RSPreviewWidget * @param photo A RS_PHOTO */ extern void rs_preview_widget_set_photo(RSPreviewWidget *preview, RS_PHOTO *photo); /** * Sets settings of active photo of a RSPreviewWidget * @param preview A RSPreviewWidget */ extern void rs_preview_widget_set_photo_settings(RSPreviewWidget *preview); /** * Set input filter for a RSPreviewWidget * @param preview A RSPreviewWidget * @param filter A filter to listen for * @param fast_filter A fast, never updating filter to listen for */ extern void rs_preview_widget_set_filter(RSPreviewWidget *preview, RSFilter *filter, RSFilter *fast_filter); /** * Sets the CMS profile used in preview * @param preview A RSPreviewWidget * @param profile The profile to use */ extern void rs_preview_widget_set_profile(RSPreviewWidget *preview, RSIccProfile *profile); /** * Sets the background color of a RSPreviewWidget * @param preview A RSPreviewWidget * @param color The new background color */ extern void rs_preview_widget_set_bgcolor(RSPreviewWidget *preview, GdkColor *color); /** * Enables or disables split-view * @param preview A RSPreviewWidget * @param split_screen Enables split-view if TRUE, disables if FALSE */ extern void rs_preview_widget_set_split(RSPreviewWidget *preview, gboolean split_screen); /** * Enables or disables lights out mode * @param preview A RSPreviewWidget * @param lightsout Enables lights out mode if TRUE, disables if FALSE */ void rs_preview_widget_set_lightsout(RSPreviewWidget *preview, gboolean lightsout); /** * Sets the active snapshot of a RSPreviewWidget * @param preview A RSPreviewWidget * @param view Which view to set (0..1) * @param snapshot Which snapshot to view (0..2) */ extern void rs_preview_widget_set_snapshot(RSPreviewWidget *preview, const guint view, const gint snapshot); /** * Enables or disables the exposure mask * @param preview A RSPreviewWidget * @param show_exposure_mask Set to TRUE to enabled */ extern void rs_preview_widget_set_show_exposure_mask(RSPreviewWidget *preview, gboolean show_exposure_mask); /** * Gets the status of whether the exposure mask is displayed * @param preview A RSPreviewWidget * @return TRUE is exposure mask is displayed, FALSE otherwise */ extern gboolean rs_preview_widget_get_show_exposure_mask(RSPreviewWidget *preview, gboolean show_exposure_mask); /** * Tells the preview widget to update itself * @param preview A RSPreviewWidget * @param full_redraw Set to TRUE to redraw everything, FALSE to only redraw the image. */ extern void rs_preview_widget_update(RSPreviewWidget *preview, gboolean full_redraw); /** * Puts a RSPreviewWIdget in crop-mode * @param preview A RSPreviewWidget */ extern void rs_preview_widget_crop_start(RSPreviewWidget *preview); /* * Removes crop from the loaded photo * @param preview A RSpreviewWidget */ extern void rs_preview_widget_uncrop(RSPreviewWidget *preview); /* * Puts a RSPreviewWidget in straighten-mode * @param preview A RSPreviewWidget */ extern void rs_preview_widget_straighten(RSPreviewWidget *preview); /* * Removes straighten from the loaded photo * @param preview A RSPreviewWidget */ extern void rs_preview_widget_unstraighten(RSPreviewWidget *preview); /* * Enables quick mode in display * @param preview A RSPreviewWidget */ extern void rs_preview_widget_quick_start(RSPreviewWidget *preview, gboolean keep_quick); /* * Disables quick mode in display and redraws screen * @param preview A RSPreviewWidget */ extern void rs_preview_widget_quick_end(RSPreviewWidget *preview); extern void rs_preview_widget_update_display_colorspace(RSPreviewWidget *preview, gboolean force); #define RS_PREVIEW_TYPE_WIDGET (rs_preview_widget_get_type ()) #define RS_PREVIEW_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_PREVIEW_TYPE_WIDGET, RSPreviewWidget)) #define RS_PREVIEW_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), RS_PREVIEW_WIDGET, RSPreviewWidgetClass)) #define RS_IS_PREVIEW_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_PREVIEW_TYPE_WIDGET)) #define RS_IS_PREVIEW_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), RS_PREVIEW_TYPE_WIDGET)) #define RS_PREVIEW_WIDGET_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_PREVIEW_TYPE_WIDGET, RSPreviewWidgetClass)) #endif /* RS_PREVIEW_WIDGET_H */ rawstudio-2.0/src/gtk-interface.c0000644000175000017500000014604411547155610014011 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include #include #include "application.h" #include "gtk-helper.h" #include "gtk-interface.h" #include "gtk-progress.h" #include "conf_interface.h" #include "rs-cache.h" #include "rs-batch.h" #include "gettext.h" #include "rs-batch.h" #include #include #include "filename.h" #include "rs-store.h" #include "rs-preview-widget.h" #include "rs-photo.h" #include "rs-external-editor.h" #include "rs-actions.h" #include "rs-dir-selector.h" #include "rs-toolbox.h" #include "rs-library.h" #include "rs-tag-gui.h" static GtkStatusbar *statusbar; static gboolean fullscreen; GtkWindow *rawstudio_window; static gint busycount = 0; static GtkWidget *infobox = NULL; static GtkWidget *frame_preview_toolbox = NULL; static GtkWidget *preview_fullscreen_filler = NULL; GdkGC *dashed; GdkGC *grid; static gboolean waiting_for_user_selects_screen = FALSE; static gboolean open_photo(RS_BLOB *rs, const gchar *filename); static void gui_preview_bg_color_changed(GtkColorButton *widget, RS_BLOB *rs); gboolean gui_fullscreen_changed_callback(GtkWidget *widget, gboolean fullscreen, const gchar *conf_fullscreen_key, const gchar *conf_windowed_key); //static void gui_preference_iconview_show_filenames_changed(GtkToggleButton *togglebutton, gpointer user_data); static GtkWidget *gui_make_menubar(RS_BLOB *rs); static void drag_data_received(GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint t, RS_BLOB *rs); static gboolean gui_window_delete(GtkWidget *widget, GdkEvent *event, gpointer user_data); static GtkWidget *gui_window_make(RS_BLOB *rs); static void rs_open_file_delayed(RS_BLOB *rs, const gchar *filename); static void rs_open_file(RS_BLOB *rs, const gchar *filename); static gboolean pane_position(GtkWidget* widget, gpointer dummy, gpointer user_data); static void directory_activated(gpointer instance, const gchar *path, RS_BLOB *rs); void gui_set_busy(gboolean rawstudio_is_busy) { static guint status = 0; if (rawstudio_is_busy) busycount++; else busycount--; if (busycount<0) busycount = 0; if (busycount) { GdkCursor* cursor = gdk_cursor_new(GDK_WATCH); gdk_window_set_cursor(GTK_WIDGET(rawstudio_window)->window, cursor); gdk_cursor_unref(cursor); } else { if (status>0) gui_status_pop(status); status=0; gdk_window_set_cursor(GTK_WIDGET(rawstudio_window)->window, NULL); } return; } gboolean gui_is_busy(void) { if (busycount) return(TRUE); else return(FALSE); } static gboolean gui_statusbar_remove_helper(guint *msgid) { gdk_threads_enter(); gtk_statusbar_remove(statusbar, gtk_statusbar_get_context_id(statusbar, "generic"), *msgid); g_free(msgid); gdk_threads_leave(); return(FALSE); } void gui_status_notify(const char *text) { guint *msgid; msgid = g_new(guint, 1); *msgid = gtk_statusbar_push(statusbar, gtk_statusbar_get_context_id(statusbar, "generic"), text); g_timeout_add(5000, (GSourceFunc) gui_statusbar_remove_helper, msgid); return; } guint gui_status_push(const char *text) { guint msgid; msgid = gtk_statusbar_push(statusbar, gtk_statusbar_get_context_id(statusbar, "generic"), text); return(msgid); } void gui_status_pop(const guint msgid) { gtk_statusbar_remove(statusbar, gtk_statusbar_get_context_id(statusbar, "generic"), msgid); return; } static void set_photo_info_label(RS_PHOTO *photo) { gchar *label; gchar label_temp[100]; gint w,h; label = rs_metadata_get_short_description(photo->metadata); if (rs_photo_get_original_size(photo, TRUE, &w, &h)) { g_snprintf(label_temp, 100, "%s\n%s: %d, %s: %d",label, _("Width"), w, _("Height"),h ); gtk_label_set_text(GTK_LABEL(infobox), label_temp); } else gtk_label_set_text(GTK_LABEL(infobox), label); g_free(label); } static gboolean open_photo(RS_BLOB *rs, const gchar *filename) { RS_PHOTO *photo; gui_set_busy(TRUE); rs_preview_widget_set_photo(RS_PREVIEW_WIDGET(rs->preview), NULL); photo = rs_photo_load_from_file(filename); if (photo) { if (rs->photo) { rs_photo_close(rs->photo); if (rs->photo->metadata && rs->photo->metadata->thumbnail && rs->photo->thumbnail_filter) rs_store_update_thumbnail(rs->store, rs->photo->filename, rs->photo->metadata->thumbnail); } } else { rs_io_idle_unpause(); gui_set_busy(FALSE); return FALSE; } set_photo_info_label(photo); rs_set_photo(rs, photo); /* We need check if we should calculate and set auto wb here because the photo needs to be loaded for filterchain to work */ gint i; g_object_ref(rs->filter_demosaic_cache); rs->photo->auto_wb_filter = rs->filter_demosaic_cache; for (i=0;i<3;i++) { if (photo && photo->settings[i] && photo->settings[i]->wb_ascii && g_strcmp0(photo->settings[i]->wb_ascii, PRESET_WB_AUTO) == 0) rs_photo_set_wb_auto(rs->photo, i); } /* Set photo in preview-widget */ rs_preview_widget_set_photo(RS_PREVIEW_WIDGET(rs->preview), photo); rs_toolbox_set_photo(RS_TOOLBOX(rs->tools), photo); rs->photo->proposed_crop = NULL; GTK_CATCHUP(); if (rs->photo && NULL==rs->photo->crop && rs->photo->proposed_crop) rs_photo_set_crop(rs->photo, rs->photo->proposed_crop); rs_core_actions_update_menu_items(rs); GTK_CATCHUP(); gui_set_busy(FALSE); return TRUE; } static void icon_activated(gpointer instance, const gchar *name, RS_BLOB *rs) { guint msgid; if (name!=NULL) { GList *selected = NULL; rs_io_idle_pause(); g_signal_handlers_block_by_func(instance, icon_activated, rs); gui_set_busy(TRUE); msgid = gui_status_push(_("Opening photo ...")); GTK_CATCHUP(); g_signal_handlers_unblock_by_func(instance, icon_activated, rs); /* Read currently selected filename, it may or may not (!) be the same as served in name */ selected = rs_store_get_selected_names(rs->store); if (g_list_length(selected)==1) { name = g_list_nth_data(selected, 0); g_list_free(selected); } if (rs->photo && rs->photo->filename) if (!g_strcmp0(rs->photo->filename, name)) { gui_status_pop(msgid); gui_set_busy(FALSE); rs_io_idle_unpause(); return; } if (!open_photo(rs, name)) { gui_status_pop(msgid); gui_status_notify(_("Couldn't open photo")); } else { gui_status_pop(msgid); gui_status_notify(_("Image opened")); rs_window_set_title(rs->photo->filename); } } GTK_CATCHUP(); gui_set_busy(FALSE); rs_io_idle_unpause(); } static void group_activated(gpointer instance, GList *names, RS_BLOB *rs) { gchar *filename = (gchar *) g_list_nth_data(names, 0); icon_activated(instance, filename, rs); } static void gui_preview_bg_color_changed(GtkColorButton *widget, RS_BLOB *rs) { GdkColor color; gtk_color_button_get_color(GTK_COLOR_BUTTON(widget), &color); rs_preview_widget_set_bgcolor(RS_PREVIEW_WIDGET(rs->preview), &color); rs_conf_set_color(CONF_PREBGCOLOR, &color); return; } /** * Change priority on all selected and currently opened photos */ void gui_setprio(RS_BLOB *rs, guint prio) { GList *selected = NULL; gint i, num_selected; GString *gs; const gchar* next_name = NULL; gui_set_busy(TRUE); GTK_CATCHUP(); selected = rs_store_get_selected_iters(rs->store); num_selected = g_list_length(selected); /* If we are deleting images, select next */ if (prio == 51) { GList *selected_names = rs_store_get_selected_names(rs->store); if (g_list_length(selected_names)) next_name = (const gchar*)(g_list_last(selected_names)->data); else if (rs->photo) next_name = rs->photo->filename; /* Load next image if deleting */ if (next_name) next_name = rs_store_get_prevnext(rs->store, next_name, 2); gui_set_block_keyboard(TRUE); } /* Iterate throuh all selected thumbnails */ for(i=0;istore, NULL, g_list_nth_data(selected, i), &prio, NULL); } g_list_free(selected); /* Change priority for currently open photo */ if (rs->photo && rs_store_is_photo_selected(rs->store, rs->photo->filename)) { rs->photo->priority = prio; rs_store_set_flags(rs->store, rs->photo->filename, NULL, &prio, NULL); } /* Generate text for statusbar notification */ gs = g_string_new(NULL); if (prio == 0) g_string_printf(gs, _("Changed photo priority (*)")); else if (prio == 51) g_string_printf(gs, _("Changed photo priority (D)")); else g_string_printf(gs, _("Changed photo priority (%d)"),prio); gui_status_notify(gs->str); /* Load next image if deleting */ if (next_name) rs_store_set_selected_name(rs->store, next_name, TRUE); g_string_free(gs, TRUE); gui_set_busy(FALSE); GTK_CATCHUP(); gui_set_block_keyboard(FALSE); } void gui_widget_show(GtkWidget *widget, gboolean show, const gchar *conf_fullscreen_key, const gchar *conf_windowed_key) { if (show) { gtk_widget_show(widget); if (fullscreen) rs_conf_set_boolean(conf_fullscreen_key, TRUE); else rs_conf_set_boolean(conf_windowed_key, TRUE); } else { gtk_widget_hide(widget); if (fullscreen) rs_conf_set_boolean(conf_fullscreen_key, FALSE); else rs_conf_set_boolean(conf_windowed_key, FALSE); } return; } gboolean gui_fullscreen_changed(GtkWidget *widget, gboolean is_fullscreen, const gchar *action, gboolean default_fullscreen, gboolean default_windowed, const gchar *conf_fullscreen_key, const gchar *conf_windowed_key) { gboolean show_widget; if (is_fullscreen) { gboolean show_widget_default; rs_conf_get_boolean_with_default(conf_windowed_key, &show_widget_default, default_fullscreen); rs_conf_get_boolean_with_default(conf_fullscreen_key, &show_widget, show_widget_default); fullscreen = TRUE; gui_widget_show(widget, show_widget, CONF_SHOW_ICONBOX_FULLSCREEN, CONF_SHOW_ICONBOX); } else { rs_conf_get_boolean_with_default(CONF_SHOW_ICONBOX, &show_widget, default_windowed); fullscreen = FALSE; gui_widget_show(widget, show_widget, CONF_SHOW_ICONBOX_FULLSCREEN, CONF_SHOW_ICONBOX); } gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(rs_core_action_group_get_action(action)) ,show_widget); return(FALSE); } static gboolean gui_histogram_height_changed(GtkAdjustment *caller, RS_BLOB *rs) { const gint newheight = (gint) caller->value; rs_conf_set_integer(CONF_HISTHEIGHT, newheight); return(FALSE); } typedef struct { GdkScreen *screen; gint monitor_num; } MonitorInfo; static void gui_enable_preview_screen(RS_BLOB *rs, const gchar *screen_name, int monitor_num) { gboolean is_enabled; GdkRectangle rect; if (rs_conf_get_boolean_with_default("fullscreen-preview", &is_enabled, FALSE)) if (is_enabled) return; if (waiting_for_user_selects_screen) return; GdkDisplay *open_display = gdk_display_open(screen_name); GdkScreen *open_screen = gdk_display_get_default_screen(open_display); if (NULL == open_screen) { gui_status_notify(_("Unable to locate screen for fullscreen preview")); return; } gdk_screen_get_monitor_geometry(open_screen, monitor_num, &rect); rs->window_preview_screen = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_screen(GTK_WINDOW(rs->window_preview_screen), open_screen); gtk_window_move(GTK_WINDOW(rs->window_preview_screen), rect.x, rect.y); gtk_window_maximize(GTK_WINDOW(rs->window_preview_screen)); gtk_window_fullscreen(GTK_WINDOW(rs->window_preview_screen)); /* Make sure we don't grab focus from main window */ g_object_set(GTK_WINDOW(rs->window_preview_screen), "accept-focus", FALSE, NULL); /* Re-parent preview*/ gtk_widget_reparent(rs->preview, rs->window_preview_screen); /* Add something to the preview area */ preview_fullscreen_filler = gtk_label_new(_("Press F10 to return preview to this window")); gtk_container_add(GTK_CONTAINER(frame_preview_toolbox), preview_fullscreen_filler); gtk_widget_show_all(GTK_WIDGET(frame_preview_toolbox)); gtk_widget_show_all(rs->window_preview_screen); rs_conf_set_boolean("fullscreen-preview", TRUE); } void gui_disable_preview_screen(RS_BLOB *rs) { if (waiting_for_user_selects_screen) return; gboolean is_enabled; if (rs_conf_get_boolean_with_default("fullscreen-preview", &is_enabled, FALSE)) if (!is_enabled) return; gtk_container_remove(GTK_CONTAINER(frame_preview_toolbox), preview_fullscreen_filler); gtk_widget_reparent(rs->preview, frame_preview_toolbox); gtk_widget_destroy(rs->window_preview_screen); rs->window_preview_screen = NULL; rs_conf_set_boolean("fullscreen-preview", FALSE); } typedef struct { GSList *all_window_widgets; guint status; RS_BLOB *rs; MonitorInfo *monitor; GSList *all_monitors; } ScreenWindowInfo; static void screen_selected(GtkEntry *entry, gint response_id, gpointer user_data) { waiting_for_user_selects_screen = FALSE; ScreenWindowInfo *info = (ScreenWindowInfo *)user_data; gui_status_pop(info->status); if (response_id == GTK_RESPONSE_OK) { GdkScreen *screen = GDK_SCREEN(info->monitor->screen); g_debug("screen: %p", screen); gchar *screen_name = gdk_screen_make_display_name(screen); gui_enable_preview_screen(info->rs, screen_name, info->monitor->monitor_num); g_free(screen_name); } else { /* We didn't activate after all */ GtkAction *action = rs_core_action_group_get_action("FullscreenPreview"); gtk_toggle_action_set_active(GTK_TOGGLE_ACTION(action), FALSE); } /* Delete widgets */ GSList *iter = info->all_window_widgets; do { gtk_widget_destroy(GTK_WIDGET(iter->data)); iter = iter->next; } while (iter); /* Free monitor info */ iter = info->all_monitors; do { g_free(iter->data); iter = iter->next; } while (iter); g_slist_free(info->all_window_widgets); g_slist_free(info->all_monitors); g_free(info); } void gui_select_preview_screen(RS_BLOB *rs) { gboolean is_enabled; gint x, y; MonitorInfo *cmon; GdkRectangle rect; if (rs_conf_get_boolean_with_default("fullscreen-preview", &is_enabled, FALSE)) if (is_enabled) return; if (waiting_for_user_selects_screen) return; /* Get information about current screen */ GdkScreen *main_screen; main_screen = gtk_window_get_screen(GTK_WINDOW(rs->window)); gtk_window_get_position(GTK_WINDOW(rs->window), &x, &y); int main_screen_monitor = gdk_screen_get_monitor_at_point(main_screen, x, y); gchar *main_screen_name = gdk_screen_make_display_name(main_screen); /* For some obscure reason, if seems that gdk_display_manager_list_displays(..) */ /* returns one display on first call, two on second and so on. */ /* Therefore we have the display list as a static variable. */ /* I guess you have to restart Rawstudio to detect new displays */ static GSList *disps = NULL; GdkDisplayManager *disp_man = gdk_display_manager_get(); if (!disps) disps = gdk_display_manager_list_displays(disp_man); GSList *cdisp = disps; GSList *all_monitors = NULL; do { gint num_screens = gdk_display_get_n_screens((GdkDisplay*)cdisp->data); gint i; for (i = 0; i < num_screens; i++) { GdkScreen* screen = gdk_display_get_screen(cdisp->data, i); gchar *screen_name = gdk_screen_make_display_name(screen); gint mons = gdk_screen_get_n_monitors(screen); gint j; for (j = 0; j < mons; j++) { /* We do not add the monitor with the current window */ if (!(0 == g_strcmp0(screen_name, main_screen_name) && j == main_screen_monitor)) { cmon = g_malloc(sizeof(MonitorInfo)); cmon->screen = screen; cmon->monitor_num = j; all_monitors = g_slist_append(all_monitors, cmon); } } } } while ((cdisp = cdisp->next)); gint total_monitors = g_slist_length(all_monitors); if (total_monitors <= 0) { g_free(main_screen_name); gui_status_notify(_("Unable to detect more than one monitor. Cannot open fullscreen preview")); return; } /* If two displays, just open on the other */ if (total_monitors == 1) { cmon = all_monitors->data; gui_enable_preview_screen(rs, gdk_screen_make_display_name(cmon->screen), cmon->monitor_num); g_free(all_monitors->data); g_slist_free(all_monitors); } else { /* Pop up selection box */ GSList *screen_widgets = NULL; guint status = gui_status_push(_("Select screen to open fullscreen preview")); waiting_for_user_selects_screen = TRUE; ScreenWindowInfo **info = g_malloc(sizeof(ScreenWindowInfo*) * total_monitors); gint i; for (i = 0; i < total_monitors; i++) { info[i] = g_malloc(sizeof(ScreenWindowInfo)); cmon = g_slist_nth_data(all_monitors, i); info[i]->monitor = cmon; info[i]->status = status; info[i]->rs = rs; info[i]->all_monitors = all_monitors; gdk_screen_get_monitor_geometry(cmon->screen, cmon->monitor_num, &rect); /* Create dialog */ GtkWidget *dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), _("Select Screen for fullscreen preview")); gtk_window_set_screen(GTK_WINDOW(dialog), cmon->screen); gtk_window_move(GTK_WINDOW(dialog), rect.x+(rect.width/2), rect.y+(rect.height/2)); gtk_dialog_set_has_separator(GTK_DIALOG(dialog), FALSE); gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); gtk_dialog_add_button(GTK_DIALOG(dialog), GTK_STOCK_OK, GTK_RESPONSE_OK); GtkWidget *content = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); GtkWidget *label = gtk_label_new(_("Select OK to use this screen for fullscreen preview")); gtk_box_pack_start(GTK_BOX(content), label, TRUE, TRUE, 10); /* Connect response and show it */ g_signal_connect(dialog, "response", G_CALLBACK(screen_selected), info[i]); gtk_widget_show_all(dialog); screen_widgets = g_slist_append(screen_widgets, dialog); } /* Attach all widgets to info */ for (i = 0; i < total_monitors; i++) info[i]->all_window_widgets = screen_widgets; } g_free(main_screen_name); } static void gui_preference_use_system_theme(GtkToggleButton *togglebutton, gpointer user_data) { if (togglebutton->active) { gui_select_theme(STANDARD_GTK_THEME); } else { gui_select_theme(RAWSTUDIO_THEME); } } typedef struct { GtkWidget *example_label; GtkWidget *event; const gchar *output_type; const gchar *filename; } QUICK_EXPORT; static void update_example(QUICK_EXPORT *quick) { gchar *parsed; gchar *final = ""; RSOutput *output; GtkLabel *example = GTK_LABEL(quick->example_label); parsed = filename_parse(quick->filename, "filename", 0); output = rs_output_new(quick->output_type); if (output) { final = g_strdup_printf("%s.%s", parsed, rs_output_get_extension(output)); g_object_unref(output); } gtk_label_set_markup(example, final); g_free(parsed); g_free(final); } static void directory_chooser_changed(GtkFileChooser *chooser, gpointer user_data) { gchar *directory; directory = gtk_file_chooser_get_filename(chooser); if (directory) rs_conf_set_string("quick-export-directory", directory); } static void filetype_changed(gpointer active, gpointer user_data) { QUICK_EXPORT *quick = (QUICK_EXPORT *) user_data; GtkWidget *event = quick->event; GtkWidget *options; RSOutput *output; const gchar *identifier = g_type_name(GPOINTER_TO_INT(active)); quick->output_type = identifier; options = gtk_bin_get_child(GTK_BIN(event)); if (options) gtk_widget_destroy(options); /* Try to instantiate the output plugin to build options widget */ output = rs_output_new(identifier); if (output) { options = rs_output_get_parameter_widget(output, "quick-export"); gtk_container_add(GTK_CONTAINER(event), options); gtk_widget_show_all(event); g_object_unref(output); } update_example(quick); } static void filename_entry_changed(GtkEntry *entry, gpointer user_data) { QUICK_EXPORT *quick = (QUICK_EXPORT *) user_data; quick->filename = gtk_entry_get_text(entry); update_example(quick); } static void closed_preferences(GtkEntry *entry, gint response_id, gpointer user_data) { RS_BLOB *rs = (RS_BLOB*)user_data; rs_preview_widget_update(RS_PREVIEW_WIDGET(rs->preview), TRUE); gtk_widget_destroy(GTK_WIDGET(entry)); } static void colorspace_changed(RSColorSpaceSelector *selector, RSColorSpace *color_space, gpointer user_data) { rs_conf_set_string((const gchar*)user_data, G_OBJECT_TYPE_NAME(color_space)); } static GtkWidget * gui_make_preference_quick_export(void) { gpointer active; QUICK_EXPORT *quick; GtkWidget *page; GtkWidget *directory_hbox; GtkWidget *directory_label; GtkWidget *directory_chooser; gchar *directory; GtkWidget *filename_hbox; GtkWidget *filename_label; GtkWidget *filename_chooser; GtkWidget *filetype_hbox; GtkWidget *filetype_label; RS_CONFBOX *filetype_box; GtkWidget *filename_entry; GtkWidget *filetype_event; GtkWidget *example_hbox; GtkWidget *example_label1; GtkWidget *example_label2; page = gtk_vbox_new(FALSE, 4); gtk_container_set_border_width(GTK_CONTAINER (page), 6); /* Carrier */ quick = g_new0(QUICK_EXPORT, 1); g_object_set_data_full(G_OBJECT(page), "quick", quick, g_free); /* Directory */ directory_hbox = gtk_hbox_new(FALSE, 0); directory_label = gtk_label_new(_("Directory:")); directory_chooser = gtk_file_chooser_button_new(_("Choose output directory"), GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER); directory = rs_conf_get_string("quick-export-directory"); if (directory && g_path_is_absolute(directory)) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(directory_chooser), directory); g_signal_connect (directory_chooser, "current_folder_changed", G_CALLBACK(directory_chooser_changed), NULL); gtk_misc_set_alignment(GTK_MISC(directory_label), 0.0, 0.5); gtk_box_pack_start(GTK_BOX(directory_hbox), directory_label, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(directory_hbox), directory_chooser, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(page), directory_hbox, FALSE, TRUE, 0); /* Filename */ filename_hbox = gtk_hbox_new(FALSE, 0); filename_label = gtk_label_new(_("Filename template:")); filename_chooser = rs_filename_chooser_button_new(NULL, "quick-export-filename"); filename_entry = g_object_get_data(G_OBJECT(filename_chooser), "entry"); g_signal_connect(filename_entry, "changed", G_CALLBACK(filename_entry_changed), quick); quick->filename = gtk_entry_get_text(GTK_ENTRY(filename_entry)); gtk_misc_set_alignment(GTK_MISC(filename_label), 0.0, 0.5); gtk_box_pack_start(GTK_BOX(filename_hbox), filename_label, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(filename_hbox), filename_chooser, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(page), filename_hbox, FALSE, TRUE, 0); /* Example filename */ example_hbox = gtk_hbox_new(FALSE, 0); example_label1 = gtk_label_new(_("Filename example:")); example_label2 = gtk_label_new(NULL); quick->example_label = example_label2; gtk_misc_set_alignment(GTK_MISC(example_label1), 0.0, 0.5); gtk_box_pack_start(GTK_BOX(example_hbox), example_label1, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(example_hbox), example_label2, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(page), example_hbox, FALSE, TRUE, 0); /* Filetype */ filetype_hbox = gtk_hbox_new(FALSE, 0); filetype_label = gtk_label_new(_("File type:")); filetype_box = gui_confbox_filetype_new("quick-export-filetype"); filetype_event = gtk_event_box_new(); quick->event = filetype_event; gui_confbox_set_callback(filetype_box, quick, filetype_changed); active = gui_confbox_get_active(filetype_box); if (!active) active = GUINT_TO_POINTER(g_type_from_name("RSJpegfile")); quick->output_type = g_type_name(GPOINTER_TO_INT(active)); /* Load default from conf, or use RSJpegfile */ gui_confbox_load_conf(filetype_box, "RSJpegfile"); gtk_misc_set_alignment(GTK_MISC(filetype_label), 0.0, 0.5); gtk_box_pack_start(GTK_BOX(filetype_hbox), filetype_label, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(filetype_hbox), gui_confbox_get_widget(filetype_box), FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(page), filetype_hbox, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(page), filetype_event, FALSE, TRUE, 0); filetype_changed(active, quick); update_example(quick); return page; } void gui_make_preference_window(RS_BLOB *rs) { GtkWidget *dialog; GtkWidget *notebook; GtkWidget *vbox; GtkWidget *colorsel; GtkWidget *colorsel_label; GtkWidget *colorsel_hbox; GtkWidget *preview_page; GtkWidget *button_close; GdkColor color; GtkWidget *histsize; GtkWidget *histsize_label; GtkWidget *histsize_hbox; GtkObject *histsize_adj; gint histogram_height; GtkWidget *cs_hbox; GtkWidget *cs_label; GtkWidget* cs_widget; GtkWidget *local_cache_check; GtkWidget *system_theme_check; gchar *str; RSColorSpace *color_space; /* GtkWidget *batch_page; GtkWidget *batch_directory_hbox; GtkWidget *batch_directory_label; GtkWidget *batch_directory_entry; GtkWidget *batch_filename_hbox; GtkWidget *batch_filename_label; GtkWidget *batch_filename_entry; GtkWidget *batch_filetype_hbox; GtkWidget *batch_filetype_label; GtkWidget *batch_filetype_entry; */ dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), _("Preferences")); gtk_window_set_resizable(GTK_WINDOW(dialog), FALSE); gtk_window_set_type_hint(GTK_WINDOW(dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE); g_signal_connect_swapped(dialog, "delete_event", G_CALLBACK (gtk_widget_destroy), dialog); vbox = GTK_DIALOG (dialog)->vbox; preview_page = gtk_vbox_new(FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (preview_page), 6); colorsel_hbox = gtk_hbox_new(FALSE, 0); colorsel_label = gtk_label_new(_("Preview background color:")); gtk_misc_set_alignment(GTK_MISC(colorsel_label), 0.0, 0.5); colorsel = gtk_color_button_new(); COLOR_BLACK(color); if (rs_conf_get_color(CONF_PREBGCOLOR, &color)) gtk_color_button_set_color(GTK_COLOR_BUTTON(colorsel), &color); g_signal_connect(colorsel, "color-set", G_CALLBACK (gui_preview_bg_color_changed), rs); gtk_box_pack_start (GTK_BOX (colorsel_hbox), colorsel_label, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (colorsel_hbox), colorsel, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (preview_page), colorsel_hbox, FALSE, TRUE, 0); if (!rs_conf_get_integer(CONF_HISTHEIGHT, &histogram_height)) histogram_height = 128; histsize_hbox = gtk_hbox_new(FALSE, 0); histsize_label = gtk_label_new(_("Histogram height:")); gtk_misc_set_alignment(GTK_MISC(histsize_label), 0.0, 0.5); histsize_adj = gtk_adjustment_new(histogram_height, 15.0, 500.0, 1.0, 10.0, 0.0); g_signal_connect(histsize_adj, "value_changed", G_CALLBACK(gui_histogram_height_changed), rs); histsize = gtk_spin_button_new(GTK_ADJUSTMENT(histsize_adj), 1, 0); gtk_box_pack_start (GTK_BOX (histsize_hbox), histsize_label, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (histsize_hbox), histsize, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (preview_page), histsize_hbox, FALSE, TRUE, 0); system_theme_check = checkbox_from_conf(CONF_USE_SYSTEM_THEME, _("Use system theme"), DEFAULT_CONF_USE_SYSTEM_THEME); gtk_box_pack_start (GTK_BOX (preview_page), system_theme_check, FALSE, TRUE, 0); g_signal_connect ((gpointer) system_theme_check, "toggled", G_CALLBACK (gui_preference_use_system_theme), rs); local_cache_check = checkbox_from_conf(CONF_CACHEDIR_IS_LOCAL, _("Place cache in home directory"), FALSE); gtk_box_pack_start (GTK_BOX (preview_page), local_cache_check, FALSE, TRUE, 0); cs_hbox = gtk_hbox_new(FALSE, 0); cs_label = gtk_label_new(_("Display Colorspace:")); cs_widget = rs_color_space_selector_new(); rs_color_space_selector_add_all(RS_COLOR_SPACE_SELECTOR(cs_widget)); rs_color_space_selector_set_selected_by_name(RS_COLOR_SPACE_SELECTOR(cs_widget), "RSSrgb"); if ((str = rs_conf_get_string("display-colorspace"))) color_space = rs_color_space_selector_set_selected_by_name(RS_COLOR_SPACE_SELECTOR(cs_widget), str); g_signal_connect(cs_widget, "colorspace-selected", G_CALLBACK(colorspace_changed), "display-colorspace"); gtk_box_pack_start (GTK_BOX (cs_hbox), cs_label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (cs_hbox), cs_widget, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (preview_page), cs_hbox, FALSE, TRUE, 0); cs_hbox = gtk_hbox_new(FALSE, 0); cs_label = gtk_label_new(_("Exposure Mask Colorspace:")); cs_widget = rs_color_space_selector_new(); rs_color_space_selector_add_all(RS_COLOR_SPACE_SELECTOR(cs_widget)); rs_color_space_selector_set_selected_by_name(RS_COLOR_SPACE_SELECTOR(cs_widget), "RSSrgb"); if ((str = rs_conf_get_string("exposure-mask-colorspace"))) color_space = rs_color_space_selector_set_selected_by_name(RS_COLOR_SPACE_SELECTOR(cs_widget), str); g_signal_connect(cs_widget, "colorspace-selected", G_CALLBACK(colorspace_changed), "exposure-mask-colorspace"); gtk_box_pack_start (GTK_BOX (cs_hbox), cs_label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (cs_hbox), cs_widget, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (preview_page), cs_hbox, FALSE, TRUE, 0); /* batch_page = gtk_vbox_new(FALSE, 4); gtk_container_set_border_width (GTK_CONTAINER (batch_page), 6); batch_directory_hbox = gtk_hbox_new(FALSE, 0); batch_directory_label = gtk_label_new(_("Batch export directory:")); gtk_misc_set_alignment(GTK_MISC(batch_directory_label), 0.0, 0.5); batch_directory_entry = gtk_entry_new(); conf_temp = rs_conf_get_string(CONF_BATCH_DIRECTORY); if (g_str_equal(conf_temp, "")) { rs_conf_set_string(CONF_BATCH_DIRECTORY, "exported/"); g_free(conf_temp); conf_temp = rs_conf_get_string(CONF_BATCH_DIRECTORY); } gtk_entry_set_text(GTK_ENTRY(batch_directory_entry), conf_temp); g_free(conf_temp); g_signal_connect ((gpointer) batch_directory_entry, "changed", G_CALLBACK(gui_batch_directory_entry_changed), NULL); gtk_box_pack_start (GTK_BOX (batch_directory_hbox), batch_directory_label, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (batch_directory_hbox), batch_directory_entry, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (batch_page), batch_directory_hbox, FALSE, TRUE, 0); batch_filename_hbox = gtk_hbox_new(FALSE, 0); batch_filename_label = gtk_label_new(_("Batch export filename:")); gtk_misc_set_alignment(GTK_MISC(batch_filename_label), 0.0, 0.5); batch_filename_entry = gtk_entry_new(); conf_temp = rs_conf_get_string(CONF_BATCH_FILENAME); if (g_str_equal(conf_temp, "")) { rs_conf_set_string(CONF_BATCH_FILENAME, "%f_%2c"); g_free(conf_temp); conf_temp = rs_conf_get_string(CONF_BATCH_FILENAME); } gtk_entry_set_text(GTK_ENTRY(batch_filename_entry), conf_temp); g_free(conf_temp); g_signal_connect ((gpointer) batch_filename_entry, "changed", G_CALLBACK(gui_batch_filename_entry_changed), NULL); gtk_box_pack_start (GTK_BOX (batch_filename_hbox), batch_filename_label, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (batch_filename_hbox), batch_filename_entry, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (batch_page), batch_filename_hbox, FALSE, TRUE, 0); batch_filetype_hbox = gtk_hbox_new(FALSE, 0); batch_filetype_label = gtk_label_new(_("Batch export filetype:")); gtk_misc_set_alignment(GTK_MISC(batch_filetype_label), 0.0, 0.5); batch_filetype_entry = gtk_entry_new(); conf_temp = rs_conf_get_string(CONF_BATCH_FILETYPE); if (g_str_equal(conf_temp, "")) { rs_conf_set_string(CONF_BATCH_FILETYPE, "jpg"); g_free(conf_temp); conf_temp = rs_conf_get_string(CONF_BATCH_FILETYPE); } gtk_entry_set_text(GTK_ENTRY(batch_filetype_entry), conf_temp); g_free(conf_temp); g_signal_connect ((gpointer) batch_filetype_entry, "changed", G_CALLBACK(gui_batch_filetype_entry_changed), NULL); gtk_box_pack_start (GTK_BOX (batch_filetype_hbox), batch_filetype_label, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (batch_filetype_hbox), batch_filetype_entry, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (batch_page), batch_filetype_hbox, FALSE, TRUE, 0); */ notebook = gtk_notebook_new(); gtk_container_set_border_width (GTK_CONTAINER (notebook), 6); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), preview_page, gtk_label_new(_("General"))); //gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); gtk_notebook_append_page(GTK_NOTEBOOK(notebook), gui_make_preference_quick_export(), gtk_label_new(_("Quick export"))); gtk_box_pack_start (GTK_BOX (vbox), notebook, FALSE, FALSE, 0); button_close = gtk_button_new_from_stock(GTK_STOCK_CLOSE); gtk_dialog_add_action_widget (GTK_DIALOG (dialog), button_close, GTK_RESPONSE_CLOSE); g_signal_connect(dialog, "response", G_CALLBACK(closed_preferences), rs); gtk_widget_show_all(dialog); return; } void gui_dialog_simple(gchar *title, gchar *message) { GtkWidget *dialog, *label; dialog = gtk_dialog_new_with_buttons(title, NULL, GTK_DIALOG_NO_SEPARATOR, GTK_STOCK_OK, GTK_RESPONSE_NONE, NULL); label = gtk_label_new(message); g_signal_connect_swapped(dialog, "response", G_CALLBACK (gtk_widget_destroy), dialog); gtk_container_add(GTK_CONTAINER (GTK_DIALOG(dialog)->vbox), label); gtk_widget_show_all(dialog); return; } GtkUIManager * gui_get_uimanager() { static GStaticMutex lock = G_STATIC_MUTEX_INIT; static GtkUIManager *ui_manager = NULL; g_static_mutex_lock(&lock); if (!ui_manager) { GError *error = NULL; ui_manager = gtk_ui_manager_new (); gtk_ui_manager_add_ui_from_file (ui_manager, PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "ui.xml", &error); if (error) { g_message ("Building menus failed: %s", error->message); g_error_free (error); } } g_static_mutex_unlock(&lock); return ui_manager; } static GtkWidget * gui_make_menubar(RS_BLOB *rs) { GtkUIManager *menu_manager = gui_get_uimanager(); gtk_ui_manager_insert_action_group (menu_manager, rs_get_core_action_group(rs), 0); /* FIXME: This gives trouble with auto-sensivity * gtk_ui_manager_set_add_tearoffs(menu_manager, TRUE); */ gtk_window_add_accel_group (GTK_WINDOW(rs->window), gtk_ui_manager_get_accel_group (menu_manager)); return gtk_ui_manager_get_widget (menu_manager, "/MainMenu"); } static void window_state_event(GtkWidget *widget, GdkEventWindowState *event, gpointer user_data) { GtkWindow *window = GTK_WINDOW(widget); gint width,height,pos_x,pos_y; gboolean maximized; switch (event->type) { case GDK_WINDOW_STATE: { maximized = !!(event->new_window_state & GDK_WINDOW_STATE_MAXIMIZED); rs_conf_set_boolean(CONF_MAIN_WINDOW_MAXIMIZED, maximized); if (!maximized) { gtk_window_get_size(window, &width, &height); gtk_window_get_position(window, &pos_x, &pos_y); rs_conf_set_integer(CONF_MAIN_WINDOW_WIDTH, width); rs_conf_set_integer(CONF_MAIN_WINDOW_HEIGHT, height); rs_conf_set_integer(CONF_MAIN_WINDOW_POS_X, pos_x); rs_conf_set_integer(CONF_MAIN_WINDOW_POS_Y, pos_y); } break; } default: break; } } static void drag_data_received(GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y, GtkSelectionData *selection_data, guint info, guint t, RS_BLOB *rs) { gchar *uris = (gchar *) selection_data->data; gchar *tmp; gchar *filename; if (!uris) { gtk_drag_finish (drag_context, FALSE, FALSE, t); return; } tmp = uris; while(tmp) { if ((*tmp == '\r') || (*tmp == '\n')) { *tmp = '\0'; break; } tmp++; } filename = g_filename_from_uri(uris, NULL, NULL); rs_open_file(rs, filename); g_free(filename); gtk_drag_finish(drag_context, TRUE, FALSE, t); return; } static gboolean gui_window_delete(GtkWidget *widget, GdkEvent *event, gpointer user_data) { rs_core_action_group_activate("Quit"); return TRUE; } static GtkWidget * gui_window_make(RS_BLOB *rs) { static const GtkTargetEntry targets[] = { { "text/uri-list", 0, 0 } }; gint width = DEFAULT_CONF_MAIN_WINDOW_WIDTH; gint height = DEFAULT_CONF_MAIN_WINDOW_HEIGHT; gint pos_x = DEFAULT_CONF_MAIN_WINDOW_POS_X; gint pos_y = DEFAULT_CONF_MAIN_WINDOW_POS_Y; gboolean maximized; rs_conf_get_integer(CONF_MAIN_WINDOW_WIDTH, &width); rs_conf_get_integer(CONF_MAIN_WINDOW_HEIGHT, &height); rs_conf_get_integer(CONF_MAIN_WINDOW_POS_X, &pos_x); rs_conf_get_integer(CONF_MAIN_WINDOW_POS_Y, &pos_y); rs_conf_get_boolean_with_default(CONF_MAIN_WINDOW_MAXIMIZED, &maximized, DEFAULT_CONF_MAIN_WINDOW_MAXIMIZED); rawstudio_window = GTK_WINDOW(gtk_window_new (GTK_WINDOW_TOPLEVEL)); if (!maximized) { // gtk_window_set_position((GtkWindow *) rawstudio_window, GTK_WIN_POS_NONE); // gtk_window_move((GtkWindow *) rawstudio_window, pos_x, pos_y); gtk_window_resize((GtkWindow *) rawstudio_window, width, height); } else { gtk_window_maximize((GtkWindow *) rawstudio_window); } rs_window_set_title(NULL); g_signal_connect((gpointer) rawstudio_window, "delete_event", G_CALLBACK(gui_window_delete), NULL); g_signal_connect((gpointer) rawstudio_window, "key_press_event", G_CALLBACK(window_key_press_event), NULL); gtk_drag_dest_set(GTK_WIDGET(rawstudio_window), GTK_DEST_DEFAULT_ALL, targets, 1, GDK_ACTION_COPY); g_signal_connect((gpointer) rawstudio_window, "drag_data_received", G_CALLBACK(drag_data_received), rs); g_signal_connect((gpointer) rawstudio_window, "window-state-event", G_CALLBACK(window_state_event), rs); gtk_widget_set_name (GTK_WIDGET(rawstudio_window), "rawstudio-widget"); return(GTK_WIDGET(rawstudio_window)); } void preview_wb_picked(RSPreviewWidget *preview, RS_PREVIEW_CALLBACK_DATA *cbdata, RS_BLOB *rs) { if ((cbdata->pixelfloat[R]>0.0) && (cbdata->pixelfloat[G]>0.0) && (cbdata->pixelfloat[B]>0.0)) rs_photo_set_wb_from_color(rs->photo, rs->current_setting, cbdata->pixelfloat[R], cbdata->pixelfloat[G], cbdata->pixelfloat[B]); } void preview_motion(RSPreviewWidget *preview, RS_PREVIEW_CALLBACK_DATA *cbdata, GtkLabel **valuefield) { gint c; gchar tmp[20]; for(c=0;c<3;c++) { g_snprintf(tmp, 20, "%u", cbdata->pixel8[c]); gtk_label_set_markup (valuefield[c], tmp); } } void preview_leave(RSPreviewWidget *preview, RS_PREVIEW_CALLBACK_DATA *cbdata, GtkLabel **valuefield) { gint c; for(c=0;c<3;c++) gtk_label_set_text(valuefield[c], "-"); } static gboolean open_file_in_mainloop(gpointer data) { gpointer *foo = data; gdk_threads_enter(); rs_open_file((RS_BLOB *) (foo[0]), (gchar *) foo[1]); g_free(foo[1]); gdk_threads_leave(); return FALSE; } static void rs_open_file_delayed(RS_BLOB *rs, const gchar *filename) { gpointer *carrier = g_new(gpointer, 2); /* Load image in mainloop */ carrier[0] = (gpointer) rs; carrier[1] = (gpointer) g_strdup(filename); g_idle_add(open_file_in_mainloop, carrier); } static gboolean open_directory_in_mainloop(gpointer data) { gpointer *foo = data; gdk_threads_enter(); directory_activated(NULL, (gchar *) foo[1], (RS_BLOB *) (foo[0])); g_free(foo[1]); gdk_threads_leave(); return FALSE; } static void rs_open_directory_delayed(RS_BLOB *rs, const gchar *path) { gpointer *carrier = g_new(gpointer, 2); /* Load image in mainloop */ carrier[0] = (gpointer) rs; carrier[1] = (gpointer) g_strdup(path); g_idle_add(open_directory_in_mainloop, carrier); } static void rs_open_file(RS_BLOB *rs, const gchar *filename) { if (filename) { gchar *abspath; gchar *temppath = g_strdup(filename); gchar *lwd; rs_io_idle_pause(); if (g_path_is_absolute(temppath)) abspath = g_strdup(temppath); else { gchar *tmpdir = g_get_current_dir (); abspath = g_build_filename (tmpdir, temppath, NULL); g_free (tmpdir); } g_free(temppath); if (g_file_test(abspath, G_FILE_TEST_IS_DIR)) { rs_store_remove(rs->store, NULL, NULL); if (rs_store_load_directory(rs->store, abspath) >= 0) rs_conf_set_string(CONF_LWD, abspath); } else if (g_file_test(abspath, G_FILE_TEST_IS_REGULAR)) { lwd = g_path_get_dirname(abspath); filename = g_path_get_basename(abspath); rs_store_remove(rs->store, NULL, NULL); if (rs_store_load_directory(rs->store, lwd) >= 0) rs_conf_set_string(CONF_LWD, lwd); rs_store_set_selected_name(rs->store, abspath, FALSE); g_free(lwd); } else rs_store_load_directory(rs->store, NULL); g_free(abspath); rs_io_idle_unpause(); } } static gboolean pane_position(GtkWidget* widget, gpointer dummy, gpointer user_data) { GtkPaned *paned = GTK_PANED(widget); gint pos; gint window_width; gtk_window_get_size(rawstudio_window, &window_width, NULL); pos = gtk_paned_get_position(paned); rs_conf_set_integer(CONF_TOOLBOX_WIDTH, window_width - pos); return TRUE; } static void directory_activated(gpointer instance, const gchar *path, RS_BLOB *rs) { static gboolean opening = FALSE; if (opening) return; opening = TRUE; /* Set this, so directory is reset, if a crash occurs during load, */ /* directory will be reset on next startup */ rs_conf_set_string(CONF_LWD, g_get_home_dir()); rs_io_idle_pause(); rs_store_remove(rs->store, NULL, NULL); guint msgid = gui_status_push(_("Opening directory...")); gui_set_busy(TRUE); GTK_CATCHUP(); if (rs_store_load_directory(rs->store, path) >= 0) rs_conf_set_string(CONF_LWD, path); rs_window_set_title(path); GTK_CATCHUP(); gui_status_pop(msgid); gui_set_busy(FALSE); rs_io_idle_unpause(); /* Restore directory */ rs_conf_set_string(CONF_LWD, path); opening = FALSE; } static void snapshot_changed(RSToolbox *toolbox, gint snapshot, RS_BLOB *rs) { /* Switch preview widget to the correct snapshot */ rs_preview_widget_set_snapshot(RS_PREVIEW_WIDGET(rs->preview), 0, snapshot); rs->current_setting = snapshot; } void rs_window_set_title(const char *str) { GString *window_title = g_string_new(_("Rawstudio")); if (str) { window_title = g_string_append(window_title, " - "); window_title = g_string_append(window_title, str); } gtk_window_set_title(GTK_WINDOW(rawstudio_window), window_title->str); g_string_free(window_title, TRUE); } int gui_init(int argc, char **argv, RS_BLOB *rs) { GtkWidget *vbox; GtkWidget *pane; GtkWidget *tools; GtkWidget *batchbox; GtkWidget *menubar; GtkWidget *dir_selector_vbox; GtkWidget *checkbox_recursive; GtkWidget *dir_selector_separator; GtkWidget *dir_selector; GtkWidget *library_vbox; gint window_width = 0, toolbox_width = 0; GdkColor dashed_bg = {0, 0, 0, 0 }; GdkColor dashed_fg = {0, 0, 65535, 0}; GdkColor grid_bg = {0, 0, 0, 0 }; GdkColor grid_fg = {0, 32767, 32767, 32767}; GdkColor bgcolor = {0, 0, 0, 0 }; GdkColor tmpcolor; GtkWidget *hbox; /* for statusbar */ GtkWidget *valuefield[3]; gtk_window_set_default_icon_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "icons" G_DIR_SEPARATOR_S PACKAGE ".png", NULL); rs->window = gui_window_make(rs); gtk_widget_show(rs->window); /* initialize dashed gc */ dashed = gdk_gc_new(rs->window->window); gdk_gc_set_rgb_fg_color(dashed, &dashed_fg); gdk_gc_set_rgb_bg_color(dashed, &dashed_bg); gdk_gc_set_line_attributes(dashed, 1, GDK_LINE_DOUBLE_DASH, GDK_CAP_BUTT, GDK_JOIN_MITER); grid = gdk_gc_new(rs->window->window); gdk_gc_set_rgb_fg_color(grid, &grid_fg); gdk_gc_set_rgb_bg_color(grid, &grid_bg); gdk_gc_set_line_attributes(grid, 1, GDK_LINE_SOLID, GDK_CAP_BUTT, GDK_JOIN_MITER); /* Build status bar */ statusbar = GTK_STATUSBAR(gtk_statusbar_new()); valuefield[R] = gtk_label_new(NULL); gtk_label_set_width_chars (GTK_LABEL(valuefield[R]), 3); gtk_misc_set_alignment (GTK_MISC(valuefield[R]), 1.0, 0.5); gdk_color_parse("#ef2929", &tmpcolor); /* Scarlet Red */ gtk_widget_modify_fg (GTK_WIDGET(valuefield[R]), GTK_STATE_NORMAL, &tmpcolor); valuefield[G] = gtk_label_new(NULL); gtk_label_set_width_chars (GTK_LABEL(valuefield[G]), 3); gtk_misc_set_alignment (GTK_MISC(valuefield[G]), 1.0, 0.5); gdk_color_parse("#8ae234", &tmpcolor); /* Chameleon */ gtk_widget_modify_fg (GTK_WIDGET(valuefield[G]), GTK_STATE_NORMAL, &tmpcolor); valuefield[B] = gtk_label_new(NULL); gtk_label_set_width_chars (GTK_LABEL(valuefield[B]), 3); gtk_misc_set_alignment (GTK_MISC(valuefield[B]), 1.0, 0.5); gdk_color_parse("#729fcf", &tmpcolor); /* Sky Blue */ gtk_widget_modify_fg (GTK_WIDGET(valuefield[B]), GTK_STATE_NORMAL, &tmpcolor); hbox = gtk_hbox_new (FALSE, 0); gtk_box_set_spacing(GTK_BOX(hbox), 3); gtk_box_pack_start (GTK_BOX (hbox), valuefield[R], FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), valuefield[G], FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), valuefield[B], FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), GTK_WIDGET (statusbar), TRUE, TRUE, 0); /* Build iconbox */ rs->iconbox = rs_store_new(); g_signal_connect((gpointer) rs->iconbox, "thumb-activated", G_CALLBACK(icon_activated), rs); g_signal_connect((gpointer) rs->iconbox, "group-activated", G_CALLBACK(group_activated), rs); rs->store = RS_STORE(rs->iconbox); rs_get_core_action_group(rs); /* Build toolbox */ rs->tools = tools = rs_toolbox_new(); g_signal_connect(tools, "snapshot-changed", G_CALLBACK(snapshot_changed), rs); rs_toolbox_register_actions(RS_TOOLBOX(tools)); batchbox = make_batchbox(rs->queue); GtkWidget *open_box = gtk_vbox_new(FALSE, 0); GtkWidget *library_expander; GtkWidget *directory_expander; dir_selector_vbox = gtk_vbox_new(FALSE, 0); checkbox_recursive = checkbox_from_conf(CONF_LOAD_RECURSIVE ,_("Open recursive"), DEFAULT_CONF_LOAD_RECURSIVE); dir_selector_separator = gtk_hseparator_new(); dir_selector = rs_dir_selector_new(); g_signal_connect(G_OBJECT(dir_selector), "directory-activated", G_CALLBACK(directory_activated), rs); gtk_box_pack_start (GTK_BOX(dir_selector_vbox), checkbox_recursive, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX(dir_selector_vbox), dir_selector_separator, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX(dir_selector_vbox), dir_selector, TRUE, TRUE, 0); directory_expander = gui_box(_("Directory"), dir_selector_vbox, "OPEN_DIRECTORY_EXPANDER", TRUE); library_vbox = rs_tag_gui_toolbox_new(rs_library_get_singleton(), rs->store); library_expander = gui_box(_("Tag search"), library_vbox, "OPEN_LIBRARY_SEARCH_EXPANDER", TRUE); gtk_box_pack_start (GTK_BOX(open_box), library_expander, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX(open_box), directory_expander, TRUE, TRUE, 0); rs->toolbox = gtk_notebook_new(); gtk_notebook_append_page(GTK_NOTEBOOK(rs->toolbox), tools, gtk_label_new(_("Tools"))); gtk_notebook_append_page(GTK_NOTEBOOK(rs->toolbox), batchbox, gtk_label_new(_("Batch"))); gtk_notebook_append_page(GTK_NOTEBOOK(rs->toolbox), open_box, gtk_label_new(_("Open"))); /* Metadata infobox */ infobox = gtk_label_new(""); gtk_misc_set_alignment(GTK_MISC(infobox), 0.0, 0.0); gtk_misc_set_padding (GTK_MISC(infobox), 7,3); rs_toolbox_add_widget(RS_TOOLBOX(rs->tools), infobox, NULL); /* Build menubar */ menubar = gui_make_menubar(rs); /* Preview area */ rs_conf_set_boolean("fullscreen-preview", FALSE); rs->preview = rs_preview_widget_new(tools); rs_preview_widget_set_filter(RS_PREVIEW_WIDGET(rs->preview), rs->filter_end, rs->filter_demosaic_cache); rs_conf_get_color(CONF_PREBGCOLOR, &bgcolor); rs_preview_widget_set_bgcolor(RS_PREVIEW_WIDGET(rs->preview), &bgcolor); g_signal_connect(G_OBJECT(rs->preview), "wb-picked", G_CALLBACK(preview_wb_picked), rs); g_signal_connect(G_OBJECT(rs->preview), "motion", G_CALLBACK(preview_motion), valuefield); g_signal_connect(G_OBJECT(rs->preview), "leave", G_CALLBACK(preview_leave), valuefield); /* Split pane below iconbox */ pane = gtk_hpaned_new (); frame_preview_toolbox = gtk_frame_new(NULL); gtk_container_add(GTK_CONTAINER(frame_preview_toolbox), rs->preview); g_signal_connect_after(G_OBJECT(pane), "notify::position", G_CALLBACK(pane_position), NULL); gtk_paned_pack1 (GTK_PANED (pane), frame_preview_toolbox, TRUE, TRUE); gtk_paned_pack2 (GTK_PANED (pane), rs->toolbox, FALSE, TRUE); /* Vertical packing box */ vbox = gtk_vbox_new (FALSE, 0); gtk_container_add (GTK_CONTAINER (rs->window), vbox); gtk_box_pack_start (GTK_BOX (vbox), menubar, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), rs->iconbox, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), pane, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 0); g_object_set (gtk_settings_get_default (), "gtk-menu-images", TRUE, NULL); g_object_set (gtk_settings_get_default (), "gtk-button-images", TRUE, NULL); if(gui_status_push(_("Ready"))); /* To put a "buttom" the status stack, we ignore the reutrn value */ // arrange rawstudio as the user left it gboolean show_iconbox; gboolean show_toolbox; rs_conf_get_boolean_with_default(CONF_FULLSCREEN, &fullscreen, DEFAULT_CONF_FULLSCREEN); if (fullscreen) { rs_core_action_group_activate("Fullscreen"); /* Retrieve defaults */ gboolean show_iconbox_default; gboolean show_toolbox_default; rs_conf_get_boolean_with_default(CONF_SHOW_ICONBOX, &show_iconbox_default, DEFAULT_CONF_SHOW_ICONBOX_FULLSCREEN); rs_conf_get_boolean_with_default(CONF_SHOW_TOOLBOX, &show_toolbox_default, DEFAULT_CONF_SHOW_TOOLBOX_FULLSCREEN); /* Get actual state */ rs_conf_get_boolean_with_default(CONF_SHOW_ICONBOX_FULLSCREEN, &show_iconbox, show_iconbox_default); rs_conf_get_boolean_with_default(CONF_SHOW_TOOLBOX_FULLSCREEN, &show_toolbox, show_toolbox_default); } else { gtk_window_get_size(rawstudio_window, &window_width, NULL); if (rs_conf_get_integer(CONF_TOOLBOX_WIDTH, &toolbox_width)) gtk_paned_set_position(GTK_PANED(pane), window_width - toolbox_width); gtk_window_unfullscreen(GTK_WINDOW(rs->window)); rs_conf_get_boolean_with_default(CONF_SHOW_ICONBOX, &show_iconbox, DEFAULT_CONF_SHOW_TOOLBOX); rs_conf_get_boolean_with_default(CONF_SHOW_TOOLBOX, &show_toolbox, DEFAULT_CONF_SHOW_ICONBOX); } if (!show_iconbox) rs_core_action_group_activate("Iconbox"); if (!show_toolbox) rs_core_action_group_activate("Toolbox"); gtk_widget_show_all (rs->window); if (argc > 1) { gchar *path; if (!g_path_is_absolute(argv[1])) path = g_build_filename(g_get_current_dir(), argv[1], NULL); else path = g_strdup(argv[1]); rs_open_file_delayed(rs, path); rs_conf_set_integer(CONF_LAST_PRIORITY_PAGE, 0); rs_dir_selector_expand_path(RS_DIR_SELECTOR(dir_selector), path); rs_window_set_title(g_path_get_dirname(path)); g_free(path); } else { gchar *lwd, *tags; lwd = rs_conf_get_string(CONF_LWD); tags = rs_conf_get_string(CONF_LIBRARY_TAG_SEARCH); if (tags && !lwd) { rs_library_set_tag_search(tags); g_free(tags); } else if (lwd) { rs_window_set_title(lwd); rs_open_directory_delayed(rs, lwd); rs_dir_selector_expand_path(RS_DIR_SELECTOR(dir_selector), lwd); g_free(lwd); } else { lwd = g_get_current_dir(); rs_window_set_title(lwd); rs_open_directory_delayed(rs, lwd); rs_dir_selector_expand_path(RS_DIR_SELECTOR(dir_selector), lwd); g_free(lwd); } gint last_priority_page = 0; if (!rs_conf_get_integer(CONF_LAST_PRIORITY_PAGE, &last_priority_page)) rs_conf_set_integer(CONF_LAST_PRIORITY_PAGE, 0); rs_store_set_current_page(rs->store, last_priority_page); } /* Construct this to load dcp profiles early */ RSProfileFactory *factory = rs_profile_factory_new_default(); factory = NULL; RSLibrary *library = rs_library_get_singleton(); if (!rs_library_has_database_connection(library)) { GtkWidget *dialog = gui_dialog_make_from_text(GTK_STOCK_DIALOG_ERROR, "Could not initialize sqlite database:", rs_library_get_init_error_msg(library)); gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_ACCEPT); gtk_widget_show_all(dialog); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } gui_set_busy(FALSE); gdk_threads_enter(); gtk_main(); gdk_threads_leave(); return(0); } rawstudio-2.0/src/rs-camera-db.c0000644000175000017500000003156511541462326013523 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "config.h" #include "gettext.h" #include #include #include "rs-camera-db.h" #include "rs-photo.h" #include "rs-toolbox.h" #include "rs-cache.h" /* FIXME: Make this thread safe! */ struct _RSCameraDb { GObject parent; gchar *path; GtkListStore *cameras; }; enum { COLUMN_MAKE, COLUMN_MODEL, COLUMN_PROFILE, COLUMN_SETTINGS0, COLUMN_SETTINGS1, COLUMN_SETTINGS2, NUM_COLUMNS }; G_DEFINE_TYPE(RSCameraDb, rs_camera_db, G_TYPE_OBJECT) static void load_db(RSCameraDb *db); static void save_db(RSCameraDb *db); enum { PROP_0, PROP_PATH }; static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSCameraDb *camera_db = RS_CAMERA_DB(object); switch (property_id) { case PROP_PATH: g_value_set_string(value, camera_db->path); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSCameraDb *camera_db = RS_CAMERA_DB(object); switch (property_id) { case PROP_PATH: camera_db->path = g_value_dup_string(value); load_db(camera_db); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void dispose(GObject *object) { G_OBJECT_CLASS(rs_camera_db_parent_class)->dispose(object); } static void rs_camera_db_class_init(RSCameraDbClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = get_property; object_class->set_property = set_property; object_class->dispose = dispose; g_object_class_install_property(object_class, PROP_PATH, g_param_spec_string( "path", "Path", "Path to XML database", NULL, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); } static void rs_camera_db_init(RSCameraDb *camera_db) { camera_db->cameras = gtk_list_store_new(NUM_COLUMNS, G_TYPE_STRING, /* COLUMN_MAKE */ G_TYPE_STRING, /* COLUMN_MODEL */ G_TYPE_POINTER, /* COLUMN_PROFILE */ RS_TYPE_SETTINGS, /* COLUMN_SETTINGS0 */ RS_TYPE_SETTINGS, /* COLUMN_SETTINGS1 */ RS_TYPE_SETTINGS /* COLUMN_SETTINGS2 */ ); } RSCameraDb * rs_camera_db_new(const char *path) { g_assert(path != NULL); g_assert(g_path_is_absolute(path)); return g_object_new (RS_TYPE_CAMERA_DB, "path", path, NULL); } RSCameraDb * rs_camera_db_get_singleton(void) { static RSCameraDb *camera_db = NULL; static GStaticMutex lock = G_STATIC_MUTEX_INIT; g_static_mutex_lock(&lock); if (!camera_db) { gchar *path = g_build_filename(rs_confdir_get(), "camera-database.xml", NULL); camera_db = rs_camera_db_new(path); g_free(path); } g_static_mutex_unlock(&lock); return camera_db; } static void camera_db_add_camera(RSCameraDb *camera_db, const gchar *make, const gchar *model) { GtkTreeIter iter; gtk_list_store_append(camera_db->cameras, &iter); gtk_list_store_set(camera_db->cameras, &iter, COLUMN_MAKE, make, COLUMN_MODEL, model, -1); save_db(camera_db); } void rs_camera_db_save_defaults(RSCameraDb *camera_db, RS_PHOTO *photo) { g_return_if_fail(RS_IS_PHOTO(photo)); g_return_if_fail(RS_IS_METADATA(photo->metadata)); gboolean found = FALSE; gint snapshot; gchar *db_make, *db_model; const gchar *needle_make = photo->metadata->make_ascii; const gchar *needle_model = photo->metadata->model_ascii; GtkTreeIter iter; GtkTreeModel *model = GTK_TREE_MODEL(camera_db->cameras); if (needle_make && needle_model && gtk_tree_model_get_iter_first(model, &iter)) do { gtk_tree_model_get(model, &iter, COLUMN_MAKE, &db_make, COLUMN_MODEL, &db_model, -1); if (db_make && db_model && g_str_equal(needle_make, db_make) && g_str_equal(needle_model, db_model)) { gpointer profile = rs_photo_get_dcp_profile(photo); gtk_list_store_set(camera_db->cameras, &iter, COLUMN_PROFILE, profile, -1); RSSettings *settings[3]; for(snapshot=0;snapshot<3;snapshot++) { settings[snapshot] = rs_settings_new(); rs_settings_copy(photo->settings[snapshot], MASK_ALL, settings[snapshot]); gtk_list_store_set(camera_db->cameras, &iter, COLUMN_SETTINGS0 + snapshot, settings[snapshot], -1); g_object_unref(settings[snapshot]); } found = TRUE; } g_free(db_make); g_free(db_model); } while (!found && gtk_tree_model_iter_next(model, &iter)); save_db(camera_db); } gboolean rs_camera_db_photo_get_defaults(RSCameraDb *camera_db, RS_PHOTO *photo, RSSettings **dest_settings, gpointer *dest_profile) { g_return_val_if_fail(RS_IS_PHOTO(photo), FALSE); g_return_val_if_fail(RS_IS_METADATA(photo->metadata), FALSE); gboolean found = FALSE; gchar *db_make, *db_model; const gchar *needle_make = photo->metadata->make_ascii; const gchar *needle_model = photo->metadata->model_ascii; GtkTreeIter iter; GtkTreeModel *model = GTK_TREE_MODEL(camera_db->cameras); if (needle_make && needle_model && gtk_tree_model_get_iter_first(model, &iter)) do { gtk_tree_model_get(model, &iter, COLUMN_MAKE, &db_make, COLUMN_MODEL, &db_model, -1); if (db_make && db_model && g_str_equal(needle_make, db_make) && g_str_equal(needle_model, db_model)) { gtk_tree_model_get(model, &iter, COLUMN_PROFILE, dest_profile, COLUMN_SETTINGS0, &dest_settings[0], COLUMN_SETTINGS1, &dest_settings[1], COLUMN_SETTINGS2, &dest_settings[2], -1); found = TRUE; } g_free(db_make); g_free(db_model); } while (!found && gtk_tree_model_iter_next(model, &iter)); if (!found) camera_db_add_camera(camera_db, needle_make, needle_model); return found; } gboolean rs_camera_db_photo_set_defaults(RSCameraDb *camera_db, RS_PHOTO *photo) { g_return_val_if_fail(RS_IS_PHOTO(photo), FALSE); g_return_val_if_fail(RS_IS_METADATA(photo->metadata), FALSE); gpointer p; RSSettings *s[3]; gboolean found = rs_camera_db_photo_get_defaults(camera_db, photo, s, &p); if (!found) return FALSE; if (RS_IS_DCP_FILE(p)) rs_photo_set_dcp_profile(photo, p); gint i; for(i=0;i<3;i++) if (RS_IS_SETTINGS(s[i])) { rs_settings_copy(s[i], MASK_ALL, photo->settings[i]); g_object_unref(s[i]); } return found; } static void load_db(RSCameraDb *camera_db) { xmlDocPtr doc; xmlNodePtr cur; xmlNodePtr entry = NULL; xmlChar *val; RSProfileFactory *profile_factory = rs_profile_factory_new_default(); doc = xmlParseFile(camera_db->path); if (!doc) return; cur = xmlDocGetRootElement(doc); if (cur && (xmlStrcmp(cur->name, BAD_CAST "rawstudio-camera-database") == 0)) { cur = cur->xmlChildrenNode; while(cur) { if ((!xmlStrcmp(cur->name, BAD_CAST "camera"))) { GtkTreeIter iter; gtk_list_store_append(camera_db->cameras, &iter); entry = cur->xmlChildrenNode; while (entry) { val = xmlNodeListGetString(doc, entry->xmlChildrenNode, 1); if ((!xmlStrcmp(entry->name, BAD_CAST "make"))) gtk_list_store_set(camera_db->cameras, &iter, COLUMN_MAKE, val, -1); else if ((!xmlStrcmp(entry->name, BAD_CAST "model"))) gtk_list_store_set(camera_db->cameras, &iter, COLUMN_MODEL, val, -1); else if ((!xmlStrcmp(entry->name, BAD_CAST "dcp-profile"))) gtk_list_store_set(camera_db->cameras, &iter, COLUMN_PROFILE, rs_profile_factory_find_from_id(profile_factory, (gchar *) val), -1); xmlFree(val); if ((!xmlStrcmp(entry->name, BAD_CAST "settings"))) { val = xmlGetProp(entry, BAD_CAST "id"); gint id = (val) ? atoi((gchar *) val) : 0; xmlFree(val); id = CLAMP(id, 0, 2); RSSettings *settings = rs_settings_new(); rs_cache_load_setting(settings, doc, entry->xmlChildrenNode, 100); /* FIXME: Correct version somehow! */ gtk_list_store_set(camera_db->cameras, &iter, COLUMN_SETTINGS0 + id, settings, -1); g_object_unref(settings); } entry = entry->next; } } cur = cur->next; } } else g_warning(PACKAGE " did not understand the format in %s", camera_db->path); xmlFreeDoc(doc); } static void save_db(RSCameraDb *camera_db) { xmlTextWriterPtr writer; gint snapshot; gchar *db_make, *db_model; gpointer profile; RSSettings *settings[3]; GtkTreeIter iter; GtkTreeModel *model = GTK_TREE_MODEL(camera_db->cameras); writer = xmlNewTextWriterFilename(camera_db->path, 0); if (!writer) return; xmlTextWriterSetIndent(writer, 1); xmlTextWriterStartDocument(writer, NULL, "ISO-8859-1", NULL); xmlTextWriterStartElement(writer, BAD_CAST "rawstudio-camera-database"); if (gtk_tree_model_get_iter_first(model, &iter)) do { gtk_tree_model_get(model, &iter, COLUMN_MAKE, &db_make, COLUMN_MODEL, &db_model, COLUMN_PROFILE, &profile, COLUMN_SETTINGS0, &settings[0], COLUMN_SETTINGS1, &settings[1], COLUMN_SETTINGS2, &settings[2], -1); xmlTextWriterStartElement(writer, BAD_CAST "camera"); if (db_make) xmlTextWriterWriteFormatElement(writer, BAD_CAST "make", "%s", db_make); if (db_model) xmlTextWriterWriteFormatElement(writer, BAD_CAST "model", "%s", db_model); if (profile) { if (RS_IS_DCP_FILE(profile)) { const gchar* dcp_id = rs_dcp_get_id(RS_DCP_FILE(profile)); xmlTextWriterWriteFormatElement(writer, BAD_CAST "dcp-profile", "%s", dcp_id); } /* FIXME: Add support for ICC profiles */ } for(snapshot=0;snapshot<3;snapshot++) if (RS_IS_SETTINGS(settings[snapshot])) { xmlTextWriterStartElement(writer, BAD_CAST "settings"); xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "id", "%d", snapshot); rs_cache_save_settings(settings[snapshot], MASK_ALL-MASK_WB, writer); xmlTextWriterEndElement(writer); g_object_unref(settings[snapshot]); } xmlTextWriterEndElement(writer); g_free(db_make); g_free(db_model); } while (gtk_tree_model_iter_next(model, &iter)); xmlTextWriterEndDocument(writer); xmlFreeTextWriter(writer); return; } static void icon_func(GtkTreeViewColumn *tree_column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { /* This will always be called from the GTK+ main thread, we should be safe */ static GdkPixbuf *pixbuf = NULL; if (!pixbuf) pixbuf = gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "camera-photo.png", NULL); g_object_set(cell, "pixbuf", pixbuf, NULL); } GtkWidget * rs_camera_db_editor_new(RSCameraDb *camera_db) { GtkWidget *dialog = NULL; if (dialog) return dialog; dialog = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(dialog), _("Camera defaults editor")); gtk_window_set_type_hint(GTK_WINDOW(dialog), GDK_WINDOW_TYPE_HINT_DIALOG); gtk_window_set_destroy_with_parent(GTK_WINDOW(dialog), TRUE); gtk_dialog_set_has_separator (GTK_DIALOG(dialog), FALSE); /* Is this wise? */ g_signal_connect_swapped(dialog, "delete_event", G_CALLBACK (gtk_widget_hide), dialog); g_signal_connect_swapped(dialog, "response", G_CALLBACK (gtk_widget_hide), dialog); #if GTK_CHECK_VERSION(2,14,0) GtkWidget *vbox = gtk_dialog_get_content_area(GTK_DIALOG(dialog)); #else GtkWidget *vbox = GTK_DIALOG(dialog)->vbox; #endif GtkWidget *camera_selector = gtk_tree_view_new_with_model(GTK_TREE_MODEL(camera_db->cameras)); GtkCellRenderer *renderer; GtkTreeViewColumn *column; column = gtk_tree_view_column_new(); gtk_tree_view_column_set_title (column, _("Model")); /* Icon */ renderer = gtk_cell_renderer_pixbuf_new(); gtk_tree_view_column_pack_start (column, renderer, FALSE); gtk_tree_view_column_set_cell_data_func(column, renderer, icon_func, NULL, NULL); /* Model */ renderer = gtk_cell_renderer_text_new(); gtk_tree_view_column_pack_start(column, renderer, TRUE); gtk_tree_view_column_set_attributes(column, renderer, "text", COLUMN_MODEL, NULL); gtk_tree_view_append_column(GTK_TREE_VIEW(camera_selector), column); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(camera_db->cameras), COLUMN_MODEL, GTK_SORT_ASCENDING); GtkWidget *hbox = gtk_hbox_new(FALSE, 4); gtk_box_pack_start(GTK_BOX(hbox), camera_selector, FALSE, FALSE, 3); GtkWidget *toolbox = rs_toolbox_new(); gtk_box_pack_start(GTK_BOX(hbox), toolbox, TRUE, TRUE, 3); gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 3); return dialog; } rawstudio-2.0/src/rs-save-dialog.h0000644000175000017500000000474611526533645014117 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_SAVE_DIALOG_H #define RS_SAVE_DIALOG_H #include #include G_BEGIN_DECLS #define RS_TYPE_SAVE_DIALOG rs_save_dialog_get_type() #define RS_SAVE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_SAVE_DIALOG, RSSaveDialog)) #define RS_SAVE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_SAVE_DIALOG, RSSaveDialogClass)) #define RS_IS_SAVE_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_SAVE_DIALOG)) #define RS_IS_SAVE_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_SAVE_DIALOG)) #define RS_SAVE_DIALOG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_SAVE_DIALOG, RSSaveDialogClass)) typedef struct { GtkWindow parent; RSOutput *output; GtkWidget *vbox; GtkWidget *chooser; RS_CONFBOX *type_box; GtkWidget *file_pref; GtkWidget *pref_bin; gdouble w_original; gdouble h_original; gboolean keep_aspect; GtkSpinButton *w_spin; GtkSpinButton *h_spin; GtkSpinButton *p_spin; gulong w_signal; gulong h_signal; gulong p_signal; gint save_width; gint save_height; gboolean dispose_has_run; RSFilter *finput; RSFilter *fdemosaic; RSFilter *flensfun; RSFilter *ftransform_input; RSFilter *frotate; RSFilter *fcrop; RSFilter *fresample; RSFilter *fdcp; RSFilter *fdenoise; RSFilter *ftransform_display; RSFilter *fend; RS_PHOTO *photo; gint snapshot; } RSSaveDialog; typedef struct { GtkWindowClass parent_class; } RSSaveDialogClass; GType rs_save_dialog_get_type (void); RSSaveDialog* rs_save_dialog_new (void); void rs_save_dialog_set_photo(RSSaveDialog *dialog, RS_PHOTO *photo, gint snapshot); G_END_DECLS #endif /* RS_SAVE_DIALOG_H */ rawstudio-2.0/src/filename.c0000644000175000017500000002170411526533645013046 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #ifdef WIN32 #include /* MinGW WIN32 gmtime_r() */ #endif #include #include #include #include "config.h" #include "application.h" #include "filename.h" #include "conf_interface.h" #include "gettext.h" #include "gtk-helper.h" #include "rs-metadata.h" static void filename_entry_changed_writeback(GtkEntry *entry, gpointer user_data); static void filename_entry_changed_writeconf(GtkEntry *entry, gpointer user_data); static void filename_add_clicked(GtkButton *button, gpointer user_data); gchar * filename_parse(const gchar *in, const gchar *filename, const gint snapshot) { /* * %f = filename * %c = incremental counter * %s = setting (A,B or C) * %d = date (will have to wait until read from exif) * %t = time (will have to wait until read from exif) * %p = path of raw file */ gchar temp[1024]; gchar tempc[32]; gchar *output = NULL; gint n=0, m=0; gint c=0; gboolean counter = FALSE; gboolean file_exists = FALSE; gint i = 1; gchar *basename; gchar *path; RSMetadata *metadata = rs_metadata_new_from_file(filename); if (filename == NULL) return NULL; if (in == NULL) return NULL; basename = g_path_get_basename(filename); path = g_path_get_dirname(filename); output = g_strrstr(basename, "."); /* Prepare time/date */ struct tm *tm = g_new0(struct tm, 1); time_t tt = (time_t) metadata->timestamp; gmtime_r(&tt, tm); if (output != NULL) { *output = '\0'; } output = NULL; do { while (in[n]) { switch(in[n]) { case '%': switch (in[n+1]) { case '1': case '2': case '3': case '4': case '5': case '6': case '7': case '8': case '9': c = (gint) in[n+1]; switch (in[n+2]) { case 'c': counter = TRUE; if (c == 49) sprintf(tempc, "%01d",i); else if (c == 50) sprintf(tempc, "%02d",i); else if (c == 51) sprintf(tempc, "%03d",i); else if (c == 52) sprintf(tempc, "%04d",i); else if (c == 53) sprintf(tempc, "%05d",i); else if (c == 54) sprintf(tempc, "%06d",i); else if (c == 55) sprintf(tempc, "%07d",i); else if (c == 56) sprintf(tempc, "%08d",i); else if (c == 57) sprintf(tempc, "%09d",i); n += 3; strcpy(&temp[m], tempc); m += strlen(tempc); break; default: temp[m++] = in[n]; temp[m++] = in[n+1]; temp[m++] = in[n+2]; n += 3; break; } break; case 'f': strcpy(&temp[m], basename); m += strlen(basename); n += 2; break; case 'c': counter = TRUE; g_sprintf(tempc, "%d", i); strcpy(&temp[m], tempc); m += strlen(tempc); n += 2; break; case 's': switch (snapshot) { case 0: strcpy(&temp[m], "A"); break; case 1: strcpy(&temp[m], "B"); break; case 2: strcpy(&temp[m], "C"); break; } m += 1; n += 2; break; case 'd': { gchar *result = g_new0(gchar, 11); strftime(result, 11, "%Y-%m-%d", tm); strcpy(&temp[m], result); n += 2; m += strlen(result); g_free(result); break; } case 'D': { gchar *result = g_new0(gchar, 500); switch (in[n+2]) { case 'y': strftime(result, 500, "%y", tm); break; case 'Y': strftime(result, 500, "%Y", tm); break; case 'm': strftime(result, 500, "%m", tm); break; case 'M': strftime(result, 500, "%B", tm); break; case 'd': strftime(result, 500, "%d", tm); break; case 'D': strftime(result, 500, "%A", tm); break; default: *result = 0; } strcpy(&temp[m], result); n += 3; m += strlen(result); g_free(result); break; } case 't': { gchar *result = g_new0(gchar, 9); strftime(result, 9, "%H:%M:%S", tm); strcpy(&temp[m], result); n += 2; m += strlen(result); g_free(result); break; } case 'p': { strcpy(&temp[m], path); m += strlen(path); n += 2; break; } default: temp[m++] = in[n]; temp[m++] = in[n+1]; n += 2; break; } break; default: temp[m++] = in[n++]; break; } } temp[m] = '\0'; if (output) g_free(output); output = g_strdup(temp); file_exists = g_file_test(output, G_FILE_TEST_EXISTS); if (counter == FALSE) file_exists = FALSE; // resets for next run i++; n = 0; m = 0; } while (file_exists == TRUE); g_free(basename); g_free(tm); g_free(path); g_object_unref(metadata); return output; } static void filename_entry_changed_writeback(GtkEntry *entry, gpointer user_data) { gchar **filename = (gchar **) user_data; if (filename) { if (*filename) g_free(*filename); *filename = g_strdup(gtk_entry_get_text(entry)); } return; } static void filename_entry_changed_writeconf(GtkEntry *entry, gpointer user_data) { gchar *conf_key = (gchar *) user_data; if (conf_key) rs_conf_set_string(conf_key, gtk_entry_get_text(entry)); return; } #define TEXT_FUNCTION(A,B) static void A(GtkMenuItem *menuitem, GtkBin *combo) {\ GtkWidget *entry = gtk_bin_get_child(combo);\ gtk_entry_append_text(GTK_ENTRY(entry), B); } TEXT_FUNCTION(add_f,"%f"); TEXT_FUNCTION(add_c,"%2c"); TEXT_FUNCTION(add_s,"%s"); TEXT_FUNCTION(add_d,"%d"); TEXT_FUNCTION(add_t,"%t"); TEXT_FUNCTION(add_p,"%p"); TEXT_FUNCTION(add_DY,"%DY"); TEXT_FUNCTION(add_Dy,"%Dy"); TEXT_FUNCTION(add_Dm,"%Dm"); TEXT_FUNCTION(add_DM,"%DM"); TEXT_FUNCTION(add_DD,"%DD"); TEXT_FUNCTION(add_Dd,"%Dd"); #undef TEXT_FUNCTION static void filename_add_clicked(GtkButton *button, gpointer user_data) { gui_menu_popup(GTK_WIDGET(button), user_data, _("%f - Original filename"), add_f, _("%p - Path of original file"), add_p, _("%2c - Incremental counter"), add_c, _("%s - Setting id (A, B or C)"), add_s, _("%d - Date from EXIF (YYYY-MM-DD)"), add_d, _("%DY - Year from EXIF (YYYY)"), add_DY, _("%Dy - Year from EXIF (YY)"), add_Dy, _("%Dm - Month from EXIF (MM)"), add_Dm, _("%DM - Month from EXIF (Text)"), add_DM, _("%Dd - Date from EXIF (DD)"), add_Dd, _("%DD - Day of week from EXIF"), add_DD, _("%t - Time from EXIF (HH:MM:SS)"), add_t, -1 ); } GtkWidget * rs_filename_chooser_button_new(gchar **filename, const gchar *conf_key) { gint i; const static gchar *filenames[] = { DEFAULT_CONF_EXPORT_FILENAME, "%f", "%f_%c", "%f_output_%4c", NULL }; GtkWidget *addbutton; GtkWidget *hbox = gtk_hbox_new(FALSE, 2); GtkWidget *combo; GtkWidget *entry; combo = gtk_combo_box_entry_new_text(); entry = gtk_bin_get_child(GTK_BIN(combo)); addbutton = gtk_button_new_with_label("+"); g_object_set_data(G_OBJECT(hbox), "entry", entry); for(i=0; filenames[i] != NULL; i++) gtk_combo_box_append_text(GTK_COMBO_BOX(combo), filenames[i]); gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0); if (filename) { gtk_entry_set_text(GTK_ENTRY(entry), *filename); g_signal_connect (G_OBJECT(entry), "changed", G_CALLBACK(filename_entry_changed_writeback), (gpointer) filename); } if (conf_key) g_signal_connect (G_OBJECT(entry), "changed", G_CALLBACK(filename_entry_changed_writeconf), (gpointer) conf_key); /* If we have a conf_key but no supplied filename, we try to load saved * filename from conf system */ if (conf_key && !filename) { gchar *saved_filename; saved_filename = rs_conf_get_string(conf_key); if (saved_filename) gtk_entry_set_text(GTK_ENTRY(entry), saved_filename); } g_signal_connect (G_OBJECT(addbutton), "clicked", G_CALLBACK(filename_add_clicked), combo); gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0); gtk_box_pack_start (GTK_BOX (hbox), addbutton, FALSE, FALSE, 0); return(hbox); } rawstudio-2.0/src/rs-store.h0000644000175000017500000002036311526533645013051 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_STORE_H #define RS_STORE_H #include typedef struct _RSStoreClass RSStoreClass; struct _RSStoreClass { GtkHBoxClass parent_class; }; typedef enum { RS_STORE_SORT_BY_NAME, RS_STORE_SORT_BY_TIMESTAMP, RS_STORE_SORT_BY_ISO, RS_STORE_SORT_BY_APERTURE, RS_STORE_SORT_BY_FOCALLENGTH, RS_STORE_SORT_BY_SHUTTERSPEED, } RS_STORE_SORT_METHOD; GType rs_store_get_type (void); /** * Creates a new RSStore * @return A new GtkWidget */ extern GtkWidget * rs_store_new(void); #define RS_STORE_TYPE_WIDGET (rs_store_get_type ()) #define RS_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_STORE_TYPE_WIDGET, RSStore)) #define RS_STORE_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), RS_STORE_WIDGET, RSStoreClass)) #define RS_IS_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_STORE_TYPE_WIDGET)) #define RS_IS_STORE_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), RS_STORE_TYPE_WIDGET)) #define RS_STORE_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_STORE_TYPE_WIDGET, RSStoreClass)) /* Classes to user for io-system */ #define PRELOAD_CLASS (82764283) #define METADATA_CLASS (542344) #define RESTORE_TAGS_CLASS (4845658) /** * Load thumbnails from a directory into the store * @param store A RSStore * @param path The path to load * @return The number of files loaded or -1 */ extern gint rs_store_load_directory(RSStore *store, const gchar *path); /** * Set priority and exported flags of a thumbnail * @param store A RSStore * @param filename The name of the thumbnail to remove or NULL * @param iter The iter of the thumbnail to remove or NULL * @param priority The priority or NULL to leave unchanged * @param exported The exported status or NULL to leave unchanged * @return TRUE if succeeded */ extern gboolean rs_store_set_flags(RSStore *store, const gchar *filename, GtkTreeIter *iter, const guint *priority, const gboolean *exported); /** * Update thumbnail of a file in the store * @param store A RSStore * @param filename The name of the thumbnail to remove or NULL * @param thumbnail A pixbuffer containing the updated thumbnail */ extern void rs_store_update_thumbnail(RSStore *store, const gchar *filename, GdkPixbuf *thumbnail); /** * Select one image * @param store A RSStore * @param name The filename to select * @param deselect_others Should other images be de-selected. */ extern gboolean rs_store_set_selected_name(RSStore* store, const gchar* filename, gboolean deselect_others); /** * Remove thumbnail(s) from store * @param store A RSStore * @param filename The name of the thumbnail to remove or NULL * @param iter The iter of the thumbnail to remove or NULL (If both name and iter is NULL, ALL thumbnails will be removed) */ extern void rs_store_remove(RSStore *store, const gchar *filename, GtkTreeIter *iter); /** * Get a list of currently selected thumbnail iters * @param store A RSStore * @return a GList or NULL */ extern GList * rs_store_get_selected_iters(RSStore *store); /** * Get a list of currently selected thumbnail names * @param store A RSStore * @return a GList or NULL */ extern GList * rs_store_get_selected_names(RSStore *store); /** * Get a list of photo names * @param store A RSStore * @param selected GList for selected thumbs or NULL * @param visible GList for visible (in currently selected iconview) thumbs or NULL * @param all GList for all photos or NULL */ extern void rs_store_get_names(RSStore *store, GList **selected, GList **visible, GList **all); /** * Show filenames in the thumbnail browser * @param store A RSStore * @param show_filenames If TRUE filenames will be visible */ extern void rs_store_set_show_filenames(RSStore *store, gboolean show_filenames); /** * Return a GList of iters with a specific priority * @param store A RSStore * @param priority The priority of interest * @return A GList of GtkTreeIters */ extern GList * rs_store_get_iters_with_priority(RSStore *store, guint priority); /** * Get the filename of an image * @param store A RSStore * @param iter The iter of the thumbnail * @return a filename or NULL if failed */ extern gchar * rs_store_get_name(RSStore *store, GtkTreeIter *iter); /** * Get the filename of the previous or next thumbnail * @param store A RSStore * @param current_filename Current filename or NULL if none * @param direction 1: previous, 2: next * @return filename of next or previous file, NULL if none. */ const gchar* rs_store_get_prevnext(RSStore *store, const gchar *current_filename, guint direction); /** * Selects the previous or next thumbnail * @param store A RSStore * @param current_filename Current filename or NULL if none * @param direction 1: previous, 2: next */ gboolean rs_store_select_prevnext(RSStore *store, const gchar *current_filename, guint direction); /** * Switches to the page number page_num * @note Should behave like gtk_notebook_set_current_page() * @param store A RSStore * @param page_num index of the page to switch to, starting from 0. If negative, the last page will be used. If greater than the number of pages in the notebook, nothing will be done. */ extern void rs_store_set_current_page(RSStore *store, gint page_num); /** * Returns the page number of the current page. * @note Should behave like gtk_notebook_get_current_page() * @param store A RSStore * @return the index (starting from 0) of the current page in the notebook. If the notebook has no pages, then -1 will be returned. */ extern gint rs_store_get_current_page(RSStore *store); /** * Set the sorting method for a RSStore * @param store A RSStore * @param sort_method A sort method from the RS_STORE_SORT_BY-family of enums */ extern void rs_store_set_sort_method(RSStore *store, RS_STORE_SORT_METHOD sort_method); /** * Get the sorting method for a RSStore * @param store A RSStore * @return A sort method from the RS_STORE_SORT_BY-family of enums */ extern RS_STORE_SORT_METHOD rs_store_get_sort_method(RSStore *store); /** * Marks a selection of thumbnails as a group * @param store A RSStore */ void rs_store_group_photos(RSStore *store); /** * Ungroup a group or selection of groups * @param store A RSStore */ void rs_store_ungroup_photos(RSStore *store); gint rs_store_selection_n_groups(RSStore *store, GList *selected); extern GList * rs_store_sort_selected(GList *selected); extern void rs_store_auto_group(RSStore *store); extern void rs_store_group_select_name(RSStore *store, const gchar *filename); extern void rs_store_group_ungroup_name(RSStore *store, const gchar *filename); /** * Add a single image to the image store. * @param store A RSStore * @param fullname Full filename including path to the file. */ extern void rs_store_load_file(RSStore *store, gchar *fullname); extern void rs_store_set_iconview_size(RSStore *store, gint size); extern gint rs_store_get_iconview_size(RSStore *store); extern gboolean rs_store_set_open_selected(RSStore *store, gboolean open_selected); /** * Return whether the file is assumed to be selected * A special case is if NONE is selected, then we will return TRUE, since this will * actually assume that the current photo is selected. * @param store A RSStore * @param filename The filename of the photo * @return TRUE if the photo is selected in the store, FALSE otherwise */ extern gboolean rs_store_is_photo_selected(RSStore *store, const gchar *filename); extern GtkIconView* rs_store_get_current_iconview(RSStore *store); #endif /* RS_STORE_H */ rawstudio-2.0/src/rs-tiff.h0000644000175000017500000000230111526533645012635 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_TIFF_H #define RS_TIFF_H extern gboolean rs_tiff8_save(GdkPixbuf *pixbuf, const gchar *filename, const gchar *profile_filename, gboolean uncompressed); extern gboolean rs_tiff16_save(RS_IMAGE16 *image, const gchar *filename, const gchar *profile_filename, gboolean uncompressed); RS_IMAGE16 *rs_tiff16_load(const gchar *filename); #endif rawstudio-2.0/src/rs-histogram.h0000644000175000017500000000470311543674627013717 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_HISTOGRAM_WIDGET_H #define RS_HISTOGRAM_WIDGET_H #include #include "application.h" typedef struct _RSHistogramWidget RSHistogramWidget; typedef struct _RSHistogramWidgetClass RSHistogramWidgetClass; extern GType rs_histogram_widget_get_type (void); /** * Creates a new RSHistogramWidget */ extern GtkWidget *rs_histogram_new(void); /** * Set an image to base the histogram of * @param histogram A RSHistogramWidget * @param image An image * @param display_color_space Colorspace to use to transform the input. */ extern void rs_histogram_set_input(RSHistogramWidget *histogram, RSFilter* input, RSColorSpace *display_color_space); extern void rs_histogram_set_highlight(RSHistogramWidget *histogram, const guchar* rgb_values); /** * Redraw a RSHistogramWidget * @param histogram A RSHistogramWidget */ extern void rs_histogram_redraw(RSHistogramWidget *histogram); #define RS_HISTOGRAM_TYPE_WIDGET (rs_histogram_widget_get_type ()) #define RS_HISTOGRAM_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_HISTOGRAM_TYPE_WIDGET, RSHistogramWidget)) #define RS_HISTOGRAM_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), RS_HISTOGRAM_WIDGET, RSHistogramWidgetClass)) #define RS_IS_HISTOGRAM_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_HISTOGRAM_TYPE_WIDGET)) #define RS_IS_HISTOGRAM_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), RS_HISTOGRAM_TYPE_WIDGET)) #define RS_HISTOGRAM_WIDGET_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_HISTOGRAM_TYPE_WIDGET, RSHistogramWidgetClass)) #endif /* RS_HISTOGRAM_WIDGET_H */ rawstudio-2.0/src/rs-histogram.c0000644000175000017500000003161311526533645013705 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include /* memset() */ #include "rs-histogram.h" /* FIXME: Do some cleanup in finalize! */ struct _RSHistogramWidget { GtkDrawingArea parent; gint width; gint height; GdkPixmap *blitter; RSFilter *input; RSSettings *settings; guint input_samples[4][256]; guint *output_samples[4]; gfloat rgb_values[3]; RSColorSpace *display_color_space; }; struct _RSHistogramWidgetClass { GtkDrawingAreaClass parent_class; }; /* Define the boiler plate stuff using the predefined macro */ G_DEFINE_TYPE (RSHistogramWidget, rs_histogram_widget, GTK_TYPE_DRAWING_AREA); static void size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data); static gboolean expose(GtkWidget *widget, GdkEventExpose *event); /** * Class initializer */ static void rs_histogram_widget_class_init(RSHistogramWidgetClass *klass) { GtkWidgetClass *widget_class; GtkObjectClass *object_class; widget_class = GTK_WIDGET_CLASS(klass); object_class = GTK_OBJECT_CLASS(klass); widget_class->expose_event = expose; } /** * Instance initialization */ static void rs_histogram_widget_init(RSHistogramWidget *hist) { hist->output_samples[0] = NULL; hist->output_samples[1] = NULL; hist->output_samples[2] = NULL; hist->output_samples[3] = NULL; hist->input = NULL; hist->settings = NULL; hist->blitter = NULL; hist->rgb_values[0] = -1; hist->rgb_values[1] = -1; hist->rgb_values[2] = -1; g_signal_connect(G_OBJECT(hist), "size-allocate", G_CALLBACK(size_allocate), NULL); } static void size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data) { gint c; RSHistogramWidget *histogram = RS_HISTOGRAM_WIDGET(widget); histogram->width = allocation->width; histogram->height = allocation->height; /* Free the samples array if needed */ for (c=0;c<4;c++) { if (histogram->output_samples[c]) g_free(histogram->output_samples[c]); histogram->output_samples[c] = NULL; } /* Free blitter if needed */ if (histogram->blitter) { g_object_unref(histogram->blitter); histogram->blitter = NULL; } } static gboolean expose(GtkWidget *widget, GdkEventExpose *event) { rs_histogram_redraw(RS_HISTOGRAM_WIDGET(widget)); return FALSE; } /** * Creates a new RSHistogramWidget */ GtkWidget * rs_histogram_new(void) { return g_object_new (RS_HISTOGRAM_TYPE_WIDGET, NULL); } /** * Set an image to base the histogram of * @param histogram A RSHistogramWidget * @param input An input RSFilter */ void rs_histogram_set_input(RSHistogramWidget* histogram, RSFilter* input, RSColorSpace* display_color_space) { g_return_if_fail (RS_IS_HISTOGRAM_WIDGET(histogram)); g_return_if_fail (RS_IS_FILTER(input)); histogram->input = input; histogram->display_color_space = display_color_space; rs_histogram_redraw(histogram); } void rs_histogram_set_highlight(RSHistogramWidget *histogram, const guchar* rgb_values) { g_return_if_fail (RS_IS_HISTOGRAM_WIDGET(histogram)); if (rgb_values) { histogram->rgb_values[0] = (float)rgb_values[0]/255.0f; histogram->rgb_values[1] = (float)rgb_values[1]/255.0f; histogram->rgb_values[2] = (float)rgb_values[2]/255.0f; } else { histogram->rgb_values[0] = -1; histogram->rgb_values[1] = -1; histogram->rgb_values[2] = -1; } rs_histogram_redraw(histogram); } #define LUM_PRECISION 15 #define LUM_FIXED(a) ((guint)((a)*(1<input_samples[0][0]; /* Reset table */ memset(hist, 0x00, sizeof(guint)*4*256); if (!histogram->input) return; RSFilterRequest *request = rs_filter_request_new(); rs_filter_request_set_quick(RS_FILTER_REQUEST(request), TRUE); rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", histogram->display_color_space); RSFilterResponse *response = rs_filter_get_image8(histogram->input, request); g_object_unref(request); GdkPixbuf *pixbuf = rs_filter_response_get_image8(response); if (!pixbuf) return; const gint pix_width = gdk_pixbuf_get_n_channels(pixbuf); const gint w = gdk_pixbuf_get_width(pixbuf); const gint h = gdk_pixbuf_get_height(pixbuf); for(y = 0; y < h; y++) { guchar *i = GET_PIXBUF_PIXEL(pixbuf, 0, y); for(x = 0; x < w ; x++) { guchar r = i[R]; guchar g = i[G]; guchar b = i[B]; hist[r]++; hist[g+256]++; hist[b+512]++; guchar luma = (guchar)((RLUMF * (int)r + GLUMF * (int)g + BLUMF * (int)b + HALFF) >> LUM_PRECISION); hist[luma+768]++; i += pix_width; } } g_object_unref(pixbuf); g_object_unref(response); } /** * Redraw a RSHistogramWidget * @param histogram A RSHistogramWidget */ void rs_histogram_redraw(RSHistogramWidget *histogram) { gint c, x; guint max; GdkDrawable *window; GtkWidget *widget; GdkGC *gc; gint current[4]; current[0] = (int)(histogram->rgb_values[0] * histogram->width); current[1] = (int)(histogram->rgb_values[1] * histogram->width); current[2] = (int)(histogram->rgb_values[2] * histogram->width); gfloat lum = 0.212671f * histogram->rgb_values[0] + 0.715160f * histogram->rgb_values[1] + 0.072169f * histogram->rgb_values[2]; current[3] = (int)(lum*histogram->width); g_return_if_fail (RS_IS_HISTOGRAM_WIDGET(histogram)); widget = GTK_WIDGET(histogram); /* Draw histogram if we got everything needed */ if (histogram->input && GTK_WIDGET_VISIBLE(widget) && GTK_WIDGET_REALIZED(widget)) { const static GdkColor bg = {0, 0x9900, 0x9900, 0x9900}; const static GdkColor lines = {0, 0x7700, 0x7700, 0x7700}; window = GDK_DRAWABLE(widget->window); gc = gdk_gc_new(window); /* Allocate new buffer if needed */ if (histogram->blitter == NULL) histogram->blitter = gdk_pixmap_new(window, histogram->width, histogram->height, -1); /* Reset background to a nice grey */ gdk_gc_set_rgb_fg_color(gc, &bg); gdk_draw_rectangle(histogram->blitter, gc, TRUE, 0, 0, histogram->width, histogram->height); /* Draw vertical lines */ gdk_gc_set_rgb_fg_color(gc, &lines); gdk_draw_line(histogram->blitter, gc, histogram->width*0.25, 0, histogram->width*0.25, histogram->height-1); gdk_draw_line(histogram->blitter, gc, histogram->width*0.5, 0, histogram->width*0.5, histogram->height-1); gdk_draw_line(histogram->blitter, gc, histogram->width*0.75, 0, histogram->width*0.75, histogram->height-1); /* Sample some data */ calculate_histogram(histogram); /* Interpolate data for correct width and find maximum value */ max = 0; for (c=0;c<4;c++) histogram->output_samples[c] = interpolate_dataset_int( &histogram->input_samples[c][1], 253, histogram->output_samples[c], histogram->width, &max); /* Find the scaling factor */ gfloat factor = (gfloat)(max+histogram->height)/(gfloat)histogram->height; #if GTK_CHECK_VERSION(2,8,0) cairo_t *cr; /* We will use Cairo for this if possible */ cr = gdk_cairo_create (histogram->blitter); /* Line width */ cairo_set_line_width (cr, 2.0); /* Red */ cairo_set_source_rgba(cr, 1.0, 0.2, 0.2, 1.0); /* Start at first column */ cairo_move_to (cr, 0, (histogram->height-1)-histogram->output_samples[0][0]/factor); /* Walk through columns */ for (x = 1; x < histogram->width; x++) cairo_line_to(cr, x, (histogram->height-1)-histogram->output_samples[0][x]/factor); /* Draw the line */ cairo_stroke (cr); /* Underexposed */ cairo_set_source_rgba(cr, 1.0, 0.2, 0.2, histogram->input_samples[0][0]/100.0); cairo_arc(cr, 8.0, 8.0, 3.0, 0.0, 2*G_PI); cairo_fill(cr); /* Overexposed */ cairo_set_source_rgba(cr, 1.0, 0.2, 0.2, histogram->input_samples[0][255]/100.0); cairo_arc(cr, histogram->width-8.0, 8.0, 3.0, 0.0, 2*G_PI); cairo_fill(cr); /* Green */ cairo_set_source_rgba(cr, 0.2, 1.0, 0.2, 0.5); cairo_move_to (cr, 0, (histogram->height-1)-histogram->output_samples[1][0]/factor); for (x = 1; x < histogram->width; x++) cairo_line_to(cr, x, (histogram->height-1)-histogram->output_samples[1][x]/factor); cairo_stroke (cr); cairo_set_source_rgba(cr, 0.2, 1.0, 0.2, histogram->input_samples[1][0]/100.0); cairo_arc(cr, 8.0, 16.0, 3.0, 0.0, 2*G_PI); cairo_fill(cr); cairo_set_source_rgba(cr, 0.2, 1.0, 0.2, histogram->input_samples[1][255]/100.0); cairo_arc(cr, histogram->width-8.0, 16.0, 3.0, 0.0, 2*G_PI); cairo_fill(cr); /* Blue */ cairo_set_source_rgba(cr, 0.2, 0.2, 1.0, 0.5); cairo_move_to (cr, 0, (histogram->height-1)-histogram->output_samples[2][0]/factor); for (x = 1; x < histogram->width; x++) cairo_line_to(cr, x, (histogram->height-1)-histogram->output_samples[2][x]/factor); cairo_stroke (cr); cairo_set_source_rgba(cr, 0.2, 0.2, 1.0, histogram->input_samples[2][0]/100.0); cairo_arc(cr, 8.0, 24.0, 3.0, 0.0, 2*G_PI); cairo_fill(cr); cairo_set_source_rgba(cr, 0.2, 0.2, 1.0, histogram->input_samples[2][255]/100.0); cairo_arc(cr, histogram->width-8.0, 24.0, 3.0, 0.0, 2*G_PI); cairo_fill(cr); /* Luma */ cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, 0.5); cairo_move_to (cr, 0, histogram->height); for (x = 0; x < histogram->width; x++) cairo_line_to(cr, x, (histogram->height)-histogram->output_samples[3][x]/factor); cairo_line_to(cr, x, histogram->height); cairo_fill (cr); for (c = 0; c < 4; c++) { if (current[c] >= 0 && current[c] < histogram->width) { switch (c) { case 0: cairo_set_source_rgba(cr, 1.0, 0.0, 0.0, 0.2); break; case 1: cairo_set_source_rgba(cr, 0.0, 1.0, 0.0, 0.3); break; case 2: cairo_set_source_rgba(cr, 0.0, 0.0, 1.0, 0.2); break; case 3: cairo_set_source_rgba(cr, 1.0, 1.0, 1.0, 0.4); break; } cairo_move_to (cr, current[c],(histogram->height-1)-histogram->output_samples[c][current[c]]/factor); cairo_line_to(cr, current[c],0); cairo_stroke (cr); } } /* We're done */ cairo_destroy (cr); #else /* GTK_CHECK_VERSION(2,8,0) */ GdkPoint points[histogram->width]; const static GdkColor red = {0, 0xffff, 0x0000, 0x0000 }; const static GdkColor green = {0, 0x0000, 0xffff, 0x0000 }; const static GdkColor blue = {0, 0x0000, 0x0000, 0xffff }; const static GdkColor luma = {0, 0xeeee, 0xeeee, 0xeeee }; /* Red */ gdk_gc_set_rgb_fg_color(gc, &red); for (x = 0; x < histogram->width; x++) { points[x].x = x; /* Only update x the first time! */ points[x].y = (histogram->height-1)-histogram->output_samples[0][x]/factor; } gdk_draw_lines(histogram->blitter, gc, points, histogram->width); /* Underexposed */ if (histogram->input_samples[0][0]>99) gdk_draw_arc(histogram->blitter, gc, TRUE, 1, 0, 8, 8, 0, 360*64); /* Overexposed */ if (histogram->input_samples[0][255]>99) gdk_draw_arc(histogram->blitter, gc, TRUE, histogram->width-10, 0, 8, 8, 0, 360*64); /* Green */ gdk_gc_set_rgb_fg_color(gc, &green); for (x = 0; x < histogram->width; x++) points[x].y = (histogram->height-1)-histogram->output_samples[1][x]/factor; gdk_draw_lines(histogram->blitter, gc, points, histogram->width); if (histogram->input_samples[1][0]>99) gdk_draw_arc(histogram->blitter, gc, TRUE, 1, 10, 8, 8, 0, 360*64); if (histogram->input_samples[1][255]>99) gdk_draw_arc(histogram->blitter, gc, TRUE, histogram->width-10, 10, 8, 8, 0, 360*64); /* Blue */ gdk_gc_set_rgb_fg_color(gc, &blue); for (x = 0; x < histogram->width; x++) points[x].y = (histogram->height-1)-histogram->output_samples[2][x]/factor; gdk_draw_lines(histogram->blitter, gc, points, histogram->width); if (histogram->input_samples[2][0]>99) gdk_draw_arc(histogram->blitter, gc, TRUE, 1, 20, 8, 8, 0, 360*64); if (histogram->input_samples[2][255]>99) gdk_draw_arc(histogram->blitter, gc, TRUE, histogram->width-10, 20, 8, 8, 0, 360*64); /* Luma */ gdk_gc_set_rgb_fg_color(gc, &luma); for (x = 0; x < histogram->width; x++) points[x].y = (histogram->height-1)-histogram->output_samples[3][x]/factor; gdk_draw_lines(histogram->blitter, gc, points, histogram->width); #endif /* GTK_CHECK_VERSION(2,8,0) */ /* Blit to screen */ gdk_draw_drawable(window, gc, histogram->blitter, 0, 0, 0, 0, histogram->width, histogram->height); g_object_unref(gc); } } rawstudio-2.0/src/Makefile.in0000644000175000017500000005266111547430041013162 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = rawstudio$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(uidir)" PROGRAMS = $(bin_PROGRAMS) am_rawstudio_OBJECTS = application.$(OBJEXT) rs-actions.$(OBJEXT) \ gtk-helper.$(OBJEXT) gtk-interface.$(OBJEXT) \ rs-save-dialog.$(OBJEXT) gtk-progress.$(OBJEXT) \ rs-camera-db.$(OBJEXT) rs-cache.$(OBJEXT) rs-batch.$(OBJEXT) \ rs-toolbox.$(OBJEXT) rs-navigator.$(OBJEXT) rs-photo.$(OBJEXT) \ rs-tiff.$(OBJEXT) filename.$(OBJEXT) rs-store.$(OBJEXT) \ rs-preview-widget.$(OBJEXT) rs-loupe.$(OBJEXT) \ rs-histogram.$(OBJEXT) eog-pixbuf-cell-renderer.$(OBJEXT) \ rs-pixbuf.$(OBJEXT) rs-external-editor.$(OBJEXT) \ rs-dir-selector.$(OBJEXT) rs-tag-gui.$(OBJEXT) \ rs-tethered-shooting.$(OBJEXT) rawstudio_OBJECTS = $(am_rawstudio_OBJECTS) am__DEPENDENCIES_1 = rawstudio_DEPENDENCIES = ../librawstudio/librawstudio-@VERSION@.la \ $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(rawstudio_SOURCES) DIST_SOURCES = $(rawstudio_SOURCES) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' DATA = $(ui_DATA) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ \ -I$(top_srcdir)/librawstudio/ \ -I$(top_srcdir)/ AM_CFLAGS = \ -Wall -fno-strict-aliasing\ -DWITH_GCONF\ -O4 AM_CXXFLAGS = $(AM_CFLAGS) uidir = $(datadir)/rawstudio/ ui_DATA = ui.xml rawstudio.gtkrc EXTRA_DIST = \ $(ui_DATA) rawstudio_SOURCES = \ application.c application.h \ rs-actions.c rs-actions.h \ gtk-helper.c gtk-helper.h \ gtk-interface.c gtk-interface.h \ rs-save-dialog.c rs-save-dialog.h \ gtk-progress.c gtk-progress.h \ rs-camera-db.c rs-camera-db.h \ rs-cache.c rs-cache.h \ rs-batch.c rs-batch.h \ rs-toolbox.c rs-toolbox.h \ rs-navigator.c rs-navigator.h \ rs-photo.c rs-photo.h \ rs-tiff.c rs-tiff.h \ filename.c filename.h \ rs-store.c rs-store.h \ rs-preview-widget.c rs-preview-widget.h \ rs-loupe.c rs-loupe.h \ rs-histogram.c rs-histogram.h \ eog-pixbuf-cell-renderer.c eog-pixbuf-cell-renderer.h \ rs-pixbuf.c rs-pixbuf.h \ rs-external-editor.c rs-external-editor.h \ rs-dir-selector.c rs-dir-selector.h \ rs-tag-gui.c rs-tag-gui.h\ rs-tethered-shooting.c rs-tethered-shooting.h rawstudio_LDADD = ../librawstudio/librawstudio-@VERSION@.la @PACKAGE_LIBS@ @LIBJPEG@ @LIBTIFF@ $(INTLLIBS) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p || test -f $$p1; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list rawstudio$(EXEEXT): $(rawstudio_OBJECTS) $(rawstudio_DEPENDENCIES) @rm -f rawstudio$(EXEEXT) $(LINK) $(rawstudio_OBJECTS) $(rawstudio_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/application.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/eog-pixbuf-cell-renderer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filename.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk-helper.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk-interface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gtk-progress.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-actions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-batch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-cache.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-camera-db.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-dir-selector.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-external-editor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-histogram.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-loupe.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-navigator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-photo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-pixbuf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-preview-widget.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-save-dialog.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-store.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-tag-gui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-tethered-shooting.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-tiff.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-toolbox.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-uiDATA: $(ui_DATA) @$(NORMAL_INSTALL) test -z "$(uidir)" || $(MKDIR_P) "$(DESTDIR)$(uidir)" @list='$(ui_DATA)'; test -n "$(uidir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(uidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(uidir)" || exit $$?; \ done uninstall-uiDATA: @$(NORMAL_UNINSTALL) @list='$(ui_DATA)'; test -n "$(uidir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(uidir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(uidir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(uidir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-uiDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-uiDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic clean-libtool ctags distclean distclean-compile \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip install-uiDATA installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-uiDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/src/rs-loupe.c0000644000175000017500000001620411526533645013033 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include "rs-loupe.h" G_DEFINE_TYPE (RSLoupe, rs_loupe, GTK_TYPE_WINDOW) static gboolean expose(GtkWidget *widget, GdkEventExpose *event, RSLoupe *loupe); static void move(RSLoupe *loupe); static void redraw(RSLoupe *loupe); static void rs_loupe_finalize(GObject *object) { RSLoupe *loupe = RS_LOUPE(object); if (loupe->filter) g_object_unref(loupe->filter); G_OBJECT_CLASS (rs_loupe_parent_class)->finalize (object); } static void rs_loupe_class_init(RSLoupeClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = rs_loupe_finalize; } static void rs_loupe_init(RSLoupe *loupe) { /* Get screen size */ GdkScreen *screen = gdk_screen_get_default(); const gint screen_width = gdk_screen_get_width(screen); const gint screen_height = gdk_screen_get_height(screen); const gint loupe_size = MIN(screen_width/4, screen_height/3); /* Initialize window */ gtk_window_resize(GTK_WINDOW(loupe), loupe_size, loupe_size); gtk_window_set_keep_above(GTK_WINDOW(loupe), TRUE); /* We have to grab focus, otherwise window will not show up in fullscreen mode */ g_object_set(GTK_WINDOW(loupe), "accept-focus", TRUE, "decorated", FALSE, "deletable", FALSE, "focus-on-map", FALSE, "skip-pager-hint", TRUE, "skip-taskbar-hint", TRUE, NULL); loupe->canvas = gtk_drawing_area_new(); gtk_container_add(GTK_CONTAINER(loupe), loupe->canvas); g_signal_connect(loupe->canvas, "expose-event", G_CALLBACK(expose), loupe); } /** * Instantiates a new RSLoupe * @return A new RSLoupe */ RSLoupe * rs_loupe_new(void) { return g_object_new(RS_TYPE_LOUPE, "type", GTK_WINDOW_POPUP, NULL); } /** * Set the RSFilter a RSLoupe will get its image data from * @param loupe A RSLoupe * @param filter A RSFilter */ void rs_loupe_set_filter(RSLoupe *loupe, RSFilter *filter) { g_assert(RS_IS_LOUPE(loupe)); g_assert(RS_IS_FILTER(filter)); if (loupe->filter) g_object_unref(loupe->filter); loupe->filter = g_object_ref(filter); } /** * Set center coordinate of the RSLoupe, this will be clamped to filter size * @param loupe A RSLoupe * @param center_x Center of loupe on the X-axis * @param center_y Center of loupe on the Y-axis */ void rs_loupe_set_coord(RSLoupe *loupe, gint center_x, gint center_y) { g_assert(RS_IS_LOUPE(loupe)); loupe->center_x = center_x; loupe->center_y = center_y; move(loupe); redraw(loupe); } /** * Set display colorspace * @param loupe A RSLoupe * @param colorspace An RSColorSpace that should be used to display the content of the loupe */ void rs_loupe_set_colorspace(RSLoupe *loupe, RSColorSpace *display_color_space) { g_assert(RS_IS_LOUPE(loupe)); loupe->display_color_space = display_color_space; } void rs_loupe_set_screen(RSLoupe* loupe, GdkScreen* screen, gint screen_num) { g_assert(RS_IS_LOUPE(loupe)); if (loupe->display_screen == screen && loupe->screen_num == screen_num) return; loupe->display_screen = screen; loupe->screen_num = screen_num; const gint screen_width = gdk_screen_get_width(screen); const gint screen_height = gdk_screen_get_height(screen); const gint loupe_size = MIN(screen_width/4, screen_height/3) & 0xfffffff0; /* Set screen and resize window */ gtk_window_set_screen(GTK_WINDOW(loupe), screen); gtk_window_resize(GTK_WINDOW(loupe), loupe_size, loupe_size); } static gboolean expose(GtkWidget *widget, GdkEventExpose *event, RSLoupe *loupe) { /* We always draw the full frame */ if (event->count > 0) return TRUE; redraw(loupe); return TRUE; } static void move(RSLoupe *loupe) { const gint distance_to_window = 50; const gint distance_to_border = 20; /* Get cursor position */ gint cursor_x=0, cursor_y=0; gdk_display_get_pointer(gdk_display_get_default(), &loupe->display_screen, &cursor_x, &cursor_y, NULL); /* Get window size */ gint window_width, window_height; gtk_window_get_size(GTK_WINDOW(loupe), &window_width, &window_height); /* Get screen size */ GdkScreen *screen = loupe->display_screen; const gint screen_width = gdk_screen_get_width(screen); const gint screen_height = gdk_screen_get_height(screen); if (loupe->left) { if ((cursor_x - window_width - distance_to_window) < distance_to_border) loupe->left = !loupe->left; } else { if ((cursor_x + window_width + distance_to_window) > (screen_width - distance_to_border)) loupe->left = !loupe->left; } if (loupe->atop) { if ((cursor_y - window_height - distance_to_window) < distance_to_border) loupe->atop = !loupe->atop; } else { if ((cursor_y + window_height + distance_to_window) > (screen_height - distance_to_border)) loupe->atop = !loupe->atop; } gint place_x, place_y; if (loupe->left) place_x = cursor_x - window_width - distance_to_window; else place_x = cursor_x + distance_to_window; if (loupe->atop) place_y = cursor_y - window_height - distance_to_window; else place_y = cursor_y + distance_to_window; gtk_window_move(GTK_WINDOW(loupe), place_x, place_y); } static void redraw(RSLoupe *loupe) { if (!loupe->filter) return; if (!GTK_WIDGET_DRAWABLE(loupe->canvas)) return; GdkDrawable *drawable = GDK_DRAWABLE(loupe->canvas->window); GdkGC *gc = gdk_gc_new(drawable); gint width; gint height; rs_filter_get_size_simple(loupe->filter, RS_FILTER_REQUEST_QUICK, &width, &height); /* Get window size */ gint window_width, window_height; gtk_window_get_size(GTK_WINDOW(loupe), &window_width, &window_height); /* Create request ROI */ RSFilterRequest *request = rs_filter_request_new(); GdkRectangle roi; roi.x = CLAMP(loupe->center_x - window_width/2, 0, width-window_width-1); roi.y = CLAMP(loupe->center_y - window_height/2, 0, height-window_height-1); roi.width = window_width; roi.height = window_height; rs_filter_request_set_roi(request, &roi); rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", loupe->display_color_space); RSFilterResponse *response = rs_filter_get_image8(loupe->filter, request); GdkPixbuf *buffer = rs_filter_response_get_image8(response); g_object_unref(response); g_object_unref(request); gdk_draw_pixbuf(drawable, gc, buffer, roi.x, roi.y, 0, 0, roi.width, roi.height, GDK_RGB_DITHER_NONE, 0, 0); /* Draw border */ static const GdkColor black = {0,0,0,0}; gdk_gc_set_foreground(gc, &black); gdk_draw_rectangle(drawable, gc, FALSE, 0, 0, roi.width-1, roi.height-1); g_object_unref(buffer); g_object_unref(gc); } rawstudio-2.0/src/rs-actions.c0000644000175000017500000014661011545167154013353 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include /* g_unlink */ #include #include #include "gettext.h" #include "application.h" #include "rs-actions.h" #include "conf_interface.h" #include "rs-store.h" #include "rs-photo.h" #include "filename.h" #include "gtk-interface.h" #include "gtk-progress.h" #include "gtk-helper.h" #include "rs-external-editor.h" #include "rs-cache.h" #include "rs-preview-widget.h" #include "rs-batch.h" #include "rs-save-dialog.h" #include "rs-library.h" #include "rs-tag-gui.h" #include "rs-lens-db-editor.h" #include "rs-camera-db.h" #include "rs-toolbox.h" #include "rs-tethered-shooting.h" static GtkActionGroup *core_action_group = NULL; static GStaticMutex rs_actions_spinlock = G_STATIC_MUTEX_INIT; #define ACTION(Action) void rs_action_##Action(GtkAction *action, RS_BLOB *rs); \ void rs_action_##Action(GtkAction *action, RS_BLOB *rs) #define ACTION_CB(Action) G_CALLBACK(rs_action_##Action) #define TOGGLEACTION(Action) void rs_action_##Action(GtkToggleAction *toggleaction, RS_BLOB *rs); \ void rs_action_##Action(GtkToggleAction *toggleaction, RS_BLOB *rs) #define RADIOACTION(Action) void rs_action_##Action(GtkRadioAction *radioaction, GtkRadioAction *current, RS_BLOB *rs); \ void rs_action_##Action(GtkRadioAction *radioaction, GtkRadioAction *current, RS_BLOB *rs) static gint copy_dialog_get_mask(void); static void copy_dialog_set_mask(gint mask); ACTION(todo) { GString *gs = g_string_new("Action not implemented: "); g_string_append(gs, gtk_action_get_name(action)); g_warning("%s", gs->str); gui_status_notify(gs->str); g_string_free(gs, TRUE); } void rs_core_actions_update_menu_items(RS_BLOB *rs) { /* File Menu */ rs_core_action_group_set_sensivity("QuickExport", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("ExportAs", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("ExportToGimp", RS_IS_PHOTO(rs->photo)); /* Edit Menu */ rs_core_action_group_set_sensivity("RevertSettings", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("CopySettings", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("CopyImage", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("PasteSettings", !!(rs->settings_buffer)); rs_core_action_group_set_sensivity("SaveDefaultSettings", RS_IS_PHOTO(rs->photo)); /* Photo Menu */ GList *selected = NULL, *selected_iters = NULL; gint num_selected, selected_groups; gboolean photos_selected; selected = rs_store_get_selected_names(rs->store); num_selected = g_list_length(selected); photos_selected = (RS_IS_PHOTO(rs->photo) || (num_selected > 0)); selected_iters = rs_store_get_selected_iters(rs->store); selected_groups = rs_store_selection_n_groups(rs->store, selected_iters); rs_core_action_group_set_sensivity("FlagPhoto", photos_selected); rs_core_action_group_set_sensivity("PriorityMenu", photos_selected); rs_core_action_group_set_sensivity("WhiteBalanceMenu", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("Crop", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("Uncrop", (RS_IS_PHOTO(rs->photo) && rs->photo->crop)); rs_core_action_group_set_sensivity("Straighten", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("Unstraighten", (RS_IS_PHOTO(rs->photo) && (rs->photo->angle != 0.0))); rs_core_action_group_set_sensivity("TagPhoto", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("Group", (num_selected > 1)); rs_core_action_group_set_sensivity("Ungroup", (selected_groups > 0)); rs_core_action_group_set_sensivity("RotateClockwise", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("RotateCounterClockwise", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("Flip", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("Mirror", RS_IS_PHOTO(rs->photo)); #ifndef EXPERIMENTAL rs_core_action_group_set_visibility("Group", FALSE); rs_core_action_group_set_visibility("Ungroup", FALSE); rs_core_action_group_set_visibility("AutoGroup", FALSE); #endif /* View Menu */ rs_core_action_group_set_sensivity("Lightsout", !rs->window_fullscreen); /* Batch Menu */ rs_core_action_group_set_sensivity("AddToBatch", (num_selected >= 1) || (rs->photo && !rs_batch_exists_in_queue(rs->queue, rs->photo->filename, rs->current_setting))); rs_core_action_group_set_sensivity("RemoveFromBatch", (num_selected >= 1) || (rs->photo && rs_batch_exists_in_queue(rs->queue, rs->photo->filename, rs->current_setting))); rs_core_action_group_set_sensivity("ProcessBatch", (rs_batch_num_entries(rs->queue)>0)); /* Preview */ rs_core_action_group_set_sensivity("Crop", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("Uncrop", (RS_IS_PHOTO(rs->photo) && rs->photo->crop)); rs_core_action_group_set_sensivity("Straighten", RS_IS_PHOTO(rs->photo)); rs_core_action_group_set_sensivity("Unstraighten", (RS_IS_PHOTO(rs->photo) && (rs->photo->angle != 0.0))); g_list_free(selected); } ACTION(file_menu) { rs_core_actions_update_menu_items(rs); } ACTION(edit_menu) { rs_core_actions_update_menu_items(rs); } ACTION(photo_menu) { rs_core_actions_update_menu_items(rs); } ACTION(view_menu) { rs_core_actions_update_menu_items(rs); } ACTION(batch_menu) { rs_core_actions_update_menu_items(rs); } ACTION(preview_popup) { rs_core_actions_update_menu_items(rs); } ACTION(open) { GtkWidget *fc; gchar *lwd = rs_conf_get_string(CONF_LWD); fc = gtk_file_chooser_dialog_new (_("Open directory"), NULL, GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); gtk_dialog_set_default_response(GTK_DIALOG(fc), GTK_RESPONSE_ACCEPT); if (g_file_test(lwd, G_FILE_TEST_IS_DIR)) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (fc), lwd); if (gtk_dialog_run (GTK_DIALOG (fc)) == GTK_RESPONSE_ACCEPT) { char *filename; filename = gtk_file_chooser_get_filename (GTK_FILE_CHOOSER (fc)); gtk_widget_destroy (fc); rs_store_remove(rs->store, NULL, NULL); if (rs_store_load_directory(rs->store, filename) >= 0) rs_conf_set_string(CONF_LWD, filename); g_free (filename); } else gtk_widget_destroy (fc); g_free(lwd); rs_core_actions_update_menu_items(rs); } ACTION(quick_export) { gchar *directory; gchar *filename_template; gchar *parsed_filename = NULL; gchar *parsed_dir = NULL; gchar *output_identifier; directory = rs_conf_get_string("quick-export-directory"); filename_template = rs_conf_get_string("quick-export-filename"); output_identifier = rs_conf_get_string("quick-export-filetype"); /* Initialize directory to home dir if nothing is saved in config */ if (!directory) { const char *homedir = g_getenv("HOME"); if (!homedir) homedir = g_get_home_dir(); directory = g_strdup(homedir); } /* Initialize filename_template to default if nothing is saved in config */ if (!filename_template) filename_template = g_strdup(DEFAULT_CONF_EXPORT_FILENAME); /* Output as Jpeg, if nothing is saved in config */ if (!output_identifier) output_identifier = g_strdup("RSJpeg"); RSOutput *output = rs_output_new(output_identifier); GString *filename = NULL; /* Build new filename */ if (NULL == g_strrstr(filename_template, "%p")) { filename = g_string_new(directory); g_string_append(filename, G_DIR_SEPARATOR_S); g_string_append(filename, filename_template); } else filename = g_string_new(filename_template); g_string_append(filename, "."); g_string_append(filename, rs_output_get_extension(output)); parsed_filename = filename_parse(filename->str, rs->photo->filename, rs->current_setting); if (parsed_filename && output) { /* Create directory, if it doesn't exist */ parsed_dir = g_path_get_dirname(parsed_filename); if (FALSE == g_file_test(parsed_dir, G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR)) if (g_mkdir_with_parents(parsed_dir, 0x1ff)) { gui_status_notify(_("Could not create output directory.")); return; } guint msg = gui_status_push(_("Exporting...")); gui_set_busy(TRUE); GTK_CATCHUP(); g_object_set(output, "filename", parsed_filename, NULL); rs_output_set_from_conf(output, "quick-export"); if (rs_photo_save(rs->photo, rs->filter_end, output, -1, -1, FALSE, 1.0, rs->current_setting)) { gchar *status = g_strdup_printf("%s (%s)", _("File exported"), parsed_filename); gui_status_notify(status); g_free(status); } else gui_status_notify(_("Export failed")); gui_status_pop(msg); gui_set_busy(FALSE); } g_object_unref(output); g_free(directory); g_free(parsed_filename); g_free(parsed_dir); g_free(output_identifier); g_string_free(filename, TRUE); } ACTION(export_as) { if (RS_IS_PHOTO(rs->photo)) { RSSaveDialog *dialog = rs_save_dialog_new(); rs_save_dialog_set_photo(dialog, rs->photo, rs->current_setting); gtk_widget_show(GTK_WIDGET(dialog)); } else gui_status_notify(_("Export failed")); } ACTION(export_to_gimp) { if (!RS_IS_PHOTO(rs->photo)) return; guint status = gui_status_push(_("Exporting to GIMP...")); GTK_CATCHUP(); if (!rs_external_editor_gimp(rs->photo, rs->filter_end, rs->current_setting)) { GtkWidget *dialog = gui_dialog_make_from_text(GTK_STOCK_DIALOG_WARNING, _("Error exporting"), _("Error exporting photo to gimp.")); gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_ACCEPT); gtk_widget_show_all(dialog); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); } gui_status_pop(status); } ACTION(reload) { rs_store_remove(rs->store, NULL, NULL); rs_store_load_directory(rs->store, NULL); rs_core_actions_update_menu_items(rs); } ACTION(delete_flagged) { gchar *cache; GtkWidget *dialog; GList *photos_d = NULL; gint items = 0, i; RS_PROGRESS *progress; dialog = gui_dialog_make_from_text(GTK_STOCK_DIALOG_WARNING, _("Deleting photos"), _("Your files will be permanently deleted!")); gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); gtk_dialog_add_button (GTK_DIALOG (dialog), _("Delete photos"), GTK_RESPONSE_ACCEPT); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_CANCEL); gtk_widget_show_all(dialog); if((gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_ACCEPT)) { gtk_widget_destroy(dialog); return; } else gtk_widget_destroy(dialog); photos_d = rs_store_get_iters_with_priority(rs->store, PRIO_D); items = g_list_length(photos_d); progress = gui_progress_new(_("Deleting photos"), items); for (i=0;istore, g_list_nth_data(photos_d, i)); if(0 == g_unlink(fullname)) { rs_metadata_delete_cache(fullname); if ((cache = rs_cache_get_name(fullname))) { g_unlink(cache); g_free(cache); } /* Try to delete thm-files */ { gchar *thm; gchar *ext; thm = g_strdup(fullname); ext = g_strrstr(thm, "."); ext++; g_strlcpy(ext, "thm", 4); if(g_unlink(thm)) { g_strlcpy(ext, "THM", 4); g_unlink(thm); } g_free(thm); } rs_store_remove(rs->store, NULL, g_list_nth_data(photos_d, i)); gui_progress_advance_one(progress); GUI_CATCHUP(); } } g_list_free(photos_d); gui_progress_free(progress); } ACTION(quit) { if (rs->photo) rs_photo_close(rs->photo); rs_conf_set_integer(CONF_LAST_PRIORITY_PAGE, rs_store_get_current_page(rs->store)); rs_io_idle_cancel_class(METADATA_CLASS); rs_io_idle_cancel_class(PRELOAD_CLASS); rs_io_idle_cancel_class(RESTORE_TAGS_CLASS); RS_PROGRESS *progress; gint total_items = rs_io_get_jobs_left(); if (total_items) { progress = gui_progress_new(_("Waiting for jobs to finish"), total_items); gtk_widget_hide(rs->window); gint items = total_items; while (items > 0) { g_usleep(100*1000); items = rs_io_get_jobs_left(); gui_progress_set_current(progress, total_items-items); GUI_CATCHUP(); } } gtk_main_quit(); } ACTION(copy_image) { if (!rs->photo) return; guint msg = gui_status_push(_("Copying image to clipboard")); gui_set_busy(TRUE); GTK_CATCHUP(); if (rs_photo_copy_to_clipboard(rs->photo, rs->filter_end, -1, -1, FALSE, 1.0, rs->current_setting)) gui_status_notify(_("Image copied to clipboard")); else gui_status_notify(_("ERROR: Could not copy image to clipboard")); gui_set_busy(FALSE); gui_status_pop(msg); } ACTION(revert_settings) { if (RS_IS_PHOTO(rs->photo)) rs_cache_load(rs->photo); } static const gint COPY_MASK_ALL = MASK_PROFILE|MASK_EXPOSURE|MASK_SATURATION|MASK_HUE| MASK_CONTRAST|MASK_WB|MASK_SHARPEN|MASK_DENOISE_LUMA|MASK_DENOISE_CHROMA| MASK_CHANNELMIXER|MASK_TCA|MASK_VIGNETTING|MASK_CURVE; /* Widgets for copy dialog */ static GtkWidget *cb_profile, *cb_exposure, *cb_saturation, *cb_hue, *cb_contrast, *cb_whitebalance, *cb_curve, *cb_sharpen, *cb_denoise_luma, *cb_denoise_chroma, *cb_channelmixer, *cb_tca, *cb_vignetting, *b_all_none; static void all_none_clicked(GtkButton *button, gpointer user_data) { gint mask= copy_dialog_get_mask(); if (mask == COPY_MASK_ALL) mask = 0; else mask = COPY_MASK_ALL; copy_dialog_set_mask(mask); } static GtkWidget * create_copy_dialog(gint mask) { GtkWidget *cb_box; GtkWidget *dialog; /* Build GUI */ cb_profile = gtk_check_button_new_with_label (_("Profile")); cb_exposure = gtk_check_button_new_with_label (_("Exposure")); cb_saturation = gtk_check_button_new_with_label (_("Saturation")); cb_hue = gtk_check_button_new_with_label (_("Hue")); cb_contrast = gtk_check_button_new_with_label (_("Contrast")); cb_whitebalance = gtk_check_button_new_with_label (_("White balance")); cb_sharpen = gtk_check_button_new_with_label (_("Sharpen")); cb_denoise_luma = gtk_check_button_new_with_label (_("Denoise")); cb_denoise_chroma = gtk_check_button_new_with_label (_("Color denoise")); cb_channelmixer = gtk_check_button_new_with_label (_("Channel mixer")); cb_tca = gtk_check_button_new_with_label (_("TCA")); cb_vignetting = gtk_check_button_new_with_label (_("Vignetting")); cb_curve = gtk_check_button_new_with_label (_("Curve")); b_all_none = gtk_button_new_with_label (_("Select All/None")); g_signal_connect(b_all_none, "clicked", G_CALLBACK(all_none_clicked), NULL); copy_dialog_set_mask(mask); cb_box = gtk_vbox_new(FALSE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_profile, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_exposure, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_saturation, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_hue, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_contrast, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_whitebalance, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_sharpen, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_denoise_luma, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_denoise_chroma, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_channelmixer, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_tca, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_vignetting, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_curve, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), b_all_none, FALSE, TRUE, 0); dialog = gui_dialog_make_from_widget(GTK_STOCK_DIALOG_QUESTION, _("Select settings to copy"), cb_box); gtk_dialog_add_buttons(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_OK); return dialog; } static void copy_dialog_set_mask(gint mask) { gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_profile), !!(mask & MASK_PROFILE)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_exposure), !!(mask & MASK_EXPOSURE)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_saturation), !!(mask & MASK_SATURATION)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_hue), !!(mask & MASK_HUE)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_contrast), !!(mask & MASK_CONTRAST)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_whitebalance), !!(mask & MASK_WB)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_sharpen), !!(mask & MASK_SHARPEN)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_denoise_luma), !!(mask & MASK_DENOISE_LUMA)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_denoise_chroma), !!(mask & MASK_DENOISE_CHROMA)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_channelmixer), !!(mask & MASK_CHANNELMIXER)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_tca), !!(mask & MASK_TCA)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_vignetting), !!(mask & MASK_VIGNETTING)); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_curve), !!(mask & MASK_CURVE)); } static gint copy_dialog_get_mask(void) { gint mask = 0; if (GTK_TOGGLE_BUTTON(cb_profile)->active) mask |= MASK_PROFILE; if (GTK_TOGGLE_BUTTON(cb_exposure)->active) mask |= MASK_EXPOSURE; if (GTK_TOGGLE_BUTTON(cb_saturation)->active) mask |= MASK_SATURATION; if (GTK_TOGGLE_BUTTON(cb_hue)->active) mask |= MASK_HUE; if (GTK_TOGGLE_BUTTON(cb_contrast)->active) mask |= MASK_CONTRAST; if (GTK_TOGGLE_BUTTON(cb_whitebalance)->active) mask |= MASK_WB; if (GTK_TOGGLE_BUTTON(cb_sharpen)->active) mask |= MASK_SHARPEN; if (GTK_TOGGLE_BUTTON(cb_denoise_luma)->active) mask |= MASK_DENOISE_LUMA; if (GTK_TOGGLE_BUTTON(cb_denoise_chroma)->active) mask |= MASK_DENOISE_CHROMA; if (GTK_TOGGLE_BUTTON(cb_channelmixer)->active) mask |= MASK_CHANNELMIXER; if (GTK_TOGGLE_BUTTON(cb_tca)->active) mask |= MASK_TCA; if (GTK_TOGGLE_BUTTON(cb_vignetting)->active) mask |= MASK_VIGNETTING; if (GTK_TOGGLE_BUTTON(cb_curve)->active) mask |= MASK_CURVE; return mask; } ACTION(copy_settings) { gint mask = COPY_MASK_ALL; /* Should be RSSettingsMask, is gint to satisfy rs_conf_get_integer() */ GtkWidget *dialog; if (!rs->settings_buffer) rs->settings_buffer = rs_settings_new(); if (!rs->photo) return; rs_conf_get_integer(CONF_PASTE_MASK, &mask); dialog = create_copy_dialog(mask); gtk_widget_show_all(dialog); if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) { mask = copy_dialog_get_mask(); rs_conf_set_integer(CONF_PASTE_MASK, mask); rs_settings_copy(rs->photo->settings[rs->current_setting], MASK_ALL, rs->settings_buffer); rs->dcp_buffer = rs_photo_get_dcp_profile(rs->photo); rs->icc_buffer = rs_photo_get_icc_profile(rs->photo); gui_status_notify(_("Copied settings")); } gtk_widget_destroy (dialog); } ACTION(paste_settings) { gint mask = COPY_MASK_ALL; /* Should be RSSettingsMask, is gint to satisfy rs_conf_get_integer() */ gui_set_busy(TRUE); guint msg = gui_status_push(_("Pasting settings to images")); GTK_CATCHUP(); if (rs->settings_buffer) { rs_conf_get_integer(CONF_PASTE_MASK, &mask); if(mask > 0) { RSMetadata *metadata; RS_PHOTO *photo; gint cur; GList *selected = NULL; gint num_selected; guint new_mask; /* Apply to all selected photos */ selected = rs_store_get_selected_names(rs->store); num_selected = g_list_length(selected); for(cur=0;curfilename = g_strdup(g_list_nth_data(selected, cur)); /* Make sure we rotate this right */ metadata = rs_metadata_new_from_file(photo->filename); switch (metadata->orientation) { case 90: ORIENTATION_90(photo->orientation); break; case 180: ORIENTATION_180(photo->orientation); break; case 270: ORIENTATION_270(photo->orientation); break; } g_object_unref(metadata); new_mask = rs_cache_load(photo); rs_settings_copy(rs->settings_buffer, mask, photo->settings[rs->current_setting]); if (mask & MASK_PROFILE) { if (rs->dcp_buffer) rs_photo_set_dcp_profile(photo, rs->dcp_buffer); else if (rs->icc_buffer) rs_photo_set_icc_profile(photo, rs->icc_buffer); } rs_cache_save(photo, new_mask | mask); g_object_unref(photo); } g_list_free(selected); /* Apply to current photo */ if (rs->photo && (mask & MASK_PROFILE)) { if (rs->dcp_buffer) rs_photo_set_dcp_profile(rs->photo, rs->dcp_buffer); else if (rs->icc_buffer) rs_photo_set_icc_profile(rs->photo, rs->icc_buffer); } if (rs->photo) rs_settings_copy(rs->settings_buffer, mask, rs->photo->settings[rs->current_setting]); /* Update WB if wb_ascii is set */ if (mask & MASK_WB && rs->photo->settings[rs->current_setting]->wb_ascii) { if (g_strcmp0(rs->photo->settings[rs->current_setting]->wb_ascii, PRESET_WB_AUTO) == 0) rs_photo_set_wb_auto(rs->photo, rs->current_setting); else if (g_strcmp0(rs->photo->settings[rs->current_setting]->wb_ascii, PRESET_WB_CAMERA) == 0) rs_photo_set_wb_from_camera(rs->photo, rs->current_setting); } gui_status_notify(_("Pasted settings")); } else gui_status_notify(_("Nothing to paste")); } else gui_status_notify(_("Buffer empty")); gui_status_pop(msg); GTK_CATCHUP(); gui_set_busy(FALSE); } ACTION(reset_settings) { if (RS_IS_PHOTO(rs->photo)) { rs_settings_commit_start(rs->photo->settings[rs->current_setting]); RSCameraDb *db = rs_camera_db_get_singleton(); gpointer p; RSSettings *s[3]; gint snapshot = rs->current_setting; if (rs_camera_db_photo_get_defaults(db, rs->photo, s, &p) && s[snapshot] && RS_IS_SETTINGS(s[snapshot])) { rs_settings_copy(s[snapshot], MASK_ALL, rs->photo->settings[snapshot]); if (rs->photo->dcp && p && RS_IS_DCP_FILE(p)) rs_photo_set_dcp_profile(rs->photo, p); } else rs_settings_reset(rs->photo->settings[snapshot], MASK_ALL); rs_photo_set_wb_from_camera(rs->photo, snapshot); rs_settings_commit_stop(rs->photo->settings[snapshot]); } } ACTION(save_default_settings) { if (RS_IS_PHOTO(rs->photo)) rs_camera_db_save_defaults(rs_camera_db_get_singleton(), rs->photo); } ACTION(preferences) { gui_make_preference_window(rs); } ACTION(flag_for_deletion) { gui_setprio(rs, PRIO_D); } ACTION(priority_1) { gui_setprio(rs, PRIO_1); } ACTION(priority_2) { gui_setprio(rs, PRIO_2); } ACTION(priority_3) { gui_setprio(rs, PRIO_3); } ACTION(priority_0) { gui_setprio(rs, PRIO_U); } void set_wb_on_multiple_photos(GList *selected, gint current_setting, const gchar *wb_ascii) { gint num_selected = g_list_length(selected); gui_set_busy(TRUE); GTK_CATCHUP(); if (num_selected > 1) { RS_PHOTO *photo; gint cur, load_mask; for(cur=0;curfilename = g_strdup(g_list_nth_data(selected, cur)); if (rs_metadata_load(photo->metadata, photo->filename)) { /* Rotate photo inplace */ switch (photo->metadata->orientation) { case 90: ORIENTATION_90(photo->orientation); break; case 180: ORIENTATION_180(photo->orientation); break; case 270: ORIENTATION_270(photo->orientation); break; } } load_mask = rs_cache_load(photo); rs_settings_set_wb(photo->settings[current_setting], 0.0, 0.0, wb_ascii); rs_cache_save(photo, load_mask | MASK_WB); g_object_unref(photo); } } g_list_free(selected); gui_set_busy(FALSE); } ACTION(auto_wb) { if (RS_IS_PHOTO(rs->photo) && rs_store_is_photo_selected(rs->store, rs->photo->filename)) { gui_status_notify(_("Adjusting to auto white balance")); rs_photo_set_wb_auto(rs->photo, rs->current_setting); } /* Apply to all selected photos */ set_wb_on_multiple_photos(rs_store_get_selected_names(rs->store), rs->current_setting, PRESET_WB_AUTO); } ACTION(camera_wb) { if (RS_IS_PHOTO(rs->photo) && rs_store_is_photo_selected(rs->store, rs->photo->filename)) { if (rs->photo && !rs->photo->dcp) rs_photo_set_wb_from_camera(rs->photo, rs->current_setting); else if (rs->photo && rs->photo->metadata && rs->photo->metadata->cam_mul[R] == -1.0) gui_status_notify(_("No white balance to set from")); else { gui_status_notify(_("Adjusting to camera white balance")); rs_photo_set_wb_from_camera(rs->photo, rs->current_setting); } } /* Apply to all selected photos */ set_wb_on_multiple_photos(rs_store_get_selected_names(rs->store), rs->current_setting, PRESET_WB_CAMERA); } ACTION(crop) { rs_preview_widget_crop_start(RS_PREVIEW_WIDGET(rs->preview)); rs_core_actions_update_menu_items(rs); } ACTION(uncrop) { rs_preview_widget_uncrop(RS_PREVIEW_WIDGET(rs->preview)); rs_core_actions_update_menu_items(rs); } ACTION(straighten) { rs_preview_widget_straighten(RS_PREVIEW_WIDGET(rs->preview)); } ACTION(unstraighten) { rs_preview_widget_unstraighten(RS_PREVIEW_WIDGET(rs->preview)); } ACTION(rotate_clockwise) { if (rs->photo) rs_photo_rotate(rs->photo, 1, 0.0); } ACTION(rotate_counter_clockwise) { if (rs->photo) rs_photo_rotate(rs->photo, 3, 0.0); } ACTION(flip) { if (rs->photo) rs_photo_flip(rs->photo); } ACTION(mirror) { if (rs->photo) rs_photo_mirror(rs->photo); } ACTION(group_photos) { rs_store_group_photos(rs->store); } ACTION(ungroup_photos) { rs_store_ungroup_photos(rs->store); } ACTION(auto_group_photos) { rs_store_auto_group(rs->store); } typedef struct TagPhotoData { RS_BLOB *rs; GtkEntry *entry; } TagPhotoData; static void tag_photo_input_changed(GtkWidget *button, gpointer user_data) { GHashTableIter iter; gpointer key, value; RSLibrary *library = rs_library_get_singleton(); TagPhotoData *info = (TagPhotoData*)(user_data); RS_BLOB *rs = info->rs; GtkEntry *entry = info->entry; GList * selected = rs_store_get_selected_names(rs->store); gint num_selected = g_list_length(selected); gint cur, i; GHashTable* directories = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); const char* entry_text = gtk_entry_get_text(entry); if (num_selected > 0 && entry_text) { GList *tags = rs_split_string(entry_text, " .,/;:~^*|&"); for(i = 0; i < g_list_length(tags); i++) { gchar *tag = (gchar *) g_list_nth_data(tags, i); gint tag_id = rs_library_add_tag(library, tag); g_free(tag); for(cur=0;curwindow)); gtk_window_set_type_hint(GTK_WINDOW(popup), GDK_WINDOW_TYPE_HINT_UTILITY); GtkWidget *label = gtk_label_new(_("Tags, separated by spaces:")); GtkWidget *box = gtk_hbox_new(FALSE, 10); GtkWidget *entry = rs_library_tag_entry_new(rs_library_get_singleton()); GtkWidget *apply_button = gtk_button_new_from_stock(GTK_STOCK_APPLY); gtk_window_set_title(GTK_WINDOW(popup), _("Add tags to selected photo(s).")); gtk_window_set_position(GTK_WINDOW(popup), GTK_WIN_POS_MOUSE); gtk_box_pack_start(GTK_BOX(box), label, FALSE, TRUE, 5); gtk_box_pack_start(GTK_BOX(box), entry, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(box), apply_button, FALSE, FALSE, 5); gtk_container_set_border_width(GTK_CONTAINER(box), 10); gtk_container_add(GTK_CONTAINER(popup), box); gtk_widget_show_all(popup); TagPhotoData *info = g_malloc(sizeof(TagPhotoData)); info->rs = rs; info->entry = GTK_ENTRY(entry); g_signal_connect(entry, "activate", G_CALLBACK(tag_photo_input_changed), info); g_signal_connect(apply_button, "clicked", G_CALLBACK(tag_photo_input_changed), info); } ACTION(previous_photo) { gchar *current_filename = NULL; /* Get current filename if a photo is loaded */ if (RS_IS_PHOTO(rs->photo)) current_filename = rs->photo->filename; rs_store_select_prevnext(rs->store, current_filename, 1); } ACTION(next_photo) { gchar *current_filename = NULL; /* Get current filename if a photo is loaded */ if (RS_IS_PHOTO(rs->photo)) current_filename = rs->photo->filename; rs_store_select_prevnext(rs->store, current_filename, 2); } TOGGLEACTION(zoom_to_fit) { rs_preview_widget_set_zoom_to_fit(RS_PREVIEW_WIDGET(rs->preview), gtk_toggle_action_get_active(toggleaction)); } TOGGLEACTION(iconbox) { gui_widget_show(rs->iconbox, gtk_toggle_action_get_active(toggleaction), CONF_SHOW_ICONBOX_FULLSCREEN, CONF_SHOW_ICONBOX); } TOGGLEACTION(toolbox) { gui_widget_show(rs->toolbox, gtk_toggle_action_get_active(toggleaction), CONF_SHOW_TOOLBOX_FULLSCREEN, CONF_SHOW_TOOLBOX); } TOGGLEACTION(show_filenames) { rs_store_set_show_filenames(rs->store, gtk_toggle_action_get_active(toggleaction)); rs_conf_set_boolean(CONF_SHOW_FILENAMES, gtk_toggle_action_get_active(toggleaction)); } TOGGLEACTION(load_8bit) { rs_conf_set_boolean(CONF_LOAD_GDK, gtk_toggle_action_get_active(toggleaction)); } TOGGLEACTION(fullscreen) { if (gtk_toggle_action_get_active(toggleaction)) { rs->window_fullscreen = TRUE; gtk_window_fullscreen(GTK_WINDOW(rs->window)); } else { rs->window_fullscreen = FALSE; gtk_window_unfullscreen(GTK_WINDOW(rs->window)); } rs_conf_set_boolean(CONF_FULLSCREEN, rs->window_fullscreen); /* Update Toolox and Iconbox */ gui_fullscreen_changed(rs->iconbox, rs->window_fullscreen, "Iconbox", DEFAULT_CONF_SHOW_ICONBOX_FULLSCREEN, DEFAULT_CONF_SHOW_ICONBOX, CONF_SHOW_ICONBOX_FULLSCREEN, CONF_SHOW_ICONBOX); gui_fullscreen_changed(rs->toolbox, rs->window_fullscreen, "Toolbox", DEFAULT_CONF_SHOW_TOOLBOX_FULLSCREEN, DEFAULT_CONF_SHOW_TOOLBOX, CONF_SHOW_TOOLBOX_FULLSCREEN, CONF_SHOW_TOOLBOX); rs_core_action_group_set_sensivity("Lightsout", !rs->window_fullscreen); } TOGGLEACTION(fullscreen_preview) { if (gtk_toggle_action_get_active(toggleaction)) { rs_core_action_group_set_sensivity("Lightsout", FALSE); gui_select_preview_screen(rs); } else { gui_disable_preview_screen(rs); rs_core_action_group_set_sensivity("Lightsout", !rs->window_fullscreen); } } TOGGLEACTION(exposure_mask) { if (gtk_toggle_action_get_active(toggleaction)) gui_status_notify(_("Showing exposure mask")); else gui_status_notify(_("Hiding exposure mask")); rs_preview_widget_set_show_exposure_mask(RS_PREVIEW_WIDGET(rs->preview), gtk_toggle_action_get_active(toggleaction)); } TOGGLEACTION(load_selected) { gtk_toggle_action_set_active(toggleaction, !rs_store_set_open_selected(rs->store, !gtk_toggle_action_get_active(toggleaction))); } TOGGLEACTION(split) { rs_preview_widget_set_split(RS_PREVIEW_WIDGET(rs->preview), gtk_toggle_action_get_active(toggleaction)); } #if GTK_CHECK_VERSION(2,12,0) TOGGLEACTION(lightsout) { rs_preview_widget_set_lightsout(RS_PREVIEW_WIDGET(rs->preview), gtk_toggle_action_get_active(toggleaction)); } #endif ACTION(add_to_batch) { GString *gs = g_string_new(""); GList *selected = NULL; gint num_selected, cur, num_added = 0; gui_set_busy(TRUE); guint msg = gui_status_push(_("Adding images to batch queue")); GTK_CATCHUP(); selected = rs_store_get_selected_names(rs->store); num_selected = g_list_length(selected); if (RS_IS_PHOTO(rs->photo) && rs_store_is_photo_selected(rs->store, rs->photo->filename)) { rs_cache_save(rs->photo, MASK_ALL); if (rs_batch_add_to_queue(rs->queue, rs->photo->filename, rs->current_setting)) num_added++; } /* Deal with selected icons */ for(cur=0;curqueue, g_list_nth_data(selected, cur), rs->current_setting)) num_added++; g_string_printf(gs, _("%d photos added to batch queue"), num_added); g_list_free(selected); gui_status_notify(gs->str); g_string_free(gs, TRUE); rs_core_actions_update_menu_items(rs); gui_set_busy(FALSE); gui_status_pop(msg); } ACTION(add_view_to_batch) { GString *gs = g_string_new(""); GtkWidget *dialog, *cb_box; GtkWidget *cb_a, *cb_b, *cb_c; cb_a = gtk_check_button_new_with_label (_("A")); cb_b = gtk_check_button_new_with_label (_("B")); cb_c = gtk_check_button_new_with_label (_("C")); switch (rs->current_setting) { case 0: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_a), TRUE); break; case 1: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_b), TRUE); break; case 2: gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(cb_c), TRUE); break; } cb_box = gtk_vbox_new(FALSE, 4); gtk_box_pack_start (GTK_BOX (cb_box), cb_a, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_b, FALSE, TRUE, 0); gtk_box_pack_start (GTK_BOX (cb_box), cb_c, FALSE, TRUE, 0); dialog = gui_dialog_make_from_widget(GTK_STOCK_DIALOG_QUESTION, _("Select which settings to\nadd to batch queue"), cb_box); gtk_dialog_add_buttons(GTK_DIALOG(dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_APPLY, GTK_RESPONSE_APPLY, NULL); gtk_dialog_set_default_response(GTK_DIALOG(dialog), GTK_RESPONSE_APPLY); gtk_widget_show_all(dialog); if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_APPLY) { GList *selected = NULL; gint num_selected, i; gui_set_busy(TRUE); rs_store_get_names(rs->store, &selected, NULL, NULL); selected = rs_store_sort_selected(selected); num_selected = g_list_length(selected); if (0 == num_selected && RS_IS_PHOTO(rs->photo)) { selected = g_list_append(selected, g_strdup(rs->photo->filename)); num_selected++; } for (i=0;iqueue, fullname, 0); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_b))) rs_batch_add_to_queue(rs->queue, fullname, 1); if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_c))) rs_batch_add_to_queue(rs->queue, fullname, 2); } g_list_foreach(selected, (GFunc) g_free, NULL); g_list_free(selected); /* Save settings of current photo just to be sure */ if (rs->photo) rs_cache_save(rs->photo, MASK_ALL); g_string_printf(gs, _("%d photos added to batch queue"), ((gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_a))) ? num_selected : 0) + ((gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_b))) ? num_selected : 0) + ((gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(cb_c))) ? num_selected : 0)); gui_set_busy(FALSE); gui_status_notify(gs->str); } gtk_widget_destroy (dialog); g_string_free(gs, TRUE); rs_core_actions_update_menu_items(rs); } ACTION(remove_from_batch) { GList *selected = NULL; GString *gs = g_string_new(""); gint num_selected, i, num_removed = 0; gui_set_busy(TRUE); guint msg = gui_status_push(_("Removing images from batch queue")); GTK_CATCHUP(); rs_store_get_names(rs->store, &selected, NULL, NULL); selected = rs_store_sort_selected(selected); num_selected = g_list_length(selected); for (i=0;iqueue, fullname, rs->current_setting)) num_removed++; } g_list_foreach(selected, (GFunc) g_free, NULL); g_list_free(selected); g_string_printf(gs, _("%d photos removed from batch queue"), num_removed); gui_set_busy(FALSE); gui_status_pop(msg); gui_status_notify(gs->str); g_string_free(gs, TRUE); } /* This is protected by gdk_thread */ static GThread* process_thread = 0; static gpointer start_process_batch(gpointer data) { RS_QUEUE *queue = data; rs_batch_process(queue); gdk_threads_enter(); process_thread = NULL; gdk_threads_leave(); return NULL; } ACTION(ProcessBatch) { /* Save current photo just in case it's in the queue */ if (RS_IS_PHOTO(rs->photo)) rs_cache_save(rs->photo, MASK_ALL); if (NULL == process_thread) process_thread = g_thread_create_full(start_process_batch, rs->queue, 0, FALSE, FALSE, G_THREAD_PRIORITY_LOW, NULL); } ACTION(lens_db_editor) { rs_lens_db_editor(); } ACTION(tethered_shooting) { rs_tethered_shooting_open(rs); } ACTION(filter_graph) { rs_filter_graph(rs->filter_input); } ACTION(add_profile) { GtkWidget *dialog = gtk_file_chooser_dialog_new( _("Add Profile ..."), rawstudio_window, GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT, NULL); GtkFileFilter *filter_all = gtk_file_filter_new(); GtkFileFilter *filter_profiles = gtk_file_filter_new(); gtk_file_filter_set_name(filter_profiles, _("All Profiles")); gtk_file_filter_add_pattern(filter_profiles, "*.dcp"); gtk_file_filter_add_pattern(filter_profiles, "*.DCP"); gtk_file_filter_add_pattern(filter_profiles, "*.icc"); gtk_file_filter_add_pattern(filter_profiles, "*.ICC"); gtk_file_filter_add_pattern(filter_profiles, "*.icm"); gtk_file_filter_add_pattern(filter_profiles, "*.ICM"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter_profiles); GtkFileFilter *filter_dcp = gtk_file_filter_new(); gtk_file_filter_set_name(filter_dcp, _("Camera Profiles (DCP)")); gtk_file_filter_add_pattern(filter_dcp, "*.dcp"); gtk_file_filter_add_pattern(filter_dcp, "*.DCP"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter_dcp); GtkFileFilter *filter_icc = gtk_file_filter_new(); gtk_file_filter_set_name(filter_icc, _("Color Profiles (ICC and ICM)")); gtk_file_filter_add_pattern(filter_icc, "*.icc"); gtk_file_filter_add_pattern(filter_icc, "*.ICC"); gtk_file_filter_add_pattern(filter_icc, "*.icm"); gtk_file_filter_add_pattern(filter_icc, "*.ICM"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter_icc); gtk_file_filter_set_name(filter_all, _("All files")); gtk_file_filter_add_pattern(filter_all, "*"); gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), filter_all); if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_ACCEPT) { RSProfileFactory *factory = rs_profile_factory_new_default(); gchar *path = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog)); gchar *basename = g_path_get_basename(path); const gchar *userdir = rs_profile_factory_get_user_profile_directory(); g_mkdir_with_parents(userdir, 00755); gchar *new_path = g_build_filename(userdir, basename, NULL); if (rs_file_copy(path, new_path)) rs_profile_factory_add_profile(factory, new_path); g_free(path); g_free(basename); g_free(new_path); } gtk_widget_destroy (dialog); } ACTION(online_documentation) { const gchar *link = "http://rawstudio.org/documentation/"; #ifdef WIN32 #warning This is untested gchar* argv[]= { getenv("ComSpec"), "/c", "start", "uri click", /* start needs explicit title incase link has spaces or quotes */ (gchar*) link, NULL }; #else gchar *argv[]= { "gnome-open", /* this feels like cheating! */ (gchar *) link, NULL }; #endif GError *error = NULL; gint status = 0; gboolean res; res = g_spawn_sync( NULL /*PWD*/, argv, NULL /*envp*/, G_SPAWN_SEARCH_PATH, /*flags*/ NULL, /*setup_func*/ NULL, /*user data for setup*/ NULL, NULL, /* stdin/out/error */ &status, &error); if(!res) { g_error("%s: %s\n", g_quark_to_string(error->domain), error->message); g_error_free(error); return ; } } ACTION(about) { const static gchar *authors[] = { "Anders Brander ", "Anders Kvist ", "Klaus Post ", NULL }; const static gchar *artists[] = { "Kristoffer Jørgensen ", "Rune Stowasser ", NULL }; const static gchar *translators = "Simone Contini\n" "Paweł Gołaszewski\n" "Alexandre Prokoudine\n" "Jakub Friedl\n" "Carsten Mathaes\n" "Edouard Gomez\n" "Martin Egger\n" "Krzysztof Kościuszkiewicz\n" "Einar Ryeng\n" "Olli Hänninen\n" "Carlos Dávila\n" "Patrik Jarl\n" "Olav Lavell\n" "Rafael Sachetto Oliveira\n" "Paco Rivière\n" "Tuomas Haarala\n" "Martin Nilsson\n" "Ryo Fujita\n" "Roman Schulz\n" "Stian Grindvoll\n" "Dariusz Duma"; gtk_show_about_dialog(GTK_WINDOW(rawstudio_window), "program-name", "Rawstudio", "authors", authors, "artists", artists, "translator-credits", translators, "comments", _("A raw image converter for GTK+/GNOME"), "version", RAWSTUDIO_VERSION, "website", "http://rawstudio.org/", "name", "Rawstudio", NULL ); } RADIOACTION(right_popup) { rs_preview_widget_set_snapshot(RS_PREVIEW_WIDGET(rs->preview), 1, gtk_radio_action_get_current_value(radioaction)); } RADIOACTION(sort_by_popup) { rs_store_set_sort_method(rs->store, gtk_radio_action_get_current_value(radioaction)); } #ifndef GTK_STOCK_FULLSCREEN #define GTK_STOCK_FULLSCREEN NULL #endif /** * Get the core action group * @return A pointer to the core action group */ GtkActionGroup * rs_get_core_action_group(RS_BLOB *rs) { gboolean show_filenames; gboolean load_8bit = FALSE; rs_conf_get_boolean_with_default(CONF_SHOW_FILENAMES, &show_filenames, DEFAULT_CONF_SHOW_FILENAMES); rs_conf_get_boolean_with_default(CONF_LOAD_GDK, &load_8bit, FALSE); /* FIXME: This should be static */ GtkActionEntry actionentries[] = { { "FileMenu", NULL, _("_File"), NULL, NULL, ACTION_CB(file_menu) }, { "EditMenu", NULL, _("_Edit"), NULL, NULL, ACTION_CB(edit_menu) }, { "PhotoMenu", NULL, _("_Photo"), NULL, NULL, ACTION_CB(photo_menu) }, { "PriorityMenu", NULL, _("_Set Priority") }, { "WhiteBalanceMenu", "NULL", _("_White Balance") }, { "ViewMenu", NULL, _("_View"), NULL, NULL, ACTION_CB(view_menu) }, { "SortByMenu", NULL, _("_Sort by") }, { "BatchMenu", NULL, _("_Batch"), NULL, NULL, ACTION_CB(batch_menu) }, { "HelpMenu", NULL, _("_Help") }, { "PreviewPopup", NULL, NULL, NULL, NULL, ACTION_CB(preview_popup) }, { "SnapshotMenu", NULL, _("_Snapshot") }, /* File menu */ { "Open", GTK_STOCK_OPEN, _("_Open Directory"), "O", NULL, ACTION_CB(open) }, { "QuickExport", GTK_STOCK_SAVE, _("_Quick Export"), "S", NULL, ACTION_CB(quick_export) }, { "ExportAs", GTK_STOCK_SAVE_AS, _("_Export As"), "S", NULL, ACTION_CB(export_as) }, { "ExportToGimp", GTK_STOCK_EXECUTE, _("_Export to Gimp"), "G", NULL, ACTION_CB(export_to_gimp) }, { "CopyImage", GTK_STOCK_COPY, _("_Copy Image to Clipboard"), "C", NULL, ACTION_CB(copy_image) }, { "Reload", GTK_STOCK_REFRESH, _("_Reload directory"), "R", NULL, ACTION_CB(reload) }, { "DeleteFlagged", GTK_STOCK_DELETE, _("_Delete flagged photos"), "D", NULL, ACTION_CB(delete_flagged) }, { "Quit", GTK_STOCK_QUIT, _("_Quit"), "Q", NULL, ACTION_CB(quit) }, /* Edit menu */ { "RevertSettings", GTK_STOCK_UNDO, _("_Revert settings"), "Z", NULL, ACTION_CB(revert_settings) }, { "CopySettings", GTK_STOCK_COPY, _("_Copy settings"), "C", NULL, ACTION_CB(copy_settings) }, { "PasteSettings", GTK_STOCK_PASTE, _("_Paste settings"), "V", NULL, ACTION_CB(paste_settings) }, { "ResetSettings", GTK_STOCK_REFRESH, _("_Reset settings"), NULL, NULL, ACTION_CB(reset_settings) }, { "SaveDefaultSettings", NULL, _("_Save camera default settings"), NULL, NULL, ACTION_CB(save_default_settings) }, { "Preferences", GTK_STOCK_PREFERENCES, _("_Preferences"), NULL, NULL, ACTION_CB(preferences) }, /* Photo menu */ { "FlagPhoto", GTK_STOCK_DELETE, _("_Flag photo for deletion"), "Delete", NULL, ACTION_CB(flag_for_deletion) }, { "Priority1", NULL, _("_1"), "1", NULL, ACTION_CB(priority_1) }, { "Priority2", NULL, _("_2"), "2", NULL, ACTION_CB(priority_2) }, { "Priority3", NULL, _("_3"), "3", NULL, ACTION_CB(priority_3) }, { "RemovePriority", NULL, _("_Remove priority"), "0", NULL, ACTION_CB(priority_0) }, { "AutoWB", NULL, _("_Auto"), "A", NULL, ACTION_CB(auto_wb) }, { "CameraWB", NULL, _("_Camera"), "C", NULL, ACTION_CB(camera_wb) }, { "Crop", RS_STOCK_CROP, _("_Crop"), "C", NULL, ACTION_CB(crop) }, { "Uncrop", NULL, _("_Uncrop"), "V", NULL, ACTION_CB(uncrop) }, { "Straighten", RS_STOCK_ROTATE, _("_Straighten"), NULL, NULL, ACTION_CB(straighten) }, { "Unstraighten", NULL, _("_Unstraighten"), NULL, NULL, ACTION_CB(unstraighten) }, { "Group", NULL, _("_Group"), NULL, NULL, ACTION_CB(group_photos) }, { "Ungroup", NULL, _("_Ungroup"), NULL, NULL, ACTION_CB(ungroup_photos) }, { "AutoGroup", NULL, _("_Auto group"), NULL, NULL, ACTION_CB(auto_group_photos) }, { "TagPhoto", NULL, _("_Tag Photo..."), "T", NULL, ACTION_CB(tag_photo) }, { "RotateClockwise", RS_STOCK_ROTATE_CLOCKWISE, _("Rotate Clockwise"), "Right", NULL, ACTION_CB(rotate_clockwise) }, { "RotateCounterClockwise", RS_STOCK_ROTATE_COUNTER_CLOCKWISE, _("Rotate Counter Clockwise"), "Left", NULL, ACTION_CB(rotate_counter_clockwise) }, { "Flip", RS_STOCK_FLIP, _("Flip"), NULL, NULL, ACTION_CB(flip) }, { "Mirror", RS_STOCK_MIRROR, _("Mirror"), NULL, NULL, ACTION_CB(mirror) }, /* View menu */ { "PreviousPhoto", GTK_STOCK_GO_BACK, _("_Previous photo"), "Left", NULL, ACTION_CB(previous_photo) }, { "NextPhoto", GTK_STOCK_GO_FORWARD, _("_Next Photo"), "Right", NULL, ACTION_CB(next_photo) }, { "LensDbEditor", NULL, _("_Lens Library"), "L", NULL, ACTION_CB(lens_db_editor) }, { "TetheredShooting", NULL, _("_Tethered Shooting"), "F9", NULL, ACTION_CB(tethered_shooting) }, /* Batch menu */ { "AddToBatch", GTK_STOCK_ADD, _("_Add to batch queue"), "Insert", NULL, ACTION_CB(add_to_batch) }, { "AddViewToBatch", NULL, _("_Add view to queue..."), "Insert", NULL, ACTION_CB(add_view_to_batch) }, { "RemoveFromBatch", GTK_STOCK_REMOVE, _("_Remove from batch queue"), "Delete", NULL, ACTION_CB(remove_from_batch) }, { "ProcessBatch", GTK_STOCK_EXECUTE, _("_Start"), NULL, NULL, ACTION_CB(ProcessBatch) }, /* help menu */ { "OnlineDocumentation", GTK_STOCK_HELP, _("_Online Documentation"), NULL, NULL, ACTION_CB(online_documentation) }, { "About", GTK_STOCK_ABOUT, _("_About"), NULL, NULL, ACTION_CB(about) }, { "FilterGraph", NULL, "_Filter Graph", NULL, NULL, ACTION_CB(filter_graph) }, /* Not in any menu (yet) */ { "AddProfile", NULL, _("Add Profile ..."), NULL, NULL, ACTION_CB(add_profile) }, }; static guint n_actionentries = G_N_ELEMENTS (actionentries); GtkToggleActionEntry toggleentries[] = { { "ZommToFit", GTK_STOCK_ZOOM_FIT, _("_Zoom to fit"), "asterisk", NULL, ACTION_CB(zoom_to_fit), TRUE }, { "Iconbox", NULL, _("_Iconbox"), "I", NULL, ACTION_CB(iconbox), TRUE }, { "Toolbox", NULL, _("_Toolbox"), "T", NULL, ACTION_CB(toolbox), TRUE }, { "Fullscreen", GTK_STOCK_FULLSCREEN, _("_Fullscreen"), "F11", NULL, ACTION_CB(fullscreen), FALSE }, { "FullscreenPreview", GTK_STOCK_FULLSCREEN, _("_Show Photo On Secondary Monitor"), "F10", NULL, ACTION_CB(fullscreen_preview), FALSE }, { "ShowFilenames", NULL, _("Show Filenames in Iconbox"), NULL, NULL, ACTION_CB(show_filenames), show_filenames }, { "Load8Bit", NULL, _("Load non-RAW images"), NULL, NULL, ACTION_CB(load_8bit), load_8bit }, { "LoadSelected", NULL, _("Do not Load Selected Images"), "Pause", NULL, ACTION_CB(load_selected), FALSE }, { "ExposureMask", NULL, _("_Exposure mask"), "E", NULL, ACTION_CB(exposure_mask), FALSE }, { "Split", NULL, _("_Split"), "D", NULL, ACTION_CB(split), FALSE }, #if GTK_CHECK_VERSION(2,12,0) { "Lightsout", NULL, _("_Lights out"), "F12", NULL, ACTION_CB(lightsout), FALSE }, #endif }; static guint n_toggleentries = G_N_ELEMENTS (toggleentries); GtkRadioActionEntry sort_by_popup[] = { { "SortByName", NULL, _("Name"), NULL, NULL, RS_STORE_SORT_BY_NAME }, { "SortByTimestamp", NULL, _("Timestamp"), NULL, NULL, RS_STORE_SORT_BY_TIMESTAMP }, { "SortByISO", NULL, _("ISO"), NULL, NULL, RS_STORE_SORT_BY_ISO }, { "SortByAperture", NULL, _("Aperture"), NULL, NULL, RS_STORE_SORT_BY_APERTURE }, { "SortByFocallength", NULL, _("Focallength"), NULL, NULL, RS_STORE_SORT_BY_FOCALLENGTH }, { "SortByShutterspeed", NULL, _("Shutterspeed"), NULL, NULL, RS_STORE_SORT_BY_SHUTTERSPEED }, }; static guint n_sort_by_popup = G_N_ELEMENTS (sort_by_popup); GtkRadioActionEntry right_popup[] = { { "RightA", NULL, _(" A "), NULL, NULL, 0 }, { "RightB", NULL, _(" B "), NULL, NULL, 1 }, { "RightC", NULL, _(" C "), NULL, NULL, 2 }, }; static guint n_right_popup = G_N_ELEMENTS (right_popup); g_static_mutex_lock(&rs_actions_spinlock); if (core_action_group == NULL) { core_action_group = gtk_action_group_new ("CoreActions"); /* FIXME: gtk_action_group_set_translation_domain */ gtk_action_group_add_actions (core_action_group, actionentries, n_actionentries, rs); gtk_action_group_add_toggle_actions(core_action_group, toggleentries, n_toggleentries, rs); gtk_action_group_add_radio_actions(core_action_group, sort_by_popup, n_sort_by_popup, rs_store_get_sort_method(rs->store), ACTION_CB(sort_by_popup), rs); gtk_action_group_add_radio_actions(core_action_group, right_popup, n_right_popup, 1, ACTION_CB(right_popup), rs); } g_static_mutex_unlock(&rs_actions_spinlock); return core_action_group; } /** * Set sensivity of an action * @param name The name of the action * @param sensitive The sensivity of the action */ void rs_core_action_group_set_sensivity(const gchar *name, gboolean sensitive) { if (core_action_group) gtk_action_set_sensitive(gtk_action_group_get_action(core_action_group, name), sensitive); } /** * Activate an action * @param name The action to activate */ void rs_core_action_group_activate(const gchar *name) { if (core_action_group) gtk_action_activate(gtk_action_group_get_action(core_action_group, name)); } /** * Set visibility of an action * @param name The name of the action * @param visibility The visibility of the action */ void rs_core_action_group_set_visibility(const gchar *name, gboolean visible) { if (core_action_group) gtk_action_set_visible(gtk_action_group_get_action(core_action_group, name), visible); } /** * Add actions to global action group, see documentation for gtk_action_group_add_actions */ void rs_core_action_group_add_actions(const GtkActionEntry *entries, guint n_entries, gpointer user_data) { g_static_mutex_lock(&rs_actions_spinlock); if (core_action_group) gtk_action_group_add_actions(core_action_group, entries, n_entries, user_data); else g_warning("core_action_group is NULL"); g_static_mutex_unlock(&rs_actions_spinlock); } /** * Add radio action to global action group, see documentation for gtk_action_group_add_radio_actions() */ void rs_core_action_group_add_radio_actions(const GtkRadioActionEntry *entries, guint n_entries, gint value, GCallback on_change, gpointer user_data) { g_static_mutex_lock(&rs_actions_spinlock); if (core_action_group) gtk_action_group_add_radio_actions(core_action_group, entries, n_entries, value, on_change, user_data); else g_warning("core_action_group is NULL"); g_static_mutex_unlock(&rs_actions_spinlock); } /** * Get a GtkAction by name * @param name The name of the action * @return A GtkAction or NULL (should not be unreffed) */ extern GtkAction * rs_core_action_group_get_action(const gchar *name) { GtkAction *action = NULL; g_static_mutex_lock(&rs_actions_spinlock); if (core_action_group) action = gtk_action_group_get_action(core_action_group, name); else g_warning("core_action_group is NULL"); g_static_mutex_unlock(&rs_actions_spinlock); return action; } rawstudio-2.0/src/rs-external-editor.c0000644000175000017500000001541311534730147015011 00000000000000/* * Copyright (C) 2006-2011 Anders Brander , * Anders Kvist and Klaus Post * * 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. */ /* Accepts old DBUS (before 1.0) installations */ #define DBUS_API_SUBJECT_TO_CHANGE #include #include #include #include #include "application.h" #include "rs-photo.h" #ifndef WIN32 #include static gboolean rs_has_gimp(gint major, gint minor, gint micro); #define EXPORT_TO_GIMP_TIMEOUT_SECONDS 30 DBusHandlerResult dbus_gimp_opened (DBusConnection * connection, DBusMessage * message, void *user_data) { /* Check if image has been opened by GIMP */ if (dbus_message_is_signal(message, "org.gimp.GIMP.UI", "Opened")) { gchar *argument = NULL; gchar *filename = (gchar *) user_data; dbus_message_get_args(message, NULL, DBUS_TYPE_STRING, &argument, DBUS_TYPE_INVALID); /* Cleaning up */ dbus_connection_remove_filter(connection, dbus_gimp_opened, user_data); unlink(filename); /*FIXME: filename should almost match argument - will cause error if user opens a photo in GIMP while exporting */ return DBUS_HANDLER_RESULT_HANDLED; } return DBUS_HANDLER_RESULT_NOT_YET_HANDLED; } #endif gboolean rs_external_editor_gimp(RS_PHOTO *photo, RSFilter *prior_to_resample, guint snapshot) { #ifdef WIN32 return FALSE; #else RSOutput *output = NULL; g_assert(RS_IS_PHOTO(photo)); // We need at least GIMP 2.4.0 to export photo if (!rs_has_gimp(2,4,0)) { return FALSE; } DBusConnection *bus; DBusMessage *message, *reply; GString *filename; bus = dbus_bus_get (DBUS_BUS_SESSION, NULL); gchar* org_name = g_path_get_basename(photo->filename); gchar* org_name_noext = g_utf8_strchr(org_name, -1, '.'); /* Terminate string there */ if (NULL != org_name_noext) org_name_noext[0] = 0; filename = g_string_new(""); g_string_printf(filename, "%s/%s-rawstudio_%.0f.tif",g_get_tmp_dir(), org_name, g_random_double()*10000); g_free(org_name); /* Setup our filter chain for saving */ RSFilter *ftransform_input = rs_filter_new("RSColorspaceTransform", prior_to_resample); RSFilter *fdcp = rs_filter_new("RSDcp", ftransform_input); RSFilter *fdenoise= rs_filter_new("RSDenoise", fdcp); RSFilter *ftransform_display = rs_filter_new("RSColorspaceTransform", fdenoise); RSFilter *fend = ftransform_display; GList *filters = g_list_append(NULL, fend); rs_photo_apply_to_filters(photo, filters, snapshot); g_list_free(filters); output = rs_output_new("RSTifffile"); g_object_set(output, "filename", filename->str, NULL); rs_output_execute(output, fend); g_object_unref(output); g_object_unref(ftransform_input); g_object_unref(ftransform_display); g_object_unref(fdenoise); g_object_unref(fdcp); message = dbus_message_new_method_call("org.gimp.GIMP.UI", "/org/gimp/GIMP/UI", "org.gimp.GIMP.UI", "OpenAsNew"); dbus_message_append_args (message, DBUS_TYPE_STRING, &filename->str, DBUS_TYPE_INVALID); /* Send DBus message to GIMP */ reply = dbus_connection_send_with_reply_and_block (bus, message, -1, NULL); /* If we didn't get a reply from GIMP - we try to start it and resend the message */ if (!reply) { gint retval = system("gimp &"); if (retval != 0) { g_warning("system(\"gimp &\") returned: %d\n", retval); g_unlink(filename->str); g_string_free(filename, TRUE); dbus_message_unref (message); return FALSE; } } /* Allow GIMP to start - we send the message every one second */ while (!reply) { gint i = 0; if (i > EXPORT_TO_GIMP_TIMEOUT_SECONDS) { g_warning("Never got a reply from GIMP - deleting temporary file"); g_unlink(filename->str); g_string_free(filename, TRUE); dbus_message_unref (message); return FALSE; } sleep(1); i++; reply = dbus_connection_send_with_reply_and_block (bus, message, -1, NULL); } dbus_message_unref (message); /* Depends on GIMP DBus signal: 'Opened' */ if (rs_has_gimp(2,6,2)) { /* Connect to GIMP and listen for "Opened" signal */ dbus_bus_add_match (bus, "type='signal',interface='org.gimp.GIMP.UI'", NULL); dbus_connection_add_filter(bus, dbus_gimp_opened, filename->str , NULL); g_string_free(filename, FALSE); } else { /* Old sad way - GIMP doesn't let us know that it has opened the photo */ g_warning("You have an old version of GIMP and we suggest that you upgrade to at least 2.6.2"); g_warning("Rawstudio will stop responding for 10 seconds while it waits for GIMP to open the file"); sleep(10); g_unlink(filename->str); g_string_free(filename, TRUE); } return TRUE; #endif } #ifndef WIN32 static gboolean rs_has_gimp(gint major, gint minor, gint micro) { FILE *fp; char line[128]; int _major, _minor, _micro; gboolean retval = FALSE; fp = popen("gimp -v","r"); if (fgets( line, sizeof line, fp) == NULL) { g_warning("fgets returned: %d\n", retval); return FALSE; } pclose(fp); #if GLIB_CHECK_VERSION(2,14,0) GRegex *regex; gchar **tokens; regex = g_regex_new(".*([0-9])\x2E([0-9]+)\x2E([0-9]+).*", 0, 0, NULL); tokens = g_regex_split(regex, line, 0); g_regex_unref(regex); if (tokens[1]) _major = atoi(tokens[1]); else { g_strfreev(tokens); return FALSE; } if (_major > major) { retval = TRUE; } else if (_major == major) { if (tokens[2]) _minor = atoi(tokens[2]); else { g_strfreev(tokens); return FALSE; } if (_minor > minor) { retval = TRUE; } else if (_minor == minor) { if (tokens[3]) _micro = atoi(tokens[3]); else { g_strfreev(tokens); return FALSE; } if (_micro >= micro) { retval = TRUE; } } } g_strfreev(tokens); #else sscanf(line,"GNU Image Manipulation Program version %d.%d.%d", &_major, &_minor, &_micro); if (_major > major) { retval = TRUE; } else if (_major == major) { if (_minor > minor) { retval = TRUE; } else if (_minor == minor) { if (_micro >= micro) { retval = TRUE; } } } #endif return retval; } #endif rawstudio-2.0/src/eog-pixbuf-cell-renderer.h0000644000175000017500000000444011526533645016057 00000000000000/* Eye Of Gnome - Pixbuf Cellrenderer * * Lifted from eog-2.20.0 with minor changes, Thanks! - Anders Brander * * Copyright (C) 2007 The GNOME Foundation * * Author: Lucas Rocha * * Based on gnome-control-center code (capplets/appearance/wp-cellrenderer.c) by: * - Denis Washington * * 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __EOG_PIXBUF_CELL_RENDERER_H__ #define __EOG_PIXBUF_CELL_RENDERER_H__ #include G_BEGIN_DECLS typedef struct _EogPixbufCellRenderer EogPixbufCellRenderer; typedef struct _EogPixbufCellRendererClass EogPixbufCellRendererClass; struct _EogPixbufCellRenderer { GtkCellRendererPixbuf parent; }; struct _EogPixbufCellRendererClass { GtkCellRendererPixbufClass parent; }; typedef struct _BangPosition { GdkDrawable *drawable; gint x; gint y; } BangPosition; /** * This is an evil evil evil hack that should never be used by any sane person. * eog_pixbuf_cell_renderer_render() will store the position and the drawable * a pixbuf has been drawn to - this function returns this information in a * BangPositon. This will allow an aggressive caller to bang the GdkDrawable * directly instead of using conventional methods of setting the icon. * Please understand: THE INFORMATION RETURNED CAN BE WRONG AND/OR OUTDATED! * The key used in the tree is simply two XOR'ed pointers, collisions can * easily exist. */ extern gboolean eog_pixbuf_cell_renderer_get_bang_position(GtkIconView *iconview, GdkPixbuf *pixbuf, BangPosition *bp); GtkCellRenderer *eog_pixbuf_cell_renderer_new (void); G_END_DECLS #endif /* __EOG_PIXBUF_CELL_RENDERER_H__ */ rawstudio-2.0/src/rawstudio.gtkrc0000644000175000017500000000212211526533645014170 00000000000000style "rawstudio-style" { bg[NORMAL] = { 0.4, 0.4, 0.4 } #done bg[ACTIVE] = { 0.37, 0.37, 0.37 } #done bg[PRELIGHT] = { 0.45, 0.45, 0.45 } #done bg[SELECTED] = { 0.5, 0.5, 0.5 } #done bg[INSENSITIVE] = { 0.4, 0.4, 0.4 } #done fg[NORMAL] = { 0.7, 0.7, 0.7 } #done fg[ACTIVE] = { 0.67, 0.67, 0.67 } #done fg[PRELIGHT] = { 0.95, 0.95, 0.95 } #done fg[SELECTED] = { 0.6, 0.6, 0.9 } #??? fg[INSENSITIVE] = { 0.4, 0.4, 0.4 } #crap text[NORMAL] = { 0.7, 0.7, 0.7 } #done text[ACTIVE] = { 0.67, 0.67, 0.67 } #done text[PRELIGHT] = { 0.95, 0.95, 0.95 } text[SELECTED] = { 0.9, 0.9, 0.9 } #done text[INSENSITIVE] = { 0.4, 0.4, 0.4 } #crap base[NORMAL] = { 0.5, 0.5, 0.5 } #done base[ACTIVE] = { 0.55, 0.55, 0.55 } #done base[PRELIGHT] = { 0.95, 0.5, 0.5 } #??? base[SELECTED] = { 0.6, 0.6, 0.6 } #done base[INSENSITIVE] = { 0.4, 0.94, 0.4 } #??? GtkTreeView::even-row-color = "#666" GtkTreeView::odd-row-color = "#555" bg_pixmap[NORMAL] = "" engine "clearlooks" { } } widget "*" style "rawstudio-style" class "*" style "rawstudio-style" widget_class "*" style "rawstudio-style" rawstudio-2.0/src/ui.xml0000644000175000017500000000744711541723411012256 00000000000000 rawstudio-2.0/src/application.c0000644000175000017500000005337111547155610013571 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ #if defined(__GNUC__) && (defined (__x86_64__) || defined (__i386__)) && !defined(__MINGW32__) //#define RS_USE_INTERNAL_STACKTRACE #endif #include #include #include #include #include /* pow() */ #include /* memset() */ #include #include #ifdef WITH_GCONF #include #endif #if defined(RS_USE_INTERNAL_STACKTRACE) #include #include #define __USE_GNU #include #endif #include "application.h" #include "gtk-interface.h" #include "gtk-helper.h" #include "rs-cache.h" #include "gettext.h" #include "conf_interface.h" #include "filename.h" #include "rs-tiff.h" #include "rs-batch.h" #include "rs-store.h" #include "rs-preview-widget.h" #include "rs-histogram.h" #include "rs-photo.h" #include "rs-exif.h" #include "rs-library.h" #include "lensfun.h" #include "rs-profile-factory-model.h" #include "rs-profile-camera.h" static void photo_spatial_changed(RS_PHOTO *photo, RS_BLOB *rs); static void photo_profile_changed(RS_PHOTO *photo, gpointer profile, RS_BLOB *rs); void rs_free(RS_BLOB *rs) { if (rs->photo) g_object_unref(rs->photo); } void rs_set_photo(RS_BLOB *rs, RS_PHOTO *photo) { g_assert(rs != NULL); /* Unref old photo if any */ if (rs->photo) g_object_unref(rs->photo); rs->photo = NULL; /* Save photo in blob */ rs->photo = photo; if (rs->photo) { rs_filter_set_recursive(rs->filter_end, "image", rs->photo->input_response, "filename", rs->photo->filename, NULL); g_signal_connect(G_OBJECT(rs->photo), "spatial-changed", G_CALLBACK(photo_spatial_changed), rs); g_signal_connect(G_OBJECT(rs->photo), "profile-changed", G_CALLBACK(photo_profile_changed), rs); } } static void photo_spatial_changed(RS_PHOTO *photo, RS_BLOB *rs) { if (photo == rs->photo) { /* Update crop and rotate filters */ rs_filter_set_recursive(rs->filter_end, "rectangle", rs_photo_get_crop(photo), "angle", rs_photo_get_angle(photo), "orientation", rs->photo->orientation, NULL); } } static void photo_profile_changed(RS_PHOTO *photo, gpointer profile, RS_BLOB *rs) { if (photo == rs->photo) { if (RS_IS_ICC_PROFILE(profile)) { RSColorSpace *cs = rs_color_space_icc_new_from_icc(profile); g_object_set(rs->filter_input, "color-space", cs, NULL); /* We unref at once, and the the filter keep the only reference */ g_object_unref(cs); } else { /* If we don't have a specific ICC profile, we will simply assign a Prophoto colorspace to stop RSColorTransform from doing anything - this works because RSDcp is requesting Prophoto. */ g_object_set(rs->filter_input, "color-space", rs_color_space_new_singleton("RSProphoto"), NULL); } } } gboolean rs_photo_save(RS_PHOTO *photo, RSFilter *prior_to_resample, RSOutput *output, gint width, gint height, gboolean keep_aspect, gdouble scale, gint snapshot) { gfloat actual_scale; g_assert(RS_IS_PHOTO(photo)); g_assert(RS_IS_FILTER(prior_to_resample)); g_assert(RS_IS_OUTPUT(output)); RSFilter *fresample= rs_filter_new("RSResample", prior_to_resample); RSFilter *ftransform_input = rs_filter_new("RSColorspaceTransform", fresample); RSFilter *fdcp = rs_filter_new("RSDcp", ftransform_input); RSFilter *fdenoise= rs_filter_new("RSDenoise", fdcp); RSFilter *ftransform_display = rs_filter_new("RSColorspaceTransform", fdenoise); RSFilter *fend = ftransform_display; gint input_width; rs_filter_get_size_simple(prior_to_resample, RS_FILTER_REQUEST_QUICK, &input_width, NULL); actual_scale = ((gdouble) width / (gdouble) input_width); if (0 < width && 0 < height) /* We only wan't to set width and height if they are not -1 */ rs_filter_set_recursive(fend, "width", width, "height", height, NULL); GList *filters = g_list_append(NULL, fend); rs_photo_apply_to_filters(photo, filters, snapshot); g_list_free(filters); /* actually save */ gboolean exported = rs_output_execute(output, fend); photo->exported |= exported; rs_cache_save(photo, MASK_ALL); /* Set the exported flag */ rs_store_set_flags(NULL, photo->filename, NULL, NULL, &photo->exported); g_object_unref(ftransform_input); g_object_unref(ftransform_display); g_object_unref(fresample); g_object_unref(fdenoise); g_object_unref(fdcp); return exported; } gboolean rs_photo_copy_to_clipboard(RS_PHOTO *photo, RSFilter *prior_to_resample, gint width, gint height, gboolean keep_aspect, gdouble scale, gint snapshot) { gfloat actual_scale; g_assert(RS_IS_PHOTO(photo)); g_assert(RS_IS_FILTER(prior_to_resample)); RSFilter *fresample= rs_filter_new("RSResample", prior_to_resample); RSFilter *ftransform_input = rs_filter_new("RSColorspaceTransform", fresample); RSFilter *fdcp = rs_filter_new("RSDcp", ftransform_input); RSFilter *fdenoise= rs_filter_new("RSDenoise", fdcp); RSFilter *ftransform_display = rs_filter_new("RSColorspaceTransform", fdenoise); RSFilter *fend = ftransform_display; gint input_width; rs_filter_get_size_simple(prior_to_resample, RS_FILTER_REQUEST_QUICK, &input_width, NULL); actual_scale = ((gdouble) width / (gdouble) input_width); if (0 < width && 0 < height) /* We only wan't to set width and height if they are not -1 */ rs_filter_set_recursive(fend, "width", width, "height", height, NULL); GList *filters = g_list_append(NULL, fend); rs_photo_apply_to_filters(photo, filters, snapshot); g_list_free(filters); RSFilterResponse *response; RSFilterRequest *request = rs_filter_request_new(); rs_filter_request_set_quick(RS_FILTER_REQUEST(request), FALSE); rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", rs_color_space_new_singleton("RSSrgb")); response = rs_filter_get_image8(fend, request); GdkPixbuf *pixbuf = rs_filter_response_get_image8(response); GtkClipboard *clipboard = gtk_clipboard_get(GDK_SELECTION_CLIPBOARD); gtk_clipboard_set_image(clipboard, pixbuf); g_object_unref(request); g_object_unref(response); g_object_unref(pixbuf); g_object_unref(ftransform_input); g_object_unref(ftransform_display); g_object_unref(fresample); g_object_unref(fdenoise); g_object_unref(fdcp); return TRUE; } RS_BLOB * rs_new(void) { RSFilter *cache; RS_BLOB *rs; rs = g_malloc(sizeof(RS_BLOB)); rs->settings_buffer = NULL; rs->photo = NULL; rs->queue = rs_batch_new_queue(rs); rs->current_setting = 0; /* Build basic filter chain */ rs->filter_input = rs_filter_new("RSInputImage16", NULL); rs->filter_demosaic = rs_filter_new("RSDemosaic", rs->filter_input); rs->filter_fuji_rotate = rs_filter_new("RSFujiRotate", rs->filter_demosaic); rs->filter_demosaic_cache = rs_filter_new("RSCache", rs->filter_fuji_rotate); /* We need this for 100% zoom */ g_object_set(rs->filter_demosaic_cache, "ignore-roi", TRUE, NULL); rs->filter_lensfun = rs_filter_new("RSLensfun", rs->filter_demosaic_cache); rs->filter_rotate = rs_filter_new("RSRotate", rs->filter_lensfun); rs->filter_crop = rs_filter_new("RSCrop", rs->filter_rotate); cache = rs_filter_new("RSCache", rs->filter_crop); rs_filter_set_recursive(rs->filter_input, "color-space", rs_color_space_new_singleton("RSProphoto"), NULL); rs->filter_end = cache; return(rs); } void rs_white_black_point(RS_BLOB *rs) { if (rs->photo) { guint hist[4][256] = {{0,}}; gint i = 0; gdouble black_threshold = 0.003; // Percent underexposed pixels gdouble white_threshold = 0.01; // Percent overexposed pixels gdouble blackpoint; gdouble whitepoint; guint total = 0; // calculate black point while(i < 256) { total += hist[R][i]+hist[G][i]+hist[B][i]; if ((total/3) > ((250*250*3)/100*black_threshold)) break; i++; } blackpoint = (gdouble) i / (gdouble) 255; // calculate white point i = 255; while(i) { total += hist[R][i]+hist[G][i]+hist[B][i]; if ((total/3) > ((250*250*3)/100*white_threshold)) break; i--; } whitepoint = (gdouble) i / (gdouble) 255; rs_curve_widget_move_knot(RS_CURVE_WIDGET(rs->curve[rs->current_setting]),0,blackpoint,0.0); rs_curve_widget_move_knot(RS_CURVE_WIDGET(rs->curve[rs->current_setting]),-1,whitepoint,1.0); } } gboolean test_dcp_profile(RSProfileFactory *factory, gchar *make_ascii, gchar *model_ascii) { GtkTreeIter iter; GtkTreeModel *model = GTK_TREE_MODEL(factory->profiles); gchar *unique = g_strdup(rs_profile_camera_find(make_ascii, model_ascii)); gchar *temp; gtk_tree_model_get_iter_first(model, &iter); do { gtk_tree_model_get(model, &iter, FACTORY_MODEL_COLUMN_MODEL, &temp, -1); if (g_strcmp0(temp, unique) == 0) { g_free(unique); return TRUE; } } while ( gtk_tree_model_iter_next(model, &iter)); g_free(unique); return FALSE; } /** * This is a very simple regression test for Rawstudio. Filenames will be read * from "testimages" in the current directory, one filename per line, and a * small series of tests will be carried out for each filename. Output can be * piped to a file for further processing. */ void test(void) { if (!g_file_test("testimages", G_FILE_TEST_EXISTS)) { printf("File: testimages is missing.\n"); return; } gchar *filename, *basename, *next_filename; GdkPixbuf *pixbuf; GIOStatus status = G_IO_STATUS_NORMAL; GIOChannel *io = g_io_channel_new_file("testimages", "r", NULL); gint sum, good = 0, bad = 0; struct lfDatabase *lensdb = lf_db_new (); lf_db_load (lensdb); RSProfileFactory *profile_factory = g_object_new(RS_TYPE_PROFILE_FACTORY, NULL); rs_profile_factory_load_profiles(profile_factory, PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "profiles" G_DIR_SEPARATOR_S, TRUE, FALSE); printf("basename, load, filetype, thumb, meta, make, a-make, a-model, aperture, iso, s-speed, wb, f-length, lensfun camera, lens min focal, lens max focal, lens max aperture, lens min aperture, lens id, lens identifier, dcp profile\n"); status = g_io_channel_read_line(io, &filename, NULL, NULL, NULL); g_strstrip(filename); while (G_IO_STATUS_EOF != status) { status = g_io_channel_read_line(io, &next_filename, NULL, NULL, NULL); g_strstrip(next_filename); if (status != G_IO_STATUS_EOF) rs_io_idle_prefetch_file(next_filename, -1); gboolean filetype_ok = FALSE; gboolean load_ok = FALSE; gboolean thumbnail_ok = FALSE; gboolean load_meta_ok = FALSE; gboolean make_ok = FALSE; gboolean make_ascii_ok = FALSE; gboolean model_ascii_ok = FALSE; gboolean aperture_ok = FALSE; gboolean iso_ok = FALSE; gboolean shutterspeed_ok = FALSE; gboolean wb_ok = FALSE; gboolean focallength_ok = FALSE; gboolean lensfun_camera_ok = FALSE; gboolean lens_min_focal_ok = FALSE; gboolean lens_max_focal_ok = FALSE; gboolean lens_max_aperture_ok = FALSE; gboolean lens_min_aperture_ok = FALSE; gboolean lens_id_ok = FALSE; gboolean lens_identifier_ok = FALSE; gboolean dcp_profile_ok = FALSE; if (rs_filetype_can_load(filename)) { RS_PHOTO *photo = NULL; filetype_ok = TRUE; photo = rs_photo_load_from_file(filename); if (photo) { load_ok = TRUE; g_object_unref(photo); } RSMetadata *metadata = rs_metadata_new(); rs_metadata_load_from_file(metadata, filename); load_meta_ok = TRUE; if (metadata->make != MAKE_UNKNOWN) make_ok = TRUE; if (metadata->make_ascii != NULL) make_ascii_ok = TRUE; if (metadata->model_ascii != NULL) model_ascii_ok = TRUE; if (metadata->aperture > 0.0) aperture_ok = TRUE; if (metadata->iso > 0) iso_ok = TRUE; if (metadata->shutterspeed > 1.0) shutterspeed_ok = TRUE; if (metadata->cam_mul[0] > 0.1 && metadata->cam_mul[0] != 1.0) wb_ok = TRUE; if (metadata->focallength > 0.0) focallength_ok = TRUE; /* FIXME: Port to RSFiletype */ pixbuf = rs_metadata_get_thumbnail(metadata); if (pixbuf) { thumbnail_ok = TRUE; g_object_unref(pixbuf); } /* Test if camera is known in Lensfun */ const lfCamera **cameras = lf_db_find_cameras(lensdb, metadata->make_ascii, metadata->model_ascii); if (cameras) lensfun_camera_ok = TRUE; if (metadata->lens_min_focal > 0.0) lens_min_focal_ok = TRUE; if (metadata->lens_max_focal > 0.0) lens_max_focal_ok = TRUE; if (metadata->lens_max_aperture > 0.0) lens_max_aperture_ok = TRUE; if (metadata->lens_min_aperture > 0.0) lens_min_aperture_ok = TRUE; if (metadata->lens_id > 0.0) lens_id_ok = TRUE; if (metadata->lens_identifier) lens_identifier_ok = TRUE; if (test_dcp_profile(profile_factory, metadata->make_ascii, metadata->model_ascii)) dcp_profile_ok = TRUE; g_object_unref(metadata); } basename = g_path_get_basename(filename); printf("%s, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d, %d\n", basename, load_ok, filetype_ok, thumbnail_ok, load_meta_ok, make_ok, make_ascii_ok, model_ascii_ok, aperture_ok, iso_ok, shutterspeed_ok, wb_ok, focallength_ok, lensfun_camera_ok, lens_min_focal_ok, lens_max_focal_ok, lens_max_aperture_ok, lens_min_aperture_ok, lens_id_ok, lens_identifier_ok, dcp_profile_ok ); sum = load_ok +filetype_ok +thumbnail_ok +load_meta_ok +make_ok +make_ascii_ok +model_ascii_ok +aperture_ok +iso_ok +shutterspeed_ok +wb_ok +focallength_ok +lensfun_camera_ok +lens_min_focal_ok +lens_max_focal_ok +lens_max_aperture_ok +lens_min_aperture_ok +lens_id_ok +lens_identifier_ok +dcp_profile_ok; good += sum; bad += (20-sum); g_free(basename); g_free(filename); filename = next_filename; } printf("Passed: %d Failed: %d (%d%%)\n", good, bad, (good*100)/(good+bad)); g_io_channel_shutdown(io, TRUE, NULL); exit(0); } #if GTK_CHECK_VERSION(2,10,0) /* Default handler for GtkLinkButton's -copied almost verbatim from Bond2 */ static void runuri(GtkLinkButton *button, const gchar *link, gpointer user_data) { #ifdef WIN32 #warning This is untested gchar* argv[]= { getenv("ComSpec"), "/c", "start", "uri click", /* start needs explicit title incase link has spaces or quotes */ (gchar*)link, NULL }; #else gchar *argv[]= { "gnome-open", /* this feels like cheating! */ (gchar *) link, NULL }; #endif GError *error = NULL; gint status = 0; gboolean res; res = g_spawn_sync( NULL /*PWD*/, argv, NULL /*envp*/, G_SPAWN_SEARCH_PATH, /*flags*/ NULL, /*setup_func*/ NULL, /*user data for setup*/ NULL, NULL, /* stdin/out/error */ &status, &error); if(!res) { g_error("%s: %s\n", g_quark_to_string(error->domain), error->message); g_error_free(error); return ; } } #endif /* We use out own reentrant locking for GDK/GTK */ static GStaticRecMutex gdk_lock = G_STATIC_REC_MUTEX_INIT; static void rs_gdk_lock(void) { g_static_rec_mutex_lock (&gdk_lock); } static void rs_gdk_unlock(void) { g_static_rec_mutex_unlock (&gdk_lock); } #if defined(RS_USE_INTERNAL_STACKTRACE) #if defined (__x86_64__) #define PROG_COUNTER_REG REG_RIP #else #define PROG_COUNTER_REG REG_EIP #endif void segfault_sigaction(int signal, siginfo_t *si, void *arg) { ucontext_t *uc = (ucontext_t *)arg; void* caller_address = (void *) uc->uc_mcontext.gregs[PROG_COUNTER_REG]; if (signal == SIGSEGV) printf("\nCaught SIGSEGV requesting address: %p from %p\n\nBacktrace:\n", si->si_addr, caller_address); else if (signal == SIGILL) printf("\nCaught SIGILL at %p\n\nBacktrace:\n", caller_address); void* tracePtrs[100]; int count = backtrace( tracePtrs, 100 ); tracePtrs[1] = caller_address; char** funcNames = backtrace_symbols( tracePtrs, count ); int i; /* Print the stack trace */ for( i = 1; i < count; i++ ) printf("[%d]: %s\n", i, funcNames[i] ); printf("\nRegisters:\n"); #if defined (__x86_64__) unsigned long val = uc->uc_mcontext.gregs[REG_RAX]; printf("[rax]: 0x%08x%08x | ", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_RBX]; printf("[rbx]: 0x%08x%08x\n", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_RCX]; printf("[rcx]: 0x%08x%08x | ", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_RDX]; printf("[rdx]: 0x%08x%08x\n", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_RSI]; printf("[rsi]: 0x%08x%08x | ", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_RDI]; printf("[rdi]: 0x%08x%08x\n", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_R8]; printf("[r08]: 0x%08x%08x | ", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_R9]; printf("[r09]: 0x%08x%08x\n", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_R10]; printf("[r10]: 0x%08x%08x | ", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_R11]; printf("[r11]: 0x%08x%08x\n", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_R12]; printf("[r12]: 0x%08x%08x | ", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_R13]; printf("[r13]: 0x%08x%08x\n", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_R14]; printf("[r14]: 0x%08x%08x | ", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_R15]; printf("[r15]: 0x%08x%08x\n", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_RSP]; printf("[rsp]: 0x%08x%08x | ", (int)(val>>32), (int)(val&0xffffffff)); val = uc->uc_mcontext.gregs[REG_RIP]; printf("[rip]: 0x%08x%08x\n", (int)(val>>32), (int)(val&0xffffffff)); guint32 *mregs = (guint32*)uc->uc_mcontext.fpregs->_xmm; for( i = 0; i < 8; i++) { printf("xmm%02d: %08x %08x %08x %08x |", i*2, mregs[i*2*4+3],mregs[i*2*4+2],mregs[i*2*4+1], mregs[i*2*4]); printf("xmm%02d: %08x %08x %08x %08x\n", i*2+1, mregs[i*2*4+3+4],mregs[i*2*4+2+4],mregs[i*2*4+1+4], mregs[i*2*4+4]); } #endif #if defined (__i386__) unsigned int val = uc->uc_mcontext.gregs[REG_EAX]; printf("[eax]: 0x%08x | ", val); val = uc->uc_mcontext.gregs[REG_EBX]; printf("[ebx]: 0x%08x\n", val); val = uc->uc_mcontext.gregs[REG_ECX]; printf("[ecx]: 0x%08x | ", val); val = uc->uc_mcontext.gregs[REG_EDX]; printf("[edx]: 0x%08x\n", val); val = uc->uc_mcontext.gregs[REG_ESI]; printf("[esi]: 0x%08x | ", val); val = uc->uc_mcontext.gregs[REG_EDI]; printf("[edi]: 0x%08x\n", val); val = uc->uc_mcontext.gregs[REG_ESP]; printf("[esp]: 0x%08x | ", val); val = uc->uc_mcontext.gregs[REG_EIP]; printf("[eip]: 0x%08x\n", val); #endif g_error("\nPlease file a bugreport at http://bugzilla.rawstudio.org/ including the information above, thanks!\n"); /* Free the string pointers */ free( funcNames ); exit(0); } #endif // defined(RS_USE_INTERNAL_STACKTRACE) static RS_BLOB* main_blob = NULL; RS_BLOB* rs_get_blob(void) { return main_blob; } int main(int argc, char **argv) { RS_BLOB *rs; gboolean do_test = FALSE; gboolean use_system_theme = DEFAULT_CONF_USE_SYSTEM_THEME; gchar *debug = NULL; GError *error = NULL; GOptionContext *option_context; const GOptionEntry option_entries[] = { { "debug", 'd', 0, G_OPTION_ARG_STRING, &debug, "Debug flags to use", "flags" }, { "do-tests", 't', G_OPTION_FLAG_HIDDEN, G_OPTION_ARG_NONE, &do_test, "Do internal tests", NULL }, { NULL } }; #if defined(RS_USE_INTERNAL_STACKTRACE) struct sigaction sa; memset(&sa, 0, sizeof(sigaction)); sigemptyset(&sa.sa_mask); sa.sa_sigaction = segfault_sigaction; sa.sa_flags = SA_SIGINFO; sigaction(SIGSEGV, &sa, NULL); sigaction(SIGILL, &sa, NULL); #endif #ifdef WITH_GCONF GConfClient *client; #endif option_context = g_option_context_new(""); g_option_context_add_main_entries(option_context, option_entries, NULL); g_option_context_add_group(option_context, gtk_get_option_group(FALSE)); if (!g_option_context_parse(option_context, &argc, &argv, &error)) { g_print("option parsing failed: %s\n", error->message); exit(1); } if (debug) rs_debug_setup(debug); gdk_threads_set_lock_functions(rs_gdk_lock, rs_gdk_unlock); g_thread_init(NULL); gdk_threads_init(); #ifdef ENABLE_NLS bindtextdomain(GETTEXT_PACKAGE, PACKAGE_LOCALE_DIR); bind_textdomain_codeset(GETTEXT_PACKAGE, "UTF-8"); textdomain(GETTEXT_PACKAGE); #endif /* Make sure the GType system is initialized */ g_type_init(); /* Switch to rawstudio theme before any drawing if needed */ rs_conf_get_boolean_with_default(CONF_USE_SYSTEM_THEME, &use_system_theme, DEFAULT_CONF_USE_SYSTEM_THEME); if (!use_system_theme) gui_select_theme(RAWSTUDIO_THEME); gtk_init(&argc, &argv); check_install(); rs_filetype_init(); rs_plugin_manager_load_all_plugins(); #ifdef WITH_GCONF /* Add our own directory to default GConfClient before anyone uses it */ client = gconf_client_get_default(); gconf_client_add_dir(client, "/apps/" PACKAGE, GCONF_CLIENT_PRELOAD_NONE, NULL); #endif rs = main_blob = rs_new(); rs_stock_init(); rs_lens_fix_init(); #if GTK_CHECK_VERSION(2,10,0) gtk_link_button_set_uri_hook(runuri,NULL,NULL); #endif // g_log_set_always_fatal(G_LOG_LEVEL_CRITICAL | G_LOG_LEVEL_ERROR); if (do_test) test(); else gui_init(argc, argv, rs); /* This is so fucking evil, but Rawstudio will deadlock in some GTK atexit() function from time to time :-/ */ _exit(0); } rawstudio-2.0/src/gtk-progress.c0000644000175000017500000001235111526533645013713 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include "application.h" #include "gettext.h" #include "gtk-progress.h" #include "gtk-interface.h" struct _RS_PROGRESS { GtkWidget *window; GtkWidget *progressbar; GtkWidget *frame; GtkWidget *vbox; gint items; gint current; const gchar *title; gdouble delay; GTimer *lifetime; }; static gboolean gui_progress_destroy(GtkWidget *widget, GdkEvent *event, RS_PROGRESS *rsp) { rsp->progressbar = NULL; return(TRUE); } /** * Initialize a new RS_PROGRESS * @return A new RS_PROGRESS */ static RS_PROGRESS * gui_progress_init(const gchar *title) { extern GtkWindow *rawstudio_window; GtkWidget *alignment; RS_PROGRESS *rsp; rsp = g_new(RS_PROGRESS, 1); rsp->progressbar = gtk_progress_bar_new(); alignment = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 5, 5, 5, 5); rsp->frame = gtk_frame_new(_("Progress")); gtk_container_set_border_width (GTK_CONTAINER (rsp->frame), 5); rsp->vbox = gtk_vbox_new(FALSE, 2); rsp->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_resize (GTK_WINDOW(rsp->window), 400, 50); g_signal_connect(G_OBJECT(rsp->window), "delete_event", G_CALLBACK(gui_progress_destroy), rsp); gtk_widget_realize (rsp->window); gdk_window_set_type_hint(rsp->window->window, GDK_WINDOW_TYPE_HINT_UTILITY); gtk_window_set_position(GTK_WINDOW(rsp->window), GTK_WIN_POS_CENTER_ON_PARENT); gtk_window_set_title(GTK_WINDOW(rsp->window), title); gtk_window_set_transient_for(GTK_WINDOW (rsp->window), rawstudio_window); gtk_box_pack_start(GTK_BOX(rsp->vbox), rsp->frame, TRUE, TRUE, 0); gtk_container_add (GTK_CONTAINER (rsp->window), rsp->vbox); gtk_container_add (GTK_CONTAINER (rsp->frame), alignment); gtk_container_add (GTK_CONTAINER (alignment), rsp->progressbar); rsp->items = 1; rsp->current = 0; rsp->title = NULL; rsp->delay = -1.0f; rsp->lifetime = NULL; gui_progress_set_current(rsp, 0); return(rsp); } RS_PROGRESS * gui_progress_new(const gchar *title, gint items) { RS_PROGRESS *rsp = gui_progress_init(title); if (items==0) items = 1; if (title) gtk_frame_set_label(GTK_FRAME(rsp->frame), _("Progress")); rsp->items = items; rsp->current = 0; gui_progress_set_current(rsp, 0); gtk_widget_show_all(rsp->window); return(rsp); } /** * Shows a new progress bar with an initial delay, otherwise behaves like gui_progress_new() * @param title The title to use for the progress bar * @param items How many items must be processed * @param delay The delay in milliseconds * @return A new RS_PROGRESS */ RS_PROGRESS * gui_progress_new_with_delay(const gchar *title, gint items, gint delay) { RS_PROGRESS *rsp = gui_progress_init(title); if (items==0) items = 1; if (title) gtk_frame_set_label(GTK_FRAME(rsp->frame), _("Progress")); rsp->items = items; rsp->current = 0; rsp->delay = ((gdouble)delay)/1000.0f; rsp->lifetime = g_timer_new(); gui_progress_set_current(rsp, 0); return(rsp); } void gui_progress_free(RS_PROGRESS *rsp) { extern GtkWindow *rawstudio_window; gtk_widget_destroy(rsp->window); /* Free the GTimer if needed */ if (rsp->lifetime) g_timer_destroy(rsp->lifetime); g_free(rsp); gtk_window_present(rawstudio_window); } void gui_progress_advance_one(RS_PROGRESS *rsp) { rsp->current++; gui_progress_set_current(rsp, rsp->current); } void gui_progress_set_current(RS_PROGRESS *rsp, gint current) { GString *gs; rsp->current = current; if (!rsp->progressbar) return; /* Show the widget if we're past the initial delay */ if ((rsp->delay>-1.0f) && (g_timer_elapsed(rsp->lifetime, NULL) > rsp->delay)) { gtk_widget_show_all(rsp->window); gtk_window_present(GTK_WINDOW(rsp->window)); } gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(rsp->progressbar), ((gdouble)rsp->current)/((gdouble)rsp->items)); gs = g_string_new(NULL); g_string_printf(gs, "%d/%d", rsp->current, rsp->items); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(rsp->progressbar), gs->str); g_string_free(gs, TRUE); /* Lock if needed */ if (g_main_depth() == 0) { gdk_threads_enter(); GTK_CATCHUP(); gdk_threads_leave(); } else GTK_CATCHUP(); } void gui_progress_add_widget(RS_PROGRESS *rsp, GtkWidget *widget) { GtkWidget *alignment; alignment = gtk_alignment_new (0.5, 0.5, 1, 1); gtk_alignment_set_padding (GTK_ALIGNMENT (alignment), 5, 5, 5, 5); gtk_container_add (GTK_CONTAINER (alignment), widget); gtk_box_pack_start(GTK_BOX(rsp->vbox), alignment, FALSE, FALSE, 0); } rawstudio-2.0/src/rs-camera-db.h0000644000175000017500000000404611535504061013516 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_CAMERA_DB_H #define RS_CAMERA_DB_H #include #include "application.h" G_BEGIN_DECLS #define RS_TYPE_CAMERA_DB rs_camera_db_get_type() #define RS_CAMERA_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_CAMERA_DB, RSCameraDb)) #define RS_CAMERA_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_CAMERA_DB, RSCameraDbClass)) #define RS_IS_CAMERA_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_CAMERA_DB)) #define RS_IS_CAMERA_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_CAMERA_DB)) #define RS_CAMERA_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_CAMERA_DB, RSCameraDbClass)) typedef struct _RSCameraDb RSCameraDb; typedef struct { GObjectClass parent_class; } RSCameraDbClass; GType rs_camera_db_get_type(void); RSCameraDb *rs_camera_db_new(const gchar *path); RSCameraDb *rs_camera_db_get_singleton(void); void rs_camera_db_save_defaults(RSCameraDb *camera_db, RS_PHOTO *photo); gboolean rs_camera_db_photo_get_defaults(RSCameraDb *camera_db, RS_PHOTO *photo, RSSettings **dest_settings, gpointer *dest_profile); gboolean rs_camera_db_photo_set_defaults(RSCameraDb *camera_db, RS_PHOTO *photo); G_END_DECLS #endif /* RS_CAMERA_DB_H */ rawstudio-2.0/src/filename.h0000644000175000017500000000210111526533645013041 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 FILENAME_H #define FILENAME_H gchar *filename_parse(const gchar *in, const gchar *filename, const gint snapshot); extern GtkWidget *rs_filename_chooser_button_new(gchar **filename, const gchar *conf_key); #endif rawstudio-2.0/src/rs-cache.c0000644000175000017500000003757211537764507012772 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include #include "application.h" #include "rs-cache.h" #include "rs-photo.h" /* This will be written to XML files for making backward compatibility easier to implement */ #define CACHEVERSION 5 gchar * rs_cache_get_name(const gchar *src) { gchar *ret=NULL; gchar *dotdir, *filename; GString *out; dotdir = rs_dotdir_get(src); filename = g_path_get_basename(src); if (dotdir) { out = g_string_new(dotdir); out = g_string_append(out, G_DIR_SEPARATOR_S); out = g_string_append(out, filename); out = g_string_append(out, ".cache.xml"); ret = out->str; g_string_free(out, FALSE); g_free(dotdir); } g_free(filename); return(ret); } void rs_cache_save(RS_PHOTO *photo, const RSSettingsMask mask) { gint id; xmlTextWriterPtr writer; gchar *cachename; if (!photo->filename) return; cachename = rs_cache_get_name(photo->filename); if (!cachename) return; writer = xmlNewTextWriterFilename(cachename, 0); /* fixme, check for errors */ xmlTextWriterSetIndent(writer, 1); xmlTextWriterStartDocument(writer, NULL, "ISO-8859-1", NULL); xmlTextWriterStartElement(writer, BAD_CAST "rawstudio-cache"); xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "version", "%d", CACHEVERSION); xmlTextWriterWriteFormatElement(writer, BAD_CAST "priority", "%d", photo->priority); if (photo->exported) xmlTextWriterWriteFormatElement(writer, BAD_CAST "exported", "yes"); xmlTextWriterWriteFormatElement(writer, BAD_CAST "orientation", "%d", photo->orientation); xmlTextWriterWriteFormatElement(writer, BAD_CAST "angle", "%f", photo->angle); RSDcpFile *dcp = rs_photo_get_dcp_profile(photo); if (RS_IS_DCP_FILE(dcp)) { const gchar *dcp_id = rs_dcp_get_id(RS_DCP_FILE(dcp)); xmlTextWriterWriteFormatElement(writer, BAD_CAST "dcp-profile", "%s", dcp_id); } RSIccProfile *icc = rs_photo_get_icc_profile(photo); if (RS_IS_ICC_PROFILE(icc)) { const gchar *icc_filename; g_object_get(icc, "filename", &icc_filename, NULL); if (icc_filename) { gchar *basename = g_path_get_basename(icc_filename); xmlTextWriterWriteFormatElement(writer, BAD_CAST "icc-profile", "%s", basename); g_free(basename); } } if (photo->crop) { xmlTextWriterWriteFormatElement(writer, BAD_CAST "crop", "%d %d %d %d", photo->crop->x1, photo->crop->y1, photo->crop->x2, photo->crop->y2); } for(id=0;id<3&&mask>0;id++) { xmlTextWriterStartElement(writer, BAD_CAST "settings"); xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "id", "%d", id); rs_cache_save_settings(photo->settings[id], mask, writer); xmlTextWriterEndElement(writer); } xmlTextWriterEndDocument(writer); xmlFreeTextWriter(writer); g_free(cachename); return; } void rs_cache_save_settings(RSSettings *rss, const RSSettingsMask mask, xmlTextWriterPtr writer) { if (mask & MASK_EXPOSURE) xmlTextWriterWriteFormatElement(writer, BAD_CAST "exposure", "%f", rss->exposure); if (mask & MASK_SATURATION) xmlTextWriterWriteFormatElement(writer, BAD_CAST "saturation", "%f", rss->saturation); if (mask & MASK_HUE) xmlTextWriterWriteFormatElement(writer, BAD_CAST "hue", "%f", rss->hue); if (mask & MASK_CONTRAST) xmlTextWriterWriteFormatElement(writer, BAD_CAST "contrast", "%f", rss->contrast); if (mask & MASK_WARMTH) xmlTextWriterWriteFormatElement(writer, BAD_CAST "warmth", "%f", rss->dcp_temp); if (mask & MASK_TINT) xmlTextWriterWriteFormatElement(writer, BAD_CAST "tint", "%f", rss->dcp_tint); if (mask & MASK_WB && rss->wb_ascii) xmlTextWriterWriteFormatElement(writer, BAD_CAST "wb_ascii", "%s", rss->wb_ascii); if (mask & MASK_SHARPEN) xmlTextWriterWriteFormatElement(writer, BAD_CAST "sharpen", "%f", rss->sharpen); if (mask & MASK_DENOISE_LUMA) xmlTextWriterWriteFormatElement(writer, BAD_CAST "denoise_luma", "%f", rss->denoise_luma); if (mask & MASK_DENOISE_CHROMA) xmlTextWriterWriteFormatElement(writer, BAD_CAST "denoise_chroma", "%f", rss->denoise_chroma); if (mask & MASK_CHANNELMIXER) { xmlTextWriterWriteFormatElement(writer, BAD_CAST "channelmixer_red", "%f", rss->channelmixer_red); xmlTextWriterWriteFormatElement(writer, BAD_CAST "channelmixer_green", "%f", rss->channelmixer_green); xmlTextWriterWriteFormatElement(writer, BAD_CAST "channelmixer_blue", "%f", rss->channelmixer_blue); } if (mask & MASK_TCA_KR) xmlTextWriterWriteFormatElement(writer, BAD_CAST "tca_kr", "%f", rss->tca_kr); if (mask & MASK_TCA_KB) xmlTextWriterWriteFormatElement(writer, BAD_CAST "tca_kb", "%f", rss->tca_kb); if (mask & MASK_VIGNETTING) xmlTextWriterWriteFormatElement(writer, BAD_CAST "vignetting", "%f", rss->vignetting); if (mask & MASK_CURVE && rss->curve_nknots > 0) { gint i; xmlTextWriterStartElement(writer, BAD_CAST "curve"); xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "num", "%d", rss->curve_nknots); for(i=0;icurve_nknots;i++) xmlTextWriterWriteFormatElement(writer, BAD_CAST "knot", "%f %f", rss->curve_knots[i*2+0], rss->curve_knots[i*2+1]); xmlTextWriterEndElement(writer); } } guint rs_cache_load_setting(RSSettings *rss, xmlDocPtr doc, xmlNodePtr cur, gint version) { RSSettingsMask mask = 0; xmlChar *val; gfloat *target=NULL; xmlNodePtr curve = NULL; while(cur) { target = NULL; if ((!xmlStrcmp(cur->name, BAD_CAST "exposure"))) { mask |= MASK_EXPOSURE; target = &rss->exposure; } else if ((!xmlStrcmp(cur->name, BAD_CAST "saturation"))) { mask |= MASK_SATURATION; target = &rss->saturation; } else if ((!xmlStrcmp(cur->name, BAD_CAST "hue"))) { mask |= MASK_HUE; target = &rss->hue; } else if ((!xmlStrcmp(cur->name, BAD_CAST "contrast"))) { mask |= MASK_CONTRAST; target = &rss->contrast; } else if ((!xmlStrcmp(cur->name, BAD_CAST "warmth"))) { if ( version <= 4) { mask |= MASK_WARMTH; target = &rss->warmth; rss->recalc_temp = TRUE; } else { mask |= MASK_WARMTH; target = &rss->dcp_temp; } } else if ((!xmlStrcmp(cur->name, BAD_CAST "tint"))) { if ( version <= 4) { mask |= MASK_TINT; target = &rss->tint; rss->recalc_temp = TRUE; } else { mask |= MASK_TINT; target = &rss->dcp_tint; } } else if ((!xmlStrcmp(cur->name, BAD_CAST "wb_ascii"))) { mask |= MASK_WB; val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); rss->wb_ascii = g_strdup((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "sharpen"))) { mask |= MASK_SHARPEN; target = &rss->sharpen; } else if ((!xmlStrcmp(cur->name, BAD_CAST "denoise_luma"))) { mask |= MASK_DENOISE_LUMA; target = &rss->denoise_luma; } else if ((!xmlStrcmp(cur->name, BAD_CAST "denoise_chroma"))) { mask |= MASK_DENOISE_CHROMA; target = &rss->denoise_chroma; } else if ((!xmlStrcmp(cur->name, BAD_CAST "channelmixer_red"))) { mask |= MASK_CHANNELMIXER_RED; val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); rss->channelmixer_red = rs_atof((gchar *) val); xmlFree(val); if (version < 4) rss->channelmixer_red *= 3.0; } else if ((!xmlStrcmp(cur->name, BAD_CAST "channelmixer_green"))) { mask |= MASK_CHANNELMIXER_GREEN; val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); rss->channelmixer_green = rs_atof((gchar *) val); xmlFree(val); if (version < 4) rss->channelmixer_green *= 3.0; } else if ((!xmlStrcmp(cur->name, BAD_CAST "channelmixer_blue"))) { mask |= MASK_CHANNELMIXER_BLUE; val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); rss->channelmixer_blue = rs_atof((gchar *) val); xmlFree(val); if (version < 4) rss->channelmixer_blue *= 3.0; } else if ((!xmlStrcmp(cur->name, BAD_CAST "tca_kr"))) { mask |= MASK_TCA_KR; val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); rss->tca_kr = rs_atof((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "tca_kb"))) { mask |= MASK_TCA_KB; val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); rss->tca_kb = rs_atof((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "vignetting"))) { mask |= MASK_VIGNETTING; val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); rss->vignetting = rs_atof((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "curve"))) { gchar **vals; gint num; gfloat x,y; val = xmlGetProp(cur, BAD_CAST "num"); if (val) num = atoi((gchar *) val); else num = 0; rss->curve_knots = g_new(gfloat, 2*num); rss->curve_nknots = 0; curve = cur->xmlChildrenNode; while (curve && num) { if ((!xmlStrcmp(curve->name, BAD_CAST "knot"))) { mask |= MASK_CURVE; val = xmlNodeListGetString(doc, curve->xmlChildrenNode, 1); vals = g_strsplit((gchar *)val, " ", 4); if (vals[0] && vals[1]) { x = rs_atof(vals[0]); y = rs_atof(vals[1]); rss->curve_knots[rss->curve_nknots*2+0] = x; rss->curve_knots[rss->curve_nknots*2+1] = y; rss->curve_nknots++; num--; } g_strfreev(vals); xmlFree(val); } curve = curve->next; } } if (target) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); *target = rs_atof((gchar *) val); xmlFree(val); } cur = cur->next; } return mask; } guint rs_cache_load(RS_PHOTO *photo) { RSSettingsMask mask = 0; xmlDocPtr doc; xmlNodePtr cur; xmlChar *val; gchar *cachename; gint id; gint version = 0; RSSettings *settings; cachename = rs_cache_get_name(photo->filename); if (!cachename) return mask; if (!g_file_test(cachename, G_FILE_TEST_IS_REGULAR)) return FALSE; photo->exported = FALSE; doc = xmlParseFile(cachename); if(doc==NULL) return mask; /* Return something if the file exists */ mask = 0x80000000; cur = xmlDocGetRootElement(doc); if ((!xmlStrcmp(cur->name, BAD_CAST "rawstudio-cache"))) { val = xmlGetProp(cur, BAD_CAST "version"); if (val) version = atoi((gchar *) val); } cur = cur->xmlChildrenNode; while(cur) { if ((!xmlStrcmp(cur->name, BAD_CAST "settings"))) { val = xmlGetProp(cur, BAD_CAST "id"); id = (val) ? atoi((gchar *) val) : 0; xmlFree(val); if (id>2) id=0; if (id<0) id=0; settings = rs_settings_new(); mask |= rs_cache_load_setting(settings, doc, cur->xmlChildrenNode, version); rs_photo_apply_settings(photo, id, settings, MASK_ALL); g_object_unref(settings); } else if ((!xmlStrcmp(cur->name, BAD_CAST "priority"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (val) { photo->priority = atoi((gchar *) val); xmlFree(val); } } else if ((!xmlStrcmp(cur->name, BAD_CAST "orientation"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (val) { photo->orientation = atoi((gchar *) val); xmlFree(val); } } else if ((!xmlStrcmp(cur->name, BAD_CAST "angle"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (val) { photo->angle = rs_atof((gchar *) val); xmlFree(val); } } else if ((!xmlStrcmp(cur->name, BAD_CAST "exported"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (val) { if (g_ascii_strcasecmp((gchar *) val, "yes")==0) photo->exported = TRUE; xmlFree(val); } } else if ((!xmlStrcmp(cur->name, BAD_CAST "dcp-profile"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (val) { RSProfileFactory *factory = rs_profile_factory_new_default(); RSDcpFile *dcp = rs_profile_factory_find_from_id(factory, (gchar *) val); if (dcp) rs_photo_set_dcp_profile(photo, dcp); xmlFree(val); } } else if ((!xmlStrcmp(cur->name, BAD_CAST "icc-profile"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (val) { RSProfileFactory *factory = rs_profile_factory_new_default(); RSIccProfile *icc = rs_profile_factory_find_icc_from_filename(factory, (gchar *) val); if (icc) rs_photo_set_icc_profile(photo, icc); xmlFree(val); } } else if ((!xmlStrcmp(cur->name, BAD_CAST "crop"))) { RS_RECT *crop = g_new0(RS_RECT, 1); gchar **vals = NULL; val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (val) vals = g_strsplit((gchar *)val, " ", 4); if (val && vals[0]) { crop->x1 = atoi((gchar *) vals[0]); if (vals[1]) { crop->y1 = atoi((gchar *) vals[1]); if (vals[2]) { crop->x2 = atoi((gchar *) vals[2]); if (vals[3]) crop->y2 = atoi((gchar *) vals[3]); } } } /* If crop was done before demosaic was implemented, we should double the dimensions */ if (version < 2) { crop->x1 *= 2; crop->y1 *= 2; crop->x2 *= 2; crop->y2 *= 2; } rs_photo_set_crop(photo, crop); g_free(crop); g_strfreev(vals); xmlFree(val); } cur = cur->next; } xmlFreeDoc(doc); g_free(cachename); return mask; } void rs_cache_load_quick(const gchar *filename, gint *priority, gboolean *exported) { xmlDocPtr doc; xmlNodePtr cur; xmlChar *val; gchar *cachename; if (priority) *priority = PRIO_U; if (exported) *exported = FALSE; if (!filename) return; cachename = rs_cache_get_name(filename); if (!cachename) return; if (!g_file_test(cachename, G_FILE_TEST_IS_REGULAR)) { g_free(cachename); return; } doc = xmlParseFile(cachename); g_free(cachename); if(doc==NULL) return; cur = xmlDocGetRootElement(doc); cur = cur->xmlChildrenNode; while(cur) { if (priority && (!xmlStrcmp(cur->name, BAD_CAST "priority"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); *priority = atoi((gchar *) val); xmlFree(val); } if (exported && (!xmlStrcmp(cur->name, BAD_CAST "exported"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); if (g_ascii_strcasecmp((gchar *) val, "yes")==0) *exported = TRUE; xmlFree(val); } cur = cur->next; } xmlFreeDoc(doc); return; } void rs_cache_save_flags(const gchar *filename, const guint *priority, const gboolean *exported) { RS_PHOTO *photo; RSSettingsMask mask; g_assert(filename != NULL); if (!(priority || exported)) return; /* Aquire a "fake" RS_PHOTO */ photo = rs_photo_new(); photo->filename = (gchar *) filename; if ((mask = rs_cache_load(photo))) { /* If we got a cache file, save as normal */ if (priority) photo->priority = *priority; if (exported) photo->exported = *exported; rs_cache_save(photo, mask); } else { /* If we're creating a new file, only save what we know */ xmlTextWriterPtr writer; gchar *cachename = rs_cache_get_name(photo->filename); if (cachename) { writer = xmlNewTextWriterFilename(cachename, 0); /* fixme, check for errors */ g_free(cachename); xmlTextWriterStartDocument(writer, NULL, "ISO-8859-1", NULL); xmlTextWriterStartElement(writer, BAD_CAST "rawstudio-cache"); if (priority) xmlTextWriterWriteFormatElement(writer, BAD_CAST "priority", "%d", *priority); if (exported && *exported) xmlTextWriterWriteFormatElement(writer, BAD_CAST "exported", "yes"); xmlTextWriterEndDocument(writer); xmlFreeTextWriter(writer); } } /* Free the photo */ photo->filename = NULL; g_object_unref(photo); return; } rawstudio-2.0/src/rs-external-editor.h0000644000175000017500000000204211526533645015015 00000000000000/* * Copyright (C) 2006-2011 Anders Brander , * Anders Kvist and Klaus Post * * 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 RS_EXTERNAL_EDITOR_H #define RS_EXTERNAL_EDITOR_H extern gboolean rs_external_editor_gimp(RS_PHOTO *photo, RSFilter *prior_to_resample, guint snapshot); #endif /* RS_EXTERNAL_EDITOR_H */ rawstudio-2.0/src/rs-tag-gui.c0000644000175000017500000001336511526533645013251 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-library.h" #include "rs-tag-gui.h" #include "rs-store.h" #include "gtk-interface.h" #include "conf_interface.h" #include "config.h" #include "gettext.h" static GtkWidget *tag_search_entry = NULL; /* Carrier used for a few callbacks */ typedef struct { RSLibrary *library; RSStore *store; } cb_carrier; static void load_photos(gpointer data, gpointer user_data) { RSStore *store = user_data; gchar *text = (gchar *) data; /* FIXME: Change this to be signal based at some point */ rs_store_load_file(store, text); g_free(text); } static void search_changed(GtkEntry *entry, gpointer user_data) { cb_carrier *carrier = user_data; const gchar *text = gtk_entry_get_text(entry); GList *tags = rs_split_string(text, " "); GList *photos = rs_library_search(carrier->library, tags); /* FIXME: deselect all photos in store */ rs_store_remove(carrier->store, NULL, NULL); g_list_foreach(photos, load_photos, carrier->store); /* Fix size of iconview */ rs_store_set_iconview_size(carrier->store, g_list_length(photos)); GString *window_title = g_string_new(""); g_string_printf(window_title, _("Tag search [%s]"), text); rs_window_set_title(window_title->str); g_string_free(window_title, TRUE); rs_conf_set_string(CONF_LIBRARY_TAG_SEARCH, text); rs_conf_unset(CONF_LWD); g_list_free(photos); g_list_free(tags); } GtkWidget * rs_tag_gui_toolbox_new(RSLibrary *library, RSStore *store) { g_assert(RS_IS_LIBRARY(library)); g_assert(RS_IS_STORE(store)); cb_carrier *carrier = g_new(cb_carrier, 1); GtkWidget *box = gtk_vbox_new(FALSE, 0); tag_search_entry = rs_library_tag_entry_new(library); carrier->library = library; carrier->store = store; g_signal_connect (tag_search_entry, "changed", G_CALLBACK (search_changed), carrier); gtk_box_pack_start (GTK_BOX(box), tag_search_entry, FALSE, TRUE, 0); /* FIXME: Make sure to free carrier at some point */ return box; } GtkWidget * rs_library_tag_entry_new(RSLibrary *library) { g_assert(RS_IS_LIBRARY(library)); gboolean selected(GtkEntryCompletion *completion, GtkTreeModel *model, GtkTreeIter *iter, gpointer user_data) { GtkEntry *entry = GTK_ENTRY(gtk_entry_completion_get_entry(completion)); gchar *current_text, *new_text; gchar *tag; gchar *target; gtk_tree_model_get (model, iter, 0, &tag, -1); current_text = g_strdup(gtk_entry_get_text(entry)); /* Try to find the last tag entered */ target = g_utf8_strrchr(current_text, -1, ' '); if (target) target++; else target = current_text; /* End the string just as the last tag starts */ *target = '\0'; /* Append selected tag */ new_text = g_strconcat(current_text, tag, NULL); gtk_entry_set_text(entry, new_text); gtk_editable_set_position(GTK_EDITABLE(entry), -1); g_free(current_text); g_free(new_text); return TRUE; } gboolean match(GtkEntryCompletion *completion, const gchar *key, GtkTreeIter *iter, gpointer user_data) { gboolean found = FALSE; GtkTreeModel *model; const gchar *needle; gchar *needle_normalized = NULL; gchar *needle_case_normalized = NULL; gchar *tag = NULL; gchar *tag_normalized = NULL; gchar *tag_case_normalized = NULL; /* Look for last tag if found */ needle = g_utf8_strrchr(key, ' ',-1); if (needle) needle += 1; else needle = key; needle_normalized = g_utf8_normalize(needle, -1, G_NORMALIZE_ALL); if (needle_normalized) { needle_case_normalized = g_utf8_casefold(needle_normalized, -1); model = gtk_entry_completion_get_model (completion); gtk_tree_model_get (model, iter, 0, &tag, -1); if (tag) { tag_normalized = g_utf8_normalize(tag, -1, G_NORMALIZE_ALL); if (tag_normalized) { tag_case_normalized = g_utf8_casefold(tag_normalized, -1); if (g_str_has_prefix(tag_case_normalized, needle_case_normalized)) found = TRUE; } } } g_free(needle_normalized); g_free(needle_case_normalized); g_free(tag); g_free(tag_normalized); g_free(tag_case_normalized); return found; } GtkWidget *entry = gtk_entry_new(); GtkEntryCompletion *completion = gtk_entry_completion_new(); GtkListStore *store = gtk_list_store_new(1, G_TYPE_STRING); GList *all_tags = rs_library_find_tag(library, ""); GtkTreeIter iter; GList *node; for (node = g_list_first(all_tags); node != NULL; node = g_list_next(node)) { gchar *tag = node->data; gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, 0, tag, -1); g_free(tag); } gtk_entry_completion_set_model(completion, GTK_TREE_MODEL(store)); gtk_entry_completion_set_text_column(completion, 0); gtk_entry_completion_set_match_func(completion, match, NULL, NULL); g_signal_connect(completion, "match-selected", G_CALLBACK(selected), NULL); gtk_entry_set_completion (GTK_ENTRY(entry), completion); g_list_free(all_tags); return entry; } gboolean rs_library_set_tag_search(gchar *str) { if (!str) return FALSE; gtk_entry_set_text(GTK_ENTRY(tag_search_entry), str); return TRUE; } rawstudio-2.0/src/rs-photo.h0000644000175000017500000002374411543674627013061 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_PHOTO_H #define RS_PHOTO_H #include "application.h" #include #define RS_TYPE_PHOTO (rs_photo_get_type ()) #define RS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_PHOTO, RS_PHOTO)) #define RS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_PHOTO, RS_PHOTOClass)) #define RS_IS_PHOTO(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_PHOTO)) #define RS_IS_PHOTO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_PHOTO)) #define RS_PHOTO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_PHOTO, RS_PHOTOClass)) typedef struct _RS_PHOTOClass RS_PHOTOClass; struct _RS_PHOTOClass { GObjectClass parent; }; GType rs_photo_get_type (void); /* Please note that this is not a bitmask */ enum { PRIO_U = 0, PRIO_D = 51, PRIO_1 = 1, PRIO_2 = 2, PRIO_3 = 3, PRIO_ALL = 255 }; /** * Allocates a new RS_PHOTO * @return A new RS_PHOTO */ extern RS_PHOTO *rs_photo_new(void); /** * Rotates a RS_PHOTO * @param photo A RS_PHOTO * @param quarterturns How many quarters to turn * @param angle The angle in degrees (360 is whole circle) to turn the image */ extern void rs_photo_rotate(RS_PHOTO *photo, const gint quarterturns, const gdouble angle); /** * Sets a new crop of a RS_PHOTO * @param photo A RS_PHOTO * @param crop The new crop or NULL to remove previous cropping */ extern void rs_photo_set_crop(RS_PHOTO *photo, const RS_RECT *crop); /** * Gets the crop of a RS_PHOTO * @param photo A RS_PHOTO * @return The crop as a RS_RECT or NULL if the photo is uncropped */ extern RS_RECT *rs_photo_get_crop(RS_PHOTO *photo); /** * Set the angle of a RS_PHOTO * @param photo A RS_PHOTO * @param angle The new angle * @param relative If set to TRUE, angle will be relative to existing angle */ extern void rs_photo_set_angle(RS_PHOTO *photo, gdouble angle, gboolean relative); /** * Get the angle of a RS_PHOTO * @param photo A RS_PHOTO * @return The current angle */ extern gdouble rs_photo_get_angle(RS_PHOTO *photo); /** * Get the exposure of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot A snapshot * @return The current value */ extern gdouble rs_photo_get_exposure(RS_PHOTO *photo, const gint snapshot); /** * Get the saturation of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot A snapshot * @return The current value */ extern gdouble rs_photo_get_saturation(RS_PHOTO *photo, const gint snapshot); /** * Get the hue of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot A snapshot * @return The current value */ extern gdouble rs_photo_get_hue(RS_PHOTO *photo, const gint snapshot); /** * Get the contrast of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot A snapshot * @return The current value */ extern gdouble rs_photo_get_contrast(RS_PHOTO *photo, const gint snapshot); /** * Get the warmth of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot A snapshot * @return The current value */ extern gdouble rs_photo_get_warmth(RS_PHOTO *photo, const gint snapshot); /** * Get the tint of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot A snapshot * @return The current value */ extern gdouble rs_photo_get_tint(RS_PHOTO *photo, const gint snapshot); /** * Get the sharpen of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot A snapshot * @return The current value */ extern gdouble rs_photo_get_sharpen(RS_PHOTO *photo, const gint snapshot); /** * Set the exposure of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param value The new value */ extern void rs_photo_set_exposure(RS_PHOTO *photo, const gint snapshot, const gdouble value); /** * Set the saturation of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param value The new value */ extern void rs_photo_set_saturation(RS_PHOTO *photo, const gint snapshot, const gdouble value); /** * Set the hue of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param value The new value */ extern void rs_photo_set_hue(RS_PHOTO *photo, const gint snapshot, const gdouble value); /** * Set the contrast of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param value The new value */ extern void rs_photo_set_contrast(RS_PHOTO *photo, const gint snapshot, const gdouble value); /** * Set the warmth of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param value The new value */ extern void rs_photo_set_warmth(RS_PHOTO *photo, const gint snapshot, const gdouble value); /** * Set the tint of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param value The new value */ extern void rs_photo_set_tint(RS_PHOTO *photo, const gint snapshot, const gdouble value); /** * Set the sharpen of a RS_PHOTO * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param value The new value */ extern void rs_photo_set_sharpen(RS_PHOTO *photo, const gint snapshot, const gdouble value); /** * Apply settings to a RS_PHOTO from a RSSettings * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param rs_settings The settings to apply * @param mask A mask for defining which settings to apply */ extern void rs_photo_apply_settings(RS_PHOTO *photo, const gint snapshot, RSSettings *settings, RSSettingsMask mask); /** * Apply photo settings to a list of filters from an RSSettings * @param photo A RS_PHOTO * @param filters Which filters to apply the settings to * @param snapshot Which snapshot to affect */ extern void rs_photo_apply_to_filters(RS_PHOTO *photo, GList *filters, const gint snapshot); /** * Flips a RS_PHOTO * @param photo A RS_PHOTO */ extern void rs_photo_flip(RS_PHOTO *photo); /** * Mirrors a RS_PHOTO * @param photo A RS_PHOTO */ extern void rs_photo_mirror(RS_PHOTO *photo); /** * Assign a DCP profile to a photo * @param photo A RS_PHOTO * @param dcp A DCP profile */ extern void rs_photo_set_dcp_profile(RS_PHOTO *photo, RSDcpFile *dcp); /** * Get the assigned DCP profile for a RS_PHOTO * @param photo A RS_PHOTO * @return A DCP profile or NULL */ extern RSDcpFile *rs_photo_get_dcp_profile(RS_PHOTO *photo); /** * Assign a ICC profile to a photo * @param photo A RS_PHOTO * @param dcp An ICC profile */ extern void rs_photo_set_icc_profile(RS_PHOTO *photo, RSIccProfile *icc); /** * Get the assigned ICC profile for a RS_PHOTO * @param photo A RS_PHOTO * @return An ICC profile or NULL */ extern RSIccProfile *rs_photo_get_icc_profile(RS_PHOTO *photo); /** * Sets the white balance of a RS_PHOTO using warmth and tint variables * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param warmth * @param tint */ extern void rs_photo_set_wb_from_wt(RS_PHOTO *photo, const gint snapshot, const gdouble warmth, const gdouble tint); /** * Sets the white balance of a RS_PHOTO using multipliers * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param mul A pointer to an array of at least 3 multipliers */ extern void rs_photo_set_wb_from_mul(RS_PHOTO *photo, const gint snapshot, const gdouble *mul, const gchar *ascii); /** * Sets the white balance by neutralizing the colors provided * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @param r The red color * @param g The green color * @param b The blue color */ extern void rs_photo_set_wb_from_color(RS_PHOTO *photo, const gint snapshot, const gdouble r, const gdouble g, const gdouble b); /** * Autoadjust white balance of a RS_PHOTO using the greyworld algorithm * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect */ extern void rs_photo_set_wb_auto(RS_PHOTO *photo, const gint snapshot); /** * Autoadjust white balance from the in-camera settings * @param photo A RS_PHOTO * @param snapshot Which snapshot to affect * @return TRUE on success, FALSE on error */ extern gboolean rs_photo_set_wb_from_camera(RS_PHOTO *photo, const gint snapshot); /** * Get the metadata belonging to the RS_PHOTO * @param photo A RS_PHOTO * @return A RSMetadata, this must be unref'ed */ extern RSMetadata *rs_photo_get_metadata(RS_PHOTO *photo); /** * Closes a RS_PHOTO - this basically means saving cache * @param photo A RS_PHOTO */ extern void rs_photo_close(RS_PHOTO *photo); /** * Indicate that the lens has changed. * @param photo A RS_PHOTO */ extern void rs_photo_lens_updated(RS_PHOTO *photo); /** * Loads a photo in to a RS_PHOTO including metadata * @param filename The filename to load * @return A RS_PHOTO on success, NULL on error */ extern RS_PHOTO * rs_photo_load_from_file(const gchar *filename); /** * Loads a photo in to a RS_PHOTO including metadata * @param photo A RS_PHOTO * @param rotated Set to TRUE to get the rotated sizes, FALSE to get the RAW size. * @param width output variable that will be set to the width * @param height output variable that will be set to the height * @return A boolean, TRUE on success, false if no photo has been loaded */ extern gboolean rs_photo_get_original_size(RS_PHOTO *photo, gboolean rotated, gint* width, gint* height); extern void rs_photo_rotate_rect_inverse(RS_PHOTO *photo, RS_RECT *coords); #endif /* RS_PHOTO_H */ rawstudio-2.0/src/rs-pixbuf.h0000644000175000017500000000223711526533645013212 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_PIXBUF_H #define RS_PIXBUF_H #include void rs_pixbuf_draw_hline(GdkPixbuf *pixbuf, guint x, guint y, guint length, guint R, guint G, guint B, guint A); void rs_pixbuf_draw_vline(GdkPixbuf *pixbuf, guint x, guint y, guint length, guint R, guint G, guint B, guint A); #endif /* RS_PIXBUF_H */ rawstudio-2.0/pixmaps/0000755000175000017500000000000011547430077012066 500000000000000rawstudio-2.0/pixmaps/camera-photo.png0000644000175000017500000000357711526533643015107 00000000000000PNG  IHDR szzsBIT|d6IDATX]l3sgwgwk\L BԇxRߪVתHUHQxiUxAPlc̝РHzr99==ka礔GBe[_<+){Jb۶mC 8AoYV*ggo.jaXaU #t|g;6/~񠮴OB"Gm= m.]Ԃʛ GB>jOIO_W'-CDu c.KFMMM ZOӴMӶ9 FηDP`z:BLS`&i"!FI{az =*TJTӴX,*66mʅ::;L&C" cYJ͹\ ;wǏ? )%B&B Ca iaX(@ T^g+U|gi/fjBs\ƶm2]Y Zn4hV |+l`YDFAi z4MWW"LSx]'Kd3m8q,7f>gǾC2YlQ+*Un߽'#|h?A B@n`6#WK+G8jWd|l ++%t]'bE7~J _ƩבRbkwxh=Qrm2@}c1 jl6@T:g՝̇h'xeYt!ߺɩٹg*"i-4>{ʕϨW+!(lޝ+U+j-3c%%3"ZxgnڎWa?I)M&5 HD_xӦe|c!{}Rh*xh DPV)ebb1)'x6p9JzrsM Q^N57joZ dMu ٲk EQ+ License: http://creativecommons.org/licenses/by-nd/2.5/legalcode Commons deed: http://creativecommons.org/licenses/by-nd/2.5/ rawstudio-2.0/pixmaps/overlay_priority3.png0000644000175000017500000000134011526533643016217 00000000000000PNG  IHDRabKGD pHYs DtIME" )mIDAT8˝?KA3;1-"j!HIJ#Q:m|Fm,RHibgBDcPߍ73)^|O[. sϝ;^RRl󀓞 Je;L@ގ_]a#o,/܉]]oRd{zO߿ fg[Cit_nnb/.P*޼A)1u{֒j--qFy`ss$X77H) ZEAvz2$К_K%d ð)edWWcx>3ӗ/)cGj6TXcȵ&Hݮ]AkBcpyJ Q;>fk>|/_H# B\r";;8:6lAR)ON"ٛZP"°1 pPB!\XmhAj{{D--8&6qs.VWy25Eub8><$][#* K%».HgiJag'?8_Y!.IhA|6YݻDj3!JDQcϓg!, e3R%IENDB`rawstudio-2.0/pixmaps/cursor-color-picker.png0000644000175000017500000000065111526533643016422 00000000000000PNG  IHDRcsRGBbKGD pHYs  tIME %@)IDATH1j@D!&>U.VҾ+]B7P# I),F2YC-;vC֒$I? zsnRdjvT3kY"s'O)V0WE󖚕 gm]c|>} P$Ztmـul6{lA>Q1iRIJG=<<@?gqveY2N&ӆMORQʲLݛv4yغxt6-M gǪotZ/XIENDB`rawstudio-2.0/pixmaps/Makefile.am0000644000175000017500000000107111526533643014041 00000000000000icondir = $(datadir)/icons icon_DATA = rawstudio.png rawstudiodir = $(datadir)/pixmaps/rawstudio rawstudio_DATA = overlay_deleted.png \ overlay_priority1.png \ overlay_priority2.png \ overlay_priority3.png \ overlay_exported.png \ transform_flip.png \ transform_mirror.png \ transform_90.png \ transform_180.png \ transform_270.png \ camera-photo.png \ cursor-color-picker.png \ cursor-crop.png \ cursor-rotate.png \ tool-color-picker.png \ tool-crop.png \ tool-rotate.png EXTRA_DIST = $(icon_DATA) $(rawstudio_DATA) artwork.license rawstudio-2.0/pixmaps/cursor-crop.png0000644000175000017500000000102111526533643014764 00000000000000PNG  IHDRcsRGBbKGD pHYs  tIME &IDATH唱K#AsXp "X @Y),R6`%DA"b:$ܑY+$,L`4oI%Ĵ IKC$;hGESD '3S%ۉ]GHeGp\ؘe'1'i֌$1$RUIkBaȦbE% ?'ٟIJ].;]`erb ns`ӵ$žKf04Ft¾tlb}ޓ^Ǡ5BFMPCN]6Yq+Ykj$= E(RǪVJR_N*j*"YkU.# xtMF_x 8 kBpIENDB`rawstudio-2.0/pixmaps/transform_90.png0000644000175000017500000000164511526533643015045 00000000000000PNG  IHDR sBIT|d pHYs&&LtEXtSoftwarewww.inkscape.org<"IDAT8Mh\U;o>QI$Zm !M4Zj" RDp*v+7n\H)AU 1)RM']Lb {9Z|׭/\k'6%ht @G"h*L8\00@::Ex,O#95B'|>_ԭ/r2n(WK\ԞǺcSp۶ǁ@;1zmg]DZKʩd9LOっ=Won^8wJي<db&٪"SndaOv >ūC했>iSb(\j9RFC`(Z:NKZֺ,"ǁ_*Vy3,? o Sg;pjRfA߷sEkϫ_Xk}]J)d[AIcٵ3к3ǞGӇ]׀Q}`x@ z#sN^ (L` [:";҇o֫ÝWv{v]Mrbm*ngvZ:x;u8p`@Ȳ3sK B"yfl6[iD/ǬA  F|cCvO?_}ڲ?EqJϿ(f߾Y,3夢RqEwv^sXs IENDB`rawstudio-2.0/pixmaps/tool-color-picker.png0000644000175000017500000000040011526533643016052 00000000000000PNG  IHDRaIDATx10 (݃8Kp Cy.]tz}i9bH<0 V"cڶ}  4%2@km]p}HĜ}-P@q<3cf1'@a,Kg7qUU#\'f?o6x76 3b>ߴ^p]W^7Y'{$zŔIENDB`rawstudio-2.0/pixmaps/transform_180.png0000644000175000017500000000167311526533643015126 00000000000000PNG  IHDR sBIT|d pHYs&&LtEXtSoftwarewww.inkscape.org<8IDAT8KLUan v @!Lա1"&V4F7.ʸpcLIu!6.jqC41i!Qj1uA@X0\.t 3<9wHJU `=7#EU[Q\.PwoWO`FDs~bŕ 3nX|;0quUD*4kC0䡲˾rL^+GpwD0TYs˲@iꜪ̥=`lo^N2#[sha˲v f#/SK%SV+?sŜtxȁl2:sRBC4,MF8L][*_s;P|9|n:UJXGDjpOH&}rlѱ,*4-Pߞ`cyo~ < Tia]*e]׬kT@0lnL%7]lQ¢>>TWJ7{+; NCaV:iފK|r(LWbGT5:NϬ3syikֽ*ՅW~ w>rh=#"PUmO'緻#s7V~t@;ŋۺb Q[?Zslm]9TY*?y"'p=W\`7TzVlDS7GzG/Mں_DnBl>(>tdt….\tDP E/8.HƦƙ7ܜ?oBk?[Z~Z H+lG5(͋fBM'y騿\]5LP} I]"P̤p_}gPTKv lƶm,²,,EeܧeLGlۦP(De14 AZϗ.2M0 t:QVp^uvR@X([<N*HҤRhxq2@FJGYR, o@(L&giAyh|7\|>Dn->JJ28lz0')"K^GAp,K'I{n&M%`9AjV )w=uߏ޿{&'ʳ.,IENDB`rawstudio-2.0/pixmaps/overlay_exported.png0000644000175000017500000000137711526533643016117 00000000000000PNG  IHDRV%sBIT|d pHYs H HX;tEXtSoftwarewww.inkscape.org<|IDAT(S]HSqN}4j6Wf%%}VC!D%HAJD!ԋ%ЋAC+AT&us,fxǁs8 "7cwl Ƙ. *m~/vd\_kI$4tuO4.Kfqצ! 80M*a!I*[eս{Lzb,ks N—IL@Sd$cI<wmkɜ^tnIMaLwS-щ "2wp8cL m^RLp/  -`:08 ])p& 3qu6&'{ϱ,h (4vccjٓW(s31|1SwdőVfBccE@gWl WTwX.ZoBAM* RmcD$y)0j':"50<3?;z>vW؆mXg{#E۵#(*t,nl) Z{%"NQ]ͼ@RGa;ӛIENDB`rawstudio-2.0/pixmaps/overlay_priority1.png0000644000175000017500000000120511526533643016215 00000000000000PNG  IHDRabKGD pHYs  .BHtIME 7y~IDAT8˝nT1?{l߽KAD(A $DAF%&}+P  AaݽͶqaK3gm5[у/1GrIdDI|GCI;<;cf~BH'7`cKgaUF cTSS!VevtSvk~, rhcC[| R ɳ󕽃]~/XL`<1L&9S XT9)LZ( R 4Z ZK/hVV%OҲkmm0b105FD SabEYh JpRնڕ$evH%5N*eC2Y&6NRI]@LY0Raﳍ3EVܩplwa:vHhKL.}F[>C}X%$J;?MIENDB`rawstudio-2.0/pixmaps/Makefile.in0000644000175000017500000003250611547430034014052 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = pixmaps DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(icondir)" "$(DESTDIR)$(rawstudiodir)" DATA = $(icon_DATA) $(rawstudio_DATA) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ icondir = $(datadir)/icons icon_DATA = rawstudio.png rawstudiodir = $(datadir)/pixmaps/rawstudio rawstudio_DATA = overlay_deleted.png \ overlay_priority1.png \ overlay_priority2.png \ overlay_priority3.png \ overlay_exported.png \ transform_flip.png \ transform_mirror.png \ transform_90.png \ transform_180.png \ transform_270.png \ camera-photo.png \ cursor-color-picker.png \ cursor-crop.png \ cursor-rotate.png \ tool-color-picker.png \ tool-crop.png \ tool-rotate.png EXTRA_DIST = $(icon_DATA) $(rawstudio_DATA) artwork.license all: all-am .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu pixmaps/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu pixmaps/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-iconDATA: $(icon_DATA) @$(NORMAL_INSTALL) test -z "$(icondir)" || $(MKDIR_P) "$(DESTDIR)$(icondir)" @list='$(icon_DATA)'; test -n "$(icondir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(icondir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(icondir)" || exit $$?; \ done uninstall-iconDATA: @$(NORMAL_UNINSTALL) @list='$(icon_DATA)'; test -n "$(icondir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(icondir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(icondir)" && rm -f $$files install-rawstudioDATA: $(rawstudio_DATA) @$(NORMAL_INSTALL) test -z "$(rawstudiodir)" || $(MKDIR_P) "$(DESTDIR)$(rawstudiodir)" @list='$(rawstudio_DATA)'; test -n "$(rawstudiodir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(rawstudiodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(rawstudiodir)" || exit $$?; \ done uninstall-rawstudioDATA: @$(NORMAL_UNINSTALL) @list='$(rawstudio_DATA)'; test -n "$(rawstudiodir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(rawstudiodir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(rawstudiodir)" && rm -f $$files tags: TAGS TAGS: ctags: CTAGS CTAGS: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(icondir)" "$(DESTDIR)$(rawstudiodir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-iconDATA install-rawstudioDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-iconDATA uninstall-rawstudioDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ distclean distclean-generic distclean-libtool distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-iconDATA install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-rawstudioDATA install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ uninstall-iconDATA uninstall-rawstudioDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/pixmaps/overlay_priority2.png0000644000175000017500000000126711526533643016226 00000000000000PNG  IHDRabKGD pHYs DtIME!$CDIDAT8˝kTQn܄u(č!JF Z( ,ҨED0A+T IIDjLv׽YmT3s̙sk+}l4~J|P9zn򖤳G*Ad-REG4`s5#F2^m6YI01}yISU/:.]'X2ti ,qIӢGn!8 BbU>iK/cDaD]LO8&5KHޠsuaB)R ]gmN?IsqME8kW;@$@+8v("j}Cg Xcv,,#sg-GP?~^֘-jȲ.@tBJIm<h,fy1Rʢ!H)QJF{'<6og{{Ѿ<֨rО}TGBDk(E\m9}|c*2W[,{a7 5~ Ku\hA^|G{I\j ڴҚ'3WL|g!| nIENDB`rawstudio-2.0/pixmaps/transform_mirror.png0000644000175000017500000000150011526533643016115 00000000000000PNG  IHDR sBIT|d pHYs&&LtEXtSoftwarewww.inkscape.org<IDAT8KOSAgGji)T([%a}XHL1J0;W~G0nD\b+7ƘhJwPã-If1o3'!*-&G:xT'G A`=0vQM@{b8Q*XeEss7~t ;^#gL1rT᜷ HD:cmսZ]?ë]>Qv U6;Wi/`Çшj˘jCMfM!_F Cf{"r[xۑ_bl@4`se\'rU}]WE?y;~v䈝:zgI Sm!H !f맟Үx `> "1,]\{t P;]@"TM|3v`}po>l_/ =ɰ7>dh/ (Ãæc9E兝B(Zp7@]LLSo$!7]LJQ|k+3>9Z[uDD嚦݋',ob %BF:gk l &Zer%nxU]P]LUt !p6ـP%>}ϺkpΏIENDB`rawstudio-2.0/pixmaps/transform_270.png0000644000175000017500000000160711526533643015123 00000000000000PNG  IHDR sBIT|d pHYs&&LtEXtSoftwarewww.inkscape.org<IDAT8_lSu?wֵYZƆ  c&DAM&&&"j &&g o>,!&C ]@WWntҟz;N9ﹿ1) 0d%ՉWDdM6PcxHcf} )$[t 9dSN.o1%]Oπ*pXD""n:כ4e(5}s@b-[UN-zEO;+x_hu]h{KD89p^fD$uRzCVڮr4#O˅j2չ8_Od)ev_0H1}]*U'D^$<~n'W:RQb̾zz&/GR/L|k{|!"[Hg:5hK FMMV% %_!1y`\Dtd4{xa>&*J* #3Ƭ" 9l=nKڞgGLj=I>`!ATSg"r\*֑_˫?qݡhnPgNk;a5[hOޘ6ycZȡGܫ"Ү,ZkcS"͡j hY}=ՁLV+yO+4>}gԭ/._!wu%ߝrx6 9IENDB`rawstudio-2.0/pixmaps/tool-rotate.png0000644000175000017500000000100711526533643014763 00000000000000PNG  IHDRasRGBbKGD pHYs  tIME %ȲIDAT8˥"1;첳дFٷO<am$hMϥ3a BP~ B<).XYt:1ZF)RV1>?xBR8 C. Zkݮ<5Q}A @Jsp8|e,K1`2`%sz@8wߟbze0:? YA5Ziv[$™jU 91C2ktnt:OEx$I{7Tzp8 |ix<SyEZbnya4l88F#πi&?VPr:ب?]]8F-IENDB`rawstudio-2.0/pixmaps/rawstudio.png0000644000175000017500000001043211526533643014535 00000000000000PNG  IHDR00W pHYs  gAMA|Q cHRMz%u0`:o_FIDATxb?5y?J OLd1 &*;^Hhki<De@@11 q@CD M1`@1q~ uz Ii=rV￿ @,\Ġ(ÊիT _!1pec'N}y|n7=9 &/%)PV\wn.n_fX Q!_0AVF̌ _} ߀~=c r<"b!DBYݐs^^^pzG/_ccc{9@o o߽a27aT"Dl 238ͳa(0e~8S72pq v8|x HxA[KGDB2\Hpc0NEA@dX~#C oÿG`hl}AVJXIb!R203` }PSQc^N3w`胊|gd 1P^d\&H@ 51 JC!90|ZO@PYX [A҇=0yL*Pq?P{̆73 >z"W7`%T?pٳ>I :`i Iq:$=?p3fgf` 8EǀixO>3gO{a]@X=,o300$E3 _3Xٹ20xp^mU>nNce?HBpfaЬ; L Z 2 / 7+;HXY`R1d޼aϞ1}G Aj1_=;ZW@?|;PVܹs܏511x8&Vv8$# c-̰l?>U H&L o_gcce`egSfpUcx5}`x m?fs>_`F;T h UbPeشydc``X~C0 t/X?IXw@K$9tQ$%́x OXIC_0y@n$rƺK{k0-6O/!5/(ب7N('1{70 `G"{W1 JB0G<p @2+800C 耿JhbI  ʱ><-_` s a@XbbZL̨` j 'xh#%pȃ٬`6x K24r/(ݻN Am`,`gSy`LLi/fPSSa03g`afeP A#" A k A0_[`@" z<Ζam 7;w<܁ drB<D$.:ZZ W^3890ٷADEDmx%%RÇ &F O6`cV,c lzu r bgc{ `{ln> 2{ HyGHJw ?ա~zw(=L.0 1g.[E|(Leh@id3$PFeUoȮ+p8/?Ȑp%@t~)9-[Y 3N'1X3@!$X8071a@raCiP Bv4 5N> 1Ch6< %hRPgL E fIENDB`rawstudio-2.0/pixmaps/overlay_deleted.png0000644000175000017500000000123111526533643015660 00000000000000PNG  IHDR&N:sBIT|d pHYs ftEXtSoftwarewww.inkscape.org<IDAT(P{ۆ4%"]H0 gӝ/ͬ+GᲫRAjDNcQ@Ҧ$ͽǍٝp8v)_ PY}<t>+24nrm`0PQEB}, mxttɄNOO^&"x]׏v7PVZugJr|ppЩT*OM"z=^,5k"?,˸V/aZmゔ%вWZqls]ב$ H1l6a%}YPJ4h4X,puu|0N1NmKÉl6~=RMb R<_;BD8@o]Mn8E孑Q0f6Qiq+ W\ ԷD!} s!1L&F5 `;c xl\.w7I])EYI) ޤi _^Nf'&qIENDB`rawstudio-2.0/po/0000755000175000017500000000000011547430077011023 500000000000000rawstudio-2.0/po/POTFILES.in0000644000175000017500000000203111543677714012523 00000000000000# List of source files containing translatable strings. # Generated with this command: # cd .. && grep gettext.h * --include=\*.c --include=\*.h -R --exclude-dir=contrib|cut -d":" -f1|sort librawstudio/rs-lens-db-editor.c librawstudio/rs-library.c librawstudio/rs-metadata.c librawstudio/rs-profile-selector.c librawstudio/rs-settings.c plugins/colorspace-adobergb/colorspace-adobergb.c plugins/colorspace-prophoto/colorspace-prophoto.c plugins/colorspace-srgb/colorspace-srgb.c plugins/denoise/denoise.c plugins/output-facebook/output-facebook.c plugins/output-flickr/output-flickr.c plugins/output-jpegfile/output-jpegfile.c plugins/output-picasa/output-picasa.c plugins/output-picasa/rs-picasa-client.c plugins/output-pngfile/output-pngfile.c plugins/output-tifffile/output-tifffile.c src/application.c src/filename.c src/gtk-helper.c src/gtk-interface.c src/gtk-progress.c src/rs-actions.c src/rs-batch.c src/rs-camera-db.c src/rs-preview-widget.c src/rs-save-dialog.c src/rs-store.c src/rs-tag-gui.c src/rs-tethered-shooting.c src/rs-toolbox.c rawstudio-2.0/po/pt_BR.gmo0000644000175000017500000001311311546436027012454 00000000000000o ` a e i m o v |           ( * 4 S Z \ b o q x          & 6 A M _ g u        '    * 7 M R c h w          * 5 > H N U ` l w         .7:=@GM S_elr 26:>@GMcy{  # 08: ?LN Wa  .:K_gy  ' /?Qaw .:JZ k y    4 HTj4  $0DgR:]$_( H4YiV"k a8&= OnGBeXC19>ZA3/ +bNM)S 52lj?#f[Dh-!dEo@WUK6^J%L.,*FIQPm ';\70`c<T A B C %%.1fs %dmm %f - Original filename* (%d)-1 (%d)1/%.0fs 10:8 (SXGA)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)AAll filesAll photos (excluding deleted)AspectBBatchBuffer emptyCCancelChangeChoose output directoryConstant heightConstant height: %dConstant widthConstant width: %dCopied settingsCurveD (%d)Delete photosDeleted photosDeleting photosDirectory:Export FileExport dimensionsF/%.1f File exportedFile type:FilenameFilename example:GeneralGridHeight:HistogramISO paper (A4)IconImage openedJPEG (Joint Photographic Experts Group)Keep aspectLast image:Loading %s ...Maximum sizeMaximum size: %d x %dNoneNothing to pasteOpenOpen curve ...Open recursiveOpening directory...Opening photo ...Output directory:PNG (Portable Network Graphics)Pasted settingsPercent:Photo height:Photo sizePhoto width:PreferencesPrioritiesProgressRawstudioReadyRemoveRemove allReset curveSaturationSave curve as ...Saving %s ...SettingSizeStartTime left: %dh %dm %dsTime left: ...ToolsU (%d)Unprioritized photosWidth:Your files will be permanently deleted!_1_2_3_Batch_Edit_File_Fullscreen_Help_Photo_Quit_Remove priority_Set Priority_View_White BalancepixelsProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-03-26 03:39+0100 PO-Revision-Date: 2008-05-20 18:29-0300 Last-Translator: Rafael Sachetto Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit A B C %%.1fs %dmm %f - Arquivo original* (%d)-1 (%d)1/%.0fs 10:8 (SXGA)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)ATodos os arquivosTodas as fotos (exceto as apagadas)AspectoBLoteBuffer vazioCCancelarModificarEscolha o diretório de saídaAltura constanteAltura constante: %dLargura constanteLargura constante: %dConfigurações copiadasCurvaD (%d)Apagar fotosFotos apagadasApagando fotosDiretório:Exportar arquivoExportar dimensõesF/%.1f Arquivo exportadoTipo do arquivo:Nome do arquivoExemplo de nome de arquivo:Gera;GradeAlturaHistogramaISO paper (A4)ÍconeImagem abertaJPEG (Joint Photographic Experts Group)Manter aspectoÚltima imagem:Carregando %s ...Tamanho máximoMaximum size: %d x %dNenhumaNada para colarAbrirAbrir curva ...Abrir recursivamenteAbrido diretório...Abrindo foto ...Diretório de saída:PNG (Portable Network Graphics)Configurações coladasPercentual:Altura da foto:Tamanho da fotoLargura da foto:PreferênciasPrioridadesProgressoRawstudioProntoRemoverRemover todosReiniciar curvaSaturaçãoSalvar curva como ...Salvando %s ...ConfiguraçãoTamanhoComeçarTempo restante: %dh %dm %dsTempo restante: ...FerramentasU (%d)Fotos sem prioridadeLargura:Seus arquivos serão permanentemente apagado!_1_2_3_Lote_Editar_Arquivo_Tela cheiaA_juda_Foto_Sair_Remover prioridadeAjustar _prioridade_Visualizar_Balanço de brancopixelsrawstudio-2.0/po/fr.gmo0000644000175000017500000010404011546436027012055 00000000000000L|((((((((( )&)C)_)y)) ))")**.*I** +,+>+O+e+z+|+++++ ++ +, , ,5,K, `,k,o,,,,,,,-&-6-F-$H-m-}----!- . . . ).4.ES............$/ 3/@/B/G/$L/ q/ }//// / /// 000 -090@0\0w0 0 0000 001$171G1[1j1y111111&11)2"D2%g22/2&2231.3N`33 33k3A4P4V4l44 44444 4 4 4445*5=5 Y5d5(5<515 6%6:6K6\6)d6)66667 $707 B7P7`7 u77777777 77 88"868H8 [8h8m88 8 888888899 (9I9O9g9l99999 999 9999:: ":/:!A:bc:': ::;; ;; 1;=; M; [; h; r; }; ; ;;;;;;<< <*<@<"D<g< n<<< <G<) =Y7=====%== >>">+>3>8>G>V>t>>>>>>> >??2? ;? I? V? a? n??@? ?*?%@<?@ |@@@@@@@@@ A (A2AHA_Ae{AcAEBB<BJC`CdC#zCC C CC CCC DD%3D-YDDD DDDDD DE !E/E3?EsE$EE(EE+E 'F1F:FBFHFPF_FyF F&F"F'F7GFG"KGnGGGGGG GgG *H6H:H ZHeHuHzHH HH HAH/I8IOI ^IhI mIxI~I IIIFI.J0JNJjJJJJJJ JJ J K K2KEKMKhKK=L]VL LLL&L.L%MMMMMMMM MN NN-N_o+`````zaaaa aaaa b b b (b 4bBbZb(vb)b)bb&c>/cOnc[cd!-d Odpdd3d3d.d$e!oZomoooo ooo p%p;pQpdp zp4pfp 7qGEq1qLq rr-rCrYrurrr-rr rr! s#-sjQshs%ttata%uuu)u uu5u v/vHvdv~v%v,v5v%w6w yy yy yyyy0z @zaz2vz&z)zOzJ{JQ{'{ {{{ { {|v|||||||| }6}G} L}DY},}}} }~ ~~$~+~;~Q~mf~H~'Ea)w& +6Og})̀8u 4 .Ճ ! 5%?e| ф"  )/8 T_oÅʅم3Sk 6, % 2 = G R ]k Çȇ!܇ #m<W^uIO=+$>b7w# )H{7KLJ}>;q]G+O"3En_`dFvRp N1'QShna8\Dc ~lX!"Wi1%p0NM;Pra4Y&9 fC -x[@(Fb9dsC5,4J|h `?tj<U.@kTK\Mki= )usP* Syfj(?T%zrw}2G!6c&[ |U*{ZyHzog6Qtl xm5:-_AXqIe.A/D,VZBv~:E2e'^/$8BgoL YR3V 0] (Cannot log in) (Logged in succesfully) A B C %%.1fs %2c - Incremental counter%DD - Day of week from EXIF%DM - Month from EXIF (Text)%DY - Year from EXIF (YYYY)%Dd - Date from EXIF (DD)%Dm - Month from EXIF (MM)%Dy - Year from EXIF (YY)%d - Date from EXIF (YYYY-MM-DD)%d photos added to batch queue%d photos removed from batch queue%dmm %f - Original filename%p - Path of original file%s Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!%s - Setting id (A, B or C)%t - Time from EXIF (HH:MM:SS)(No user entered)(Select Profile)* (%d)* (-)-. Click to edit value. Click to reset value1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Aperture: F/%.01f Focal length: %dmm ISO: %u Make: %s Model: %s Shutter speed: %.1fs Shutter speed: 1/%.0fs Time: %s%s AA raw image converter for GTK+/GNOMEAdd Profile ...Add profile ...Add tags to selected photo(s).Adding images to batch queueAdjusting to auto white balanceAdjusting to camera white balanceAlbumsAll ProfilesAll filesAll lensesAll photos (excluding deleted)An error was returned when communicating with the Picasa web service:ApertureAprilAspectAugustAuthenticate RawstudioAuto adjust curve endsBBasicBatchBlueBlue Amount AdjustmentBlue Chromatic Aberration CorrectionBuffer emptyCCA BCA RCamera %s on port %s failed to open Camera MakeCamera ModelCamera Profiles (DCP)Camera UnknownCamera defaults editorCamera makeCamera modelCamera monitor shutting down. CancelCannot log inCaptionCapture Enabled. Capturing. ChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Channel MixerChannel mixerChoose output directoryColDnColor Profiles (ICC and ICM)Color denoiseColor space used for savingColour DenoisingConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrContrastCopied settingsCopy EXIF metadataCopy EXIF metadata to XMPCopy settings from active to new imageCopying image to clipboardCould not create datadir for lensfun - %sCould not create output directory.Could not create temporary directory.Could not export photo.Could not fetch file from %s or write it to %s.Could not fetch list of files from %s.Could not open database %sCould not open image! Could not open temporary file on disk for writingCould not save file: %s Check that you have write permissions to this folder.Couldn't open photoCreate albumCropCrop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel cropCurrent User: CurveD (%d)D (-)DecemberDelete photosDeleted photosDeleting photosDenoiDenoiseDescriptionDirectoryDirectory:Disconnect CameraDisconnecting current camera Display Colorspace:Display NavigationDo not Load Selected ImagesDon't cropDownloading and adding image. ERROR: Could not copy image to clipboardERROR: Gphoto2 returned error value %d Error message is: %s ERROR: Init camera returned %d. Error text is:%s Edit lensEdit output settingsEmbedded ProfileEnable this lensEnabledEnabling capture mode for Canon cameras. Enabling capture mode for Nikon cameras. Error copying file %s to %s Error exportingError exporting photo to gimp.Error updating lensfun databaseExport FileExport dimensionsExport failedExporting to %sExporting to GIMP...Exporting...ExposExposureExposure CompensationExposure Mask Colorspace:F/%.1f FebruaryFile Downloaded Succesfully. File exportedFile not saved!File type:FilenameFilename & TagsFilename example:Filename template:Flickr errorFlipFlip the photo over the x-axisFocalFocal LengthFocallengthFound %d cameras FreeformFull export pathGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2Gphoto2 reported Context Error: GreenGreen Amount AdjustmentGridHarmonious triangles #1Harmonious triangles #2HeightHeight:Hiding exposure maskHistogramHistogram height:HueHue ShiftISOISO paper (A4)ISO%dIconImage copied to clipboardImage openedInterval ShootingInterval shooting shutting down. It seems like rawstudio lost its authentication to upload to your account, please re-authenticate.JPEG (Joint Photographic Experts Group)JPEG QualityJanuaryJulyJuneKeep aspectLarge gamut color spaceLast image:Lens CorrectionLens DisabledLens LibraryLens MakeLens ModelLens UnknownLens makeLens modelLensfun database updatedLight DenoisingLight out mode not availableLoad non-RAW imagesLoading %s ...MarchMaster ControlMaximum sizeMaximum size: %d x %dMayMinimize this window after captureMirrorMirror the photo over the y-axisModelMonitor CameraMonitor Thread already running. Monitor recieved error %d, while waiting for camera. Error text is: %s Moving file to current directory failed! NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable.NameNo Lens InformationNo PhotoNo camera connected. No camera selected - Cannot connect! No white balance to set fromNoneNothing to pasteNovemberOctoberOpenOpen curve ...Open directoryOpen new images after captureOpen recursiveOpening directory...Opening photo ...Original AspectOutput directory:Overwrite File?PNG (Portable Network Graphics)Password: Pasted settingsPasting settings to imagesPercent:Photo height:Photo scale:Photo sizePhoto width:Picasa Webalbum AuthentificationPlace cache in home directoryPlease type in your username and password for Picasa Web Albums.PreferencesPress F10 to return preview to this windowPreview background color:Print friendly color space, compatible with Adobe RGB (1998)PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProcessing Image %d/%dProcessing Image 1/%d.ProfileProgressPublic (everyone can see this)Quick exportRawstudioRawstudio Lens EditorRawstudio Lens LibraryRawstudio Tethered ShootingRawstudio needs to be authenticated before it will be able to upload photos to your Facebook account.Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account.Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr.ReadyRecieved error %d, while capturing image. Error text is: %s Recieved error %d, while downloading image from camera. Error text is: %s RedRed Amount AdjustmentRed Chromatic Aberration CorrectionRemoveRemove allRemoving images from batch queueResetReset curveRetain EXIF metadataRetry Operation?Rotate ClockwiseRotate Counter ClockwiseRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturSaturationSave 16 bit TIFFSave 16 bit linear PNGSave curve as ...Save uncompressed TIFFSaving %s ...Seconds between each shot:Select ActionSelect All/NoneSelect OK to use this screen for fullscreen previewSelect Saved CurveSelect Screen for fullscreen previewSelect camera:Select screen to open fullscreen previewSelect settings to copySelect which settings to add to batch queueSeptemberSet lensSettingSharpSharpenSharpen AmountShow Filenames in IconboxShowing exposure maskShutterspeedShutting down already running thread. Shutting down asynchronous thread Shutting down interval capture thread. Shutting down running thread to enable remote capture. SizeStaring Interval Shooting Thread. Staring Monitor Thread. StartStart ShootingStatus:Step 1:Step 2:Stop ShootingStraighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels.Switch UserTCATIFF (Tagged Image File Format)Tag searchTag search [%s]TagsTags for new images:Tags, separated by spaces:Take PhotoTempTemperatureThe file '%s' already exists. Do you want to overwrite the file?The port you specified ('%s') can not be found.Time left: %dh %dm %dsTime left: ...TimestampTintTint ShiftTitleToolsTransformsU (%d)U (-)Unable to detect more than one monitor. Cannot open fullscreen previewUnable to locate screen for fullscreen previewUnhandled error from FacebookUnhandled error from PicasaUnprioritized photosUpdate lensfun databaseUpload photo to FacebookUpload photo to FlickrUpload photo to PicasaUse system themeUsername: VignVignettingVignetting CorrectionVisible to FamilyVisible to FriendsWBAsciiWaiting for jobs to finishWaiting for next image. Warning: It took longer time to capture the image than the set interval It took %.1f seconds to download the image. Consider increasing the interval. We recieved an error during authentication. Please try again.Welcome to Tethered shooting! Make sure your camera is NOT mounted in your operating system. White balanceWidthWidth:Would you like to Retry the operation?Your files will be permanently deleted!Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing._1_2_3_About_Add to batch queue_Add view to queue..._Auto_Auto group_Batch_Camera_Copy Image to Clipboard_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Lens Library_Lights out_Next_Next Photo_Online Documentation_Open Directory_Paste settings_Photo_Preferences_Previous_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Save camera default settings_Set Priority_Show Photo On Secondary Monitor_Snapshot_Sort by_Split_Start_Straighten_Tag Photo..._Tethered Shooting_Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelstelephotowideangleProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-03-26 03:39+0100 PO-Revision-Date: 2011-03-21 00:10+0100 Last-Translator: Edouard Gomez Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: French X-Poedit-Country: FRANCE (Ne peut s'authentifier)(Authentification réussie) A B C %%.1fs %2c - Compteur incrémental%DD - Jour de la semaine des EXIF (Texte)%DM - Mois des EXIF (Texte)%DY - Année des EXIF (AAAA)%Dd - Jour des EXIF (JJ)%Dm - Mois des EXIF (MM)%Dy - Année des EXIF (AA)%d - Date des EXIF (AAAA-MM-JJ)%d photos ajoutées au traitement par lot%d photos ajoutées au traitement par lot%dmm %f - Nom de fichier original%p - Nom de fichier original%s NB: Cette erreur n'est pas gérée par Rawstudio. Veuillez nous en faire parvenir le contenu ainsi que la procédure à suivre afin de la reproduire. Cela nous permettra de gérer cette erreur à l'avenir dans Rawstudio. Merci d'avance.%s - Id de paramètres (A, B ou C)%t - Heure des EXIF (HH:MM:SS)(Pas de nom d'utilisateur indiqué)(Sélectionnez le profile de colorimétrie)* (%d)* (-)-. Cliquer pour éditer la valeur. Cliquer pour réinitialiser la valeur1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Ouverture: F/%.01f Focale: %dmm ISO: %u Fabricant: %s Modèle: %s Vitesse d'obturation: %.1fs Vitesse d'obturation: 1/%.0fs Heure: %s%s AUn convertisseur de fichier RAW pour GTK+/GNOMEAjouter profile...Ajouter profile...Ajouter des tags aux photos sélectionnées.Ajout en cours des images au traitement par lotBalance des blancs automatiqueBalance des blancs de l'appareil photoAlbumsTous les profilsTous les fichiersTous les objectifsToutes les photos (y compris celles supprimées)Une erreur a été retournée par le service web de Picasa:OuvertureAvrilAspectAoûtAuthentifier RawstudioAjustement automatique des extrémités de courbeBBasiqueLotBleuAjustement du canal bleuCorrection d'aberration chromatique BleueBuffer videCCA BCA RAppareil %s sur le port %s n'a pu être démarré Fabricant de l'appareilModèle de l'appareilProfile Appareil Photo (DCP)Appareil inconnuEditeur du paramétrage par défaut de l'appareilFabricant de l'appareilModèle de l'appareilArrêt du pilotage de l'appareil. AnnulerNe peut s'authentifierLégendeCapture activée. Capture en cours. ChangerPriorité de photo changée (%d)Priorité de photo changée (*)Priorité de photo changée (D)Mixeur de canauxMixeur de canauxChoisir le répertoire d'enregistrementAntiBruitClrProfils de colorimétrie (ICC et ICM)Débruitage des plans de couleurProfil de colorimétrie pour la sauvergardeFiltre antibruit de couleursRapport constant : %dHauteur constanteHauteur constante : %dRapport constantLargeur constanteLargeur constante: %dContrContrasteParamètres copiésCopier les données EXIFCopier les données EXIF dans les données XMPCopier les paramètres de l'image active vers la nouvelle imageImage en cours de copie vers le presse papierN'a pu créer le répertoire servant à la base de donnée lensfun - %sN'a pu créer le répertoire de sortieN'a pu créer le répertoire temporaireN'a pas pu exporter la photoN'a pas pu obtenir le fichier à partir de %s ou n'a pu l'écrire à %s.N'a pas pu obtenir la liste de fichier à partir de %s.N'a pas pu ouvrir la base de donnée %sN'a pas pu ouvrir la photo ! Échec lors de l'écriture du fichier temporaire sur le disqueSauvegarde du fichier "%s" impossible. Vérifiez que vous posséder les droits d'écriture sur le répertoire.N'a pas pu ouvrir la photoCréer un albumRecadrerCadrer: glisser la souris afin de sélectionner le cadrage désiré. Bouton droit de la souris au sein du cadre: appliquer le cadrage; En dehors du cadre: Annuler cadrageUtilisateur actuel:CourbeD (%d)D (-)DécembreSupprimer les photosPhotos suppriméesSupression de photosAntiBruitDébruiterDescriptionRépertoireRépertoire :Déconnecter l'appareilDéconnexion de l'appareil Profil de colorimétrie pour l'affichageAfficher les informations de localisationNe pas charger les images sélectionnéesAnnuler le recadrageTéléchargement et ajout de l'image. Erreur: impossibilité de copier l'image dans le presse papierErreur: GPhoto2 a retourné une valeur d'erreur %d Le message d'erreur est: %s Erreur: l'initialisation de l'appareil a retourné le code %d. Le message d'erreur est: %s Éditer l'objectifÉditer les paramètres de sortieProfile de colorimétrie interneActiver cet objectifActivéActivation du mode de capture des appareils Canon. Activation du mode de capture des appareils Nikon. Erreur lors de la copie du fichier %s vers %s Erreur lors de l'exportErreur lors de l'export vers GIMPErreur lors de la mise à jour de la base de donnée lensfunExporter le fichierExporter les dimensionsÉchec de l'exportExport encours vers %sExport vers GIMPExport en coursExposExpositionCompensation d'expositionProfil de colorimétrie pour le masque d'expositionF/%.1f FévrierFichier téléchargé avec succès. Fichier exportéFichier non sauvegardé !Type de fichier :Nom de fichierNom de fichier & tags:Exemple de nom de fichier :Motif de nom de fichier :Erreur FlickrRetournerRetourne la photoFocaleDistance FocaleFocaleTrouvé %d appareils LibreChemin complet d'exportGénéralRectangle d'orSections d'orTriangles d'or #1Triangles d'or #2Erreur rapportée par la librarie GPhoto2: VertAjustement du canal vertGrilleTriangles harmonieux #1Triangles harmonieux #2HauteurHauteur :Masquage du masque d'expositionHistogrammeHauteur de l'histogramme :CouleurDécalage de couleurISOA4ISO%dIcôneImage copiée vers le presse papierImage ouverteMode de prise de vue à intervalle régulierIntervalle de prise de vue finie. Il semble que Rawstudio ne soit plus authentifié sur votre compte. Authentifier à nouveau afin de pouvoir publier à nouveau.JPEG (Joint Photographic Experts Group)Qualité JPEGJanvierJuilletJuinGarder l'aspectEspace de colorimétrie à large GamutDernière imageCorrection d'objectifObjectif désactivéBase de donnée d'objectifsFabricant de l'objectifModèle de l'objectifObjectif inconnuFabricant de l'objectifObjectifBase de donnée lensfun mise à jourFiltre antibruit de luminositéVoil noir non dispoibleCharger les images dans un format non-RAWChargement de %s ...MarsContrôle maîtreTaille maximumTaille maximum : %d x %dMaiMinimiser cette fenêtre après la captureMirroirMirroir de la photoModèleMonitorer l'appareilThread de moniotring déjà présente. Rawstudio a reçu une erreur %d en attendant le résultat de l'appareil. Détail de l'erreur: %s Le déplacement du fichier vers le répertoire courant a échoué ! NB: la vue en icônes est désactivée. Les nouveaux fichiers ne seront pas chargés. Appuyer sur pour ré-activer la vue en icônes.NomPas d'information sur l'objectifPas de photosPas d'appareil connecté. Pas d'appareil sélectionné - Pas de connexion possible ! Aucune balance des blancs disponibleAucuneRien à collerNovembreOctobreOuvrirOuvrir la courbe ...Ouvrir un répertoireOuvrir les nouveaux fichiers après la captureOuvrir récursivementOuverture du répertoire...Ouverture de photoAspect Ratio d'origineRépertoire d'enregistrementÉcraser le fichier ?PNG (Portable Network Graphics)Mot de passe:Paramètres collésParamètres en cours de copiePourcentage :Hauteur de la photo :Rapport de la photo :Taille de la photoLargeur de la photo :Authentification Webalbum PicasaPlacer le cache dans le répertoire de l'utilisateurVeuillez renseigner votre nom d'utilisateur et votre mot de passe pour le service Web Albums de PicasaPréférencesAppuyer sur F10 pour retrouver la pré-visualisation sur cette fenêtreCouleur d'arrière plan de la prévisualisation :Espace de colorimétrie adapté à l'impression, compatible Adobe RGB (1998)PrioritésPhotos de priorité 1Photos de priorité 2Photos de priorité 3Traitement de l'image %d/%dTraitement de l'image 1/%dProfileProgrèsPublic (tout le monde pourra voir le cliché)Exportation rapideRawstudioÉditeur d'objectifs RawstudioRépertoire d'objectifs RawstudioPrise de vue pilotée par RawstudioIl est nécessaire d'authentifier Rawstudio avant de pouvoir publier des photos sur votre compte Facebook.Il est nécessaire d'authentifier Rawstudio avant de pouvoir publier vos photos sur votre compte Flickr.Rawstudio n'a pu publier la photo car l'authentification a expiré. Procéder de nouveau à l'authentification de Raswtudio afin de publier sur Flickr.PrêtRawstudio a reçu une erreur %d en attendant le résultat de l'appareil. Détail de l'erreur: %s Rawstudio a reçu une erreur %d en attendant le résultat de l'appareil. Détail de l'erreur: %s RougeAjustement du canal rougeCorrection d'aberration chromatique RougeSupprimerSupprimer toutSuppression en cours des images du traitement par lotRéinitialiserRéinitialiser la courbeConserver les données EXIFRéessayer l'opération ?_Tourner dans le sens horaireTourner dans le sens trigonométriqueTourne la photo de 90° dans le sens horaireTourne la photo de 90° dans le sens trigonométriqueRègle des tiersSaturSaturationSauvegarder en TIFF 16 bitSauvegarder en PNG 16 bit linéairesSauvegarder la courbe sous ...Sauvegarder en TIFF non compresséSauvegarde de %s ...Secondes entre chaque prise de vue:Sélectionner une actionSélectionner Tout/AucunSélectionnez OK pour utiliser cet écran pour la pré-visualisation en plein écran.Sélectionner une courbe enregistréeSélectionnez l'écran pour la pré-visualisation en plein écran.Sélectionner l'appareil:Sélectionnez l'écran pour la pré-visualisation en plein écran.Sélectionner les paramètres à copierSélectionner les paramètres à ajouter au traitement par lotSeptembreUtiliser l'objectifParamètreNettetéNettetéForce du filtre de nettetéMontrer le nom de fichier dans la vue en icônesAffichage du masque d'expositionVitesse d'obturationArrêt déjà en cours de la thread de contrôle. Arrêt en cours du thread asynchrone Arrêt en cours de la thread de capture. Arrêt en cours de la thread actuelle afin d'activer le contrôle à distance. TailleDémarrage en cours de la thread de prise de vue à intervalle régulier. Démarrage de la thread de monitoring. DémarrerDémarrer la prise de vueStatut:Étape 1:Étape 2:Arrêter la prise de vueRedresser: dessiner une ligne sur l'image pour symboliser une horizontale ou une verticale. Bouton droit pour annuler.Changer d'utilisateurTCATIFF (Tagged Image File Format)Recharche de tagRecherche de Tag [%s]TagsTags des nouvelles images:Tags, séparés par des espaces:Prendre la photoTempTempératureLe fichier "%s" existe déjà. Souhaitez vous écraser le fichier ?Le port indiqué (%s) ne peut être trouvé.Temps restant: %dh %dm %dsTemps restant: ...TimestampTeinteDécalage de teinteTitreOutilsTransformationsU (%d)U (-)Incapable de détecter plus d'un écran. Ne peut pas utiliser la fenêtre de pré-visualisation plein écran.Incapable de détecter l'écran pour une pré-visualisation plein écranErreur inattendue provenant de FacebookErreur inattendue de PicasaPhotos sans prioritéMettre à jour la base de donnée lensfunPublier la photo sur FacebookPublier la photo sur FlickrPublier la photo sur PicasaUtiliser le thème systèmeNom d'utilisateur:VignVignettageCorrection du vignettageVisible pour la familleVisible pour les amisWBAsciiEn attente de la fin des tâches en coursAttente de l'image suivante. Avertissement: Le téléchargement de l'image a été plus long que l'intervalle de prise de vue choisi. Le téléchargement a duré %.1f secondes. Il serait préférable d'augmenter la durée de l'intervalle de prise de vue. Erreur lors de l'authentification. Réessayer plus tard.Bienvenue dans le mode de prise de vue pilotée ! Assurez vous bien que votre appareil n'est pas monté par votre système d'exploitation. Balance des blancsLargeurLargeur :Réessayer l'opération ?Vos fichiers seront effacés définitivement.Votre configuration ne semble pas supporter les visuels RGBA et/ou le compositing. Veuillez vous référer au manuel de votre système afin d'activer les visuels RGBA et le compositing._1_2_3À _proposAjouter au traitement par lotAjouter la _vue courante au traitement par lot_AutoGroupement automatique_Traitement par lot_Appareil_Copier l'image vers le presse papierCopier les paramètres_Cadrer_Supprimer les photos marquées_ÉditionExporter _sousExporter vers _GIMP_Masque d'exposition_FichierMarquer la photo pour _suppressionPlein _écran_Grouper_Aide_IcônesBase de donnée d'objectifs_Voil noirPhoto _suivantePhoto _suivanteDocumentation en ligneOuvrir un répertoireColler les paramètres_Photo_PréférencesPhoto _précédentePhoto _précédente_Export rapide_Quitter_Recharger le répertoireSupprimer du traitement par lot_Supprimer la prioritéRéinitialiser les paramètresRevenir aux _anciens paramètres_Sauvegarder les paramètres par défaut de l'appareilChoisir la _priorité_Montrer la photo sur le moniteur secondaire_Instantané_Trier par_Séparer_Démarrer_Redresser_Tag photo..._Prise de vue pilotée_OutilsAnnuler le _cadrage_DégrouperAnnuler le _redressement_Vue_Balance des blancsZoom à la taille de la _fenêtrepixelsTéléobjectifGrand anglerawstudio-2.0/po/hu.gmo0000644000175000017500000004024711546436027012072 00000000000000 tghimquw   "&< R]at$<L!l    "$).DKRn    ,@O^qw    ! 4 ?IY x     ;GPXiy , 1b>'     '= Dej ( 8 A O \ g t      ! !! .!c8!!)"/"3" :"E" K"W"h"%"-""" ""## /#+=#i#q#w## ####### #### $ $&$+$1$ 7$B$X$m$$$ $$$=$ %%.%L%%%%%%& &&&%&4&:&Q& W&b&r&&& &&&& & &&&& '' ','2'D']'n'~' '''' ' '''' ''' ((()))**!*3@*t**"T+w++++ ++ +++, ,%,),<,T,t,,,,,,&, -*-6H- - -)-- --(-.. .*. /.<.>.C. H.i. p.,z.+.+../$/ D/P/j///////0 00$.0 S0]0d0z000 000 0 00 1131*K1v11111 111 2 22 12 =2-K2y22 222222223 *343 R3]3t33 333Q3'3$434 J4!X4z444 4+4424)5/5 F5Q5g5~555555 6 6/6C6U6/f666 6$6$6$7<7E7c7 v7`77w8}8888888 89;9Q9 X9e9|999D9 :: :"*: M:[: b:l:{:::::::: ; ;; ";-;?;U;u;;; ;;;8;"< 3<.@<o<== = == ,=6= P=]=p= == ====># >->@>Q> Y> g>s>>> >>>> ? ?&?@?%V?!|?? ? ? ???@@ /@P@o@w@@@:X aAv@b"-yV d! ,1 >sc(9%'8p^FU5R0j2I} L3*]mnYD~u/. Px e|TWQZ6) hofli K;Nqrz\={Ok[`#+EwG7g<&$?M_S4BHCJt A B C %%2c - Incremental counter%d - Date from EXIF (YYYY-MM-DD)%d photos added to batch queue%f - Original filename%s Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!%s - Setting id (A, B or C)%t - Time from EXIF (HH:MM:SS)* (%d)-1 (%d)10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)Aperture: F/%.01f Focal length: %dmm ISO: %u Shutter speed: %.1fs Shutter speed: 1/%.0fs Time: %s%s AA raw image converter for GTK+/GNOMEAdd Profile ...Adjusting to auto white balanceAdjusting to camera white balanceAll ProfilesAll filesAll photos (excluding deleted)ApertureAspectAuthenticate RawstudioAuto adjust curve endsBBasicBatchBlueBuffer emptyCCA BCA RCamera Profiles (DCP)CancelChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Channel MixerChannel mixerChoose output directoryColDnColor Profiles (ICC and ICM)Color denoiseConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrContrastCopied settingsCouldn't open photoCropCurveD (%d)Delete photosDeleted photosDeleting photosDenoiDenoiseDescriptionDirectoryDirectory:Display NavigationDon't cropEdit lensError exportingError exporting photo to gimp.Export FileExport dimensionsExport failedExporting to %sExposExposureFile exportedFile type:FilenameFilename example:Filename template:Flickr errorFlipFlip the photo over the x-axisFocallengthFreeformGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2GreenGridHarmonious triangles #1Harmonious triangles #2Height:Hiding exposure maskHistogramHistogram height:HueISOISO paper (A4)IconImage openedIt seems like rawstudio lost its authentication to upload to your account, please re-authenticate.JPEG (Joint Photographic Experts Group)JPEG QualityKeep aspectLast image:Light out mode not availableLoading %s ...Maximum sizeMaximum size: %d x %dMirrorMirror the photo over the y-axisNameNo white balance to set fromNoneNothing to pasteOpenOpen curve ...Open directoryOpen recursiveOpening directory...Opening photo ...Output directory:PNG (Portable Network Graphics)Pasted settingsPercent:Photo height:Photo scale:Photo sizePhoto width:Place cache in home directoryPreferencesPreview background color:PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProgressPublic (everyone can see this)Quick exportRawstudioRawstudio needs to be authenticated before it will be able to upload photos to your Flickr account.Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr.ReadyRedRemoveRemove allResetReset curveRotate ClockwiseRotate Counter ClockwiseRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturSaturationSave 16 bit TIFFSave curve as ...Save uncompressed TIFFSaving %s ...Select which settings to add to batch queueSettingSharpSharpenShowing exposure maskShutterspeedSizeStartStep 1:Step 2:TCATIFF (Tagged Image File Format)Tag searchTagsTempTime left: %dh %dm %dsTime left: ...TimestampTintTitleToolsTransformsU (%d)Unprioritized photosUpload photo to FlickrUse system themeVignVignettingVisible to FamilyVisible to FriendsWe recieved an error during authentication. Please try again.White balanceWidth:Your files will be permanently deleted!Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing._1_2_3_About_Add to batch queue_Auto_Auto group_Batch_Camera_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Lights out_Next Photo_Open Directory_Paste settings_Photo_Preferences_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Set Priority_Sort by_Split_Start_Straighten_Tag Photo..._Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelsProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-03-26 03:39+0100 PO-Revision-Date: 2010-07-31 21:50+0100 Last-Translator: Andras Dosztal Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: Hungarian X-Poedit-Country: HUNGARY X-Poedit-SourceCharset: utf-8 A B C%%2c - Növekvő számláló%d - EXIF dátum (ÉÉÉÉ-HH-NN)%d fénykép hozzáadva a kötegelt feldolgozáshoz%f - Eredeti fájlnév%s Ezzel a hibával a Rawstudio még nem találkozott, Kérjük, össza meg velünk, hogyan találta, és hogyan lehet előidézni, hogy hasznosabb hibaüzenetet tudjunk írni. Köszönjük!%s - Beállítás ID (A, B vagy C)%t - EXIF idő (ÓÓ:PP:MM)* (%d)-1 (%d)10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)Rekesz: F/%.01f Fókusztávolság: %dmm ISO: %u Zársebesség: %.1fs Zársebesség: 1/%.0fs Idő: %s%s ANyerskép-átalakító GTK+/GNOME aláProfil hozzáadásaFehéregyensúly automatikus beállításaFehéregyensúly beállítása a fényképezőgépéreMinden profilMinden fájlMinden fénykép (kivéve a törölteket)RekeszNézőpontRawstudio azonosításaGörbe végeinek automatikus állításaBAlapKötegelésKékÜres pufferCCA BCA RFényképezőgép profilok (DCP)MégseMódosítA fénykép prioritása megváltoztatva (%d)A fénykép prioritása megváltoztatva (*)A fénykép prioritása megváltoztatva (T)CsatornakeverőCsatornakeverőVálassza ki a kimeneti könyvtáratSzZajcsökkSzínprofil (ICC és ICM)Színzaj csökkentéseÁllandó arány: %dÁllandó magasságÁllandó magasság: %dÁllandó arányÁllandó szélességÁllandó szélesség: %dKontrKontrasztBeállítások átmásolvaA fényképet nem lehetett megnyitniLevágásGörbeT (%d)Fényképek törléseTörölt fényképekFényképek törléseZajcsökkZajcsökkentésLeírásKönyvtárKönyvtár:Navigáció megjelenítéseNe vágja leLencse szerkesztéseHiba az exportálásbanHiba a fénykép GIMP-be epxortálásábanExportált fájlExportálás méreteiExportálás sikertelenExportálás a(z) %s helyreExpoExpozícióFájl exportálvaFájl típusa:FájlnévFájlnév példa:Fájlnév sablon:Flickr hibaMegfordításFénykép megfordítása az x-tengely menténFókusztávolságFreeformÁltalánosArany téglalapArany kiválasztásArany háromszög 1Arany háromszög 2ZöldRácsHarmonikus háromszög 1Harmonikus háromszög 2MagasságExpozíciós maszk elrejtéseHisztogramHisztogram magassága:SzínárnyalatISOA4 papírIkonFénykép megnyitvaA Rawstudio elvesztette az azonosítót a fiókjához, azonosítsa magát ismét.JPEG (Joint Photographic Experts Group)JPEG minőségKéparány megtartásaUtolsó kép:A 'light out' mód nem elérhető%s betöltése...Maximális méretMaximális méret: %d x %dTükrözésFénykép tükrözése az y-tengely menténNévNincs fehéregyensúly, amiből állítani lehetneNincsNincs mit beilleszteniMegnyitásGörbe megnyitása...Könyvtár megnyitásaRekurzív megnyitásKönyvtár megnyitása...Fénykép megnyitásaKimeneti könyvtár:PNG (Portable Network Graphics)Beillesztett beállításokSzázalék:Képmagasság:Fénykép arányai:Fénykép méreteKépszélesség:Gyorsítótár elhelezése a home könyvtárbanBeállításokElőnézet háttérszíne:PrioritásokElsődleges prioritású fényképekMásodlagos prioritású fényképekHarmadlagos prioritású fényképekFolyamatPublikus (mindenki láthatja)Gyors exportálásRawstudioA Rawstudionak először azonosítania kell Önt, mielőtt fényképeket töltene fel a FlickrreA Rawstudio nem tudta feltölteni a képet, mert az azonosítás vissza lett vonva. A fájlok megosztásához a Azonosítsa magát ismét a Flickren.KészVörösEltávolításAz összes eltávolításaVisszaállításGörbe visszaállításaForgatás jobbraForgatás balraKép forgatása 90 fokkal jobbraKép forgatása 90 fokkal balraHarmadolás szabályaSzaturSzaturáció16 bites TIFF mentéseGörbe mentése másként...Tömörítetlen TIFF mentése%s mentése...Válassza ki, melyik beállításokat adja hozzá a kötegelt sorhozBeállításÉlesÉlesítésExpozíciós maszk megjelenítéseZársebességMéretIndításElső lépés:Második lépésTCATIFF (Tagged Image File Format)Címke keresésCímkékHőmérsékletHátralevő idő: %d:%d:%dHátralevő idő...IdőbélyegÁrnyalatCímEszközökTranszformációkN (%d)Prioritás Néküli fényképekFénykép feltöltése FlickrreRendszertéma használataVinyVinyettálásCsalád láthatjaBarátok láthatjákHiba történt az azonosítás során. Próbálja újra.FehéregyensúlySzélesség:A fájlok véglegesentörölve lesznek!Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing._1_2_3_Névjegy_Hozzáadás a sorhoz_AutomataA_utomata csoportosítás_Kötegelés_FényképezőgépBeállítások má_solása_LevágásMegjelölt képek _törlése_Szerkesztés_Exportálás máskéntExportálás G_IMP-beE_xpozíció maszk_FájlFénykép megjelölése _törlésre_Teljes képernyő_Csoportosítás_Súgó_Ikonkészlet_Lights out_Következő fénykép_Könyvtár megnyitásaBeállítások _beszúrása_Fénykép_Beállítások_Előző fénykép_Gyors exportálás_KilépésKönyvtár új_ratöltése_Eltávolítás a sorbólPrioritás tö_rléseBeállítások _alapálapotba tevéseBeállítások _visszaállítása_Prioritás beállítása_Rendezés_Felosztás_Indítás_KiegyenesítésFénykép _címkézéseE_szközkészletLevágás _megszüntetéseCsoportosítás me_gszüntetéseEgyenesítés me_gszüntetése_NézetFehér_egyensúly_Nagyítás a szélekigpixelrawstudio-2.0/po/it.po0000644000175000017500000015162711547411676011737 00000000000000# Italian translation for Rawstudio. # Copyright (C) 2006-2008 Anders Brander and Anders Kvist # This file is distributed under the same license as the Rawstudio package. # # Simone Contini , 2008. msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-04-07 20:26+0200\n" "PO-Revision-Date: 2011-04-07 21:37+0100\n" "Last-Translator: Simone Contini \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Italian\n" "X-Poedit-Country: ITALY\n" #: librawstudio/rs-lens-db-editor.c:325 msgid "All lenses" msgstr "Tutte le ottiche" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "Errore nell'aggiornamento del database di lensfun" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "Database di lensfun aggiornato" #: librawstudio/rs-lens-db-editor.c:565 msgid "Rawstudio Lens Library" msgstr "Libreria di ottiche di Rawstudio" #: librawstudio/rs-lens-db-editor.c:590 msgid "Lens make" msgstr "Marca ottica" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "Modello ottica" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "Focale" #: librawstudio/rs-lens-db-editor.c:602 #: librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1530 msgid "Aperture" msgstr "Apertura" #: librawstudio/rs-lens-db-editor.c:606 msgid "Camera make" msgstr "Marca fotocamera" #: librawstudio/rs-lens-db-editor.c:610 msgid "Camera model" msgstr "Modello fotocamera" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "Abilitato" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "Aggiornamento del database di lensfun" #: librawstudio/rs-lens-db-editor.c:734 msgid "Could not create temporary directory." msgstr "Impossibile creare la directory temporanea." #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "Impossibile ottenere la lista dei file da %s." #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "Impossibile ottenere il file da %s o scriverlo su %s." #: librawstudio/rs-lens-db-editor.c:796 #, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Impossibile creare datadir per lensfun - %s" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "Errore nella copia del file %s su %s\n" #: librawstudio/rs-lens-db-editor.c:939 msgid "Rawstudio Lens Editor" msgstr "Editor ottiche di Rawstudio" #: librawstudio/rs-lens-db-editor.c:950 msgid "Lens Make" msgstr "Marca ottica" #: librawstudio/rs-lens-db-editor.c:954 msgid "Lens Model" msgstr "Modello ottica" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "Lunghezza focale" #: librawstudio/rs-lens-db-editor.c:966 msgid "Camera Make" msgstr "Marca fotocamera" #: librawstudio/rs-lens-db-editor.c:970 msgid "Camera Model" msgstr "Modello fotocamera" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "Abilita questa ottica" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "Imposta ottica" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "Libreria di ottiche" #: librawstudio/rs-library.c:254 #, c-format msgid "Could not open database %s" msgstr "Impossibile aprire il database %s" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "grandangolo" #: librawstudio/rs-library.c:816 msgid "telephoto" msgstr "teleobiettivo" #: librawstudio/rs-library.c:832 msgid "January" msgstr "Gennaio" #: librawstudio/rs-library.c:835 msgid "February" msgstr "Febbraio" #: librawstudio/rs-library.c:838 msgid "March" msgstr "Marzo" #: librawstudio/rs-library.c:841 msgid "April" msgstr "Aprile" #: librawstudio/rs-library.c:844 msgid "May" msgstr "Maggio" #: librawstudio/rs-library.c:847 msgid "June" msgstr "Giugno" #: librawstudio/rs-library.c:850 msgid "July" msgstr "Luglio" #: librawstudio/rs-library.c:853 msgid "August" msgstr "Agosto" #: librawstudio/rs-library.c:856 msgid "September" msgstr "Settembre" #: librawstudio/rs-library.c:859 msgid "October" msgstr "Ottobre" #: librawstudio/rs-library.c:862 msgid "November" msgstr "Novembre" #: librawstudio/rs-library.c:865 msgid "December" msgstr "Dicembre" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "Aggiungi profilo..." #: librawstudio/rs-profile-selector.c:242 msgid "Embedded Profile" msgstr "Profilo incorporato" #: librawstudio/rs-profile-selector.c:244 msgid "(Select Profile)" msgstr "(Seleziona Profilo)" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "Espos" #: librawstudio/rs-settings.c:80 msgid "Exposure Compensation" msgstr "Compensazione esposizione" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 msgid "Satur" msgstr "Satur" #: librawstudio/rs-settings.c:86 #: src/rs-actions.c:465 msgid "Saturation" msgstr "Saturazione" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 #: src/rs-actions.c:466 msgid "Hue" msgstr "Tinta" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "Spostamento tonalità" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "Contr" #: librawstudio/rs-settings.c:98 #: src/rs-actions.c:467 msgid "Contrast" msgstr "Contrasto" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 #: librawstudio/rs-settings.c:116 msgid "Temp" msgstr "Temp" #: librawstudio/rs-settings.c:104 #: librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "Temperatura" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 #: librawstudio/rs-settings.c:122 msgid "Tint" msgstr "Tinta" #: librawstudio/rs-settings.c:110 #: librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "Spostamento tinta" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "WBAscii" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 msgid "Sharp" msgstr "Nitid" #: librawstudio/rs-settings.c:133 msgid "Sharpen Amount" msgstr "Nitidezza" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "" #: librawstudio/rs-settings.c:145 msgid "Colour Denoising" msgstr "" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "Vign" #: librawstudio/rs-settings.c:163 msgid "Vignetting Correction" msgstr "Correzione vignettatura" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 msgid "Red" msgstr "Rosso" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "Verde" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "Blu" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 msgid "JPEG Quality" msgstr "Qualità JPEG" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "Carica foto su Facebook" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "Passo 1:" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "Passo 2:" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "Errore di Facebook non gestito" #: plugins/output-facebook/output-facebook.c:329 msgid "Rawstudio needs to be authenticated before it will be able to upload photos to your Facebook account." msgstr "Rawstudio necessità di essere autenticato prima di poter caricare le foto sul tuo account Facebook." #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "Album" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "Crea album" #: plugins/output-flickr/output-flickr.c:113 msgid "Title" msgstr "Titolo" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "Descrizione" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "Etichette" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "Pubblica (visibile da chiunque)" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "Visibile dagli Amici" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "Visibile dalla Famiglia" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "Carica foto su Flickr" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "" #: plugins/output-flickr/output-flickr.c:306 msgid "Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" #: plugins/output-flickr/output-flickr.c:309 msgid "It seems like rawstudio lost its authentication to upload to your account, please re-authenticate." msgstr "Sembra che rawstudio abbia perso l'autenticazione per invare sull'account, autenticare nuovamente." #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!" msgstr "" "%s\n" "\n" "Nota: questo errore non è gestito da Rawstudio. Perfavore indicaci che l'hai trovato e come riprodurlo così potremo scrivere un messaggio di errore più utile. Grazie!" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "Errore di Flickr" #: plugins/output-flickr/output-flickr.c:374 msgid "Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account." msgstr "Rawstudio necessità di essere autenticato prima di poter caricare le foto sul tuo account Flickr." #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 msgid "Full export path" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "Spazio di colore utilizzato per il salvataggio" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 msgid "Copy EXIF metadata" msgstr "Copia Metadati EXIF" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "Carica foto su Picasa" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "Errore da Picasa non gestito" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "Utente corrente:" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "(autenticazione riuscita)" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "(impossibile autenticarsi)" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "(utente non inserito)" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "Impossibile autenticarsi" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "Ritenta l'operazione?" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "Si è verificato un errore durante la comunicazione con il web service di Picasa:" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "Vuoi ritentare l'operazione?" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "Autenticazione album web di Picasa" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "Immetti il nome utente e la password per l'album web di Picasa." #: plugins/output-picasa/rs-picasa-client.c:234 msgid "Username: " msgstr "Utente:" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "Password: " #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "Salva PNG 16 bit lineare" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "Copia metadati EXIF su XMP" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Salva TIFF non compresso" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "Salva TIFF 16 bit" #: plugins/output-tifffile/output-tifffile.c:108 msgid "TIFF (Tagged Image File Format)" msgstr "TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Nome file originale" #: src/filename.c:315 #, c-format msgid "%p - Path of original file" msgstr "%p - Percorso file originale" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - Contatore incrementale" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s - ID impostazione (A, B o C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "%d - Data da EXIF (YYYY-MM-DD)" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "%DY - Anno da EXIF (YYYY)" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "%Dy - Anno da EXIF (YY)" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "%Dm - Mese da EXIF (MM)" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "%DM - Mese da EXIF (nome)" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "%Dd - Giorno da EXIF (DD)" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "%DD - Giorno della settimana da EXIF" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "%t - Ora da EXIF (HH:MM:SS)" #: src/gtk-interface.c:154 msgid "Width" msgstr "Larghezza" #: src/gtk-interface.c:154 msgid "Height" msgstr "Altezza" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Apertura foto in corso..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "Impossibile aprire la foto" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Immagine caricata" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "Cambiata la priorità della foto (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "Cambiata la priorità della foto (D)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "Cambiata la priorità della foto (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "Non è stato rilevato più di un monitor. Impossibile aprire l'anteprima a schermo intero" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "Seleziona il monitor per l'anteprima a schermo intero" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Cartella:" #: src/gtk-interface.c:777 #: src/rs-batch.c:1068 msgid "Choose output directory" msgstr "Scegliere la cartella di destinazione" #: src/gtk-interface.c:793 #: src/rs-batch.c:1079 #: src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Modello nome file:" #: src/gtk-interface.c:806 #: src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Esempio nome file:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Tipo file:" #. Add preferences box #: src/gtk-interface.c:881 #: src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Preferenze" #: src/gtk-interface.c:894 msgid "Preview background color:" msgstr "Colore di sfondo nell'anteprima:" #: src/gtk-interface.c:909 msgid "Histogram height:" msgstr "Altezza dell'istogramma:" #: src/gtk-interface.c:919 msgid "Use system theme" msgstr "Usa l'aspetto di sistema" #: src/gtk-interface.c:924 msgid "Place cache in home directory" msgstr "Memorizza le informazioni nella cartella utente" #: src/gtk-interface.c:928 msgid "Display Colorspace:" msgstr "Spazio di colore del monitor:" #: src/gtk-interface.c:940 msgid "Exposure Mask Colorspace:" msgstr "Spazio di colore della maschera di esposizione:" #: src/gtk-interface.c:1013 msgid "General" msgstr "Generale" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1015 msgid "Quick export" msgstr "Esportazione rapida" #: src/gtk-interface.c:1335 msgid "Opening directory..." msgstr "Apri cartella..." #: src/gtk-interface.c:1362 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1459 msgid "Open recursive" msgstr "Apri ricorsivamente" #: src/gtk-interface.c:1467 msgid "Directory" msgstr "Cartella" #: src/gtk-interface.c:1470 msgid "Tag search" msgstr "Ricerca etichette" #: src/gtk-interface.c:1476 msgid "Tools" msgstr "Strumenti" #: src/gtk-interface.c:1477 msgid "Batch" msgstr "Esecuzione" #: src/gtk-interface.c:1478 msgid "Open" msgstr "Apri" #: src/gtk-interface.c:1520 msgid "Ready" msgstr "Pronto" #: src/gtk-progress.c:63 #: src/gtk-progress.c:100 #: src/gtk-progress.c:123 msgid "Progress" msgstr "Avanzamento" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Apri cartella" #: src/rs-actions.c:253 #: src/rs-batch.c:543 msgid "Could not create output directory." msgstr "Impossibile creare la cartella di destinazione" #: src/rs-actions.c:257 msgid "Exporting..." msgstr "Esportazione..." #: src/rs-actions.c:265 msgid "File exported" msgstr "File esportato" #: src/rs-actions.c:270 #: src/rs-actions.c:293 msgid "Export failed" msgstr "Esportazione fallita" #: src/rs-actions.c:300 msgid "Exporting to GIMP..." msgstr "Esportazione in GIMP..." #: src/rs-actions.c:305 msgid "Error exporting" msgstr "Errore nell'esportazione" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "Errore nell'esportazione foto in GIMP." #: src/rs-actions.c:331 #: src/rs-actions.c:349 msgid "Deleting photos" msgstr "Cancellazione foto in corso" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "I file saranno permanentemente cancellati!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Cancella foto" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "In attesa del completamento dei lavori" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "Copia dell'immagine negli appunti" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "Immagine copiata negli appunti" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "ERRORE: Impossibile copiare l'immagine negli appunti" #. Build GUI #: src/rs-actions.c:463 msgid "Profile" msgstr "Profilo" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Esposizione" #: src/rs-actions.c:468 msgid "White balance" msgstr "Bilanciamento del bianco" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Nitidezza" #: src/rs-actions.c:470 msgid "Denoise" msgstr "" #: src/rs-actions.c:471 msgid "Color denoise" msgstr "" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "Miscela canali" #: src/rs-actions.c:473 msgid "TCA" msgstr "" #: src/rs-actions.c:474 msgid "Vignetting" msgstr "Vignettatura" #: src/rs-actions.c:475 #: src/rs-toolbox.c:803 msgid "Curve" msgstr "Curva" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "Seleziona tutto/nulla" #: src/rs-actions.c:498 msgid "Select settings to copy" msgstr "Scelta delle impostazioni da trasferire" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Impostazioni copiate" #: src/rs-actions.c:587 msgid "Pasting settings to images" msgstr "Trasferimento delle impostazioni alle immagini" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Impostazioni trasferite" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Nessuna impostazione da trasferire" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Buffer vuoto" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Correzione del bilanciamento del bianco automatica" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "Nessun bilanciamento del bianco da applicare" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Correzione del bilanciamento del bianco con l'impostazione di scatto" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "Etichette separate da spazi:" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "Aggiungi etichette alla foto selezionata." #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "Maschera di esposizione visualizzata" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "Maschera di esposizione nascosta" #: src/rs-actions.c:1067 msgid "Adding images to batch queue" msgstr "Aggiunta immagini alla coda di elaborazione" #: src/rs-actions.c:1084 #: src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "%d foto aggiunte alla coda di elaborazione" #: src/rs-actions.c:1101 #: src/rs-batch.c:210 msgid "A" msgstr "A" #: src/rs-actions.c:1102 #: src/rs-batch.c:213 msgid "B" msgstr "B" #: src/rs-actions.c:1103 #: src/rs-batch.c:216 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Selezionare i settaggi da\n" "aggiungere alla coda di elaborazione" #: src/rs-actions.c:1188 msgid "Removing images from batch queue" msgstr "Rimozione immagini dalla coda di elaborazione" #: src/rs-actions.c:1203 #, c-format msgid "%d photos removed from batch queue" msgstr "%d foto rimosse dalla coda di elaborazione" #. Not in any menu (yet) #: src/rs-actions.c:1254 #: src/rs-actions.c:1505 msgid "Add Profile ..." msgstr "Aggiungi profilo ..." #: src/rs-actions.c:1266 msgid "All Profiles" msgstr "Tutti i profili" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "Profili di colore (ICC e ICM)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Tutti i file" #: src/rs-actions.c:1399 msgid "A raw image converter for GTK+/GNOME" msgstr "Un convertitore di immagini raw per GTK+/GNOME" #: src/rs-actions.c:1436 msgid "_File" msgstr "_File" #: src/rs-actions.c:1437 msgid "_Edit" msgstr "_Modifica" #: src/rs-actions.c:1438 msgid "_Photo" msgstr "_Foto" #: src/rs-actions.c:1439 msgid "_Set Priority" msgstr "_Imposta Contrassegno" #: src/rs-actions.c:1440 msgid "_White Balance" msgstr "_Bilanciamento del Bianco" #: src/rs-actions.c:1441 msgid "_View" msgstr "_Visualizza" #: src/rs-actions.c:1442 msgid "_Sort by" msgstr "_Ordina per" #: src/rs-actions.c:1443 msgid "_Batch" msgstr "_Esecuzione" #: src/rs-actions.c:1444 msgid "_Help" msgstr "_Aiuto" #: src/rs-actions.c:1446 msgid "_Snapshot" msgstr "_Anteprima" #. File menu #: src/rs-actions.c:1449 msgid "_Open Directory" msgstr "_Apri Cartella" #: src/rs-actions.c:1450 msgid "_Quick Export" msgstr "Esportazione _Rapida" #: src/rs-actions.c:1451 msgid "_Export As" msgstr "Esporta _Come" #: src/rs-actions.c:1452 msgid "_Export to Gimp" msgstr "Esporta in _GIMP" #: src/rs-actions.c:1453 msgid "_Copy Image to Clipboard" msgstr "_Copia immagine negli appunti" #: src/rs-actions.c:1454 msgid "_Reload directory" msgstr "_Riapri Cartella" #: src/rs-actions.c:1455 msgid "_Delete flagged photos" msgstr "_Cancella foto contrassegnate" #: src/rs-actions.c:1456 msgid "_Quit" msgstr "_Chiudi" #. Edit menu #: src/rs-actions.c:1459 msgid "_Revert settings" msgstr "_Annulla impostazioni" #: src/rs-actions.c:1460 msgid "_Copy settings" msgstr "_Copia settaggio" #: src/rs-actions.c:1461 msgid "_Paste settings" msgstr "_Incolla settaggio" #: src/rs-actions.c:1462 msgid "_Reset settings" msgstr "_Ripristina settaggio" #: src/rs-actions.c:1463 msgid "_Save camera default settings" msgstr "_Salva impostazione di default della fotocamera" #: src/rs-actions.c:1464 msgid "_Preferences" msgstr "_Preferenze" #. Photo menu #: src/rs-actions.c:1467 msgid "_Flag photo for deletion" msgstr "_Contrassegna per cancellazione" #: src/rs-actions.c:1468 msgid "_1" msgstr "_1" #: src/rs-actions.c:1469 msgid "_2" msgstr "_2" #: src/rs-actions.c:1470 msgid "_3" msgstr "_3" #: src/rs-actions.c:1471 msgid "_Remove priority" msgstr "_Rimuovi contrassegno" #: src/rs-actions.c:1472 msgid "_Auto" msgstr "_Auto" #: src/rs-actions.c:1473 msgid "_Camera" msgstr "_Macchina" #: src/rs-actions.c:1474 msgid "_Crop" msgstr "_Ritaglia" #: src/rs-actions.c:1475 msgid "_Uncrop" msgstr "Annulla _ritaglio" #: src/rs-actions.c:1476 msgid "_Straighten" msgstr "_Raddrizza" #: src/rs-actions.c:1477 msgid "_Unstraighten" msgstr "Annulla _raddrizza" #: src/rs-actions.c:1478 msgid "_Group" msgstr "_Raggruppa" #: src/rs-actions.c:1479 msgid "_Ungroup" msgstr "_Suddividi" #: src/rs-actions.c:1480 msgid "_Auto group" msgstr "" #: src/rs-actions.c:1481 msgid "_Tag Photo..." msgstr "_Etichetta Foto..." #: src/rs-actions.c:1482 msgid "Rotate Clockwise" msgstr "Ruota in senso orario" #: src/rs-actions.c:1483 msgid "Rotate Counter Clockwise" msgstr "Ruota la foto in senso antiorario" #: src/rs-actions.c:1484 msgid "Flip" msgstr "Ribalta" #: src/rs-actions.c:1485 msgid "Mirror" msgstr "Rifletti" #. View menu #: src/rs-actions.c:1488 msgid "_Previous photo" msgstr "Foto _Precedente" #: src/rs-actions.c:1489 msgid "_Next Photo" msgstr "Foto _Successiva" #: src/rs-actions.c:1490 msgid "_Lens Library" msgstr "_Libreria ottiche" #: src/rs-actions.c:1491 msgid "_Tethered Shooting" msgstr "" #. Batch menu #: src/rs-actions.c:1494 msgid "_Add to batch queue" msgstr "_Aggiungi alla coda di elaborazione" #: src/rs-actions.c:1495 msgid "_Add view to queue..." msgstr "_Aggiungi la vista alla coda..." #: src/rs-actions.c:1496 msgid "_Remove from batch queue" msgstr "_Rimuovi dalla coda di elaborazione" #: src/rs-actions.c:1497 msgid "_Start" msgstr "_Avvia" #. help menu #: src/rs-actions.c:1500 msgid "_Online Documentation" msgstr "D_ocumentazione sul web" #: src/rs-actions.c:1501 msgid "_About" msgstr "_Informazioni su..." #: src/rs-actions.c:1510 msgid "_Zoom to fit" msgstr "Adatta _zoom" #: src/rs-actions.c:1511 msgid "_Iconbox" msgstr "_Anteprime" #: src/rs-actions.c:1512 msgid "_Toolbox" msgstr "_Strumenti" #: src/rs-actions.c:1513 msgid "_Fullscreen" msgstr "_Schermo intero" #: src/rs-actions.c:1514 msgid "_Show Photo On Secondary Monitor" msgstr "_Mostra Foto Sul Monitor Secondario" #: src/rs-actions.c:1515 msgid "Show Filenames in Iconbox" msgstr "Mostra il nome dei file sotto le anteprime" #: src/rs-actions.c:1516 msgid "Load non-RAW images" msgstr "Carica immagini non RAW" #: src/rs-actions.c:1517 msgid "Do not Load Selected Images" msgstr "" #: src/rs-actions.c:1518 msgid "_Exposure mask" msgstr "_Maschera di esposizione" #: src/rs-actions.c:1519 msgid "_Split" msgstr "_Vista affiancata" #: src/rs-actions.c:1521 msgid "_Lights out" msgstr "" #: src/rs-actions.c:1527 msgid "Name" msgstr "" #: src/rs-actions.c:1528 msgid "Timestamp" msgstr "" #: src/rs-actions.c:1529 msgid "ISO" msgstr "ISO" #: src/rs-actions.c:1531 msgid "Focallength" msgstr "" #: src/rs-actions.c:1532 msgid "Shutterspeed" msgstr "" #. Snapshot labels #: src/rs-actions.c:1537 #: src/rs-toolbox.c:207 #: src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1538 #: src/rs-toolbox.c:208 #: src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1539 #: src/rs-toolbox.c:209 #: src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:460 msgid "Cancel" msgstr "Annulla" #: src/rs-batch.c:465 msgid "Last image:" msgstr "Ultima immagine:" #: src/rs-batch.c:491 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Tempo rimanente: %dh %dm %ds" #: src/rs-batch.c:492 #, c-format msgid "Processing Image %d/%d" msgstr "Elaborazione Immagine %d/%d" #: src/rs-batch.c:496 msgid "Time left: ..." msgstr "Tempo rimanente: ..." #: src/rs-batch.c:497 #, c-format msgid "Processing Image 1/%d." msgstr "Elaborazione Immagine 1/%d." #: src/rs-batch.c:511 #, c-format msgid "Loading %s ..." msgstr "Caricamento di %s..." #: src/rs-batch.c:587 #, c-format msgid "Saving %s ..." msgstr "Salvataggio di %s..." #: src/rs-batch.c:636 msgid "Could not export photo." msgstr "Impossibile esportare la foto." #: src/rs-batch.c:696 msgid "Icon" msgstr "Icona" #: src/rs-batch.c:703 msgid "Filename" msgstr "Nome file" #: src/rs-batch.c:710 msgid "Setting" msgstr "Impostazione" #: src/rs-batch.c:803 msgid "Start" msgstr "Avvia" #: src/rs-batch.c:806 msgid "Remove" msgstr "Rimuovi" #: src/rs-batch.c:809 msgid "Remove all" msgstr "Rimuovi tutte" #: src/rs-batch.c:919 #: src/rs-batch.c:1090 msgid "Edit output settings" msgstr "Modifica impostazioni di esportazione" #: src/rs-batch.c:955 msgid "Photo size" msgstr "Dimensione foto" #: src/rs-batch.c:963 msgid "Constant scale" msgstr "Scalatura fissa" #: src/rs-batch.c:964 msgid "Constant width" msgstr "Larghezza fissa" #: src/rs-batch.c:965 msgid "Constant height" msgstr "Altezza fissa" #: src/rs-batch.c:966 msgid "Maximum size" msgstr "Dimensione massima" #: src/rs-batch.c:979 msgid "Photo width:" msgstr "Larghezza foto:" #: src/rs-batch.c:981 #: src/rs-batch.c:990 msgid "pixels" msgstr "pixel" #: src/rs-batch.c:988 msgid "Photo height:" msgstr "Altezza foto:" #: src/rs-batch.c:997 msgid "Photo scale:" msgstr "Scalatura foto:" #: src/rs-batch.c:999 msgid "%" msgstr "%" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Larghezza fissa:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Altezza fissa:\n" "%d" #: src/rs-batch.c:1041 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "Scalatura fissa:\n" "%d" #: src/rs-batch.c:1045 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Dimensione massima:\n" "%d x %d" #: src/rs-batch.c:1075 msgid "Output directory:" msgstr "Cartella di destinazione:" #: src/rs-batch.c:1099 msgid "Change" msgstr "Modifica" #: src/rs-batch.c:1104 msgid "Export dimensions" msgstr "Dimensione di esportazione" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "" #: src/rs-camera-db.c:459 msgid "Model" msgstr "Modello" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "" #: src/rs-preview-widget.c:887 msgid "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing." msgstr "" #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Dimensione" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Griglia" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Nessuna" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "Sezione aurea" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "Regola dei terzi" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Triangoli aurei #1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Triangoli aurei #2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Triangoli armoniosi #1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Triangoli armoniosi #2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Formato" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "libero" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "Proporzione originale" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "Carta ISO (A4)" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "16:9 (HDTV)" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Doppio schermo XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "Rettangolo aureo" #: src/rs-preview-widget.c:1180 #: src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Ritaglia" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "Annulla ritaglio" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel crop" msgstr "" #: src/rs-preview-widget.c:1238 msgid "Straighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels." msgstr "" #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 #: src/rs-toolbox.c:522 msgid "Export File" msgstr "Esporta file" #: src/rs-save-dialog.c:282 msgid "File not saved!" msgstr "File non salvato!" #: src/rs-save-dialog.c:299 #, c-format msgid "Exporting to %s" msgstr "Esportazione su %s" #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "Sovrascrivo il file?" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Mantieni proporzioni" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Larghezza:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Altezza:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Ingrandimento:" #. All #: src/rs-store.c:298 #: src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Tutte le foto (escluse quelle cancellate)" #. 1 #: src/rs-store.c:302 #: src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Foto con contrassegno 1" #. 2 #: src/rs-store.c:306 #: src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Foto con contrassegno 2" #. 3 #: src/rs-store.c:310 #: src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Foto con contrassegno 3" #. Unsorted #: src/rs-store.c:314 #: src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Foto senza contrassegno" #. Deleted #: src/rs-store.c:318 #: src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Foto Cancellate" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Contrassegni" #: src/rs-store.c:500 msgid "NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable." msgstr "" #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" "%s\n" "\n" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "Marca: %s\n" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "Modello: %s\n" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "Lunghezza focale: %dmm\n" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "Apertura: F/%.01f\n" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "ISO: %u\n" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "Data: %s" #: src/rs-store.c:1371 msgid "* (-)" msgstr "* (-)" #: src/rs-store.c:1372 msgid "1 (-)" msgstr "1 (-)" #: src/rs-store.c:1373 msgid "2 (-)" msgstr "2 (-)" #: src/rs-store.c:1374 msgid "3 (-)" msgstr "3 (-)" #: src/rs-store.c:1375 msgid "U (-)" msgstr "U (-)" #: src/rs-store.c:1376 msgid "D (-)" msgstr "D (-)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "" #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "Spostamento file verso la cartella corrente fallito!\n" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "Impossibile aprire un file temporaneo sul disco" #: src/rs-tethered-shooting.c:558 msgid "Could not open image!\n" msgstr "Impossibile aprire l'immagine!\n" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "File scaricato con successo.\n" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:651 #: src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "" #: src/rs-tethered-shooting.c:692 #: src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "Scollegamento della fotocamera in uso\n" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "Impossibile accedere alla fotocamera %s sulla porta %s\n" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" "ERRORE: l'inizializzazione della fotocamera ha resituito %d.\n" "Il messaggio di errore è: %s\n" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "Terminazione del thread asincrono\n" #: src/rs-tethered-shooting.c:784 #: src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "Trovate %d fotocamere\n" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "Nessuna fotocamera selezionata - impossibile connettere!\n" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "Nessuna fotocamera connessa.\n" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:938 msgid "Stop Shooting" msgstr "Ferma scatti" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "Seleziona fotocamera:" #: src/rs-tethered-shooting.c:1003 msgid "Take Photo" msgstr "Scatta foto" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "" #. Status window #: src/rs-tethered-shooting.c:1022 msgid "Status:" msgstr "Stato:" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 msgid "Filename & Tags" msgstr "Nome del fine & Etichette" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Istogramma" #: src/rs-toolbox.c:443 msgid "Reset" msgstr "Reimposta" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr "" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr "" #: src/rs-toolbox.c:566 #: src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Apri curva..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "" #: src/rs-toolbox.c:700 msgid "Select Action" msgstr "Seleziona Azione" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Salva come..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Reimposta curva" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "Corregge automaticamente la fine della curva" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "Modifica ottica" #. Pack everything nice #: src/rs-toolbox.c:800 msgid "Basic" msgstr "Basilari" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "Miscelatore canali" #: src/rs-toolbox.c:802 msgid "Lens Correction" msgstr "Correzione dell'ottica" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Specchia la foto rispetto all'asse x" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Specchia la foto rispetto all'asse y" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Ruota la foto di 90 gradi in senso orario" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Ruota la foto di 90 gradi in senso antiorario" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Trasforma" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "Ottica sconosciuta" #: src/rs-toolbox.c:1035 msgid "Lens Disabled" msgstr "Ottica disattivata" #: src/rs-toolbox.c:1043 msgid "No Lens Information" msgstr "Nessuna informazione sull'ottica" #: src/rs-toolbox.c:1045 msgid "Camera Unknown" msgstr "Fotocamera sconosciuta" #: src/rs-toolbox.c:1050 msgid "No Photo" msgstr "Nessuna foto" #: src/rs-toolbox.c:1259 msgid "_Previous" msgstr "_Precedente" #: src/rs-toolbox.c:1260 msgid "_Next" msgstr "_Successiva" #~ msgid " %s added to batch queue" #~ msgstr "%s aggiunto alla coda di elaborazione" #~ msgid "%s already added to batch queue" #~ msgstr "%s già presente nella coda di elaborazione" #~ msgid "Not in batch queue" #~ msgstr "Non presente nella coda di elaborazione" #~ msgid "Processing photos" #~ msgstr "Elaborazione foto" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "Carica foto ad 8 bit (jpeg, png, ecc...)" #, fuzzy #~ msgid "Warmth" #~ msgstr "Temperatura di colore/Tinta" #, fuzzy #~ msgid "CA Red" #~ msgstr "Pronto" #~ msgid "Select color profile" #~ msgstr "Selezione del profilo di colore" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Profili di colore (icc e icm)" #~ msgid "Not a valid color profile." #~ msgstr "Profilo colore non valido." #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "" #~ "Il file selezionato non è un profilo di colore valido per la versione di " #~ "Rawstudio in uso." #~ msgid "Enable color management (experimental)" #~ msgstr "Abilita gestione del colore (sperimentale)" #~ msgid "Input profile" #~ msgstr "Profilo d'ingresso" #~ msgid "BuiltInRGBProfile" #~ msgstr "Profilo RGB incorporato" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Profilo di esportazione" #~ msgid "Intent" #~ msgstr "Intento" #~ msgid "Perceptual" #~ msgstr "Percettivo" #~ msgid "Relative colormetric" #~ msgstr "Colorimetrico relativo" #~ msgid "Absolute colormetric" #~ msgstr "Colorimetrico assoluto" #~ msgid "Colors" #~ msgstr "Colore" #, fuzzy #~ msgid "Change this" #~ msgstr "Modifica" #~ msgid "Background renderer active" #~ msgstr "Visualizzazione in sottofondo attiva" #~ msgid "File export canceled" #~ msgstr "Esportazione file cancellata" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "16-bit TIFF (Tagged Image File Format)" #~ msgid "Rotate the photo 180 degrees" #~ msgstr "Ruota la foto di 180 gradi" #~ msgid "Reset this setting" #~ msgstr "Ripristina questo settaggio" #~ msgid "_Zoom to 100%" #~ msgstr "_Zoom 100%" #~ msgid "Canon CR2" #~ msgstr "Canon CR2" #~ msgid "Canon CIFF" #~ msgstr "Canon CIFF" #~ msgid "Nikon NEF" #~ msgstr "Nikon NEF" #~ msgid "Minolta raw" #~ msgstr "Minolta raw" #~ msgid "Canon TIFF" #~ msgstr "Canon TIFF" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Panasonic raw" #~ msgstr "Panasonic raw" #~ msgid "Pentax raw" #~ msgstr "Pentax raw" #~ msgid "Adobe Digital negative" #~ msgstr "Adobe Digital negative" #~ msgid "Hasselblad" #~ msgstr "Hasselblad" #~ msgid "/File/_Open directory..." #~ msgstr "/File/_Apri cartella..." #~ msgid "/File/_Quick export" #~ msgstr "/File/_Esportazione rapida" #~ msgid "/File/_Export as..." #~ msgstr "/File/E_sporta come..." #~ msgid "/File/_Reload" #~ msgstr "/File/_Ricarica" #~ msgid "/_Edit/_Paste settings" #~ msgstr "/_Modifica/_Incolla impostazioni" #~ msgid "/_Edit/_Reset current settings" #~ msgstr "/_Modifica/_Ripristina impostazioni correnti" #~ msgid "/_Edit/sep1" #~ msgstr "/_Modifica/sep1" #~ msgid "/_Edit/_Preferences" #~ msgstr "/_Modifica/_Preferenze" #~ msgid "/_Photo/_Set priority/_2" #~ msgstr "/_Foto/_Imposta priorità/_2" #~ msgid "/_Photo/_Set priority/_3" #~ msgstr "/_Foto/_Imposta priorità/_3" #~ msgid "/_Photo/_Set priority/_Remove priority" #~ msgstr "/_Foto/_Imposta priorità/_Nessuna" #~ msgid "/_Photo/_White balance/_Auto" #~ msgstr "/_Foto/_Bilanciamento del bianco/_Automatico" #~ msgid "/_Photo/_White balance/_Camera" #~ msgstr "/_Foto/_Bilanciamento del bianco/_Scatto" #~ msgid "/_Photo/_Uncrop" #~ msgstr "/_Foto/_Annulla ritraglio" #~ msgid "/_Photo/_Straighten" #~ msgstr "/_Foto/_Raddrizza" #~ msgid "/_Photo/_Unstraighten" #~ msgstr "/_Foto/_Annulla raddrizza" #~ msgid "/_Photo/_Group photos" #~ msgstr "/_Foto/_Raggruppa" #~ msgid "/_Photo/_Ungroup photos" #~ msgstr "/_Foto/_Dividi gruppo" #~ msgid "/_View/sep1" #~ msgstr "/_Visualizza/sep1" #~ msgid "/_View/_Zoom in" #~ msgstr "/_Visualizza/_Zoom avanti" #~ msgid "/_View/_Zoom out" #~ msgstr "/_Visualizza/_Zoom indietro" #~ msgid "/_View/_Zoom to fit" #~ msgstr "/_Visualizza/_Adatta zoom" #~ msgid "/_View/_Zoom to 100%" #~ msgstr "/_Visualizza/_Zoom 100%" #~ msgid "/_View/sep2" #~ msgstr "/_Visualizza/sep2" #~ msgid "/_View/_Icon Box" #~ msgstr "/_Visualizza/_Anteprime" #~ msgid "/_View/_Tool Box" #~ msgstr "/_Visualizza/_Strumenti" #~ msgid "/_View/sep3" #~ msgstr "/_Visualizza/sep3" #~ msgid "/_View/_Show exposure mask" #~ msgstr "/_Visualizza/_Mostra maschera di esposizione" #~ msgid "/_Batch/_Add to batch queue" #~ msgstr "/_Esecuzione/_Aggiungi alla coda" #~ msgid "/_Batch/_Remove from batch queue" #~ msgstr "/_Esecuzione/_Rimuovi dalla coda" #~ msgid "/_Batch/_Start" #~ msgstr "/_Esecuzione/A_vvia" #~ msgid "Exp. mask" #~ msgstr "Masc.Esp." #~ msgid "Toggle exposure mask" #~ msgstr "Commuta maschera di esposizione" #~ msgid "Set zoom" #~ msgstr "Imposta zoom" #~ msgid "Zoom out" #~ msgstr "Zoom indietro" #~ msgid "Zoom in" #~ msgstr "Zoom avanti" #~ msgid "Zoom:" #~ msgstr "Zoom:" #~ msgid "Apply" #~ msgstr "Applica" #~ msgid "Split continuous" #~ msgstr "Separazione continua" rawstudio-2.0/po/ja.gmo0000644000175000017500000010453511546436027012051 00000000000000,<H(I(Z(s(w({((((((((),) F)g)")))))******++*+A+W+l+ u++ ++++++ +,,,4,O,_,p,,,,,,$,--%-D-a-!-- - - --E-1.:.@.G.N.e.|.~....$. ....$. / /"/8/G/ ^/ j/w// /// ////0 *0 80F0^0d0 00000000111'1:1&T1{1)1"1%1 2/!2&Q2x2212N2+3 ?3L3kQ333333 44#43494 A4 M4 W4b4t4444 44(4<(51e5 55555)5) 646Q6a66 66 666 667 7#7=7E7 N7\7 l7w7777 7777 7 7 88$8,8=8M8a8 u888888888 99)9 -979;9J9P9U9 o9|9!9b9': ;:H:P:U: Z:f: ~:: : : : : : : ::;;2;F;U;[; j;w;;";; ;;; ;G<)Z<Y<<<<=%=<=Y=^=o=x=========>>)> I>T>d>> > > > > >>@> ;?*G?r?<? ???? @!@8@@@I@ h@ u@@@@e@c.AAB<%BJbBBB#BB B BC $C0CECVCgC%C-CCC CCDD.D EDSD nD|D3DD$DD(E0E+HE tE~EEEEEEE E&E"F'3F7[FF"FFFFFFF GgG wGGG GGGGG GH HAH/UHHH HH HHH HHHFI.NI}IIIIIIJ+J WNW(PWyWW-W3W'X-AX oX|XXX-XIX{4H{%}{{{{{{{{}||| ||||%}&}6} ;}OE};}}}}~~ +~ 8~B~I~_~jt~Q~1Ok")''! @N S`s$+KǁƂʂς2" %(4"]  1DŽ%! GRl.ۅ 4 Q\du ņ͆ކ "+)Ul.ɇ" 1 <G[xÈ %?OV W(#isE&!;e(_gU67KR=lK].316{+[^B:Qd2[|OE05 t .p,uNY;*4  ]59 l<LJ XV=qmvdA/IhYxfx,n`hZaok?L> B&D\NG<T9\?'k#{jeyZFSMw OP0TfCz!$yz_vPA%) @F>iCrtjU~"V@}DIbH4Qb$'n/s -q-MS~c1u%p:m"aw`*^XoR+})r|W7J8g Gc2H83 (Cannot log in) (Logged in succesfully) A B C %%.1fs %2c - Incremental counter%DD - Day of week from EXIF%DM - Month from EXIF (Text)%DY - Year from EXIF (YYYY)%Dd - Date from EXIF (DD)%Dm - Month from EXIF (MM)%Dy - Year from EXIF (YY)%d - Date from EXIF (YYYY-MM-DD)%d photos added to batch queue%d photos removed from batch queue%dmm %f - Original filename%p - Path of original file%s Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!%s - Setting id (A, B or C)%t - Time from EXIF (HH:MM:SS)(No user entered)(Select Profile)* (%d)* (-)-. Click to edit value. Click to reset value1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Aperture: F/%.01f Focal length: %dmm ISO: %u Make: %s Model: %s Shutter speed: %.1fs Shutter speed: 1/%.0fs Time: %s%s AA raw image converter for GTK+/GNOMEAdd Profile ...Add profile ...Add tags to selected photo(s).Adding images to batch queueAdjusting to auto white balanceAdjusting to camera white balanceAlbumsAll ProfilesAll filesAll lensesAll photos (excluding deleted)An error was returned when communicating with the Picasa web service:ApertureAprilAspectAugustAuthenticate RawstudioAuto adjust curve endsBBasicBatchBlueBlue Amount AdjustmentBlue Chromatic Aberration CorrectionBuffer emptyCCA BCA RCamera %s on port %s failed to open Camera MakeCamera ModelCamera Profiles (DCP)Camera UnknownCamera defaults editorCamera makeCamera modelCamera monitor shutting down. CancelCannot log inCaptionCapture Enabled. Capturing. ChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Channel MixerChannel mixerChoose output directoryColDnColor Profiles (ICC and ICM)Color denoiseColour DenoisingConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrContrastCopied settingsCopy EXIF metadataCopy EXIF metadata to XMPCopy settings from active to new imageCopying image to clipboardCould not create datadir for lensfun - %sCould not create output directory.Could not create temporary directory.Could not export photo.Could not fetch file from %s or write it to %s.Could not fetch list of files from %s.Could not open database %sCould not open image! Could not open temporary file on disk for writingCould not save file: %s Check that you have write permissions to this folder.Couldn't open photoCreate albumCropCrop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel cropCurrent User: CurveD (%d)D (-)DecemberDelete photosDeleted photosDeleting photosDenoiDenoiseDescriptionDirectoryDirectory:Disconnect CameraDisconnecting current camera Display Colorspace:Display NavigationDo not Load Selected ImagesDon't cropDownloading and adding image. ERROR: Could not copy image to clipboardERROR: Gphoto2 returned error value %d Error message is: %s ERROR: Init camera returned %d. Error text is:%s Edit lensEdit output settingsEmbedded ProfileEnable this lensEnabledEnabling capture mode for Canon cameras. Enabling capture mode for Nikon cameras. Error copying file %s to %s Error exportingError exporting photo to gimp.Error updating lensfun databaseExport FileExport dimensionsExport failedExporting to %sExporting to GIMP...Exporting...ExposExposureExposure CompensationExposure Mask Colorspace:F/%.1f FebruaryFile exportedFile not saved!File type:FilenameFilename & TagsFilename example:Filename template:Flickr errorFlipFlip the photo over the x-axisFocalFocal LengthFocallengthFound %d cameras FreeformGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2Gphoto2 reported Context Error: GreenGreen Amount AdjustmentGridHarmonious triangles #1Harmonious triangles #2HeightHeight:Hiding exposure maskHistogramHistogram height:HueHue ShiftISOISO paper (A4)ISO%dIconImage copied to clipboardImage openedInterval ShootingInterval shooting shutting down. It seems like rawstudio lost its authentication to upload to your account, please re-authenticate.JPEG (Joint Photographic Experts Group)JPEG QualityJanuaryJulyJuneKeep aspectLarge gamut color spaceLast image:Lens CorrectionLens DisabledLens LibraryLens MakeLens ModelLens UnknownLens makeLens modelLensfun database updatedLight DenoisingLight out mode not availableLoad non-RAW imagesLoading %s ...MarchMaster ControlMaximum sizeMaximum size: %d x %dMayMinimize this window after captureMirrorMirror the photo over the y-axisModelMonitor CameraMonitor Thread already running. Monitor recieved error %d, while waiting for camera. Error text is: %s Moving file to current directory failed! NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable.NameNo Lens InformationNo PhotoNo camera connected. No camera selected - Cannot connect! No white balance to set fromNoneNothing to pasteNovemberOctoberOpenOpen curve ...Open directoryOpen new images after captureOpen recursiveOpening directory...Opening photo ...Original AspectOutput directory:Overwrite File?PNG (Portable Network Graphics)Password: Pasted settingsPasting settings to imagesPercent:Photo height:Photo scale:Photo sizePhoto width:Picasa Webalbum AuthentificationPlace cache in home directoryPlease type in your username and password for Picasa Web Albums.PreferencesPress F10 to return preview to this windowPreview background color:Print friendly color space, compatible with Adobe RGB (1998)PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProcessing Image %d/%dProcessing Image 1/%d.ProfileProgressPublic (everyone can see this)Quick exportRawstudioRawstudio Lens EditorRawstudio Lens LibraryRawstudio Tethered ShootingRawstudio needs to be authenticated before it will be able to upload photos to your Facebook account.Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account.Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr.ReadyRecieved error %d, while capturing image. Error text is: %s Recieved error %d, while downloading image from camera. Error text is: %s RedRed Amount AdjustmentRed Chromatic Aberration CorrectionRemoveRemove allRemoving images from batch queueResetReset curveRetain EXIF metadataRetry Operation?Rotate ClockwiseRotate Counter ClockwiseRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturSaturationSave 16 bit TIFFSave 16 bit linear PNGSave curve as ...Save uncompressed TIFFSaving %s ...Seconds between each shot:Select ActionSelect All/NoneSelect OK to use this screen for fullscreen previewSelect Saved CurveSelect Screen for fullscreen previewSelect camera:Select screen to open fullscreen previewSelect settings to copySelect which settings to add to batch queueSeptemberSet lensSettingSharpSharpenSharpen AmountShow Filenames in IconboxShowing exposure maskShutterspeedShutting down already running thread. Shutting down asynchronous thread Shutting down interval capture thread. Shutting down running thread to enable remote capture. SizeStaring Interval Shooting Thread. Staring Monitor Thread. StartStart ShootingStatus:Step 1:Step 2:Stop ShootingStraighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels.Switch UserTCATIFF (Tagged Image File Format)Tag searchTag search [%s]TagsTags for new images:Tags, separated by spaces:Take PhotoTempTemperatureThe file '%s' already exists. Do you want to overwrite the file?The port you specified ('%s') can not be found.Time left: %dh %dm %dsTime left: ...TimestampTintTint ShiftTitleToolsTransformsU (%d)U (-)Unable to detect more than one monitor. Cannot open fullscreen previewUnable to locate screen for fullscreen previewUnhandled error from FacebookUnhandled error from PicasaUnprioritized photosUpdate lensfun databaseUpload photo to FacebookUpload photo to FlickrUpload photo to PicasaUse system themeUsername: VignVignettingVignetting CorrectionVisible to FamilyVisible to FriendsWBAsciiWaiting for jobs to finishWaiting for next image. Warning: It took longer time to capture the image than the set interval It took %.1f seconds to download the image. Consider increasing the interval. We recieved an error during authentication. Please try again.Welcome to Tethered shooting! Make sure your camera is NOT mounted in your operating system. White balanceWidthWidth:Would you like to Retry the operation?Your files will be permanently deleted!Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing._1_2_3_About_Add to batch queue_Add view to queue..._Auto_Auto group_Batch_Camera_Copy Image to Clipboard_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Lens Library_Lights out_Next_Next Photo_Open Directory_Paste settings_Photo_Preferences_Previous_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Save camera default settings_Set Priority_Show Photo On Secondary Monitor_Snapshot_Sort by_Split_Start_Straighten_Tag Photo..._Tethered Shooting_Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelstelephotowideangleProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-03-26 03:39+0100 PO-Revision-Date: 2011-03-24 10:07+0900 Last-Translator: Ryo Fujita Language-Team: Rawstudio development Language: Japanese MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: Japanese X-Poedit-Country: JAPAN X-Poedit-SourceCharset: utf-8 (ログインに失敗)(ログインに成功) A B C %%.1fs %2c - 加算カウンタ%DD - EXIFの曜日%DM - EXIFの月 (テキスト)%DY - EXIFの年号 (YYYY)%Dd - EXIFの日 (DD)%Dm - EXIFの月 (MM)%Dy - EXIFの年号 (YY)%d - EXIFの日付 (YYYY-MM-DD)%d 枚の写真がバッチ処理のキューに追加された%d 枚の写真がバッチ処理のキューから取り除かれた%dmm %f - 元のファイル名%p - 元のファイルのパス%s 注意: このエラーはrawstudioが対応出来ません。エラーを発見したことと、より役立つエラーメッセージを表示出来るように、再現手順を知らせてください。感謝します!%s - 設定ID (A, B もしくは C)%t - EXIFの時刻 (HH:MM:SS)(ユーザが存在しない)(プロファイルの選択)* (%d)* (-)-. クリックして値を編集. クリックして値をリセット1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)絞り: F/%.01f 焦点距離: %dmm ISO: %u メーカー: %s モデル: %s シャッター速度: %.1fs シャッター速度: 1/%.0fs 時刻: %s%s AGTK+/GNOME用のRAW画像変換アプリプロファイルの追加...プロファイルを追加...選択した写真にタグを追加する。バッチ処理のキューにイメージを追加自動ホワイトバランスに調整カメラのホワイトバランスに設定アルバム全てのプロファイル全てのファイル’全てのレンズ全ての写真 (削除したものを除く)Picasaウェブサービスとの通信時にエラーが通知された:絞り4月縦横比8月Rawstudioを認証する自動的にカーブ端を調整B基本バッチBlue青色総量調整青色収差補正バッファが空ですCCA BCA Rカメラ %s (ポート %s )を開けません カメラメーカーカメラモデルカメラプロファイル (DCP)不明なカメラカメラ初期設定エディタカメラメーカーカメラモデルカメラモニタを終了中。 キャンセルログイン失敗キャプションキャプチャは有効 キャプチャ中. 変更変更された写真の優先度 (%d)変更された写真の優先度 (*)変更された写真の優先度 (D)チャネルミキサーチャネルミキサー出力するディレクトリの選択ColDnカラープロファイル (ICC と ICM)色ノイズ低減色ノイズの低減縦横比固定: %d高さ固定高さ固定: %d縦横比固定幅固定幅固定: %dContrコントラストコピーされた設定EXIFメタデータのコピーXMPへのEXIFメタデータのコピー新しいイメージに現在の設定をコピークリップボードへのイメージの転送lensfun用のデータディレクトリが作成できません- %s出力ディレクトリを作成できませんテンポラリディレクトリが作成できません写真を書き出せません。%s からファイルを読み取れないか %s に書き込めません%s からファイルのリストを読み取れませんデータベース %s を開けませんイメージが開けません! ディスク上の書き出し用一時ファイルが開けませんファイル %s を保存できません。 このフォルダの書き込み権限をチェックしてください。写真を開けませんアルバムの作成切り取る切り取り: 切り取る範囲をドラッグして選択します。切り取る範囲内で右クリック: 切り取りを適用; 外側: 切り取りをキャンセル現在のユーザ:カーブD (%d)D (-)12月写真の削除削除した写真写真の削除Denoiノイズ低減説明ディレクトリディレクトリ:カメラの切断現在のカメラを切断中 ディスプレイの色空間:ディスプレイナビゲーション選択したイメージを読み込まない切り取らないイメージをダウンロード、追加中. エラー: クリップボードにイメージを転送出来ませんエラー: Gphoto2 がエラー値 %d を返した エラーメッセージ: %s エラー: カメラの初期化の返り値 %d. エラーテキスト:%s レンズの編集出力設定の編集埋め込みプロファイルこのレンズを使用可能にする利用可能キヤノンのカメラ用のキャプチャモードを有効化 ニコンのカメラ用のキャプチャモードを有効化 ファイル %s の %s へのコピーエラー 書き出しエラーgimpへの写真の書き出しエラー。lensfunデータベースの更新エラーファイルの書き出し書き出す大きさ書き出し失敗%s に書き出すGIMPに書き出し...書き出し中...Expos露出露出補正露光マスクの色空間:F/%.1f 2月書き出したファイルファイルは保存されません!ファイルタイプ:ファイル名ファイル名 & タグファイル名の例:ファイル名のテンプレート:Flickrのエラー上下反転x軸で写真を反転焦点焦点距離焦点距離%d 台のカメラを検出 非定型一般黄金長方形黄金分割黄金三角比 #1黄金三角比 #2Gphoto2 がコンテキストエラーを通知: Green緑色総量調整グリッド調和三角 #1調和三角 #2高さ高さ:露光マスクを非表示ヒストグラムヒストグラムの高さ:Hue色相の変更ISOISO 用紙 (A4)ISO%dアイコンクリップボードに転送されたイメージ開いているイメージインターバル撮影インターバル撮影を終了中です。 あなたのアカウントにアップロードするための認証をrawstudioが失ったようです。再度認証してください。JPEG (Joint Photographic Experts Group)JPEG画質1月7月6月縦横比を維持広いガマットの色空間最後のイメージ:レンズ補正無効なレンズレンズライブラリレンズメーカーレンズモデル不明なレンズレンズメーカレンズモデル更新済みlensfunデータベース輝度ノイズの低減消灯モードは利用できませんRAW以外のイメージの読み込み%s を読み込み中...3月主コントロール最大サイズ最大サイズ: %d x %d5月キャプチャ後にウインドウを最小化水平反転y軸で写真を反転モデルカメラをモニタモニタスレッドは既に実行中。 カメラの準備を待つ間に、モニタがエラー %d を受信しました。 エラーテキスト: %s 現在のディレクトリにファイルを移動できません! 注意: アイコン表示の更新は無効です。新しいファイルは読み込まれません! 再度有効にするには を押します。名前レンズ情報無し写真がありませんカメラが接続されていません。 カメラが選択されていません - 接続できません! 設定元のホワイトバランスがありません全て無しペーストするものがありません11月10月開くカーブを開く...ディレクトリを開くキャプチャ後に新しいイメージを開く再帰的に開くディレクトリを開く...写真を開く...元の縦横比出力ディレクトリ:ファイルを上書きしますか?PNG (Portable Network Graphics)パスワード:ペーストされた設定イメージへの設定のペーストパーセント:写真の高さ:写真の縦横比:写真サイズ写真の幅:Picasaウェブアルバムの認証ホームディレクトリのキャッシュを指定Picasaウェブアルバムのユーザ名とパスワードを入力してください。設定このウインドウのプレビューに戻るには F10 を押すプレビューの背景色:印刷用色空間, Adobe RGB (1998)互換優先度優先度 1 の写真優先度 2 の写真優先度 3 の写真イメージ %d/%d を処理中イメージ 1/%d を処理中プロファイル進捗公開 (誰でも閲覧可能)クイック書き出しRawstudioRawstudioのレンズエディタRawstudioのレンズライブラリRawstudioのリモート撮影Facebookアカウントへの写真のアップロードを可能にするため、Rawstudioを認証する必要があります。Flickrアカウントへの写真のアップロードを可能にするため、Rawstudioを認証する必要があります。rawstudioは認証が無効になったために写真をアップロード出来ませんでした。Flickrに写真をアップロードするために、rawstudioを再認証してください。準備完了イメージのキャプチャ中にエラー %d を受信。 エラーテキスト: %s カメラからイメージをダウンロードする間に、エラー %d を受信しました。 エラーテキスト: %s Red赤色総量調整赤色収差補正削除全てを削除バッチ処理のキューからイメージを取り除くリセットカーブのリセットEXIFメタデータの保持操作を再試行?右回転左回転90度時計回りに写真を回転90度反時計回りに写真を回転三分割法Satur飽和16ビットTIFFで保存16ビットリニアのPNGで保存カーブを別名で保存...非圧縮TIFFで保存%s を保存中...各コマの秒間隔:アクションの選択全てを選択/選択解除この画面をフルスクリーンのプレビューに使うにはOKを選択保存したカーブの選択フルスクリーンのプレビューの画面の選択カメラの選択:フルスクリーンのプレビューを開く画面の選択コピーする設定の選択バッチ処理のキューに追加する 設定のいずれかを選択9月レンズをセットする設定Sharpシャープネスシャープネスの総量アイコンボックスにファイル名を表示露光マスクを表示シャッター速度既に実行中のスレッドを終了中。 非同期スレッドを終了中 インターバルキャプチャスレッドを終了中。 リモートキャプチャを有効にするために実行中のスレッドを終了中。 サイズインターバル撮影スレッドを開始中。 モニタスレッドを開始中。 開始撮影を開始ステータス:ステップ1:ステップ2:撮影を終了水平・垂直: 水平あるいは垂直にしたい直線をイメージ中に引きます。右クリックでキャンセル。ユーザの切り替えTCATIFF (Tagged Image File Format)タグ検索タグ検索 [%s]タグ新しいイメージのタグ:スペースで区切られたタグ:写真の撮影Temp色温度ファイル %s は既にあります。 ファイルを上書きしますか?指定されたポート ('%s') が見つかりません。残り時間: %dh %dm %ds残り時間: ...タイムスタンプTint色合いの変更タイトルツール変換U (%d)U (-)1つ以上のモニタが検出出来ません。フルスクリーンのプレビューを開けませんフルスクリーンのプレビューを表示する画面を特定できないFacebookの不明なエラーPicasaの不明なエラー優先度のない写真lensfunデータベースを更新Facebookへの写真のアップロードFlickrへの写真のアップロードPicasaへの写真のアップロードシステムテーマを使うユーザ名:Vign色にじみ色にじみ補正家族に公開友人に公開WBAscii作業の完了を待っています次のイメージを待っています。 警告: 間隔を設定する以上にイメージのキャプチャに時間がかかります。 イメージのダウンロードに %.1f 秒かかります。 間隔を増やすことを検討してください。 認証中にエラーが発生しました。再度試してください。リモート撮影へようこそ! カメラがオペレーティングシステムにマウントされていないことを確認してください。 ホワイトバランス幅幅:操作を再試行しますか?ファイルは完全に削除されます!この設定はコンポジットの有無に関わらずRGBAをサポートしていないようです。オペレーティングシステムのマニュアルを参照して、これらを利用可能にしてください。_1_2_3このプログラムについて(_A)バッチ処理のキューに追加(_A)ビューをキューに追加(_A)自動(_A)自動グループ化(_A)バッチ処理(_B)カメラ(_C)クリップボードにイメージを転送(_C)設定のコピー(_C)切り取り(_C)フラグ付きの写真を削除(_D)編集(_E)別名で書き出し(_E)GIMPへの書き出し(_E)露光マスク(_E)ファイル(_F)削除する写真にフラグを付ける(_F)フルスクリーン(_F)グループ化(_G)ヘルプ(_H)アイコンボックス(_I)レンズライブラリ(_L)消灯(_L)次(_N)次の写真(_N)ディレクトリを開く(_O)設定のペースト(_P)写真(_P)設定(_P)前(_P)前の写真(_P)クイック書き出し(_Q)終了(_Q)ディレクトリを再読込(_R)バッチ処理のキューから削除(_R)優先度を削除(_R)設定のリセット(_R)設定の復元(_R)カメラのデフォルト設定を保存(_S)優先度を設定(_S)副モニタで写真を表示(_S)スナップショット(_S)並び替え(_S)分割(_S)開始(_S)水平・垂直(_S)写真のタグ付け...(_T)リモート撮影(_T)ツールボックス(_T)切り取りを解除(_U)グループ化を解除(_U)水平・垂直を解除(_U)表示(_V)ホワイトバランス(_W)画面に合わせる(_Z)ピクセル数望遠広角rawstudio-2.0/po/de.po0000644000175000017500000015147111546425272011704 00000000000000# Deutsche Übersetzung für RAWStudio # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the Rawstudio package. # # Carsten Mathaes , 2007. # Martin Egger , 2008. # Marcus Dapp , 2009. # Mario Blättermann , 2010. # msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-03-26 03:39+0100\n" "PO-Revision-Date: 2010-02-28 01:17+0100\n" "Last-Translator: Mario Blättermann \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: German\n" "X-Poedit-Country: GERMANY\n" #: librawstudio/rs-lens-db-editor.c:325 #, fuzzy msgid "All lenses" msgstr "Alle Dateien" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "" #: librawstudio/rs-lens-db-editor.c:565 #, fuzzy msgid "Rawstudio Lens Library" msgstr "_Objektiveditor" #: librawstudio/rs-lens-db-editor.c:590 #, fuzzy msgid "Lens make" msgstr "Objektiv deaktiviert" #: librawstudio/rs-lens-db-editor.c:594 #, fuzzy msgid "Lens model" msgstr "Objektiv deaktiviert" #: librawstudio/rs-lens-db-editor.c:598 #, fuzzy msgid "Focal" msgstr "Brennweite" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "Blende" #: librawstudio/rs-lens-db-editor.c:606 #, fuzzy msgid "Camera make" msgstr "_Kamera" #: librawstudio/rs-lens-db-editor.c:610 #, fuzzy msgid "Camera model" msgstr "_Kamera" #: librawstudio/rs-lens-db-editor.c:614 #, fuzzy msgid "Enabled" msgstr "Objektiv deaktiviert" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:734 #, fuzzy msgid "Could not create temporary directory." msgstr "Ausgabeordner wählen" #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:796 #, fuzzy, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Ausgabeordner wählen" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "" #: librawstudio/rs-lens-db-editor.c:939 #, fuzzy msgid "Rawstudio Lens Editor" msgstr "_Objektiveditor" #: librawstudio/rs-lens-db-editor.c:950 #, fuzzy msgid "Lens Make" msgstr "Objektiv deaktiviert" #: librawstudio/rs-lens-db-editor.c:954 #, fuzzy msgid "Lens Model" msgstr "Objektiv deaktiviert" #: librawstudio/rs-lens-db-editor.c:958 #, fuzzy msgid "Focal Length" msgstr "Brennweite" #: librawstudio/rs-lens-db-editor.c:966 #, fuzzy msgid "Camera Make" msgstr "_Kamera" #: librawstudio/rs-lens-db-editor.c:970 #, fuzzy msgid "Camera Model" msgstr "_Kamera" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "" #: librawstudio/rs-lens-db-editor.c:998 #, fuzzy msgid "Set lens" msgstr "Objektiv bearbeiten" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "" #: librawstudio/rs-library.c:254 #, fuzzy, c-format msgid "Could not open database %s" msgstr "Bild konnte nicht geöffnet werden" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "" #: librawstudio/rs-library.c:816 #, fuzzy msgid "telephoto" msgstr "Bilder löschen" #: librawstudio/rs-library.c:832 msgid "January" msgstr "" #: librawstudio/rs-library.c:835 msgid "February" msgstr "" #: librawstudio/rs-library.c:838 msgid "March" msgstr "" #: librawstudio/rs-library.c:841 msgid "April" msgstr "" #: librawstudio/rs-library.c:844 #, fuzzy msgid "May" msgstr "Mamiya" #: librawstudio/rs-library.c:847 msgid "June" msgstr "" #: librawstudio/rs-library.c:850 msgid "July" msgstr "" #: librawstudio/rs-library.c:853 msgid "August" msgstr "" #: librawstudio/rs-library.c:856 msgid "September" msgstr "" #: librawstudio/rs-library.c:859 msgid "October" msgstr "" #: librawstudio/rs-library.c:862 msgid "November" msgstr "" #: librawstudio/rs-library.c:865 msgid "December" msgstr "" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, fuzzy, c-format msgid "ISO%d" msgstr "ISO" #: librawstudio/rs-profile-selector.c:238 #, fuzzy msgid "Add profile ..." msgstr "Profil hinzufügen …" #: librawstudio/rs-profile-selector.c:242 #, fuzzy msgid "Embedded Profile" msgstr "Profil hinzufügen …" #: librawstudio/rs-profile-selector.c:244 #, fuzzy msgid "(Select Profile)" msgstr "Auswahl des Farbprofils" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "Bel" #: librawstudio/rs-settings.c:80 #, fuzzy msgid "Exposure Compensation" msgstr "Bildgrösse exportieren" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 msgid "Satur" msgstr "Sätt" #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "Sättigung" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "Farbton" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "Kontr" #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "Kontrast" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temp" msgstr "Temp" #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 #, fuzzy msgid "Temperature" msgstr "Blende" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "Farbton" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 msgid "Sharp" msgstr "Schär" #: librawstudio/rs-settings.c:133 #, fuzzy msgid "Sharpen Amount" msgstr "Schärfen" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "Entr" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "ColDn" #: librawstudio/rs-settings.c:145 #, fuzzy msgid "Colour Denoising" msgstr "Farben entrauschen" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "CA R" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "CA B" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "Vign" #: librawstudio/rs-settings.c:163 #, fuzzy msgid "Vignetting Correction" msgstr "Objektivkorrekturen" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 msgid "Red" msgstr "Rot" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "Grün" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "Blau" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 msgid "JPEG Quality" msgstr "JPEG-Qualität" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "" #: plugins/output-facebook/output-facebook.c:132 #, fuzzy msgid "Upload photo to Facebook" msgstr "Bilder zum Flickr-Bilderdienst übertragen" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "Schritt 1" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "Schritt 2" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "Rawstudio legitimieren" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:329 #, fuzzy msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" "Rawstudio muss legitimiert werden, bevor Bilder zu Ihrem Flickr-Konto " "übertragen werden können." #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "" #: plugins/output-flickr/output-flickr.c:113 msgid "Title" msgstr "Titel" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "Beschreibung" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "Markierungen" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "Öffentlich (für alle sichtbar)" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "Sichtbar für Freunde" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "Für Familie sichtbar" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "Bilder zum Flickr-Bilderdienst übertragen" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "" "Ein Fehler ist während der Legitimierung aufgetreten. Bitte erneut versuchen." #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" "Rawstudio war nicht in der Lage, die Bilder zu Flickr zu übertragen, da die " "Legitimierung zurückgewiesen wurde. Bitte legitimieren Sie Rawstudio erneut, " "um die Bilder übertragen zu können." #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" "Es hat den Anschein, dass die Legitimierung nicht mehr gültig ist, um Daten " "zu Ihrem Konto übertragen zu können. Bitte legitimieren Sie sich erneut." #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" "%s\n" "\n" "Note: Dieser Fehler wurde von Rawstudio nicht erfasst. Bitte berichten " "Sie darüber und versuchen Sie ihn nachzuvollziehen, so dass wir eine bessere " "Fehlermeldung dazu angeben können. Danke!" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "Flickr-Fehler" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" "Rawstudio muss legitimiert werden, bevor Bilder zu Ihrem Flickr-Konto " "übertragen werden können." #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 #, fuzzy msgid "Full export path" msgstr "Datei gespeichert" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 #, fuzzy msgid "Copy EXIF metadata" msgstr "Keine Metadaten vorhanden" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "" #: plugins/output-picasa/output-picasa.c:123 #, fuzzy msgid "Upload photo to Picasa" msgstr "Bilder zum Flickr-Bilderdienst übertragen" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "" #: plugins/output-picasa/rs-picasa-client.c:234 #, fuzzy msgid "Username: " msgstr "Dateiname:" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "" #: plugins/output-pngfile/output-pngfile.c:90 #, fuzzy msgid "Save 16 bit linear PNG" msgstr "Als 16-bit TIFF speichern" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Als unkomprimiertes TIFF speichern" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "Als 16-bit TIFF speichern" #: plugins/output-tifffile/output-tifffile.c:108 msgid "TIFF (Tagged Image File Format)" msgstr "TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Usprünglicher Dateiname" #: src/filename.c:315 #, fuzzy, c-format msgid "%p - Path of original file" msgstr "%f - Usprünglicher Dateiname" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - Laufnummer" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s - Einstellungen (A, B oder C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "%d - Datum aus EXIF-Daten (JJJJ-MM-TT)" #: src/filename.c:319 #, fuzzy msgid "%DY - Year from EXIF (YYYY)" msgstr "%d - Datum aus EXIF-Daten (JJJJ-MM-TT)" #: src/filename.c:320 #, fuzzy msgid "%Dy - Year from EXIF (YY)" msgstr "%d - Datum aus EXIF-Daten (JJJJ-MM-TT)" #: src/filename.c:321 #, fuzzy msgid "%Dm - Month from EXIF (MM)" msgstr "%d - Datum aus EXIF-Daten (JJJJ-MM-TT)" #: src/filename.c:322 #, fuzzy msgid "%DM - Month from EXIF (Text)" msgstr "%d - Datum aus EXIF-Daten (JJJJ-MM-TT)" #: src/filename.c:323 #, fuzzy msgid "%Dd - Date from EXIF (DD)" msgstr "%d - Datum aus EXIF-Daten (JJJJ-MM-TT)" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "%t - Zeit aus EXIF-Daten (HH:MM:SS)" #: src/gtk-interface.c:154 #, fuzzy msgid "Width" msgstr "Breite:" #: src/gtk-interface.c:154 #, fuzzy msgid "Height" msgstr "Höhe:" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Bild wird geöffnet …" #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "Bild konnte nicht geöffnet werden" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Bild geöffnet" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "Priorität des Bildes geändert (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "Priorität des Bildes geändert (D)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "Priorität des Bildes geändert (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Ordner:" #: src/gtk-interface.c:777 src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Ausgabeordner wählen" #: src/gtk-interface.c:793 src/rs-batch.c:1075 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Vorgabe für Dateiname:" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Beispiel für Dateiname:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Dateityp:" #. Add preferences box #: src/gtk-interface.c:879 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Einstellungen" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Hintergrundfarbe:" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Höhe des Histogramms:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Systemthema verwenden" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Temporäre Daten im persönlichen Ordner speichern" #: src/gtk-interface.c:926 #, fuzzy msgid "Display Colorspace:" msgstr "Arbeitsfarbraum" #: src/gtk-interface.c:938 #, fuzzy msgid "Exposure Mask Colorspace:" msgstr "_Belichtungsmaske" #: src/gtk-interface.c:1011 msgid "General" msgstr "Allgemein" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "Schnellausgabe" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "Ordner wird geöffnet …" #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Rekursiv öffnen" #: src/gtk-interface.c:1465 msgid "Directory" msgstr "Ordner" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "Schlagwortsuche" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Werkzeuge" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Stapelverarbeitung" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Öffnen" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Fertig" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "Fortschritt" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Ordner öffnen" #: src/rs-actions.c:253 src/rs-batch.c:542 #, fuzzy msgid "Could not create output directory." msgstr "Ausgabeordner wählen" #: src/rs-actions.c:257 #, fuzzy msgid "Exporting..." msgstr "Fehler beim Exportieren" #: src/rs-actions.c:265 msgid "File exported" msgstr "Datei gespeichert" #: src/rs-actions.c:270 src/rs-actions.c:293 msgid "Export failed" msgstr "Export ist fehlgeschlagen" #: src/rs-actions.c:300 #, fuzzy msgid "Exporting to GIMP..." msgstr "Fehler beim Exportieren" #: src/rs-actions.c:305 msgid "Error exporting" msgstr "Fehler beim Exportieren" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "Fehler beim Exportieren zu GIMP" #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "Bilder werden gelöscht" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "Die Dateien werden unwiderruflich gelöscht!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Bilder löschen" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "" #. Build GUI #: src/rs-actions.c:463 #, fuzzy msgid "Profile" msgstr "Alle Profile" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Belichtung" #: src/rs-actions.c:468 msgid "White balance" msgstr "Weißabgleich" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Schärfen" #: src/rs-actions.c:470 msgid "Denoise" msgstr "Entrauschen" #: src/rs-actions.c:471 msgid "Color denoise" msgstr "Farbrauschen entfernen" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "Kanalmixer" #: src/rs-actions.c:473 msgid "TCA" msgstr "TCA" #: src/rs-actions.c:474 msgid "Vignetting" msgstr "Vignettierung" #: src/rs-actions.c:475 src/rs-toolbox.c:803 msgid "Curve" msgstr "Kurve" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "" #: src/rs-actions.c:498 #, fuzzy msgid "Select settings to copy" msgstr "Auswahl der einzufügenden Einstellungen" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Einstellungen kopiert" #: src/rs-actions.c:587 #, fuzzy msgid "Pasting settings to images" msgstr "Einstellungen eingefügt" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Einstellungen eingefügt" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Nichts einzufügen" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Puffer ist leer" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Automatischer Weißabgleich wird durchgeführt" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "Keine Daten für Weißabgleich vorhanden" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Verwendung des Weißabgleichs der Kamera" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "" #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "Anzeige der Belichtungswarnung" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "Keine Anzeige der Belichtungswarnung" #: src/rs-actions.c:1067 #, fuzzy msgid "Adding images to batch queue" msgstr "Ansicht zur Stapelverarbeitung hinzugefügt" #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "%d Bilder zur Stapelverarbeitung hinzugefügt" #: src/rs-actions.c:1101 src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Welche Einstellungen zur\n" "Stapelverarbeitung hinzufügen" #: src/rs-actions.c:1188 #, fuzzy msgid "Removing images from batch queue" msgstr "Von der Stapelverarbeitung gelöscht" #: src/rs-actions.c:1203 #, fuzzy, c-format msgid "%d photos removed from batch queue" msgstr "%d Bilder zur Stapelverarbeitung hinzugefügt" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "Profil hinzufügen …" #: src/rs-actions.c:1266 msgid "All Profiles" msgstr "Alle Profile" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "Kameraprofile (DCP)" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "Farbprofile (ICC und ICM)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Alle Dateien" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "Ein RAW-Konverter für GTK+/GNOME" #: src/rs-actions.c:1412 msgid "_File" msgstr "_Datei" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "_Bearbeiten" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "_Bild" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "Priorität _setzen" #: src/rs-actions.c:1416 msgid "_White Balance" msgstr "_Weißabgleich" #: src/rs-actions.c:1417 msgid "_View" msgstr "_Ansicht" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "_Sortieren nach" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "_Stapelverarbeitung" #: src/rs-actions.c:1420 msgid "_Help" msgstr "_Hilfe" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "" #. File menu #: src/rs-actions.c:1425 msgid "_Open Directory" msgstr "_Ordner öffnen" #: src/rs-actions.c:1426 msgid "_Quick Export" msgstr "_Schnellexport" #: src/rs-actions.c:1427 msgid "_Export As" msgstr "_Datei eportieren als" #: src/rs-actions.c:1428 msgid "_Export to Gimp" msgstr "_Exportieren zu GIMP" #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "" #: src/rs-actions.c:1430 msgid "_Reload directory" msgstr "O_rdner neu laden" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "_Markierte Bilder löschen" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "_Beenden" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "_Einstellungen rückgängig machen" #: src/rs-actions.c:1436 msgid "_Copy settings" msgstr "_Einstellungen kopieren" #: src/rs-actions.c:1437 msgid "_Paste settings" msgstr "_Einstellungen einfügen" #: src/rs-actions.c:1438 msgid "_Reset settings" msgstr "_Einstellungen zurücksetzen" #: src/rs-actions.c:1439 #, fuzzy msgid "_Save camera default settings" msgstr "Vorgabeeinstellungen _speichern" #: src/rs-actions.c:1440 msgid "_Preferences" msgstr "_Voreinstellungen" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "_Bild zum Löschen markieren" #: src/rs-actions.c:1444 msgid "_1" msgstr "_1" #: src/rs-actions.c:1445 msgid "_2" msgstr "_2" #: src/rs-actions.c:1446 msgid "_3" msgstr "_3" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "Priorität _löschen" #: src/rs-actions.c:1448 msgid "_Auto" msgstr "_Automatisch" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "_Kamera" #: src/rs-actions.c:1450 msgid "_Crop" msgstr "_Beschneiden" #: src/rs-actions.c:1451 msgid "_Uncrop" msgstr "_Beschneidung aufheben" #: src/rs-actions.c:1452 msgid "_Straighten" msgstr "_Begradigen" #: src/rs-actions.c:1453 msgid "_Unstraighten" msgstr "Begradigung a_ufheben" #: src/rs-actions.c:1454 msgid "_Group" msgstr "_Gruppieren" #: src/rs-actions.c:1455 msgid "_Ungroup" msgstr "_Gruppierung aufheben" #: src/rs-actions.c:1456 msgid "_Auto group" msgstr "_Automatisch gruppieren" #: src/rs-actions.c:1457 msgid "_Tag Photo..." msgstr "Schlagwort zum _Bild hinzufügen …" #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "Im Uhrzeigersinn drehen" #: src/rs-actions.c:1459 msgid "Rotate Counter Clockwise" msgstr "Gegen den Uhrzeigersinn drehen" #: src/rs-actions.c:1460 msgid "Flip" msgstr "Umdrehen" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "Spiegeln" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "_Vorhergehendes Bild" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "_Nächstes Bild" #: src/rs-actions.c:1466 #, fuzzy msgid "_Lens Library" msgstr "_Objektiveditor" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "" #. Batch menu #: src/rs-actions.c:1470 msgid "_Add to batch queue" msgstr "_Zur Stapelverarbeitung hinzugefügen" #: src/rs-actions.c:1471 #, fuzzy msgid "_Add view to queue..." msgstr "_Aktuelle Ansicht zur Stapelverarbeitung hinzufügen" #: src/rs-actions.c:1472 msgid "_Remove from batch queue" msgstr "_Von der Stapelverarbeitung entfernen" #: src/rs-actions.c:1473 msgid "_Start" msgstr "_Beginn" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "" #: src/rs-actions.c:1477 msgid "_About" msgstr "_Info" #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "_Auf Bildschirmgröße zoomen" #: src/rs-actions.c:1487 msgid "_Iconbox" msgstr "_Bildleiste" #: src/rs-actions.c:1488 msgid "_Toolbox" msgstr "_Werkzeuge" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "_Vollbild" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "" #: src/rs-actions.c:1491 #, fuzzy msgid "Show Filenames in Iconbox" msgstr "Anzeige der Dateinamen in der Vorschau" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "" #: src/rs-actions.c:1494 msgid "_Exposure mask" msgstr "_Belichtungsmaske" #: src/rs-actions.c:1495 msgid "_Split" msgstr "_Teilen" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "_Lichter aus" #: src/rs-actions.c:1503 msgid "Name" msgstr "Name" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "Zeitstempel" #: src/rs-actions.c:1505 msgid "ISO" msgstr "ISO" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "Brennweite" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "Verschlusszeit" #. Snapshot labels #: src/rs-actions.c:1513 src/rs-toolbox.c:207 src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1514 src/rs-toolbox.c:208 src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1515 src/rs-toolbox.c:209 src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Abbrechen" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Letztes Bild:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Verbleibende Zeit: %dh %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Verbleibende Zeit: …" #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "" #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "%s wird geladen …" #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "%s wird gespeichert …" #: src/rs-batch.c:635 #, fuzzy msgid "Could not export photo." msgstr "Bild konnte nicht geöffnet werden" #: src/rs-batch.c:695 msgid "Icon" msgstr "Symbol" #: src/rs-batch.c:702 msgid "Filename" msgstr "Dateiname" #: src/rs-batch.c:709 msgid "Setting" msgstr "Einstellung" #: src/rs-batch.c:802 msgid "Start" msgstr "Beginn" #: src/rs-batch.c:805 msgid "Remove" msgstr "Entfernen" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Alle entfernen" #: src/rs-batch.c:916 src/rs-batch.c:1091 #, fuzzy msgid "Edit output settings" msgstr "/_Editieren/_Einstellungen kopieren" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Bildgröße" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "Fixe Größe" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Fixe Breite" #: src/rs-batch.c:962 msgid "Constant height" msgstr "Fixe Höhe" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Maximale Größe" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Bildbreite:" #: src/rs-batch.c:978 src/rs-batch.c:987 msgid "pixels" msgstr "Bildpunkte" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "Bildhöhe:" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "Skalierungsfaktor:" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Fixe Breite:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Fixe Höhe:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "Fixer Faktor:\n" "%d" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Maximale Größe:\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Ausgabeordner:" #: src/rs-batch.c:1100 msgid "Change" msgstr "Ändern" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "Bildgrösse exportieren" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "" #: src/rs-camera-db.c:459 msgid "Model" msgstr "" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "Ansichtsnavigation" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "Lichter-aus-Modus ist nicht verfügbar" #: src/rs-preview-widget.c:887 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" "Ihre Systemeinstellung scheint weder die RGBA-Darstellung noch Compositing " "zu unterstützen. Bitte ziehen Sie die Dokumentation Ihres Betriebssystems zu " "Rate, wie Sie diese Funktionsmerkmale aktivieren können." #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Größe" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Gitter" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Keines" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "Goldener Schnitt" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "Drittelsregel" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Goldene Dreiecke #1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Goldene Dreiecke #2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Harmonische Dreiecke #1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Harmonische Dreiecke #2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Verhältnis" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "Freie Auswahl" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "DIN/ISO (A4)" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "16:9 (HDTV)" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "Goldenes Rechteck" #: src/rs-preview-widget.c:1180 src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Beschneiden" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "Beschneidung aufheben" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" #: src/rs-preview-widget.c:1238 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:522 msgid "Export File" msgstr "Datei exportieren" #: src/rs-save-dialog.c:282 #, fuzzy msgid "File not saved!" msgstr "Datei gespeichert" #: src/rs-save-dialog.c:299 #, c-format msgid "Exporting to %s" msgstr "Zu %s wird exportiert" #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Verhältnis beibehalten" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Breite:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Höhe:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Prozent:" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Alle Bilder (ohne gelöschte)" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Bilder der Priorität 1" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Bilder der Priorität 2" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Bilder der Priorität 3" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Bilder ohne Priorität" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Gelöschte Bilder" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Prioritäten" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" "%s\n" "\n" #: src/rs-store.c:633 #, fuzzy, c-format msgid "Make: %s\n" msgstr "Uhrzeit: %s" #: src/rs-store.c:635 #, fuzzy, c-format msgid "Model: %s\n" msgstr "Uhrzeit: %s" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "Brennweite: %dmm\n" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "Verschlusszeit: %.1fs\n" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "Verschlusszeit: 1/%.0fs\n" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "Blende: F/%.01f\n" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "ISO: %u\n" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "Uhrzeit: %s" #: src/rs-store.c:1371 #, fuzzy msgid "* (-)" msgstr "* (%d)" #: src/rs-store.c:1372 #, fuzzy msgid "1 (-)" msgstr "1 (%d)" #: src/rs-store.c:1373 #, fuzzy msgid "2 (-)" msgstr "2 (%d)" #: src/rs-store.c:1374 #, fuzzy msgid "3 (-)" msgstr "3 (%d)" #: src/rs-store.c:1375 #, fuzzy msgid "U (-)" msgstr "U (%d)" #: src/rs-store.c:1376 #, fuzzy msgid "D (-)" msgstr "D (%d)" #: src/rs-tag-gui.c:65 #, fuzzy, c-format msgid "Tag search [%s]" msgstr "Schlagwortsuche" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "" #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "" #: src/rs-tethered-shooting.c:558 #, fuzzy msgid "Could not open image!\n" msgstr "Bild konnte nicht geöffnet werden" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:938 #, fuzzy msgid "Stop Shooting" msgstr "Einstellung" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "" #: src/rs-tethered-shooting.c:1003 #, fuzzy msgid "Take Photo" msgstr "Schlagwort zum _Bild hinzufügen …" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "" #. Status window #: src/rs-tethered-shooting.c:1022 #, fuzzy msgid "Status:" msgstr "Sätt" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 #, fuzzy msgid "Filename & Tags" msgstr "Beispiel für Dateiname:" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Histogramm" #: src/rs-toolbox.c:443 msgid "Reset" msgstr "Zurücksetzen" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr "" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr "" #: src/rs-toolbox.c:566 src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Belichtungskurve öffnen …" #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "" #: src/rs-toolbox.c:700 #, fuzzy msgid "Select Action" msgstr "Einstellung" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Belichtungskurve speichern unter …" #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Belichtungskurve zurücksetzen" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "Automatische Anpassungen der Kurvenenden" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "Objektiv bearbeiten" #. Pack everything nice #: src/rs-toolbox.c:800 msgid "Basic" msgstr "Grundlegend" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "Kanalmischer" #: src/rs-toolbox.c:802 #, fuzzy msgid "Lens Correction" msgstr "Objektivkorrekturen" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Spiegeln des Bildes über die X-Achse" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Spiegeln des Bildes über die Y-Achse" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Drehen des Bildes um 90 Grad im Uhrzeigersinn" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Drehen des Bildes um 90 Grad gegen den Uhrzeigersinn" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Anpassungen" #: src/rs-toolbox.c:1033 #, fuzzy msgid "Lens Unknown" msgstr "Objektiv unbekannt" #: src/rs-toolbox.c:1035 #, fuzzy msgid "Lens Disabled" msgstr "Objektiv deaktiviert" #: src/rs-toolbox.c:1043 #, fuzzy msgid "No Lens Information" msgstr "Objektivkorrekturen" #: src/rs-toolbox.c:1045 #, fuzzy msgid "Camera Unknown" msgstr "Kamera unbekannt" #: src/rs-toolbox.c:1050 #, fuzzy msgid "No Photo" msgstr "Kein Foto" #: src/rs-toolbox.c:1259 #, fuzzy msgid "_Previous" msgstr "_Vorhergehendes Bild" #: src/rs-toolbox.c:1260 #, fuzzy msgid "_Next" msgstr "_Nächstes Bild" #~ msgid " %s added to batch queue" #~ msgstr " %s zur Stapelverarbeitung hinzugefügt" #~ msgid "%s already added to batch queue" #~ msgstr "%s wurde bereits zur Stapelverarbeitung hinzugefügt" #~ msgid "Not in batch queue" #~ msgstr "Nicht in der Stapelverarbeitung vorhanden" #~ msgid "Processing photos" #~ msgstr "Bilder werden verarbeitet" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "8-Bit-Bilder laden (JPEG, PNG etc.)" #~ msgid "Warmth" #~ msgstr "Farbtemp" #~ msgid "CA Red" #~ msgstr "CA Rot" #~ msgid "CA Blue" #~ msgstr "CA Blau" #~ msgid "Select color profile" #~ msgstr "Auswahl des Farbprofils" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Farbprofile (ICC und ICM)" #~ msgid "Not a valid color profile." #~ msgstr "Dies ist kein gültiges Farbpropfil" #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "" #~ "Die ausgewählte Datei ist für diese Version von Rawstudio kein gültiges " #~ "Farbprofil." #~ msgid "Enable color management (experimental)" #~ msgstr "Farbmanagement einschalten (experimentell)" #~ msgid "Input profile" #~ msgstr "Eingabe Farbprofil" #~ msgid "BuiltInRGBProfile" #~ msgstr "BuiltInRGBProfile" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Ausgabe Farbprofil" #~ msgid "Intent" #~ msgstr "Farbraumtransformation" #~ msgid "Perceptual" #~ msgstr "Wahrnehmungsabhängig" #~ msgid "Relative colormetric" #~ msgstr "Relativ farbmetrisch" #~ msgid "Absolute colormetric" #~ msgstr "Absolut farbmetrisch" #~ msgid "Colors" #~ msgstr "Farben" #, fuzzy #~ msgid "Change this" #~ msgstr "Ändern" #~ msgid "Background renderer active" #~ msgstr "Verarbeitung im Hintergrund aktiv" #~ msgid "File export canceled" #~ msgstr "Datei Export abgebrochen" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "16-bit TIFF (Tagged Image File Format)" #~ msgid "Rotate the photo 180 degrees" #~ msgstr "Rotieren des Bildes um 180 Grad" #~ msgid "Reset this setting" #~ msgstr "Einstellungen zurücksetzen" #~ msgid "_Zoom to 100%" #~ msgstr "_Auf 100% zoomen" #~ msgid "Canon CR2" #~ msgstr "Canon CR2" #~ msgid "Canon CIFF" #~ msgstr "Canon CIFF" #~ msgid "Nikon NEF" #~ msgstr "Nikon NEF" #~ msgid "Minolta raw" #~ msgstr "Minolta raw" #~ msgid "Canon TIFF" #~ msgstr "Canon TIFF" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Panasonic raw" #~ msgstr "Panasonic raw" #~ msgid "Pentax raw" #~ msgstr "Pentax raw" #~ msgid "Adobe Digital negative" #~ msgstr "Adobe Digital negative" #~ msgid "Hasselblad" #~ msgstr "Hasselblad" #~ msgid "/File/_Open directory..." #~ msgstr "/Datei/_Verzeichnis öffnen..." #~ msgid "/File/_Quick export" #~ msgstr "/Datei/_Schnellausgabe" #~ msgid "/File/_Export as..." #~ msgstr "/Datei/_Speichern als..." #~ msgid "/File/_Reload" #~ msgstr "/Datei/_Erneut laden" #~ msgid "/_Edit/_Paste settings" #~ msgstr "/_Editieren/_Einstellungen einfügen" #~ msgid "/_Edit/_Reset current settings" #~ msgstr "/_Editieren/_Auf Standardwerte zurücksetzen" #~ msgid "/_Edit/sep1" #~ msgstr "/_Editieren/sep1" #~ msgid "/_Edit/_Preferences" #~ msgstr "/_Editieren/_Einstellungen" #~ msgid "/_Photo/_Set priority/_2" #~ msgstr "/_Bild/_Setze Priorität/_2" #~ msgid "/_Photo/_Set priority/_3" #~ msgstr "/_Bild/_Setze Priorität/_3" #~ msgid "/_Photo/_Set priority/_Remove priority" #~ msgstr "/_Bild/_Setze Priorität/_Priorität entfernen" #~ msgid "/_Photo/_White balance/_Auto" #~ msgstr "/_Bild/_Weissabgleich/_Automatisch" #~ msgid "/_Photo/_White balance/_Camera" #~ msgstr "/_Bild/_Weissabgleich/_Kamera" #~ msgid "/_Photo/_Uncrop" #~ msgstr "/_Bild/_Beschneidung aufheben" #~ msgid "/_Photo/_Straighten" #~ msgstr "/_Bild/_Begradigen" #~ msgid "/_Photo/_Unstraighten" #~ msgstr "/_Bild/_Begradigung aufheben" #~ msgid "/_Photo/_Group photos" #~ msgstr "/_Bild/_Bilder gruppieren" #~ msgid "/_Photo/_Ungroup photos" #~ msgstr "/_Bild/_Gruppierung aufheben" #~ msgid "/_View/sep1" #~ msgstr "/_Ansicht/sep1" #~ msgid "/_View/_Zoom in" #~ msgstr "/_Ansicht/_Vergrössern" #~ msgid "/_View/_Zoom out" #~ msgstr "/_Ansicht/_Verkleinern" #~ msgid "/_View/_Zoom to fit" #~ msgstr "/_Ansicht/_Grösse anpassen" #~ msgid "/_View/_Zoom to 100%" #~ msgstr "/_Ansicht/_100% Ansicht" #~ msgid "/_View/sep2" #~ msgstr "/_Ansicht/_sep2" #~ msgid "/_View/_Icon Box" #~ msgstr "/_Ansicht/_Bilderleiste" #~ msgid "/_View/_Tool Box" #~ msgstr "/_Ansicht/_Werkzeugleiste" #~ msgid "/_View/sep3" #~ msgstr "/_Ansicht/_sep3" #~ msgid "/_View/_Show exposure mask" #~ msgstr "/_Ansicht/_Anzeige der Über- und Unterbelichtung" #~ msgid "/_Batch/_Add to batch queue" #~ msgstr "/_Stapelverarbeitung/_Bild hinzufügen" #~ msgid "/_Batch/_Remove from batch queue" #~ msgstr "/_Stapelverarbeitung/_Eintrag löschen" #~ msgid "/_Batch/_Start" #~ msgstr "/_Stapelverarbeitung/_Beginnen" #~ msgid "Exp. mask" #~ msgstr "Bel. Warnung" #~ msgid "Toggle exposure mask" #~ msgstr "Belichtungswarnung umschalten" #~ msgid "Set zoom" #~ msgstr "Vergrösserung einstellen" #~ msgid "Zoom out" #~ msgstr "Vergrössern" #~ msgid "Zoom in" #~ msgstr "Verkleinern" #~ msgid "Zoom:" #~ msgstr "Vergrössern:" #~ msgid "Apply" #~ msgstr "Anwenden" #~ msgid "Split continuous" #~ msgstr "Aufteilen" rawstudio-2.0/po/nb.po0000644000175000017500000015523211546423404011705 00000000000000# Rawstudio 0.7 Norwegian Bokmål Translations. # This file is distributed under the same license as the rawstudio package. # by Einar Ryeng # Anders Kvist , 2011. # Stian Grindvoll , 2011. # msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-04-04 22:15+0200\n" "PO-Revision-Date: 2011-04-04 21:11+0200\n" "Last-Translator: Stian Grindvoll \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Norwegian Bokmal\n" "X-Poedit-Country: NORWAY\n" "Plural-Forms: \n" #: librawstudio/rs-lens-db-editor.c:325 msgid "All lenses" msgstr "Alle Objektiver" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "Feil ved oppdatering av lensfun databasen" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "Lensfun databasen er oppdatert" #: librawstudio/rs-lens-db-editor.c:565 msgid "Rawstudio Lens Library" msgstr "Rawstudio Objektiv Bibliotek" #: librawstudio/rs-lens-db-editor.c:590 msgid "Lens make" msgstr "Objektiv produsent" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "Objektiv modell" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "Fokal" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1530 msgid "Aperture" msgstr "Lys åpning" #: librawstudio/rs-lens-db-editor.c:606 msgid "Camera make" msgstr "Kamera produsent" #: librawstudio/rs-lens-db-editor.c:610 msgid "Camera model" msgstr "Kamera modell" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "Aktiv" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "Oppdater lensfun databasen" #: librawstudio/rs-lens-db-editor.c:734 msgid "Could not create temporary directory." msgstr "Kunne ikke lage midlertidig katalog" #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "Kunne ikke hente liste over filer fra %s." #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "Kunne ikke hente fil fra %s eller skrive til %s." #: librawstudio/rs-lens-db-editor.c:796 #, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Kunne ikke lage datakatalog for lensfun - %s" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "Feil ved kopiering av fil %s til %s\n" #: librawstudio/rs-lens-db-editor.c:939 msgid "Rawstudio Lens Editor" msgstr "Rawstudio Objektiv Velger" #: librawstudio/rs-lens-db-editor.c:950 msgid "Lens Make" msgstr "Objektiv Produsent" #: librawstudio/rs-lens-db-editor.c:954 msgid "Lens Model" msgstr "Objektiv Modell" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "Fokus Lengde" #: librawstudio/rs-lens-db-editor.c:966 msgid "Camera Make" msgstr "Kamera Produsent" #: librawstudio/rs-lens-db-editor.c:970 msgid "Camera Model" msgstr "Kamera Modell" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "Aktiver objektivet" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "Velg Objektiv" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "Objektiv Bibliotek" #: librawstudio/rs-library.c:254 #, c-format msgid "Could not open database %s" msgstr "Klarte ikke å åpne database %s" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "vidvinkel" #: librawstudio/rs-library.c:816 msgid "telephoto" msgstr "telefoto" #: librawstudio/rs-library.c:832 msgid "January" msgstr "Januar" #: librawstudio/rs-library.c:835 msgid "February" msgstr "Februar" #: librawstudio/rs-library.c:838 msgid "March" msgstr "Mars" #: librawstudio/rs-library.c:841 msgid "April" msgstr "April" #: librawstudio/rs-library.c:844 msgid "May" msgstr "Mai" #: librawstudio/rs-library.c:847 msgid "June" msgstr "Juni" #: librawstudio/rs-library.c:850 msgid "July" msgstr "Juli" #: librawstudio/rs-library.c:853 msgid "August" msgstr "August" #: librawstudio/rs-library.c:856 msgid "September" msgstr "September" #: librawstudio/rs-library.c:859 msgid "October" msgstr "Oktober" #: librawstudio/rs-library.c:862 msgid "November" msgstr "November" #: librawstudio/rs-library.c:865 msgid "December" msgstr "Desember" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm" #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "Ny pofile ..." #: librawstudio/rs-profile-selector.c:242 msgid "Embedded Profile" msgstr "Velg fargeprofil" #: librawstudio/rs-profile-selector.c:244 msgid "(Select Profile)" msgstr "Velg fargeprofil" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "Ekspo" #: librawstudio/rs-settings.c:80 msgid "Exposure Compensation" msgstr "Eksponeringskompensasjon" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 msgid "Satur" msgstr "Metn" #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "Metning" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "Tone" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "Fargeforskyvning" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "Kontr" #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "Kontrast" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temp" msgstr "Temp" #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "Temperatur" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "Nyanse" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "Nyanseforskyvning" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "WBAscii" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 msgid "Sharp" msgstr "Bildeskarphet" #: librawstudio/rs-settings.c:133 msgid "Sharpen Amount" msgstr "Skarphetsjustering" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "Støyfj" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "Støyreduksjon i lys" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "FrvSt" #: librawstudio/rs-settings.c:145 msgid "Colour Denoising" msgstr "Støyreduksjon i farger" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "KA R" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "Rød korrigering for Kromatisk Abberation" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "KA B" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "Blå korrigering for Kromatisk Abberation" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "Vign" #: librawstudio/rs-settings.c:163 msgid "Vignetting Correction" msgstr "Vignetting Korreksjon" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 msgid "Red" msgstr "Rød" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "Juster Mengde: Rød" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "Grønn" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "Juster Mengde: Grønn" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "Blå" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "Juster Mengde: Blå" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "Print farge området, kompatibelt med Adobe RGB (1998)" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "Stort farge register" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 msgid "JPEG Quality" msgstr "JPEG Kvalitet:" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "Bildetekst" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "Last opp foto til Facebook" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "Steg 1:" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "Steg 2:" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "Autentiser Rawstudio" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "Ubehandlet feil fra Facebook" #: plugins/output-facebook/output-facebook.c:329 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" "Rawstudio må være autentisert med Facebook før du kan laste opp bilder." #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "Album" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "Lag album" #: plugins/output-flickr/output-flickr.c:113 msgid "Title" msgstr "Tittle" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "Beskrivelse" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "Tag" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "Offentlig (Alle kan se dette)" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "Synlig for Venner" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "Synlig for Familie" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "Last opp foto til Flickr" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "Vi fikk en feil under autentiseringen. Vennligst prøv igjen." #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" "Rawstudio klarte ikke å laste opp bildet da autentiseringen er blitt " "fratatt. Vennligst " #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" "Rawstudio mistet tilgangen til å laste opp på dint konto, vennligst " "autentifiser deg på nytt." #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" "%s\n" "\n" "Melding: Denne feilen ble ikke fanget opp av Rawstudio. Vennligst fortell " "oss at du fant en feil og hvordan vi kan gjenskape den slik at vi kan lage " "en mer brukervennlig feilmelding. Takk! " #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "Flickr feil" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" "Du må autentifisere Rawstudio før du kan laste opp bilder til din Flickr " "konto." #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 #, fuzzy msgid "Full export path" msgstr "Fil eksportert" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 msgid "Copy EXIF metadata" msgstr "Kopier EXIF metadata" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "Ta vare på EXIF metadataen" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "Last opp bilde til Picasa" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "Ubehandlet feil fra Picasa" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "Nåværende bruker:" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "(Logget inn)" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "(Kan ikke logge inn)" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "(ingen bruker)" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "Bytt Bruker" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "Kan ikke logge inn" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "Prøv på nytt?" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "Det oppstod en feil ved kommunikasjon med web tjenesten til Picasa:" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "Vil du prøve på nytt?" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "Picasa Webalbum Autentifisering" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "Skriv inn ditt brukernavn og passord for Picasa Web Album." #: plugins/output-picasa/rs-picasa-client.c:234 msgid "Username: " msgstr "Brukernavn:" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "Passord:" #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "Lagre 16 bit lineær PNG" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "Kopier EXIF metadata til XMP" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Lagre TIFF ukomprimert" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "Lagre 16 bits TIFF" #: plugins/output-tifffile/output-tifffile.c:108 msgid "TIFF (Tagged Image File Format)" msgstr "8 bits TIFF" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Opprinnelig filnavn" #: src/filename.c:315 #, c-format msgid "%p - Path of original file" msgstr "%p - Sti til opprinnelig fil" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - Økende teller" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s - Innstilling (A, B eller C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "%d - Dato fra EXIF (ÅÅÅÅ-MM-DD)" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "%DY - År fra EXIF (ÅÅÅÅ)" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "%Dy - År fra EXIF (ÅÅ)" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "%Dm - Måne fra EXIF (MM)" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "%DM - Måne fra EXIF (Text)" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "%Dd - Dato fra EXIF (DD)" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "%DD - Dag i uken fra EXIF" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "%t - Tid fra EXIF (TT:MM:SS)" #: src/gtk-interface.c:154 msgid "Width" msgstr "Bredde:" #: src/gtk-interface.c:154 msgid "Height" msgstr "Høyde:" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Åpner bilde..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "Klarte ikke å åpne bilde" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Bilde åpnet" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "Bildeprioritet endret (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "Bildeprioritet endret (S)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "Bildeprioritet endret (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "Kunne ikke finne skjerm for fullskjermvisning" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "Trykk F10 for å flytte visningen til dette vinduet" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "" "Kunne ikke finne mere enn en skjerm. Kan ikke åpne forhåndsvisningen i " "fullskjerm" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "Velg hvilken skjerm for å åpne forhåndsvisning i fullskjerm" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "Velg skjerm for forhåndsvisning i fullskjerm" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "Velg OK for å bruke denne skjermen til forhåndsvisning i fullskjerm" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Katalog:" #: src/gtk-interface.c:777 src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Velg katalog til utdata" #: src/gtk-interface.c:793 src/rs-batch.c:1075 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Mal for filnavn:" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Eksempel på filnavn:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Filtype:" #. Add preferences box #: src/gtk-interface.c:879 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Egenskaper" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Bakgrunnsfarge for forhåndsvisning:" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Høyde på histogram:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Bruk systeminnstillinger" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Mellomlagre i hjemmekatalogen" #: src/gtk-interface.c:926 msgid "Display Colorspace:" msgstr "Skjermprofil" #: src/gtk-interface.c:938 msgid "Exposure Mask Colorspace:" msgstr "Eksponeringsmaske" #: src/gtk-interface.c:1011 msgid "General" msgstr "Generelt" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "Hurtigeksportering" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "Åpner katalog..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Åpne rekursivt" #: src/gtk-interface.c:1465 msgid "Directory" msgstr "Katalog:" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "Tag søk" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Verktøy" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Prosesseringskø" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Åpne" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Klar" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "Fremgang" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Åpne katalog" #: src/rs-actions.c:253 src/rs-batch.c:542 msgid "Could not create output directory." msgstr "Kunne ikke lage katalog for eksportering." #: src/rs-actions.c:257 msgid "Exporting..." msgstr "Eksporter fil" #: src/rs-actions.c:265 msgid "File exported" msgstr "Fil eksportert" #: src/rs-actions.c:270 src/rs-actions.c:293 msgid "Export failed" msgstr "Eksporteringen mislyktes" #: src/rs-actions.c:300 msgid "Exporting to GIMP..." msgstr "Eksporterer til GIMP..." #: src/rs-actions.c:305 msgid "Error exporting" msgstr "Eksporteringen mislyktes" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "Klarte ikke å eksportere bildet til gimp." #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "Sletter bilder" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "Filene vil bli slettet for godt!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Slett bilder" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "Venter på utført arbeid" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "Kopierer bilde til minne" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "Bilde kopiert til minne" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "FEIL: Kunne ikke kopiere bilde til minnet" #. Build GUI #: src/rs-actions.c:463 msgid "Profile" msgstr "Profil" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Eksponering" #: src/rs-actions.c:468 msgid "White balance" msgstr "Hvitbalanse" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Gjør skarpere" #: src/rs-actions.c:470 msgid "Denoise" msgstr "Støyfjerner" #: src/rs-actions.c:471 msgid "Color denoise" msgstr "Fargestøy" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "Kanalmixer" #: src/rs-actions.c:473 msgid "TCA" msgstr "TCA" #: src/rs-actions.c:474 msgid "Vignetting" msgstr "Vignetting" #: src/rs-actions.c:475 src/rs-toolbox.c:803 msgid "Curve" msgstr "Kurve" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "Velg alle/Ingen" #: src/rs-actions.c:498 msgid "Select settings to copy" msgstr "Lim inn innstillinger:" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Innstillinger kopiert" #: src/rs-actions.c:587 msgid "Pasting settings to images" msgstr "Limer inn innstillinger" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Innlimte innstillinger" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Ikke noe å lime inn" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Bufferet er tomt" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Justerer til automatisk hvitbalanse" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "Ingen hvitbalanse å justere etter" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Justerer etter kameraets hvitbalanse" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "Tag, skilt med mellomrom:" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "Legg til tag på valgte bilde(r)" #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "Viser eksponeringsmaske" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "Skjuler eksponeringsmaske" #: src/rs-actions.c:1067 msgid "Adding images to batch queue" msgstr "La til bilder i prosesseringskøen." #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "%d bilder lagt til i prosesseringskø" #: src/rs-actions.c:1101 src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Velg hvilke innstillinger som skal\n" "gjelde for satsvis prosessering." #: src/rs-actions.c:1188 msgid "Removing images from batch queue" msgstr "Fjerner bilder fra prosesseringskøen" #: src/rs-actions.c:1203 #, c-format msgid "%d photos removed from batch queue" msgstr "%d bilder fjernet fra prosesseringskø" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1505 msgid "Add Profile ..." msgstr "Legg til profil ..." #: src/rs-actions.c:1266 msgid "All Profiles" msgstr "Alle profiler" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "Kameraprofiler (DCP)" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "Fargeprofiler (icc og icm)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Alle filer" #: src/rs-actions.c:1399 msgid "A raw image converter for GTK+/GNOME" msgstr "En råfilkonverterer for GTK+/GNOME" #: src/rs-actions.c:1436 msgid "_File" msgstr "Fil" #: src/rs-actions.c:1437 msgid "_Edit" msgstr "Rediger" #: src/rs-actions.c:1438 msgid "_Photo" msgstr "Bilde" #: src/rs-actions.c:1439 msgid "_Set Priority" msgstr "Sett prioritet" #: src/rs-actions.c:1440 msgid "_White Balance" msgstr "Hvitbalanse" #: src/rs-actions.c:1441 msgid "_View" msgstr "Vis" #: src/rs-actions.c:1442 msgid "_Sort by" msgstr "Sorter" #: src/rs-actions.c:1443 msgid "_Batch" msgstr "Prosesseringskø" #: src/rs-actions.c:1444 msgid "_Help" msgstr "Hjelp" #: src/rs-actions.c:1446 msgid "_Snapshot" msgstr "Øyeblikksbildet" #. File menu #: src/rs-actions.c:1449 msgid "_Open Directory" msgstr "Åpne katalog" #: src/rs-actions.c:1450 msgid "_Quick Export" msgstr "Hurtigeksportering" #: src/rs-actions.c:1451 msgid "_Export As" msgstr "Eksporter som..." #: src/rs-actions.c:1452 msgid "_Export to Gimp" msgstr "Eksporter til gimp" #: src/rs-actions.c:1453 msgid "_Copy Image to Clipboard" msgstr "Kopier bilde til minne" #: src/rs-actions.c:1454 msgid "_Reload directory" msgstr "Les katalog på ny" #: src/rs-actions.c:1455 msgid "_Delete flagged photos" msgstr "Slett _merkede bilder" #: src/rs-actions.c:1456 msgid "_Quit" msgstr "Avslutt" #. Edit menu #: src/rs-actions.c:1459 msgid "_Revert settings" msgstr "Nullstill endringer" #: src/rs-actions.c:1460 msgid "_Copy settings" msgstr "Kopier innstillinger" #: src/rs-actions.c:1461 msgid "_Paste settings" msgstr "Lim inn innstillinger" #: src/rs-actions.c:1462 msgid "_Reset settings" msgstr "Nullstill" #: src/rs-actions.c:1463 msgid "_Save camera default settings" msgstr "Lagre standard kamera instillinger" #: src/rs-actions.c:1464 msgid "_Preferences" msgstr "Egenskaper" #. Photo menu #: src/rs-actions.c:1467 msgid "_Flag photo for deletion" msgstr "Merk bilde for sletting" #: src/rs-actions.c:1468 msgid "_1" msgstr "_1" #: src/rs-actions.c:1469 msgid "_2" msgstr "_2" #: src/rs-actions.c:1470 msgid "_3" msgstr "_3" #: src/rs-actions.c:1471 msgid "_Remove priority" msgstr "Fjern prioritet" #: src/rs-actions.c:1472 msgid "_Auto" msgstr "Automatisk" #: src/rs-actions.c:1473 msgid "_Camera" msgstr "Fra kamera" #: src/rs-actions.c:1474 msgid "_Crop" msgstr "Beskjær" #: src/rs-actions.c:1475 msgid "_Uncrop" msgstr "Fjern beskjæring" #: src/rs-actions.c:1476 msgid "_Straighten" msgstr "Rett opp" #: src/rs-actions.c:1477 msgid "_Unstraighten" msgstr "Fjern oppretting" #: src/rs-actions.c:1478 msgid "_Group" msgstr "Gruppér" #: src/rs-actions.c:1479 msgid "_Ungroup" msgstr "Løs opp gruppe" #: src/rs-actions.c:1480 msgid "_Auto group" msgstr "Automatisk gruppe" #: src/rs-actions.c:1481 msgid "_Tag Photo..." msgstr "Tag Bilde" #: src/rs-actions.c:1482 msgid "Rotate Clockwise" msgstr "Rotér bildet 90° mot høyre" #: src/rs-actions.c:1483 msgid "Rotate Counter Clockwise" msgstr "Rotér bildet 90° mot venstre" #: src/rs-actions.c:1484 msgid "Flip" msgstr "Snu" #: src/rs-actions.c:1485 msgid "Mirror" msgstr "Speil" #. View menu #: src/rs-actions.c:1488 msgid "_Previous photo" msgstr "Forrige bilde" #: src/rs-actions.c:1489 msgid "_Next Photo" msgstr "Neste bilde" #: src/rs-actions.c:1490 msgid "_Lens Library" msgstr "Objektiv bibliotek" #: src/rs-actions.c:1491 msgid "_Tethered Shooting" msgstr "Fjerntagning av bilder" #. Batch menu #: src/rs-actions.c:1494 msgid "_Add to batch queue" msgstr "Legg til i prosesseringskø" #: src/rs-actions.c:1495 msgid "_Add view to queue..." msgstr "Legg aktiv visning i køen" #: src/rs-actions.c:1496 msgid "_Remove from batch queue" msgstr "Fjern fra prosesseringskøen" #: src/rs-actions.c:1497 msgid "_Start" msgstr "Start" #. help menu #: src/rs-actions.c:1500 msgid "_Online Documentation" msgstr "" #: src/rs-actions.c:1501 msgid "_About" msgstr "Om" #: src/rs-actions.c:1510 msgid "_Zoom to fit" msgstr "Beste tilpasning" #: src/rs-actions.c:1511 msgid "_Iconbox" msgstr "Ikoner" #: src/rs-actions.c:1512 msgid "_Toolbox" msgstr "Verktøy" #: src/rs-actions.c:1513 msgid "_Fullscreen" msgstr "Fullskjerm" #: src/rs-actions.c:1514 msgid "_Show Photo On Secondary Monitor" msgstr "Vis bildet på en annen skjerm" #: src/rs-actions.c:1515 msgid "Show Filenames in Iconbox" msgstr "Vis filnavn ved ikoner" #: src/rs-actions.c:1516 msgid "Load non-RAW images" msgstr "Åpne kke-RAW bilder" #: src/rs-actions.c:1517 msgid "Do not Load Selected Images" msgstr "Ikke last inn valgte bilder" #: src/rs-actions.c:1518 msgid "_Exposure mask" msgstr "Eksponeringsmaske" #: src/rs-actions.c:1519 msgid "_Split" msgstr "Splitt" #: src/rs-actions.c:1521 msgid "_Lights out" msgstr "Lys av" #: src/rs-actions.c:1527 msgid "Name" msgstr "Navn" #: src/rs-actions.c:1528 msgid "Timestamp" msgstr "Tidsstempel" #: src/rs-actions.c:1529 msgid "ISO" msgstr "ISO" #: src/rs-actions.c:1531 msgid "Focallength" msgstr "Fokuslengde" #: src/rs-actions.c:1532 msgid "Shutterspeed" msgstr "Lukkerhastighet" #. Snapshot labels #: src/rs-actions.c:1537 src/rs-toolbox.c:207 src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1538 src/rs-toolbox.c:208 src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1539 src/rs-toolbox.c:209 src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Avbryt" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Siste bilde:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Gjenstående tid: %dh %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "Prosesserer bilde %d/%d" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Gjenstående tid: ..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "Prosesserer bilde 1/%d." #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "Leser %s ..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "Lagrer %s..." #: src/rs-batch.c:635 msgid "Could not export photo." msgstr "Klarte ikke å eksportere bilde" #: src/rs-batch.c:695 msgid "Icon" msgstr "Ikon" #: src/rs-batch.c:702 msgid "Filename" msgstr "Filnavn" #: src/rs-batch.c:709 msgid "Setting" msgstr "Innstilling" #: src/rs-batch.c:802 msgid "Start" msgstr "Start" #: src/rs-batch.c:805 msgid "Remove" msgstr "Fjern" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Fjern alle" #: src/rs-batch.c:916 src/rs-batch.c:1091 msgid "Edit output settings" msgstr "Rediger eksport innstillinger" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Bildestørrelse" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "Konstant målestokk" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Konstant bredde" #: src/rs-batch.c:962 msgid "Constant height" msgstr "Konstant høyde" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Maksimal størrelse" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Bildebredde: " #: src/rs-batch.c:978 src/rs-batch.c:987 msgid "pixels" msgstr "piksler" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "Bildehøyde: " #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "Målestokk: " #: src/rs-batch.c:996 msgid "%" msgstr " %" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Konstant bredde:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Konstant høyde:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "Konstant målestokk:\n" "%d" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Maksimal størrelse:\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Eksport katalog:" #: src/rs-batch.c:1100 msgid "Change" msgstr "Endre" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "Eksporteringsdimensjoner" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "Standard kamera redigerer" #: src/rs-camera-db.c:459 msgid "Model" msgstr "Modell" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "Bilde Navigasjon" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "Lys av mode ikke tilgjengelig" #: src/rs-preview-widget.c:887 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" "Ditt oppsett ser ikke ut til å støtte RGBA visualisering og/eller " "komposisjon. Benytt manualen for ditt operativsystem for å aktivisere RGBA " "visualisering og komposisjon." #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Størrelse" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Rutenett" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Ingen" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "Gylne snitt" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "Tredjedelsregelen" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Gylne triangler #1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Gylne triangler #2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Harmoniske triangler #1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Harmoniske triangler #2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Aspekt" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "Fri" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "Orgintal Aspektet" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "ISO-papir (A4)" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "16:9 (HDTV)" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "Gyllent rektangel" #: src/rs-preview-widget.c:1180 src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Beskjær" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "Ikke beskjær" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" "Beskjær: Dra for å velge området du vil beskjære. Høyre museknapp inne i " "området: Godkjenn beskjæring. Annuller beskjæring" #: src/rs-preview-widget.c:1238 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" "Opprettning: Tegn en linje i bildet som skal være horisontal eller vertikal. " "Høyre museknapp annullerer." #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:522 msgid "Export File" msgstr "Eksporter fil" #: src/rs-save-dialog.c:282 msgid "File not saved!" msgstr "Fil ble ikke lagret!" #: src/rs-save-dialog.c:299 #, c-format msgid "Exporting to %s" msgstr "Eksporterer fil til %s" #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" "Kunne ikke lagre fil: %s\n" "\n" "Sjekk at du har skrivetilgang til katalogen." #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "Overskrive filen?" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" "Filen '%s' finnes allerede.\n" "\n" "Vil du overskrive filen?" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Behold høyde/bredde-forhold" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Bredde:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Høyde:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Prosent:" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Alle bilder (unntatt slettede)" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Prioritet 1" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Prioritet 2" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Prioritet 3" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Uprioriterte bilder" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "S (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Slettede bilder" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Prioritet" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" "Notat: Iconview oppdatering deaktivert. Nye filer vil ikke åpnes! Press " " for å reaktivere." #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" "%s\n" "\n" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "Produsent: %s\n" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "Modell: %s\n" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "Fokuslengde: %dmm\n" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "Lukkerhastighet: %.1fs\n" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "Lukkerhastighet: 1/%.0fs\n" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "Blender: F/%.01f\n" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "ISO: %u\n" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "Tid: %s" #: src/rs-store.c:1371 msgid "* (-)" msgstr "* (%d)" #: src/rs-store.c:1372 msgid "1 (-)" msgstr "1 (%d)" #: src/rs-store.c:1373 msgid "2 (-)" msgstr "2 (%d)" #: src/rs-store.c:1374 msgid "3 (-)" msgstr "3 (%d)" #: src/rs-store.c:1375 msgid "U (-)" msgstr "U (%d)" #: src/rs-store.c:1376 msgid "D (-)" msgstr "D (%d)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "Tag søk [%s]" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "Gphoto2 rapporterte kontekst feil:\n" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" "FEIL: Gphoto2 returnerte feil verdi %d\n" "Feilmeldingen er: %s\n" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "Aktiviser opptak for Canon Kameraer.\n" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "Aktiviser opptak for Nikon kameraer.\n" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "Aktiviserte opptak.\n" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "Spesifiserte port ('%s') ble ikke funnet." #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "Flytting av fil til aktive katalog feilet!\n" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "Laster ned og legger til bildet.\n" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "Klarte ikke åpne midlertidig fil på disk for skrivning." #: src/rs-tethered-shooting.c:558 msgid "Could not open image!\n" msgstr "Klarte ikke å åpne bildet!\n" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "Fanger bilder.\n" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" "Monitoreringen mottok feilen %d, når den ventet på kameraet.\n" "Feilmeldingen er: %s\n" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" "Mottatt feil %d ved nedlasting av bilde fra kamera.\n" "Feilmeldingen er: %s\n" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "Stopper kameramonitoreringen.\n" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" "Fikk feilen %d, i bildetagningen.\n" "Feilmeldingen er: %s\n" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" "Advarsel: Det tok lengre tid å fange bilde enn satt intervall\n" "Det tok %.f1 sekunder å laste ned bildet.\n" "Prøv å øke intervall instillingen.\n" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "Venter på neste bilde.\n" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "Start bildetagning" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "Stopper kontinuerlig kamera tagning\n" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "Koble fra det aktive kameraet.\n" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "Kamera %s på port %s feilet å åpne\n" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" "FEIL: Initialiseringen av kamera returnerte %d\n" "Feilmeldingen er: %s\n" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "Slår av asynkron jobb\n" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "Fant %d kameraer.\n" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "Ingen kamera valgt - Klarer ikke å koble til.\n" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "Stopper kjørende jobb for å klargjøre for fjerntagning.\n" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "Stopper kjørende jobb.\n" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "Starter jobb monitoreringen\n" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "Jobbmonitoren er allerede startet.\n" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "Stopper kontinuerlig bildetagnings jobb\n" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "Ingen kamera koblet til.\n" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "Starte kontinuerlig bildetagning\n" #: src/rs-tethered-shooting.c:938 msgid "Stop Shooting" msgstr "Stop tagning" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "Velg kamera:" #: src/rs-tethered-shooting.c:1003 msgid "Take Photo" msgstr "Ta Bilde" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "Overvåke Kameraet" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "Frakoble kamerat" #. Status window #: src/rs-tethered-shooting.c:1022 msgid "Status:" msgstr "Status" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "Master kontroll" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "Tag for de nye bildene" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 msgid "Filename & Tags" msgstr "Filnavn & Tag" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "Sekunder mellom hvert fanget bilde" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "Kontinuerlig bildetagning" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "Minimaliser dette vinduet etter tatt bilde" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "Kopier instilling fra aktiv til nytt bilde" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "Åpne det nye bildet" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "Rawstudio fjernstyring" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" "Velkommen til fjernstyring av kameraet!\n" "Pass på så kameraet ikke er opptatt med andre oppgaver i operativsystemet.\n" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Histogram" #: src/rs-toolbox.c:443 msgid "Reset" msgstr "Nullstill kurve" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr ". Klikk for å nullstille verdi" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr ". Klikk for å velge verdi" #: src/rs-toolbox.c:566 src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Åpne kurve..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "Velg lagret kurve" #: src/rs-toolbox.c:700 msgid "Select Action" msgstr "Innstilling" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Lagre kurve som..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Nullstill kurve" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "Autojustér endepunkter" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "Editer Objektiv" #. Pack everything nice #: src/rs-toolbox.c:800 msgid "Basic" msgstr "Basis" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "Kanalmixer" #: src/rs-toolbox.c:802 msgid "Lens Correction" msgstr "Linsekorreksjon" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Speil bildet om x-aksen" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Speil bildet om y-aksen" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Rotér bildet 90° mot høyre" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Rotér bildet 90° mot venstre" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Transformer" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "Ukjent Objektiv" #: src/rs-toolbox.c:1035 msgid "Lens Disabled" msgstr "Deaktivert Objektiv" #: src/rs-toolbox.c:1043 msgid "No Lens Information" msgstr "Ingen informasjon om objektivet" #: src/rs-toolbox.c:1045 msgid "Camera Unknown" msgstr "Ukjent Kamera" #: src/rs-toolbox.c:1050 msgid "No Photo" msgstr "Ingen bilder" #: src/rs-toolbox.c:1259 msgid "_Previous" msgstr "Forrige bilde" #: src/rs-toolbox.c:1260 msgid "_Next" msgstr "Neste bilde" #~ msgid " %s added to batch queue" #~ msgstr "%s lagt til i prosesseringskø" #~ msgid "%s already added to batch queue" #~ msgstr "%s finnes allerede i prosesseringskøen" #~ msgid "Not in batch queue" #~ msgstr "Ikke i prosesseringskøen" #~ msgid "Processing photos" #~ msgstr "Prosesserer bilder" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "Åpne 8-bits bildefiler (jpeg, png, osv.)" #, fuzzy #~ msgid "Warmth" #~ msgstr "Varme/nyanse" #, fuzzy #~ msgid "CA Red" #~ msgstr "Klar" #~ msgid "Select color profile" #~ msgstr "Velg fargeprofil" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Fargeprofiler (icc og icm)" #~ msgid "Not a valid color profile." #~ msgstr "Ikke en gyldig fargeprofil." #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "" #~ "Filen du har valgt er ikke en gyldig fargeprofil for denne versjonen av " #~ "Rawstudio." #~ msgid "Enable color management (experimental)" #~ msgstr "Aktiver fargestyring (eksperimentelt)" #~ msgid "Input profile" #~ msgstr "Inndataprofil" #~ msgid "BuiltInRGBProfile" #~ msgstr "Innebygget RGB-profil" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Eksportprofil" #~ msgid "Intent" #~ msgstr "Formål" #~ msgid "Perceptual" #~ msgstr "Oppfattelse" #~ msgid "Relative colormetric" #~ msgstr "Relativ fargemetrikk" #~ msgid "Absolute colormetric" #~ msgstr "Absolutt fargemetrikk" #~ msgid "Colors" #~ msgstr "Fargestyring" #, fuzzy #~ msgid "Change this" #~ msgstr "Endre" #~ msgid "Background renderer active" #~ msgstr "Ferdigstiller i bakgrunnen" #~ msgid "File export canceled" #~ msgstr "Eksportering avbrutt" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "16-bits TIFF" #~ msgid "Rotate the photo 180 degrees" #~ msgstr "Rotér bildet 180°" #~ msgid "Reset this setting" #~ msgstr "Nullstill" #~ msgid "_Zoom to 100%" #~ msgstr "_Piksel for piksel (100%)" #~ msgid "Canon CR2" #~ msgstr "Canon CR2" #~ msgid "Canon CIFF" #~ msgstr "Canon CIFF" #~ msgid "Nikon NEF" #~ msgstr "Nikon NEF" #~ msgid "Minolta raw" #~ msgstr "Minolta raw" #~ msgid "Canon TIFF" #~ msgstr "Canon TIFF" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Panasonic raw" #~ msgstr "Panasonic raw" #~ msgid "Pentax raw" #~ msgstr "Pentax raw" #~ msgid "Adobe Digital negative" #~ msgstr "Adobe Digital-negativ" #~ msgid "Hasselblad" #~ msgstr "Hasselblad" #~ msgid "/File/_Open directory..." #~ msgstr "/Fil/_Åpne mappe..." #~ msgid "/File/_Quick export" #~ msgstr "/Fil/_Hurtigeksportering" #~ msgid "/File/_Export as..." #~ msgstr "/Fil/_Eksporter som..." #~ msgid "/File/_Reload" #~ msgstr "/Fil/_Les på nytt" #~ msgid "/_Edit/_Paste settings" #~ msgstr "/Rediger/_Lim inn innstillinger" #~ msgid "/_Edit/_Reset current settings" #~ msgstr "/Rediger/Nullstill valgte innstillinger" #~ msgid "/_Edit/sep1" #~ msgstr "/Rediger/sep1" #~ msgid "/_Edit/_Preferences" #~ msgstr "/Rediger/E_genskaper" #~ msgid "/_Photo/_Set priority/_2" #~ msgstr "/Bilde/Sett prioritet/_2" #~ msgid "/_Photo/_Set priority/_3" #~ msgstr "/Bilde/Sett prioritet/_3" #~ msgid "/_Photo/_Set priority/_Remove priority" #~ msgstr "/Bilde/Sett prioritet/_Fjern prioritet" #~ msgid "/_Photo/_White balance/_Auto" #~ msgstr "/Bilde/Hvitbalanse/_Automatisk" #~ msgid "/_Photo/_White balance/_Camera" #~ msgstr "/Bilde/Hvitbalanse/Fra _kamera" #~ msgid "/_Photo/_Uncrop" #~ msgstr "/Bilde/Fjern _beskjæring" #~ msgid "/_Photo/_Straighten" #~ msgstr "/Bilde/_Rett opp" #~ msgid "/_Photo/_Unstraighten" #~ msgstr "/Bilde/Fjern opp_retting" #~ msgid "/_Photo/_Group photos" #~ msgstr "/Bilde/_Gruppér bilder" #~ msgid "/_Photo/_Ungroup photos" #~ msgstr "/Bilde/Fjern _gruppering" #~ msgid "/_View/sep1" #~ msgstr "/Vis/sep1" #~ msgid "/_View/_Zoom in" #~ msgstr "/Vis/_Zoom inn" #~ msgid "/_View/_Zoom out" #~ msgstr "/Vis/_Zoom ut" #~ msgid "/_View/_Zoom to fit" #~ msgstr "/Vis/_Beste tilpasning" #~ msgid "/_View/_Zoom to 100%" #~ msgstr "/Vis/Piksel for piksel (100%)" #~ msgid "/_View/sep2" #~ msgstr "/Vis/sep2" #~ msgid "/_View/_Icon Box" #~ msgstr "/Vis/_Ikonboks" #~ msgid "/_View/_Tool Box" #~ msgstr "/Vis/_Verktøyboks" #~ msgid "/_View/sep3" #~ msgstr "/Vis/sep3" #~ msgid "/_View/_Show exposure mask" #~ msgstr "/Vis/_Vis eksponeringsmaske" #~ msgid "/_Batch/_Add to batch queue" #~ msgstr "/Prosesseringskø/_Legg bilde i køen" #~ msgid "/_Batch/_Remove from batch queue" #~ msgstr "/Prosesseringskø/_Fjern fra køen" #~ msgid "/_Batch/_Start" #~ msgstr "/Prosesseringskø/_Start" #~ msgid "Exp. mask" #~ msgstr "Eksponeringsmaske" #~ msgid "Toggle exposure mask" #~ msgstr "Vis/skjul eksponeringsmaske" #~ msgid "Set zoom" #~ msgstr "Sett zoom" #~ msgid "Zoom out" #~ msgstr "Zoom ut" #~ msgid "Zoom in" #~ msgstr "Zoom inn" #~ msgid "Zoom:" #~ msgstr "Zoom:" #~ msgid "Apply" #~ msgstr "Bruk" #~ msgid "Split continuous" #~ msgstr "Splitt sammenhengende" rawstudio-2.0/po/LINGUAS0000644000175000017500000000006511532560622011763 00000000000000cs da de en fr it nb pl ru fi es sv nl pt_BR ca hu jarawstudio-2.0/po/es.po0000644000175000017500000013676611546425272011735 00000000000000# translation of es.po to Español # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Carlos Davila , 2008. msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-03-26 03:39+0100\n" "PO-Revision-Date: 2008-05-02 00:47+0100\n" "Last-Translator: Patrik Jarl \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Poedit-Language: Spanish\n" "X-Poedit-Country: SPAIN\n" #: librawstudio/rs-lens-db-editor.c:325 #, fuzzy msgid "All lenses" msgstr "Todos los archivos" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "" #: librawstudio/rs-lens-db-editor.c:565 #, fuzzy msgid "Rawstudio Lens Library" msgstr "Abrir directorio" #: librawstudio/rs-lens-db-editor.c:590 #, fuzzy msgid "Lens make" msgstr "Última imagen:" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "" #: librawstudio/rs-lens-db-editor.c:606 #, fuzzy msgid "Camera make" msgstr "_Cámara" #: librawstudio/rs-lens-db-editor.c:610 #, fuzzy msgid "Camera model" msgstr "_Cámara" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:734 #, fuzzy msgid "Could not create temporary directory." msgstr "Seleccionar directorio de salida" #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:796 #, fuzzy, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Seleccionar directorio de salida" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "" #: librawstudio/rs-lens-db-editor.c:939 #, fuzzy msgid "Rawstudio Lens Editor" msgstr "Abrir directorio" #: librawstudio/rs-lens-db-editor.c:950 #, fuzzy msgid "Lens Make" msgstr "Última imagen:" #: librawstudio/rs-lens-db-editor.c:954 #, fuzzy msgid "Lens Model" msgstr "Última imagen:" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "" #: librawstudio/rs-lens-db-editor.c:966 #, fuzzy msgid "Camera Make" msgstr "_Cámara" #: librawstudio/rs-lens-db-editor.c:970 #, fuzzy msgid "Camera Model" msgstr "_Cámara" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "" #: librawstudio/rs-library.c:254 #, fuzzy, c-format msgid "Could not open database %s" msgstr "No se pudo abrir la foto" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "" #: librawstudio/rs-library.c:816 #, fuzzy msgid "telephoto" msgstr "Borrar fotos" #: librawstudio/rs-library.c:832 msgid "January" msgstr "" #: librawstudio/rs-library.c:835 msgid "February" msgstr "" #: librawstudio/rs-library.c:838 msgid "March" msgstr "" #: librawstudio/rs-library.c:841 msgid "April" msgstr "" #: librawstudio/rs-library.c:844 #, fuzzy msgid "May" msgstr "Mamiya" #: librawstudio/rs-library.c:847 msgid "June" msgstr "" #: librawstudio/rs-library.c:850 msgid "July" msgstr "" #: librawstudio/rs-library.c:853 msgid "August" msgstr "" #: librawstudio/rs-library.c:856 msgid "September" msgstr "" #: librawstudio/rs-library.c:859 msgid "October" msgstr "" #: librawstudio/rs-library.c:862 msgid "November" msgstr "" #: librawstudio/rs-library.c:865 msgid "December" msgstr "" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, fuzzy, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "" #: librawstudio/rs-profile-selector.c:242 #, fuzzy msgid "Embedded Profile" msgstr "Seleccionar perfil de color" #: librawstudio/rs-profile-selector.c:244 #, fuzzy msgid "(Select Profile)" msgstr "Seleccionar perfil de color" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 #, fuzzy msgid "Expos" msgstr "Exposición" #: librawstudio/rs-settings.c:80 #, fuzzy msgid "Exposure Compensation" msgstr "Exportar dimensiones" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 #, fuzzy msgid "Satur" msgstr "Saturación" #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "Saturación" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "Tono" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 #, fuzzy msgid "Contr" msgstr "Contraste" #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "Contraste" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temp" msgstr "" #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 #, fuzzy msgid "Sharp" msgstr "Enfoque" #: librawstudio/rs-settings.c:133 #, fuzzy msgid "Sharpen Amount" msgstr "Enfoque" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "" #: librawstudio/rs-settings.c:145 #, fuzzy msgid "Colour Denoising" msgstr "Colores" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "" #: librawstudio/rs-settings.c:163 #, fuzzy msgid "Vignetting Correction" msgstr "La sección áurea" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 #, fuzzy msgid "Red" msgstr "Listo" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 #, fuzzy msgid "JPEG Quality" msgstr "Calidad JPEG:" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:329 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "" #: plugins/output-flickr/output-flickr.c:113 #, fuzzy msgid "Title" msgstr "_Archivo" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "" #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 #, fuzzy msgid "Full export path" msgstr "Archivo exportado" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 #, fuzzy msgid "Copy EXIF metadata" msgstr "Ningún metadato" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "" #: plugins/output-picasa/rs-picasa-client.c:234 #, fuzzy msgid "Username: " msgstr "Nombre de archivo:" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "" #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Guardar TIFF sin compresión" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "" #: plugins/output-tifffile/output-tifffile.c:108 #, fuzzy msgid "TIFF (Tagged Image File Format)" msgstr "8-bit TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Nombre de archivo original" #: src/filename.c:315 #, fuzzy, c-format msgid "%p - Path of original file" msgstr "%f - Nombre de archivo original" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - Contador incremental" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s - Ajuste id (A, B o C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "" #: src/gtk-interface.c:154 #, fuzzy msgid "Width" msgstr "Anchura:" #: src/gtk-interface.c:154 #, fuzzy msgid "Height" msgstr "Altura:" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Abriendo foto..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "No se pudo abrir la foto" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Imagen abierta" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "Prioridad de foto cambiada (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "Prioridad de foto cambiada (D)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "Prioridad de foto cambiada (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Directorio:" #: src/gtk-interface.c:777 src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Seleccionar directorio de salida" #: src/gtk-interface.c:793 src/rs-batch.c:1075 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Plantilla de nombres de archivo:" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Ejemplo de nombre de archivo:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Tipo de archivo:" #. Add preferences box #: src/gtk-interface.c:879 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Configuración" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Color de fondo de previsualización:" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Altura del histograma:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Usar tema del sistema" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Situar caché en el directorio personal" #: src/gtk-interface.c:926 #, fuzzy msgid "Display Colorspace:" msgstr "Perfil de visualización" #: src/gtk-interface.c:938 #, fuzzy msgid "Exposure Mask Colorspace:" msgstr "_Máscara de exposición" #: src/gtk-interface.c:1011 msgid "General" msgstr "General" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "Exportación rápida" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "Abriendo directorio..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Apertura recursiva" #: src/gtk-interface.c:1465 #, fuzzy msgid "Directory" msgstr "Directorio:" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Herramientas" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Lotes" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Abrir" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Listo" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "Progreso" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Abrir directorio" #: src/rs-actions.c:253 src/rs-batch.c:542 #, fuzzy msgid "Could not create output directory." msgstr "Seleccionar directorio de salida" #: src/rs-actions.c:257 #, fuzzy msgid "Exporting..." msgstr "Error al exportar" #: src/rs-actions.c:265 msgid "File exported" msgstr "Archivo exportado" #: src/rs-actions.c:270 src/rs-actions.c:293 #, fuzzy msgid "Export failed" msgstr "Exportar archivo" #: src/rs-actions.c:300 #, fuzzy msgid "Exporting to GIMP..." msgstr "Error al exportar" #: src/rs-actions.c:305 msgid "Error exporting" msgstr "Error al exportar" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "Error al exportar la foto a gimp." #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "Borrando fotos" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "¡Sus archivos se borrarán permanentemente!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Borrar fotos" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "" #. Build GUI #: src/rs-actions.c:463 #, fuzzy msgid "Profile" msgstr "Todos los archivos" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Exposición" #: src/rs-actions.c:468 msgid "White balance" msgstr "Balance de blancos" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Enfoque" #: src/rs-actions.c:470 msgid "Denoise" msgstr "" #: src/rs-actions.c:471 #, fuzzy msgid "Color denoise" msgstr "Colores" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "" #: src/rs-actions.c:473 msgid "TCA" msgstr "" #: src/rs-actions.c:474 #, fuzzy msgid "Vignetting" msgstr "Ajuste" #: src/rs-actions.c:475 src/rs-toolbox.c:803 msgid "Curve" msgstr "Curva" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "" #: src/rs-actions.c:498 #, fuzzy msgid "Select settings to copy" msgstr "Seleccionar ajustes a pegar" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Ajustes copiados" #: src/rs-actions.c:587 #, fuzzy msgid "Pasting settings to images" msgstr "Ajustes pegados" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Ajustes pegados" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Nada que pegar" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Memoria intermedia vacía" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Ajustando a balance de blancos automático" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "Balance de blanco falta de" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Ajustando al balance de blancos de la cámara" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "" #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "Mostrando máscara de exposición" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "Ocultando máscara de exposición" #: src/rs-actions.c:1067 #, fuzzy msgid "Adding images to batch queue" msgstr "_Añadir a la cola de lotes" #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "%d fotos añadidas a la cola de lotes" #: src/rs-actions.c:1101 src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Seleccionar qué ajustes\n" "añadir a la cola de lotes" #: src/rs-actions.c:1188 #, fuzzy msgid "Removing images from batch queue" msgstr "Eliminado de la cola de lotes" #: src/rs-actions.c:1203 #, fuzzy, c-format msgid "%d photos removed from batch queue" msgstr "%d fotos añadidas a la cola de lotes" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "" #: src/rs-actions.c:1266 #, fuzzy msgid "All Profiles" msgstr "Todos los archivos" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "" #: src/rs-actions.c:1282 #, fuzzy msgid "Color Profiles (ICC and ICM)" msgstr "Perfiles de color (icc e icm)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Todos los archivos" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "Un convertidor de imágenes raw para GTK+/GNOME" #: src/rs-actions.c:1412 msgid "_File" msgstr "_Archivo" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "_Editar" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "_Foto" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "_Establecer prioridad" #: src/rs-actions.c:1416 msgid "_White Balance" msgstr "_Balance de blancos" #: src/rs-actions.c:1417 msgid "_View" msgstr "_Ver" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "_Lotes" #: src/rs-actions.c:1420 msgid "_Help" msgstr "_Ayuda" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "" #. File menu #: src/rs-actions.c:1425 msgid "_Open Directory" msgstr "_Abrir directorio" #: src/rs-actions.c:1426 msgid "_Quick Export" msgstr "_Exportación rápida" #: src/rs-actions.c:1427 msgid "_Export As" msgstr "_Exportar como" #: src/rs-actions.c:1428 msgid "_Export to Gimp" msgstr "_Exportar a Gimp" #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "" #: src/rs-actions.c:1430 msgid "_Reload directory" msgstr "_Recargar directorio" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "_Borrar fotos marcadas" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "_Salir" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "_Deshacer ajustes" #: src/rs-actions.c:1436 msgid "_Copy settings" msgstr "_Copiar ajustes" #: src/rs-actions.c:1437 msgid "_Paste settings" msgstr "_Pegar ajustes" #: src/rs-actions.c:1438 msgid "_Reset settings" msgstr "_Restablecer ajustes" #: src/rs-actions.c:1439 #, fuzzy msgid "_Save camera default settings" msgstr "_Restablecer ajustes" #: src/rs-actions.c:1440 msgid "_Preferences" msgstr "_Configuración" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "_Marcar foto para borrar" #: src/rs-actions.c:1444 msgid "_1" msgstr "_1" #: src/rs-actions.c:1445 msgid "_2" msgstr "_2" #: src/rs-actions.c:1446 msgid "_3" msgstr "_3" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "_Eliminar prioridad" #: src/rs-actions.c:1448 msgid "_Auto" msgstr "_Auto" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "_Cámara" #: src/rs-actions.c:1450 msgid "_Crop" msgstr "_Recorte" #: src/rs-actions.c:1451 msgid "_Uncrop" msgstr "_Deshacer recorte" #: src/rs-actions.c:1452 msgid "_Straighten" msgstr "_Enderezar" #: src/rs-actions.c:1453 msgid "_Unstraighten" msgstr "_Desenderezar" #: src/rs-actions.c:1454 msgid "_Group" msgstr "_Agrupar" #: src/rs-actions.c:1455 msgid "_Ungroup" msgstr "_Desagrupar" #: src/rs-actions.c:1456 #, fuzzy msgid "_Auto group" msgstr "_Desagrupar" #: src/rs-actions.c:1457 #, fuzzy msgid "_Tag Photo..." msgstr "_Foto" #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "" #: src/rs-actions.c:1459 #, fuzzy msgid "Rotate Counter Clockwise" msgstr "Girar la foto 90 grados en el sentido de las agujas del reloj" #: src/rs-actions.c:1460 msgid "Flip" msgstr "" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "_Foto anterior" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "_Siguiente foto" #: src/rs-actions.c:1466 #, fuzzy msgid "_Lens Library" msgstr "Abrir directorio" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "" #. Batch menu #: src/rs-actions.c:1470 msgid "_Add to batch queue" msgstr "_Añadir a la cola de lotes" #: src/rs-actions.c:1471 #, fuzzy msgid "_Add view to queue..." msgstr "_Añadir vista actual a la cola de lotes" #: src/rs-actions.c:1472 msgid "_Remove from batch queue" msgstr "_Eliminar de la cola de lotes" #: src/rs-actions.c:1473 msgid "_Start" msgstr "_Iniciar" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "" #: src/rs-actions.c:1477 msgid "_About" msgstr "_Acerca de" #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "_Zoom para ajustar" #: src/rs-actions.c:1487 msgid "_Iconbox" msgstr "_Caja de iconos" #: src/rs-actions.c:1488 msgid "_Toolbox" msgstr "_Caja de herramientas" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "_Pantalla completa" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "" #: src/rs-actions.c:1491 #, fuzzy msgid "Show Filenames in Iconbox" msgstr "Mostrar nombres de archivo en la vista de iconos" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "" #: src/rs-actions.c:1494 msgid "_Exposure mask" msgstr "_Máscara de exposición" #: src/rs-actions.c:1495 msgid "_Split" msgstr "_Dividir" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "" #: src/rs-actions.c:1503 msgid "Name" msgstr "" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "" #: src/rs-actions.c:1505 #, fuzzy msgid "ISO" msgstr "ISO%d" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "" #. Snapshot labels #: src/rs-actions.c:1513 src/rs-toolbox.c:207 src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1514 src/rs-toolbox.c:208 src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1515 src/rs-toolbox.c:209 src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Cancelar" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Última imagen:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Tiempo restante: %dh %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Tiempo restante: ..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "" #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "Cargando %s..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "Guardando %s..." #: src/rs-batch.c:635 #, fuzzy msgid "Could not export photo." msgstr "No se pudo abrir la foto" #: src/rs-batch.c:695 msgid "Icon" msgstr "Icono" #: src/rs-batch.c:702 msgid "Filename" msgstr "Nombre de archivo" #: src/rs-batch.c:709 msgid "Setting" msgstr "Ajuste" #: src/rs-batch.c:802 msgid "Start" msgstr "Inicio" #: src/rs-batch.c:805 msgid "Remove" msgstr "Eliminar" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Eliminar todo" #: src/rs-batch.c:916 src/rs-batch.c:1091 #, fuzzy msgid "Edit output settings" msgstr "_Copiar ajustes" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Tamaño de foto" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "Escala constante" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Anchura constante" #: src/rs-batch.c:962 msgid "Constant height" msgstr "Altura constante" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Tamaño máximo" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Anchura de foto:" #: src/rs-batch.c:978 src/rs-batch.c:987 msgid "pixels" msgstr "píxeles" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "Altura de foto:" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "Escala de foto:" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Anchura constante:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Altura constante:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "Escala constante:\n" "%d" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Tamaño máximo:\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Directorio de salida:" #: src/rs-batch.c:1100 msgid "Change" msgstr "Cambiar" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "Exportar dimensiones" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "" #: src/rs-camera-db.c:459 msgid "Model" msgstr "" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "" #: src/rs-preview-widget.c:887 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Tamaño" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Cuadrícula" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Ninguna" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "La sección áurea" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "La regla de tercero" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Triangulo de oro #1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Triangulo de oro #2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Triángulos armoniosos #1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Triángulos armoniosos #2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Orientación" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "Forma libre" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "Papel ISO (A4)" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "El rectángulo áureo" #: src/rs-preview-widget.c:1180 src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Recortar" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "No recortar" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" #: src/rs-preview-widget.c:1238 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:522 msgid "Export File" msgstr "Exportar archivo" #: src/rs-save-dialog.c:282 #, fuzzy msgid "File not saved!" msgstr "Archivo exportado" #: src/rs-save-dialog.c:299 #, fuzzy, c-format msgid "Exporting to %s" msgstr "Exportando archivo..." #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Mantener orientación" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Anchura:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Altura:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Porcentaje:" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Todas las fotos (excluidas las borradas)" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Fotos de prioridad 1" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Fotos de prioridad 2" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Fotos de prioridad 3" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Fotos sin priorizar" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Fotos borradas" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Prioridades" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "" #: src/rs-store.c:1371 #, fuzzy msgid "* (-)" msgstr "* (%d)" #: src/rs-store.c:1372 #, fuzzy msgid "1 (-)" msgstr "1 (%d)" #: src/rs-store.c:1373 #, fuzzy msgid "2 (-)" msgstr "2 (%d)" #: src/rs-store.c:1374 #, fuzzy msgid "3 (-)" msgstr "3 (%d)" #: src/rs-store.c:1375 #, fuzzy msgid "U (-)" msgstr "U (%d)" #: src/rs-store.c:1376 #, fuzzy msgid "D (-)" msgstr "D (%d)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "" #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "" #: src/rs-tethered-shooting.c:558 #, fuzzy msgid "Could not open image!\n" msgstr "No se pudo abrir la foto" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:938 #, fuzzy msgid "Stop Shooting" msgstr "Ajuste" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "" #: src/rs-tethered-shooting.c:1003 #, fuzzy msgid "Take Photo" msgstr "_Foto" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "" #. Status window #: src/rs-tethered-shooting.c:1022 #, fuzzy msgid "Status:" msgstr "Saturación" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 #, fuzzy msgid "Filename & Tags" msgstr "Ejemplo de nombre de archivo:" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Histograma" #: src/rs-toolbox.c:443 #, fuzzy msgid "Reset" msgstr "Restablecer curva" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr "" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr "" #: src/rs-toolbox.c:566 src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Abrir curva..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "" #: src/rs-toolbox.c:700 #, fuzzy msgid "Select Action" msgstr "Ajuste" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Guardar curva como..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Restablecer curva" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "Auto ajustar finales de curva" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "" #. Pack everything nice #: src/rs-toolbox.c:800 #, fuzzy msgid "Basic" msgstr "Lotes" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "" #: src/rs-toolbox.c:802 #, fuzzy msgid "Lens Correction" msgstr "La sección áurea" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Reflejar la foto sobre el eje X" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Reflejar la foto sobre el eje X" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Girar la foto 90 grados en el sentido de las agujas del reloj" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Girar la foto 90 grados en sentido contrario a las agujas del reloj" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Transformaciones" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "" #: src/rs-toolbox.c:1035 #, fuzzy msgid "Lens Disabled" msgstr "Última imagen:" #: src/rs-toolbox.c:1043 #, fuzzy msgid "No Lens Information" msgstr "La sección áurea" #: src/rs-toolbox.c:1045 #, fuzzy msgid "Camera Unknown" msgstr "_Cámara" #: src/rs-toolbox.c:1050 #, fuzzy msgid "No Photo" msgstr "Precargar fotos" #: src/rs-toolbox.c:1259 #, fuzzy msgid "_Previous" msgstr "_Foto anterior" #: src/rs-toolbox.c:1260 #, fuzzy msgid "_Next" msgstr "_Siguiente foto" #~ msgid " %s added to batch queue" #~ msgstr " %s añadido a la cola de lotes" #~ msgid "%s already added to batch queue" #~ msgstr "%s ya está en la cola de lotes" #~ msgid "Not in batch queue" #~ msgstr "No está en la cola de lotes" #~ msgid "Processing photos" #~ msgstr "Procesando fotos" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "Cargar fotos de 8 bits (jpeg, png, etc.)" #, fuzzy #~ msgid "Warmth" #~ msgstr "Temperatura/matiz" #, fuzzy #~ msgid "CA Red" #~ msgstr "Listo" #~ msgid "Select color profile" #~ msgstr "Seleccionar perfil de color" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Perfiles de color (icc e icm)" #~ msgid "Not a valid color profile." #~ msgstr "No es un perfil de color válido." #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "" #~ "El archivo que ha seleccionado parece que no es un perfil de color válido " #~ "para esta versión de Rawstudio." #~ msgid "Enable color management (experimental)" #~ msgstr "Activar administración de color (experimental)" #~ msgid "Input profile" #~ msgstr "Perfil de entrada" #~ msgid "BuiltInRGBProfile" #~ msgstr "PerfilRGBIncrustado" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Perfil de exportación" #~ msgid "Intent" #~ msgstr "Propósito" #~ msgid "Perceptual" #~ msgstr "Perceptual" #~ msgid "Relative colormetric" #~ msgstr "Colorimétrico relativo" #~ msgid "Absolute colormetric" #~ msgstr "Colorimétrico absoluto" #~ msgid "Colors" #~ msgstr "Colores" #, fuzzy #~ msgid "Change this" #~ msgstr "Cambiar" #~ msgid "Background renderer active" #~ msgstr "Renderizador en segundo plano activo" #~ msgid "File export canceled" #~ msgstr "Cancelada la exportación de archivo" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "16-bit TIFF (Tagged Image File Format)" #~ msgid "Rotate the photo 180 degrees" #~ msgstr "Girar la foto 180 grados" #~ msgid "Reset this setting" #~ msgstr "Restaurar este ajuste" #~ msgid "_Zoom to 100%" #~ msgstr "_Zoom al 100 %" #~ msgid "Canon CR2" #~ msgstr "Canon CR2" #~ msgid "Canon CIFF" #~ msgstr "Canon CIFF" #~ msgid "Nikon NEF" #~ msgstr "Nikon NEF" #~ msgid "Minolta raw" #~ msgstr "Raw de Minolta" #~ msgid "Canon TIFF" #~ msgstr "Canon TIFF" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Panasonic raw" #~ msgstr "Raw de Panasonic" #~ msgid "Pentax raw" #~ msgstr "Raw de Pentax" #~ msgid "Adobe Digital negative" #~ msgstr "Negativo digital de Adobe" #~ msgid "Hasselblad" #~ msgstr "Hasselblad" rawstudio-2.0/po/it.gmo0000644000175000017500000006111611547417134012067 00000000000000 <!!!!!!!!! "&"C"_"y"" """"##.#I## $,$>$O$e$z$|$$$ $$ $$$$%% 3%>%B%U%o%%%%%%%$%&&$&C&`&!&& & & &&E&0'9'?'F'M'd'f'l'r' w''$' ' '' ' '' '(($(?( Z( h(v((((((( ))/)5)>)N)a){)))")%) */!*&Q*x**1** **+++-+B+ K+Y+h+ x+ + +++ +(+1+ 1,;,P,a,r,z,,,, ,, --"- 7-D-J-S-i---- -- ---- . .*./.N. T.a.s.|........./// ,/6/H/ L/V/Z/i/o/t/ /b/'/ &030;0@0 E0 Q0]0 m0 {0 0 0 0 0 00000 11$1(1 /1P1)V1111%1111 222"212@2O2d2v2222 2222 3 3 "3 -3 :3[3@y3 33 3334!484O4W4`4 4 444e4c)5555 5 55 5555%6-=6k6z6 66666 6 667(7@7+X7 77777777"7888"8*8 28@8 `8k8p8 88 8888 888 88 9F9f9999999: %:0: 5:@:V:h:{:: :::&:.:;;;;;3;I;O;V;^;w;;;; ;;;;; ;;< < <"< (<4<J<Z<j< q< ~<< <<<<<<< = '= 5= V=`=i=p= w= ==== === == = ==????????$@>@X@r@@@@*@*A1A7APAmA"BBB^BtBBBBBBB BB CCC,CACWC lCwC{CCCCCCDD#D.%DTDiD)}D+D2DDEKEQE aEnE)EQEEF FF,FGFIF RF]F aFnF7pFFFFFFGG(G%1G$WG$|GGG%GG.H6H JHXHjHzHHH HHHH!H+I.@I+oII5I-I!J@J/`JJ JJJJJJK KK(K DKPK YK&cKKK4K[KJL%ZLLL L%LL&L1M LMYMtMMMMM MM/M N(N1NON^N pN {NNNNNN$NOOO6O=OFO WOeOxOOOOOOO O OPP#P9P=PLPRPXPwPbP'P Q"Q*Q1Q8QMQ^QuQQ QQQ QQQRR3R9RLRhRoR$xRR5R R R S9'S,aSS"SSSS S SSST*T@TZToT TT.TT TTUU".U/QU?U U U UUV*VBV^VzV VVV VV Vd WbnWWWW W-W "X,XYWYlY}YY5Y'Y>Z FZPZ _ZlZ rZ |Z*Z$Z"Z Z[ [[[ #[0[P[ b[l[ [[ [[[[[[ [ \ \!\Y6\\\\%\ ]"]9]O]h]p] u]]]]]&]] ^ ^$^1A^s^v^y^|^#^^^ ^ ^^_ _)_ G_ Q___p____ __ __ __ `#`2`E` K` W`c`t```#````/a8a#Na ra }aaa aa aa aa ab !b.b 4b Bb,:~HC~| )> dML?q^ml8tf8[3FWZ=5L-Pb'Xr%&5yd[e DxgBO-Kj.GFep}i, g09+#U^f `#uzc!G\J1I*ETMvvxI VV 4j+ ?"63kNuCk}!@9H1D :byOERnaJBS(K'*N_]{rz\m qtPTWUY)7/a6.$0>/nw|"s@Y4;QA=`wlcAp<XZ2{2R;h<h %( 7]Q_s&iS$oo (Cannot log in) (Logged in succesfully) A B C %%.1fs %2c - Incremental counter%DD - Day of week from EXIF%DM - Month from EXIF (Text)%DY - Year from EXIF (YYYY)%Dd - Date from EXIF (DD)%Dm - Month from EXIF (MM)%Dy - Year from EXIF (YY)%d - Date from EXIF (YYYY-MM-DD)%d photos added to batch queue%d photos removed from batch queue%dmm %f - Original filename%p - Path of original file%s Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!%s - Setting id (A, B or C)%t - Time from EXIF (HH:MM:SS)(No user entered)(Select Profile)* (%d)* (-)-1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Aperture: F/%.01f Focal length: %dmm ISO: %u Make: %s Model: %s Time: %s%s AA raw image converter for GTK+/GNOMEAdd Profile ...Add profile ...Add tags to selected photo(s).Adding images to batch queueAdjusting to auto white balanceAdjusting to camera white balanceAlbumsAll ProfilesAll filesAll lensesAll photos (excluding deleted)An error was returned when communicating with the Picasa web service:ApertureAprilAspectAugustAuto adjust curve endsBBasicBatchBlueBuffer emptyCCamera %s on port %s failed to open Camera MakeCamera ModelCamera UnknownCamera makeCamera modelCancelCannot log inChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Channel MixerChannel mixerChoose output directoryColor Profiles (ICC and ICM)Color space used for savingConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrContrastCopied settingsCopy EXIF metadataCopy EXIF metadata to XMPCopying image to clipboardCould not create datadir for lensfun - %sCould not create output directory.Could not create temporary directory.Could not export photo.Could not fetch file from %s or write it to %s.Could not fetch list of files from %s.Could not open database %sCould not open image! Could not open temporary file on disk for writingCouldn't open photoCreate albumCropCurrent User: CurveD (%d)D (-)DecemberDelete photosDeleted photosDeleting photosDescriptionDirectoryDirectory:Disconnecting current camera Display Colorspace:Don't cropERROR: Could not copy image to clipboardERROR: Init camera returned %d. Error text is:%s Edit lensEdit output settingsEmbedded ProfileEnable this lensEnabledError copying file %s to %s Error exportingError exporting photo to gimp.Error updating lensfun databaseExport FileExport dimensionsExport failedExporting to %sExporting to GIMP...Exporting...ExposExposureExposure CompensationExposure Mask Colorspace:F/%.1f FebruaryFile Downloaded Succesfully. File exportedFile not saved!File type:FilenameFilename & TagsFilename example:Filename template:Flickr errorFlipFlip the photo over the x-axisFocalFocal LengthFound %d cameras FreeformGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2GreenGridHarmonious triangles #1Harmonious triangles #2HeightHeight:Hiding exposure maskHistogramHistogram height:HueHue ShiftISOISO paper (A4)ISO%dIconImage copied to clipboardImage openedIt seems like rawstudio lost its authentication to upload to your account, please re-authenticate.JPEG (Joint Photographic Experts Group)JPEG QualityJanuaryJulyJuneKeep aspectLast image:Lens CorrectionLens DisabledLens LibraryLens MakeLens ModelLens UnknownLens makeLens modelLensfun database updatedLoad non-RAW imagesLoading %s ...MarchMaximum sizeMaximum size: %d x %dMayMirrorMirror the photo over the y-axisModelMoving file to current directory failed! No Lens InformationNo PhotoNo camera connected. No camera selected - Cannot connect! No white balance to set fromNoneNothing to pasteNovemberOctoberOpenOpen curve ...Open directoryOpen recursiveOpening directory...Opening photo ...Original AspectOutput directory:Overwrite File?PNG (Portable Network Graphics)Password: Pasted settingsPasting settings to imagesPercent:Photo height:Photo scale:Photo sizePhoto width:Picasa Webalbum AuthentificationPlace cache in home directoryPlease type in your username and password for Picasa Web Albums.PreferencesPreview background color:PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProcessing Image %d/%dProcessing Image 1/%d.ProfileProgressPublic (everyone can see this)Quick exportRawstudioRawstudio Lens EditorRawstudio Lens LibraryRawstudio needs to be authenticated before it will be able to upload photos to your Facebook account.Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account.ReadyRedRemoveRemove allRemoving images from batch queueResetReset curveRetry Operation?Rotate ClockwiseRotate Counter ClockwiseRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturSaturationSave 16 bit TIFFSave 16 bit linear PNGSave curve as ...Save uncompressed TIFFSaving %s ...Select ActionSelect All/NoneSelect camera:Select screen to open fullscreen previewSelect settings to copySelect which settings to add to batch queueSeptemberSet lensSettingSharpSharpenSharpen AmountShow Filenames in IconboxShowing exposure maskShutting down asynchronous thread SizeStartStatus:Step 1:Step 2:Stop ShootingTIFF (Tagged Image File Format)Tag searchTagsTags, separated by spaces:Take PhotoTempTemperatureTime left: %dh %dm %dsTime left: ...TintTint ShiftTitleToolsTransformsU (%d)U (-)Unable to detect more than one monitor. Cannot open fullscreen previewUnhandled error from FacebookUnhandled error from PicasaUnprioritized photosUpdate lensfun databaseUpload photo to FacebookUpload photo to FlickrUpload photo to PicasaUse system themeUsername: VignVignettingVignetting CorrectionVisible to FamilyVisible to FriendsWBAsciiWaiting for jobs to finishWhite balanceWidthWidth:Would you like to Retry the operation?Your files will be permanently deleted!_1_2_3_About_Add to batch queue_Add view to queue..._Auto_Batch_Camera_Copy Image to Clipboard_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Lens Library_Next_Next Photo_Online Documentation_Open Directory_Paste settings_Photo_Preferences_Previous_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Save camera default settings_Set Priority_Show Photo On Secondary Monitor_Snapshot_Sort by_Split_Start_Straighten_Tag Photo..._Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelstelephotowideangleProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-04-07 20:26+0200 PO-Revision-Date: 2011-04-07 21:37+0100 Last-Translator: Simone Contini Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: Italian X-Poedit-Country: ITALY (impossibile autenticarsi)(autenticazione riuscita) A B C %%.1fs %2c - Contatore incrementale%DD - Giorno della settimana da EXIF%DM - Mese da EXIF (nome)%DY - Anno da EXIF (YYYY)%Dd - Giorno da EXIF (DD)%Dm - Mese da EXIF (MM)%Dy - Anno da EXIF (YY)%d - Data da EXIF (YYYY-MM-DD)%d foto aggiunte alla coda di elaborazione%d foto rimosse dalla coda di elaborazione%dmm %f - Nome file originale%p - Percorso file originale%s Nota: questo errore non è gestito da Rawstudio. Perfavore indicaci che l'hai trovato e come riprodurlo così potremo scrivere un messaggio di errore più utile. Grazie!%s - ID impostazione (A, B o C)%t - Ora da EXIF (HH:MM:SS)(utente non inserito)(Seleziona Profilo)* (%d)* (-)-1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Doppio schermo XGA)Apertura: F/%.01f Lunghezza focale: %dmm ISO: %u Marca: %s Modello: %s Data: %s%s AUn convertitore di immagini raw per GTK+/GNOMEAggiungi profilo ...Aggiungi profilo...Aggiungi etichette alla foto selezionata.Aggiunta immagini alla coda di elaborazioneCorrezione del bilanciamento del bianco automaticaCorrezione del bilanciamento del bianco con l'impostazione di scattoAlbumTutti i profiliTutti i fileTutte le otticheTutte le foto (escluse quelle cancellate)Si è verificato un errore durante la comunicazione con il web service di Picasa:AperturaAprileFormatoAgostoCorregge automaticamente la fine della curvaBBasilariEsecuzioneBluBuffer vuotoCImpossibile accedere alla fotocamera %s sulla porta %s Marca fotocameraModello fotocameraFotocamera sconosciutaMarca fotocameraModello fotocameraAnnullaImpossibile autenticarsiModificaCambiata la priorità della foto (%d)Cambiata la priorità della foto (*)Cambiata la priorità della foto (D)Miscelatore canaliMiscela canaliScegliere la cartella di destinazioneProfili di colore (ICC e ICM)Spazio di colore utilizzato per il salvataggioScalatura fissa: %dAltezza fissaAltezza fissa: %dScalatura fissaLarghezza fissaLarghezza fissa: %dContrContrastoImpostazioni copiateCopia Metadati EXIFCopia metadati EXIF su XMPCopia dell'immagine negli appuntiImpossibile creare datadir per lensfun - %sImpossibile creare la cartella di destinazioneImpossibile creare la directory temporanea.Impossibile esportare la foto.Impossibile ottenere il file da %s o scriverlo su %s.Impossibile ottenere la lista dei file da %s.Impossibile aprire il database %sImpossibile aprire l'immagine! Impossibile aprire un file temporaneo sul discoImpossibile aprire la fotoCrea albumRitagliaUtente corrente:CurvaD (%d)D (-)DicembreCancella fotoFoto CancellateCancellazione foto in corsoDescrizioneCartellaCartella:Scollegamento della fotocamera in uso Spazio di colore del monitor:Annulla ritaglioERRORE: Impossibile copiare l'immagine negli appuntiERRORE: l'inizializzazione della fotocamera ha resituito %d. Il messaggio di errore è: %s Modifica otticaModifica impostazioni di esportazioneProfilo incorporatoAbilita questa otticaAbilitatoErrore nella copia del file %s su %s Errore nell'esportazioneErrore nell'esportazione foto in GIMP.Errore nell'aggiornamento del database di lensfunEsporta fileDimensione di esportazioneEsportazione fallitaEsportazione su %sEsportazione in GIMP...Esportazione...EsposEsposizioneCompensazione esposizioneSpazio di colore della maschera di esposizione:F/%.1f FebbraioFile scaricato con successo. File esportatoFile non salvato!Tipo file:Nome fileNome del fine & EtichetteEsempio nome file:Modello nome file:Errore di FlickrRibaltaSpecchia la foto rispetto all'asse xFocaleLunghezza focaleTrovate %d fotocamere liberoGeneraleRettangolo aureoSezione aureaTriangoli aurei #1Triangoli aurei #2VerdeGrigliaTriangoli armoniosi #1Triangoli armoniosi #2AltezzaAltezza:Maschera di esposizione nascostaIstogrammaAltezza dell'istogramma:TintaSpostamento tonalitàISOCarta ISO (A4)ISO%dIconaImmagine copiata negli appuntiImmagine caricataSembra che rawstudio abbia perso l'autenticazione per invare sull'account, autenticare nuovamente.JPEG (Joint Photographic Experts Group)Qualità JPEGGennaioLuglioGiugnoMantieni proporzioniUltima immagine:Correzione dell'otticaOttica disattivataLibreria di otticheMarca otticaModello otticaOttica sconosciutaMarca otticaModello otticaDatabase di lensfun aggiornatoCarica immagini non RAWCaricamento di %s...MarzoDimensione massimaDimensione massima: %d x %dMaggioRiflettiSpecchia la foto rispetto all'asse yModelloSpostamento file verso la cartella corrente fallito! Nessuna informazione sull'otticaNessuna fotoNessuna fotocamera connessa. Nessuna fotocamera selezionata - impossibile connettere! Nessun bilanciamento del bianco da applicareNessunaNessuna impostazione da trasferireNovembreOttobreApriApri curva...Apri cartellaApri ricorsivamenteApri cartella...Apertura foto in corso...Proporzione originaleCartella di destinazione:Sovrascrivo il file?PNG (Portable Network Graphics)Password: Impostazioni trasferiteTrasferimento delle impostazioni alle immaginiIngrandimento:Altezza foto:Scalatura foto:Dimensione fotoLarghezza foto:Autenticazione album web di PicasaMemorizza le informazioni nella cartella utenteImmetti il nome utente e la password per l'album web di Picasa.PreferenzeColore di sfondo nell'anteprima:ContrassegniFoto con contrassegno 1Foto con contrassegno 2Foto con contrassegno 3Elaborazione Immagine %d/%dElaborazione Immagine 1/%d.ProfiloAvanzamentoPubblica (visibile da chiunque)Esportazione rapidaRawstudioEditor ottiche di RawstudioLibreria di ottiche di RawstudioRawstudio necessità di essere autenticato prima di poter caricare le foto sul tuo account Facebook.Rawstudio necessità di essere autenticato prima di poter caricare le foto sul tuo account Flickr.ProntoRossoRimuoviRimuovi tutteRimozione immagini dalla coda di elaborazioneReimpostaReimposta curvaRitenta l'operazione?Ruota in senso orarioRuota la foto in senso antiorarioRuota la foto di 90 gradi in senso orarioRuota la foto di 90 gradi in senso antiorarioRegola dei terziSaturSaturazioneSalva TIFF 16 bitSalva PNG 16 bit lineareSalva come...Salva TIFF non compressoSalvataggio di %s...Seleziona AzioneSeleziona tutto/nullaSeleziona fotocamera:Seleziona il monitor per l'anteprima a schermo interoScelta delle impostazioni da trasferireSelezionare i settaggi da aggiungere alla coda di elaborazioneSettembreImposta otticaImpostazioneNitidNitidezzaNitidezzaMostra il nome dei file sotto le anteprimeMaschera di esposizione visualizzataTerminazione del thread asincrono DimensioneAvviaStato:Passo 1:Passo 2:Ferma scattiTIFF (Tagged Image File Format)Ricerca etichetteEtichetteEtichette separate da spazi:Scatta fotoTempTemperaturaTempo rimanente: %dh %dm %dsTempo rimanente: ...TintaSpostamento tintaTitoloStrumentiTrasformaU (%d)U (-)Non è stato rilevato più di un monitor. Impossibile aprire l'anteprima a schermo interoErrore di Facebook non gestitoErrore da Picasa non gestitoFoto senza contrassegnoAggiornamento del database di lensfunCarica foto su FacebookCarica foto su FlickrCarica foto su PicasaUsa l'aspetto di sistemaUtente:VignVignettaturaCorrezione vignettaturaVisibile dalla FamigliaVisibile dagli AmiciWBAsciiIn attesa del completamento dei lavoriBilanciamento del biancoLarghezzaLarghezza:Vuoi ritentare l'operazione?I file saranno permanentemente cancellati!_1_2_3_Informazioni su..._Aggiungi alla coda di elaborazione_Aggiungi la vista alla coda..._Auto_Esecuzione_Macchina_Copia immagine negli appunti_Copia settaggio_Ritaglia_Cancella foto contrassegnate_ModificaEsporta _ComeEsporta in _GIMP_Maschera di esposizione_File_Contrassegna per cancellazione_Schermo intero_Raggruppa_Aiuto_Anteprime_Libreria ottiche_SuccessivaFoto _SuccessivaD_ocumentazione sul web_Apri Cartella_Incolla settaggio_Foto_Preferenze_PrecedenteFoto _PrecedenteEsportazione _Rapida_Chiudi_Riapri Cartella_Rimuovi dalla coda di elaborazione_Rimuovi contrassegno_Ripristina settaggio_Annulla impostazioni_Salva impostazione di default della fotocamera_Imposta Contrassegno_Mostra Foto Sul Monitor Secondario_Anteprima_Ordina per_Vista affiancata_Avvia_Raddrizza_Etichetta Foto..._StrumentiAnnulla _ritaglio_SuddividiAnnulla _raddrizza_Visualizza_Bilanciamento del BiancoAdatta _zoompixelteleobiettivograndangolorawstudio-2.0/po/pl.gmo0000644000175000017500000010177211546436027012072 00000000000000L|((((((((( )&)C)_)y)) ))")**.*I** +,+>+O+e+z+|+++++ ++ +, , ,5,K, `,k,o,,,,,,,-&-6-F-$H-m-}----!- . . . ).4.ES............$/ 3/@/B/G/$L/ q/ }//// / /// 000 -090@0\0w0 0 0000 001$171G1[1j1y111111&11)2"D2%g22/2&2231.3N`33 33k3A4P4V4l44 44444 4 4 4445*5=5 Y5d5(5<515 6%6:6K6\6)d6)66667 $707 B7P7`7 u77777777 77 88"868H8 [8h8m88 8 888888899 (9I9O9g9l99999 999 9999:: ":/:!A:bc:': ::;; ;; 1;=; M; [; h; r; }; ; ;;;;;;<< <*<@<"D<g< n<<< <G<) =Y7=====%== >>">+>3>8>G>V>t>>>>>>> >??2? ;? I? V? a? n??@? ?*?%@<?@ |@@@@@@@@@ A (A2AHA_Ae{AcAEBB<BJC`CdC#zCC C CC CCC DD%3D-YDDD DDDDD DE !E/E3?EsE$EE(EE+E 'F1F:FBFHFPF_FyF F&F"F'F7GFG"KGnGGGGGG GgG *H6H:H ZHeHuHzHH HH HAH/I8IOI ^IhI mIxI~I IIIFI.J0JNJjJJJJJJ JJ J K K2KEKMKhKK=L]VL LLL&L.L%MMMMMMMM MN NN-N]1Z]]@]2]4^)T^7~^/^,^'_:;_Sv_&_ __````` ```a"a (a4a9aAaJa!Za|aaaa!a2a?+b;kbbbbb b7c7?c)wcc7c,cd-d =d^d!xddd dd"ddd*e+eEe `e keweeee ee e e ff)f2fLfTfdftff$fffffg g 'g3g Qg[grgxgg gggggg)gj h'h hhhhh1hi2iEiZiqiiiii i iij1jCjJj^jsjj%j jjjj(jV%k>|k{k 7lCl `lnl:lll lm mm&m:m&Jmqmmmmmmm nn ,nMn Vn bnmn nn.n5n oEo`oMvo ooopp7pTp[p!cpp pp"p'ps qi~qqyrNrSr#s*s*Csnstssssss6s9(t>btBt tt tuu8u Puqu"uu#u<uv+*vVv6fv v-v vvww !w-w)Bw!lww w!w/wGx]x,exxxxxxxxo y|yyyyyyyyz)z /z1;z4mzzzzzzz {{"{8{SM{<{5{%|$:|_|||"|"|| |} }}/}D}^}/f}!}}EX~k~   #05O    $2W]s | ـ 3AI P\ n|ˁ ܁  .8L]n#$Ȃ  +6Hev ƃ׃ ߃ #m<W^uIO=+$>b7w# )H{7KLJ}>;q]G+O"3En_`dFvRp N1'QShna8\Dc ~lX!"Wi1%p0NM;Pra4Y&9 fC -x[@(Fb9dsC5,4J|h `?tj<U.@kTK\Mki= )usP* Syfj(?T%zrw}2G!6c&[ |U*{ZyHzog6Qtl xm5:-_AXqIe.A/D,VZBv~:E2e'^/$8BgoL YR3V 0] (Cannot log in) (Logged in succesfully) A B C %%.1fs %2c - Incremental counter%DD - Day of week from EXIF%DM - Month from EXIF (Text)%DY - Year from EXIF (YYYY)%Dd - Date from EXIF (DD)%Dm - Month from EXIF (MM)%Dy - Year from EXIF (YY)%d - Date from EXIF (YYYY-MM-DD)%d photos added to batch queue%d photos removed from batch queue%dmm %f - Original filename%p - Path of original file%s Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!%s - Setting id (A, B or C)%t - Time from EXIF (HH:MM:SS)(No user entered)(Select Profile)* (%d)* (-)-. Click to edit value. Click to reset value1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Aperture: F/%.01f Focal length: %dmm ISO: %u Make: %s Model: %s Shutter speed: %.1fs Shutter speed: 1/%.0fs Time: %s%s AA raw image converter for GTK+/GNOMEAdd Profile ...Add profile ...Add tags to selected photo(s).Adding images to batch queueAdjusting to auto white balanceAdjusting to camera white balanceAlbumsAll ProfilesAll filesAll lensesAll photos (excluding deleted)An error was returned when communicating with the Picasa web service:ApertureAprilAspectAugustAuthenticate RawstudioAuto adjust curve endsBBasicBatchBlueBlue Amount AdjustmentBlue Chromatic Aberration CorrectionBuffer emptyCCA BCA RCamera %s on port %s failed to open Camera MakeCamera ModelCamera Profiles (DCP)Camera UnknownCamera defaults editorCamera makeCamera modelCamera monitor shutting down. CancelCannot log inCaptionCapture Enabled. Capturing. ChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Channel MixerChannel mixerChoose output directoryColDnColor Profiles (ICC and ICM)Color denoiseColor space used for savingColour DenoisingConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrContrastCopied settingsCopy EXIF metadataCopy EXIF metadata to XMPCopy settings from active to new imageCopying image to clipboardCould not create datadir for lensfun - %sCould not create output directory.Could not create temporary directory.Could not export photo.Could not fetch file from %s or write it to %s.Could not fetch list of files from %s.Could not open database %sCould not open image! Could not open temporary file on disk for writingCould not save file: %s Check that you have write permissions to this folder.Couldn't open photoCreate albumCropCrop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel cropCurrent User: CurveD (%d)D (-)DecemberDelete photosDeleted photosDeleting photosDenoiDenoiseDescriptionDirectoryDirectory:Disconnect CameraDisconnecting current camera Display Colorspace:Display NavigationDo not Load Selected ImagesDon't cropDownloading and adding image. ERROR: Could not copy image to clipboardERROR: Gphoto2 returned error value %d Error message is: %s ERROR: Init camera returned %d. Error text is:%s Edit lensEdit output settingsEmbedded ProfileEnable this lensEnabledEnabling capture mode for Canon cameras. Enabling capture mode for Nikon cameras. Error copying file %s to %s Error exportingError exporting photo to gimp.Error updating lensfun databaseExport FileExport dimensionsExport failedExporting to %sExporting to GIMP...Exporting...ExposExposureExposure CompensationExposure Mask Colorspace:F/%.1f FebruaryFile Downloaded Succesfully. File exportedFile not saved!File type:FilenameFilename & TagsFilename example:Filename template:Flickr errorFlipFlip the photo over the x-axisFocalFocal LengthFocallengthFound %d cameras FreeformFull export pathGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2Gphoto2 reported Context Error: GreenGreen Amount AdjustmentGridHarmonious triangles #1Harmonious triangles #2HeightHeight:Hiding exposure maskHistogramHistogram height:HueHue ShiftISOISO paper (A4)ISO%dIconImage copied to clipboardImage openedInterval ShootingInterval shooting shutting down. It seems like rawstudio lost its authentication to upload to your account, please re-authenticate.JPEG (Joint Photographic Experts Group)JPEG QualityJanuaryJulyJuneKeep aspectLarge gamut color spaceLast image:Lens CorrectionLens DisabledLens LibraryLens MakeLens ModelLens UnknownLens makeLens modelLensfun database updatedLight DenoisingLight out mode not availableLoad non-RAW imagesLoading %s ...MarchMaster ControlMaximum sizeMaximum size: %d x %dMayMinimize this window after captureMirrorMirror the photo over the y-axisModelMonitor CameraMonitor Thread already running. Monitor recieved error %d, while waiting for camera. Error text is: %s Moving file to current directory failed! NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable.NameNo Lens InformationNo PhotoNo camera connected. No camera selected - Cannot connect! No white balance to set fromNoneNothing to pasteNovemberOctoberOpenOpen curve ...Open directoryOpen new images after captureOpen recursiveOpening directory...Opening photo ...Original AspectOutput directory:Overwrite File?PNG (Portable Network Graphics)Password: Pasted settingsPasting settings to imagesPercent:Photo height:Photo scale:Photo sizePhoto width:Picasa Webalbum AuthentificationPlace cache in home directoryPlease type in your username and password for Picasa Web Albums.PreferencesPress F10 to return preview to this windowPreview background color:Print friendly color space, compatible with Adobe RGB (1998)PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProcessing Image %d/%dProcessing Image 1/%d.ProfileProgressPublic (everyone can see this)Quick exportRawstudioRawstudio Lens EditorRawstudio Lens LibraryRawstudio Tethered ShootingRawstudio needs to be authenticated before it will be able to upload photos to your Facebook account.Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account.Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr.ReadyRecieved error %d, while capturing image. Error text is: %s Recieved error %d, while downloading image from camera. Error text is: %s RedRed Amount AdjustmentRed Chromatic Aberration CorrectionRemoveRemove allRemoving images from batch queueResetReset curveRetain EXIF metadataRetry Operation?Rotate ClockwiseRotate Counter ClockwiseRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturSaturationSave 16 bit TIFFSave 16 bit linear PNGSave curve as ...Save uncompressed TIFFSaving %s ...Seconds between each shot:Select ActionSelect All/NoneSelect OK to use this screen for fullscreen previewSelect Saved CurveSelect Screen for fullscreen previewSelect camera:Select screen to open fullscreen previewSelect settings to copySelect which settings to add to batch queueSeptemberSet lensSettingSharpSharpenSharpen AmountShow Filenames in IconboxShowing exposure maskShutterspeedShutting down already running thread. Shutting down asynchronous thread Shutting down interval capture thread. Shutting down running thread to enable remote capture. SizeStaring Interval Shooting Thread. Staring Monitor Thread. StartStart ShootingStatus:Step 1:Step 2:Stop ShootingStraighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels.Switch UserTCATIFF (Tagged Image File Format)Tag searchTag search [%s]TagsTags for new images:Tags, separated by spaces:Take PhotoTempTemperatureThe file '%s' already exists. Do you want to overwrite the file?The port you specified ('%s') can not be found.Time left: %dh %dm %dsTime left: ...TimestampTintTint ShiftTitleToolsTransformsU (%d)U (-)Unable to detect more than one monitor. Cannot open fullscreen previewUnable to locate screen for fullscreen previewUnhandled error from FacebookUnhandled error from PicasaUnprioritized photosUpdate lensfun databaseUpload photo to FacebookUpload photo to FlickrUpload photo to PicasaUse system themeUsername: VignVignettingVignetting CorrectionVisible to FamilyVisible to FriendsWBAsciiWaiting for jobs to finishWaiting for next image. Warning: It took longer time to capture the image than the set interval It took %.1f seconds to download the image. Consider increasing the interval. We recieved an error during authentication. Please try again.Welcome to Tethered shooting! Make sure your camera is NOT mounted in your operating system. White balanceWidthWidth:Would you like to Retry the operation?Your files will be permanently deleted!Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing._1_2_3_About_Add to batch queue_Add view to queue..._Auto_Auto group_Batch_Camera_Copy Image to Clipboard_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Lens Library_Lights out_Next_Next Photo_Online Documentation_Open Directory_Paste settings_Photo_Preferences_Previous_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Save camera default settings_Set Priority_Show Photo On Secondary Monitor_Snapshot_Sort by_Split_Start_Straighten_Tag Photo..._Tethered Shooting_Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelstelephotowideangleProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: POT-Creation-Date: 2011-03-26 15:22+0100 PO-Revision-Date: 2011-03-26 15:45+0100 Last-Translator: Dariusz Duma Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); X-Poedit-Language: Polish X-Poedit-Country: POLAND X-Generator: Lokalize 1.2 (nie można się zalogować) (zalogowano pomyślnie) A B C %%.1fs %2c - Numer zdjęcia w kolejce%DD - Dzień tygodnia z EXIF%DM - Miesiąc z EXIF (słownie)%DY - Rok z EXIF (RRRR)%Dd - Dzień z EXIF (DD)%Dm - Miesiąc z EXIF (MM)%Dy - Rok z EXIF (RR)%d - Data z EXIF (RRRR-MM-DD)%d zdjęć dodanych do kolejki%d zdjęć usuniętych z kolejki%dmm %f - Oryginalna nazwa pliku%p - Ścieżka oryginalnego pliku%s Uwaga: program Rawstudio jeszcze nie potrafi obsłużyć powyższego błędu. Proszę skontaktować sie z twórcami programu w celu ulepszenia obsługi błędów.%s - Zestaw parametrów (A, B lub C)%t - Czas z EXIF (GG:MM:SS)(nie podano użytkownika)(wybierz profil)* (%d)* (-)-. Kliknij żeby edytować wartość. Kliknij żeby zresetować wartość1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Szerokie XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Podwójne XGA)Przysłona: F/%.01f Ogniskowa: %dmm ISO: %u Data wykonania: %s Model: %s Czas naświetlania: %.1fs Czas naświetlania: 1/%.0fs Data wykonania: %s%s AProgram do konwersji plików RAW dla GTK+/GNOMEDodaj profil ...Dodaj profil ...Dodaj tagi do zaznaczonych zdjęć.Dodawanie zdjęć do kolejkiUstawiono automatyczny balans bieliUstawiono balans bieli z aparatuAlbumyWszystkie profileWszystkie plikiWszystkie obiektywyWszystkie zdjęcia (bez usuniętych)Wystąpił błąd podczas komunikacji z serwisem Picasa:PrzysłonykwiecieńStosunek krawędzisierpieńAutentykacja RawstudioAutomatycznie ustaw końce krzywejBPodstawoweKolejkaNieb.Korekcja barwy niebieskiejKorekcja niebieskiej aberracji chromatycznejBufor jest pustyCCA BCA RNie powiodła sie komunikacja z aparatem %s poprzez port %s Producent aparatuModel aparatuProfil kamery (DCP)Brak informacji o aparacieEdytor ustawień aparatuProducent aparatuModel aparatuZamykanie monitorowania aparatu. AnulujNie można się zalogowaćPodpisPrzechwytywanie włączone. Przechwytywanie. ZmieńZmieniono priorytet zdjęcia (%d)Zmieniono priorytet zdjęcia (*)Zaznaczono zdjęcie do usunięcia (D)Mikser kanałówMikser kanałówWybierz katalog docelowyOdszK.Profile kolorów (icc oraz icm)Odszumianie barwPrzestrzeń barw używana przy zapisieOdszumianie barwSkaluj do: %dStała wysokośćStała wysokość: %dSkaluj doStała szerokośćStała szerokość: %dKontr.KontrastSkopiowano parametryKopiuj metadane EXIFKopiuj metadane EXIF do XMPSkopiuj ustawienia z aktywnego do nowego zdjęciaKopiowanie zdjęcia do schowkaNie powiodło się utworzenie katalogu dla bazy obiektywów - %sNie powiodło się utworzenie katalogu docelowego.Utworzenie katalogu tymczasowego nie powiodło się.Konwertowanie zdjęcia nie powiodło sięNie powiodło się pobranie pliku z %s lub zapis do %s.Nie powiodło się pobranie listy plików z %s.Nie powiodło się otworzenie bazy danych %sOtworzenie zdjęcia nie powiodło się Nie można otworzyć do zapisu tymczasowego pliku na dyskuNie mogę zapisać pliku: %s Sprawdź, czy posiadasz prawa zapisu do tego folderu.Otworzenie zdjęcia nie powiodło sięUtwórz albumPrzytnijKadrowanie: Przeciągnij, aby wybrać obszar przycięcia. Prawy przycisk myszy wewnątrz kadrowanego obszaru: Zatwierdza; Na zewnątrz: AnulujeAktualny użytkownik: KrzywaD (%d)D (-)grudzieńUsuń zdjęciaZdjęcia do usunięciaUsuwanie zdjęćOdsz.OdszumianieOpisKatalogKatalog:Odłącz aparatOdłączanie bieżącego aparatu Przestrzeń barw wyświetlania:Wyświetl sterowanieNie wczytuj wybranych zdjęćAnulujPobieranie i dodawanie zdjęcia. Błąd - nie można skopiować zdjęcia do schowkaBŁĄD: Gphoto2 zwrócił kod błędu %d Komunikat błędu: %s Błąd inicjalizacji aparatu nr %d. Treść komunikatu: %s Edytuj obietywEdytuj parametry wyjścioweProfil osadzonyUwzględniaj ten obiektywWłączonyAktywowanie trybu przechwytywania dla aparatów Canon. Aktywowanie trybu przychwytywania dla aparatów Nikon. Błąd podczas kopiowania pliku %s do %s Błąd podczas eksportuBłąd podczas eksportowania zdjęcia do programu GIMP.Błąd podczas aktualizacji bazy obiektywówKonwertuj plikWymiary zdjęćEksportowanie nie powiodło sięKonwertowanie do pliku %sEksportowanie do programu GIMP...Eksportowanie...Eksp.EkspozycjaKorekcja ekspozycjiPrzestrzeń barw maski ekspozycji:f/%.1f lutyPobieranie pliku zakończone powodzeniem. Eksportowanie zakończonePlik nie został zapisany!Typ pliku:Nazwa plikuNazwa & TagiPrzykładowa nazwa:Wzorzec nazwy pliku:Błąd serwisu FlickrOdbij pionowoOdbicie lustrzane w pionieOgniskowaOgniskowaOgniskowejOdnaleziono %d aparatów DowolniePełna ścieżka eksportuOgólneZłoty podziałZłoty podziałZłote trójkąty #1Złote trójkąty #2Gphoto2 zgłosił błąd kontekstu: Ziel.Korekcja barwy zielonejSiatkaTrójkąty harmoniczne #1Trójkąty harmoniczne #2WysokośćWysokość:Ukryto widok maski ekspozycjiHistogramWysokość histogramu:BarwaPrzesunięcie barwoweISOPapier A4ISO%dIkonaSkopiowano zdjęcie do schowkaZdjęcie otworzoneRejestrowanie z interwałemRejestrowanie z interwałem zakończone. Autoryzacja Rawstudio została cofnięta.Należy ponowić proces autentykacji Rawstudio z serwisem Flickr.JPEG (Joint Photographic Experts Group)Jakość JPEGstyczeńlipiecczerwiecZachowuj proporcjePrzestrzeń barw o szerokim zakresie odwzorowaniaOstatnie zdjęcie:Korekcja obiektywuObiektyw zablokowanyBiblioteka obiektywówProducent obiektywuModel obiektywuObiektyw nieznanyProducent obiektywuModel obiektywuZaktualizowano bazę obiektywówOdszumianieZaciemnienie niedostępneWczytuj nie tylko zdjęcia RAWŁadowanie %s ...marzecUstawienia główneOgranicz oba wymiaryOgranicz wymiary do: %d x %dmajZminimalizuj to okno po przechwyceniuOdbij poziomoOdbicie lustrzane w poziomieModelMonitoruj aparatTryb monitoringu jest już uruchomiony. Monitoring otrzymał błąd %d, podczas oczekiwania na aparat. Treść komunikatu: %s Przenoszenie pliku do bieżącego folderu nie powiodło się! UWAGA: Aktualizacja widoku ikon wyłączona. Nowe pliki nie zostaną wczytane! Naciśnij aby włączyć ponownie. Nazwy plikuBrak informacji o obiektywieBrak zdjęciaBrak połączenia z aparatem. Nie wybrano aparatu - nie można nawiązać połączenia! Brak wzorca balansu bieliBrakBrak parametrów do zastosowanialistopadpaździernikOtwórzOtwórz krzywą ...Otwórz katalogOtwórz nowe zdjęcia po przechwyceniuPrzeszukuj podkatalogiOtwieranie katalogu...Otwieranie zdjęcia ...Oryginalny wyglądKatalog docelowy:Nadpisać plik?PNG (Portable Network Graphics)Hasło: Zaaplikowano parametryAplikowanie parametry do zdjęćProcent:Wysokość:Skaluj do:Wielkość zdjęciaSzerokość:Autentykacja serwisu PicasaPrzechowuj pliki podręczne w katalogu domowymPodaj nazwę użytkownika i hasło do serwisu Picasa.UstawieniaNaciśnij F10 aby przywrócić domyślną lokalizację okna podgląduKolor tła podglądu:Przestrzeń barw zoptymalizowana dla wydruku, kompatybilna z Adobe RGB (1998)PriorytetyZdjęcia z priorytetem 1Zdjęcia z priorytetem 2Zdjęcia z priorytetem 3Przetwarzanie zdjęcia %d/%dPrzetwarzanie zdjęcia 1/%d.ProfilPostępPubliczne (widoczne dla każdego)Szybka konwersjaRawstudioRawstudio - edytor obiektywówRawstudio - biblioteka obiektywówRawstudio - rejestrowanie bezpośrednieRawstudio musi zakończyć proces autentykacji zanim możliwe będzie wysyłanie zdjęć na konto serwisu Facebook.Rawstudio musi przejść proces autentykacji zanim będzie możliwe wysyłanie zdjęć do serwisu Flickr.Rawstudio nie może wysłać zdjęcia ponieważ autoryzacja została cofnięta.Należy ponowić proces autentykacji Rawstudio z serwisem Flickr.GotoweOtrzymano błąd %d, podczas przechwytywania zdjęcia. Treść komunikatu: %s Otrzymano błąd %d, podczas pobierania zdjęcia z aparatu. Treść komunikatu: %s Czerw.Korekcja barwy czerwonejKorekcja czerwonej aberracji chromatycznejUsuńUsuń wszystkieUsuwanie zdjęć z kolejkiResetPrzywróć domyślną krzywąZachowaj metadane EXIFPowtórzyć operację?Obróć o 90 stopni zgodnie z ruchem wskazówek zegaraObróć o 90 stopni przeciwnie do ruchu wskazówek zegaraObróc zdjęcie o 90 stopni zgodnie z ruchem wskazówek zegaraObróć zdjęcie o 90 stopni przeciwnie do ruchu wskazówek zegaraTrójpodziałNasyc.NasycenieZapisuj 16-bitowy TIFFZapisuj 16-bitowy liniowy PNGZapisz krzywą jako ...Zapisuj pliki TIFF bez kompresjiZapisywanie %s ...Sekundy pomiędzy każdym ujęciemWybierzZaznacz wszystkie/usuń zaznaczenieZaakceptuj użycie tego ekranu do podglądu pełnoekranowegoWybierz zapisaną krzywąWybierz ekran do podglądu pełnoekranowegoWybór aparatu:Wybierz ekran do otworzenia podglądu pełnoekranowegoWybierz parametry do skopiowaniaKtóre zestawy parametrów dodać do kolejki?wrzesieńWybierz obiektywZestaw parametrówWyost.WyostrzanieStopień wyostrzeniaWyświetlaj nazwy plików pod miniaturamiWłączono widok maski ekspozycjiCzasu naświetlaniaZamykanie działającego trybu. Zamykanie trybu asynchronicznego Zamykanie trybu przechwytywania z interwałem. Zamykanie działającego trybu i aktywowanie zdalnego przechwytywania. WymiaryGadatliwy tryb rejestrowania z interwałem. Gadatliwy tryb monitoringu. Rozpocznij konwersjęGadatliwe rejestrowanieStatus:Krok 1:Krok 2:Zakończ rejestrowanieProstowanie: Narysuj linię na zdjęciu, która powinna być pozioma lub pionowa. Prawy przycisk myszy anuluje.Przełącz użytkownikaTCATIFF (Tagged Image File Format)Wyszukiwanie tagówWyszukanie tagu [%s]TagiTagi dla nowych zdjęć:Tagi rozdzielone spacjami:Zrób zdjęcieTemp.TemperaturaPlik '%s' już istnieje. Czy chcesz go zmienić?Port który wskazano ('%s') nie został odnaleziony.Pozostały czas: %dh %dm %dsPozostały czas: ...Daty wykonaniaOdc.Przesunięcie odcieniaTytułNarzędziaPrzekształceniaU (%d)U (-)Nie wykryto dodatkowego monitora. Nie można włączyć podglądu pełnoekranowego.Nie znaleziono wolnego ekranu dla podglądu pełnoekranowegoNieobsłużony błąd komunikacji z serwisem FacebookNieobsługiwany błąd serwisu PicasaZdjęcia bez przypisanego priorytetuAktualizuj bazę obiektywówWyślij zdjęcie do FacebookaWyślij zdjęcie do serwisu FlickrWyślij zdjęcie do serwisu PicasaUżyj skórki systemowejUżytkownik: Win.WinietowanieKorekcja winietowaniaWidoczne dla rodzinyWidoczne dla przyjaciółWBAsciiOczekiwanie na zakończenie pozostałych zadańOczekiwanie na kolejne zdjęcie. Ostrzeżenie: przechwytywanie zdjęcia zajęło więcej czasu niż ustawiony interwał Pobranie zdjęcia trwało %.1f sekund. Rozważ zwiększenie interwału. Wystąpił błąd podczas autentykacji. Proszę spróbować ponownie.Witaj w rejestrowaniu bezpośrednim! Upewnij się, że aparat nie jest zamontowany w systemie operacyjnym. Balans bieliSzerokośćSzerokość:Czy chcesz ponowić operację?Twoje pliki zostaną nieodwracalnie usunięte!Twoje ustawienia nie wspierają wizualizacji RGBA i/lub kompozycji. Sprawdź poradnik dla systemu aby uaktywnić RGBA i kompozycję._1_2_3_O programie_Dodaj do kolejki_Dodaj bieżący widok do kolejki..._AutoGrupuj a_utomatycznie_Kolejka_Z aparatu_Kopiuj zdjęcie do schowka_Kopiuj parametry_Przytnij_Usuń oznaczone zdjęcia_Edycja_Konwertuj do..._Eksportuj do GIMP_Maska ekspozycji_Plik_Oznacz do usunięciaPełny _ekran_Grupuj_Pomoc_Miniaturki_Baza obiektywów_Zaciemnienie_Następne zdjęcie_Następne zdjęcie_Dokumentacja on-line_Otwórz katalog_Wklej parametry_Zdjęcie_Ustawienia_Poprzednie zdjęcie_Poprzednie zdjęcie_Szybka konwersjaZa_kończ_Przeładuj katalog_Usuń z kolejki_Usuń priorytet_Parametry domyślne_Cofnij zmiany_Zapisz parametry domyślne aparatuZmień _priorytet_Pokaż zdjęcie na drugim monitorze_Migawka_Sortuj wgPodgląd _dzielony_Rozpocznij konwersję_Wyprostuj_Tagi zdjęcia..._Rejestrowanie bezpośrednie_Panel narzędzi_Cofnij przycinanie_Anuluj grupowanie_Cofnij prostowanie_Widok_Balans bieli_Dopasuj do oknapikseliteleobiektywszerokokątnyrawstudio-2.0/po/ca.gmo0000644000175000017500000002626111546436027012041 000000000000004L himquw~ '3DH^ t$!  (/FH N[]dk *=FVjou     $ , :EN`s !) >HZ^m r'    /4EJYhw     :F `k}    %- 9 HSe |+  4I Zh.o   0?E ^jqw    0 AOV ]irz  &-,BDZ co .%7*b(s/ , *0 *[        !!!1!S!\!b!x!!"! !!0!*"B"J" Z"e"m"" """""##(#9#O#e#m###(# #### $$'$$L$k${$ $$$-$ % %'%,%>%P%e%%%%% %%&"&2&#F& j& x& &&&&&& ''"'*'9'(K'(t'' ''''7 ( E(S()h(((((( (((+)=)P)BY)))))) ))))) *%*A*H*W*g*~* ********++-+<+Q+W+v+++++ + , ,,*, I,T, s,,,,%U5X| ]y.q<piP 4b?zf #Cod/6L!gHxe+V0t}NO=7~ &h>MFlru:J,\DWKGvj[a3'k"BSI_R mY9Tn;2c@*${^)`8Aw1-ZEQs( A B C %%.1fs %2c - Incremental counter%d photos added to batch queue%dmm %f - Original filename%s - Setting id (A, B or C)* (%d)-1 (%d)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)AA raw image converter for GTK+/GNOMEAdjusting to auto white balanceAdjusting to camera white balanceAll filesAll photos (excluding deleted)AspectAuto adjust curve endsBBatchBuffer emptyCCancelChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Choose output directoryConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrastCopied settingsCouldn't open photoCropCurveD (%d)Delete photosDeleted photosDeleting photosDirectory:Don't cropError exportingError exporting photo to gimp.Export FileExport dimensionsExposureF/%.1f File exportedFile type:FilenameFilename example:Filename template:Flip the photo over the x-axisFreeformGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2GridHarmonious triangles #1Harmonious triangles #2Height:Hiding exposure maskHistogramHistogram height:HueISO paper (A4)IconImage openedJPEG (Joint Photographic Experts Group)Keep aspectLast image:Loading %s ...Maximum sizeMaximum size: %d x %dMirror the photo over the y-axisNo white balance to set fromNoneNothing to pasteOpenOpen curve ...Open directoryOpen recursiveOpening directory...Opening photo ...Output directory:PNG (Portable Network Graphics)Pasted settingsPercent:Photo height:Photo scale:Photo sizePhoto width:Place cache in home directoryPreferencesPreview background color:PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProgressQuick exportRawstudioReadyRemoveRemove allReset curveRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturationSave curve as ...Save uncompressed TIFFSaving %s ...Select which settings to add to batch queueSettingSharpenShowing exposure maskSizeStartTime left: %dh %dm %dsTime left: ...ToolsTransformsU (%d)Unprioritized photosUse system themeWhite balanceWidth:Your files will be permanently deleted!_1_2_3_About_Add to batch queue_Auto_Auto group_Batch_Camera_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Next Photo_Open Directory_Paste settings_Photo_Preferences_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Set Priority_Split_Start_Straighten_Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelsProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-03-26 03:39+0100 PO-Revision-Date: 2008-08-19 09:35+0100 Last-Translator: Anders Kvist Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: Catalan X-Poedit-Country: ANDORRA X-Poedit-SourceCharset: utf-8 A B C %%.1fs %2c - ComptadorS'han afegit %d fotos a la cua del lot%dmm %f - Nom del fitxer original%s - Identificador del paràmetres (A, B o C)* (%d)-1 (%d)1/%.0fs 10:8 (SXGA)16:10 (XGA ample)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)AUn convertidor de imatges raw per a GTK+/GNOMES'està ajustant l'equilibri de blancS'està ajustant amb l'equilibri de blanc de la càmeraTots els fitxersTotes les fotos (excepte les suprimides)AspecteAjusta automàticament els finals de les corbesBLotEl buffer està buitCCancel·laCanviaS'ha modificat la prioritat de la foto (%d)S'ha modificat la prioritat de la foto (*)S'ha modificat la prioritat de la foto (D)Trieu el directori de sortidaEscala constant: %dAlçada constantAlçada constant: %dEscala constantAmplada constantAmplada constant: %dContrastParàmetres copiatsNo s'ha pogut obrir la fotografiaEscapçaCorbaD (%d)Suprimeix les fotografiesFotografies suprimidesS'estant suprimint les fotografiesDirectori:No ho escapcisS'ha produït un error mentre s'estava exportantS'ha produït un error en exportar a gimp.ExportaExporta la midaExposicióF/%.1f S'ha exportat el fitxerTipus de fitxer:Nom de fitxerExemple del nom del fitxer:Plantilla del nom de l'arxiu:Gira la foto sobre l'eix XCorba de forma lliureGeneralRectangle dauratSeccions àuriesRectangles daurats #1Rectangles daurats #2GraellaTriangles harmònics #1Triangles harmònics #2Alçada:S'està amagant la màscara d'exposicióHistogramaAlçada de l'histograma:MatísPaper ISO (A4)IconaS'ha obert la imatgeJPEG (Joint Photographic Experts Group)Conserva la relació d'aspecteDarrera imatge:S'està carregant %s ...Mida màximaMida màxima:constant: %d x %dGira la foto sobre l'eix YNo hi ha cap patró per l'equilibre del blancCapNo hi ha res per enganxarObreObre la corba ...Obre un directoriObre les subcarpetesS'està obrint el directori...S'està obrint la foto ...Directori de sortida:PNG (Portable Network Graphics)Paràmetres enganxatsPercentatge:Alçada de la imatge:Escala de la imatgeMida de la fotoAmplada de la foto:Posa la caché al directori inicialPreferènciesImatge prèvia de color de fons:PrioritatsFotografies amb prioritat 1Fotografies amb prioritat 2Fotos amb prioritat 3ProgrésExportació ràpidaRawstudioPreparatEliminaElimina-ho totReinicia la corbaGira la imatge 90 graus en sentit horariGira la imatge 90 graus en sentit horariRegla dels terçosSaturacióAnomena i desa la corba ...Desa com a TIFF sense comprimirS'està desant %s ...Trieu els paràmeters que voleu afegir a la cua del lotConfiguracióAugmenta la nitidesaS'està mostrant la màscara d'exposicióMidaComençaTemps restant: %dh %dm %dsTemps restant: ...EinesTransformaU (%d)Fotografies sense prioritatFés servir els colors del tema del sistemaEquilibri de blancAmplada:Els vostres fitxers seran esborrats de forma permanentment!_1_2_3_Quant aAfegeix a la cua del _lot_AutomàticAgrupa _automàticament_Lot_Càmera_Copia els paràmetres_EscapçaS_uprimeix les fotografies senyalades_EditaExporta _com aExporta a _Gimp_Màscara d'exposició_Fitxer_Senyala la foto per suprimir-la_Pantalla sencera_Agrupa_Ajuda_Barra de miniaturesFoto _Següent_Obre un directori_Enganxa els paràmetresF_oto_PreferènciesFoto _Anterior_Exportació ràpida_Surt_Torna a carregar el directori_Suprimeix de la cua del lot_Suprimeix la prioritat_Reinicia els paràmetres_Torna als paràmetres inicialsEstableix la _prioritat_Divideix_Comença_Redreça_Caixa d'eines_Desfés el que s'ha Escapçat_DesagrupaDes_fés el que s'ha redreçat_VisualitzaEquilibri de _blancAjusta a la _finestrapíxelsrawstudio-2.0/po/es.gmo0000644000175000017500000002550111546436027012061 00000000000000,< XY]aegn #48N dos$! 68 >KMT[w -6FZ_e {      *5>Pc .8JN] b'o    $5:IXg|      *6 P[m    %-) 8CU l+z $9 JX._ #) BNU[ dp   %3: AMV^ gu{ %/EG] fr /*-2`(s  ; Z {        !#!,!2! H!U!d! s! !!!!!! !!! ""." L"m" """""" ""#2#!:# \#g#~####'####$$-$M$h$p$$$$$$$$$% &%2%B%R%b%'s%%$% %%%&&#& 8&B&H& Q&_&=q&C&& '')'F'3V'''!''''' ' ((0(D(Z(m(3v(((( (((((() ) )()7)H)a)j))))))))))) *"*)*>*\*p***** *** * * ++%+8+%U5X| ]y.q<piP 4b?zf #Cod/6L!gHxe+V0t}NO=7~ &h>MFlru:J,\DWKGvj[a3'k"BSI_R mY9Tn;2c@*${^)`8Aw1-ZEQs( A B C %%.1fs %2c - Incremental counter%d photos added to batch queue%dmm %f - Original filename%s - Setting id (A, B or C)* (%d)-1 (%d)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)AA raw image converter for GTK+/GNOMEAdjusting to auto white balanceAdjusting to camera white balanceAll filesAll photos (excluding deleted)AspectAuto adjust curve endsBBatchBuffer emptyCCancelChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Choose output directoryConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrastCopied settingsCouldn't open photoCropCurveD (%d)Delete photosDeleted photosDeleting photosDirectory:Don't cropError exportingError exporting photo to gimp.Export FileExport dimensionsExposureF/%.1f File exportedFile type:FilenameFilename example:Filename template:Flip the photo over the x-axisFreeformGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2GridHarmonious triangles #1Harmonious triangles #2Height:Hiding exposure maskHistogramHistogram height:HueISO paper (A4)IconImage openedJPEG (Joint Photographic Experts Group)Keep aspectLast image:Loading %s ...Maximum sizeMaximum size: %d x %dMirror the photo over the y-axisNo white balance to set fromNoneNothing to pasteOpenOpen curve ...Open directoryOpen recursiveOpening directory...Opening photo ...Output directory:PNG (Portable Network Graphics)Pasted settingsPercent:Photo height:Photo scale:Photo sizePhoto width:Place cache in home directoryPreferencesPreview background color:PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProgressQuick exportRawstudioReadyRemoveRemove allReset curveRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturationSave curve as ...Save uncompressed TIFFSaving %s ...Select which settings to add to batch queueSettingSharpenShowing exposure maskSizeStartTime left: %dh %dm %dsTime left: ...ToolsTransformsU (%d)Unprioritized photosUse system themeWhite balanceWidth:Your files will be permanently deleted!_1_2_3_About_Add to batch queue_Auto_Batch_Camera_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Next Photo_Open Directory_Paste settings_Photo_Preferences_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Set Priority_Split_Start_Straighten_Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelsProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-03-26 03:39+0100 PO-Revision-Date: 2008-05-02 00:47+0100 Last-Translator: Patrik Jarl Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 1.11.4 Plural-Forms: nplurals=2; plural=(n != 1); X-Poedit-Language: Spanish X-Poedit-Country: SPAIN A B C %%.1fs %2c - Contador incremental%d fotos añadidas a la cola de lotes%dmm %f - Nombre de archivo original%s - Ajuste id (A, B o C)* (%d)-1 (%d)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)AUn convertidor de imágenes raw para GTK+/GNOMEAjustando a balance de blancos automáticoAjustando al balance de blancos de la cámaraTodos los archivosTodas las fotos (excluidas las borradas)OrientaciónAuto ajustar finales de curvaBLotesMemoria intermedia vacíaCCancelarCambiarPrioridad de foto cambiada (%d)Prioridad de foto cambiada (*)Prioridad de foto cambiada (D)Seleccionar directorio de salidaEscala constante: %dAltura constanteAltura constante: %dEscala constanteAnchura constanteAnchura constante: %dContrasteAjustes copiadosNo se pudo abrir la fotoRecortarCurvaD (%d)Borrar fotosFotos borradasBorrando fotosDirectorio:No recortarError al exportarError al exportar la foto a gimp.Exportar archivoExportar dimensionesExposiciónF/%.1f Archivo exportadoTipo de archivo:Nombre de archivoEjemplo de nombre de archivo:Plantilla de nombres de archivo:Reflejar la foto sobre el eje XForma libreGeneralEl rectángulo áureoLa sección áureaTriangulo de oro #1Triangulo de oro #2CuadrículaTriángulos armoniosos #1Triángulos armoniosos #2Altura:Ocultando máscara de exposiciónHistogramaAltura del histograma:TonoPapel ISO (A4)IconoImagen abiertaJPEG (Joint Photographic Experts Group)Mantener orientaciónÚltima imagen:Cargando %s...Tamaño máximoTamaño máximo: %d x %dReflejar la foto sobre el eje XBalance de blanco falta deNingunaNada que pegarAbrirAbrir curva...Abrir directorioApertura recursivaAbriendo directorio...Abriendo foto...Directorio de salida:PNG (Portable Network Graphics)Ajustes pegadosPorcentaje:Altura de foto:Escala de foto:Tamaño de fotoAnchura de foto:Situar caché en el directorio personalConfiguraciónColor de fondo de previsualización:PrioridadesFotos de prioridad 1Fotos de prioridad 2Fotos de prioridad 3ProgresoExportación rápidaRawstudioListoEliminarEliminar todoRestablecer curvaGirar la foto 90 grados en el sentido de las agujas del relojGirar la foto 90 grados en sentido contrario a las agujas del relojLa regla de terceroSaturaciónGuardar curva como...Guardar TIFF sin compresiónGuardando %s...Seleccionar qué ajustes añadir a la cola de lotesAjusteEnfoqueMostrando máscara de exposiciónTamañoInicioTiempo restante: %dh %dm %dsTiempo restante: ...HerramientasTransformacionesU (%d)Fotos sin priorizarUsar tema del sistemaBalance de blancosAnchura:¡Sus archivos se borrarán permanentemente!_1_2_3_Acerca de_Añadir a la cola de lotes_Auto_Lotes_Cámara_Copiar ajustes_Recorte_Borrar fotos marcadas_Editar_Exportar como_Exportar a Gimp_Máscara de exposición_Archivo_Marcar foto para borrar_Pantalla completa_Agrupar_Ayuda_Caja de iconos_Siguiente foto_Abrir directorio_Pegar ajustes_Foto_Configuración_Foto anterior_Exportación rápida_Salir_Recargar directorio_Eliminar de la cola de lotes_Eliminar prioridad_Restablecer ajustes_Deshacer ajustes_Establecer prioridad_Dividir_Iniciar_Enderezar_Caja de herramientas_Deshacer recorte_Desagrupar_Desenderezar_Ver_Balance de blancos_Zoom para ajustarpíxelesrawstudio-2.0/po/fr.po0000644000175000017500000015612411546425272011723 00000000000000# Copyright(C) 2008 Edouard Gomez # Corrected by Florent "Chapal" Meyer # See Rawstudio's license for more details # # msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-03-26 03:39+0100\n" "PO-Revision-Date: 2011-03-21 00:10+0100\n" "Last-Translator: Edouard Gomez \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: French\n" "X-Poedit-Country: FRANCE\n" #: librawstudio/rs-lens-db-editor.c:325 msgid "All lenses" msgstr "Tous les objectifs" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "Erreur lors de la mise à jour de la base de donnée lensfun" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "Base de donnée lensfun mise à jour" #: librawstudio/rs-lens-db-editor.c:565 msgid "Rawstudio Lens Library" msgstr "Répertoire d'objectifs Rawstudio" #: librawstudio/rs-lens-db-editor.c:590 msgid "Lens make" msgstr "Fabricant de l'objectif" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "Objectif" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "Focale" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "Ouverture" #: librawstudio/rs-lens-db-editor.c:606 msgid "Camera make" msgstr "Fabricant de l'appareil" #: librawstudio/rs-lens-db-editor.c:610 msgid "Camera model" msgstr "Modèle de l'appareil" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "Activé" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "Mettre à jour la base de donnée lensfun" #: librawstudio/rs-lens-db-editor.c:734 msgid "Could not create temporary directory." msgstr "N'a pu créer le répertoire temporaire" #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "N'a pas pu obtenir la liste de fichier à partir de %s." #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "N'a pas pu obtenir le fichier à partir de %s ou n'a pu l'écrire à %s." #: librawstudio/rs-lens-db-editor.c:796 #, c-format msgid "Could not create datadir for lensfun - %s" msgstr "N'a pu créer le répertoire servant à la base de donnée lensfun - %s" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "Erreur lors de la copie du fichier %s vers %s\n" #: librawstudio/rs-lens-db-editor.c:939 msgid "Rawstudio Lens Editor" msgstr "Éditeur d'objectifs Rawstudio" #: librawstudio/rs-lens-db-editor.c:950 msgid "Lens Make" msgstr "Fabricant de l'objectif" #: librawstudio/rs-lens-db-editor.c:954 msgid "Lens Model" msgstr "Modèle de l'objectif" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "Distance Focale" #: librawstudio/rs-lens-db-editor.c:966 msgid "Camera Make" msgstr "Fabricant de l'appareil" #: librawstudio/rs-lens-db-editor.c:970 msgid "Camera Model" msgstr "Modèle de l'appareil" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "Activer cet objectif" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "Utiliser l'objectif" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "Base de donnée d'objectifs" #: librawstudio/rs-library.c:254 #, c-format msgid "Could not open database %s" msgstr "N'a pas pu ouvrir la base de donnée %s" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "Grand angle" #: librawstudio/rs-library.c:816 msgid "telephoto" msgstr "Téléobjectif" #: librawstudio/rs-library.c:832 msgid "January" msgstr "Janvier" #: librawstudio/rs-library.c:835 msgid "February" msgstr "Février" #: librawstudio/rs-library.c:838 msgid "March" msgstr "Mars" #: librawstudio/rs-library.c:841 msgid "April" msgstr "Avril" #: librawstudio/rs-library.c:844 msgid "May" msgstr "Mai" #: librawstudio/rs-library.c:847 msgid "June" msgstr "Juin" #: librawstudio/rs-library.c:850 msgid "July" msgstr "Juillet" #: librawstudio/rs-library.c:853 msgid "August" msgstr "Août" #: librawstudio/rs-library.c:856 msgid "September" msgstr "Septembre" #: librawstudio/rs-library.c:859 msgid "October" msgstr "Octobre" #: librawstudio/rs-library.c:862 msgid "November" msgstr "Novembre" #: librawstudio/rs-library.c:865 msgid "December" msgstr "Décembre" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "Ajouter profile..." #: librawstudio/rs-profile-selector.c:242 msgid "Embedded Profile" msgstr "Profile de colorimétrie interne" #: librawstudio/rs-profile-selector.c:244 msgid "(Select Profile)" msgstr "(Sélectionnez le profile de colorimétrie)" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "Expos" #: librawstudio/rs-settings.c:80 msgid "Exposure Compensation" msgstr "Compensation d'exposition" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 msgid "Satur" msgstr "Satur" #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "Saturation" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "Couleur" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "Décalage de couleur" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "Contr" #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "Contraste" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temp" msgstr "Temp" #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "Température" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "Teinte" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "Décalage de teinte" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "WBAscii" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 msgid "Sharp" msgstr "Netteté" #: librawstudio/rs-settings.c:133 msgid "Sharpen Amount" msgstr "Force du filtre de netteté" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "AntiBruit" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "Filtre antibruit de luminosité" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "AntiBruitClr" #: librawstudio/rs-settings.c:145 msgid "Colour Denoising" msgstr "Filtre antibruit de couleurs" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "CA R" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "Correction d'aberration chromatique Rouge" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "CA B" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "Correction d'aberration chromatique Bleue" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "Vign" #: librawstudio/rs-settings.c:163 msgid "Vignetting Correction" msgstr "Correction du vignettage" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 msgid "Red" msgstr "Rouge" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "Ajustement du canal rouge" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "Vert" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "Ajustement du canal vert" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "Bleu" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "Ajustement du canal bleu" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "" "Espace de colorimétrie adapté à l'impression, compatible Adobe RGB (1998)" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "Espace de colorimétrie à large Gamut" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 msgid "JPEG Quality" msgstr "Qualité JPEG" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "Légende" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "Publier la photo sur Facebook" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "Étape 1:" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "Étape 2:" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "Authentifier Rawstudio" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "Erreur inattendue provenant de Facebook" #: plugins/output-facebook/output-facebook.c:329 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" "Il est nécessaire d'authentifier Rawstudio avant de pouvoir publier des " "photos sur votre compte Facebook." #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "Albums" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "Créer un album" #: plugins/output-flickr/output-flickr.c:113 msgid "Title" msgstr "Titre" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "Description" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "Tags" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "Public (tout le monde pourra voir le cliché)" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "Visible pour les amis" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "Visible pour la famille" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "Publier la photo sur Flickr" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "Erreur lors de l'authentification. Réessayer plus tard." #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" "Rawstudio n'a pu publier la photo car l'authentification a expiré. Procéder " "de nouveau à l'authentification de Raswtudio afin de publier sur Flickr." #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" "Il semble que Rawstudio ne soit plus authentifié sur votre compte. " "Authentifier à nouveau afin de pouvoir publier à nouveau." #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" "%s\n" "\n" "NB: Cette erreur n'est pas gérée par Rawstudio. Veuillez nous en faire " "parvenir le contenu ainsi que la procédure à suivre afin de la reproduire. " "Cela nous permettra de gérer cette erreur à l'avenir dans Rawstudio. Merci " "d'avance." #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "Erreur Flickr" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" "Il est nécessaire d'authentifier Rawstudio avant de pouvoir publier vos " "photos sur votre compte Flickr." #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 msgid "Full export path" msgstr "Chemin complet d'export" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "Profil de colorimétrie pour la sauvergarde" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 msgid "Copy EXIF metadata" msgstr "Copier les données EXIF" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "Conserver les données EXIF" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "Publier la photo sur Picasa" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "Erreur inattendue de Picasa" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "Utilisateur actuel:" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "(Authentification réussie)" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "(Ne peut s'authentifier)" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "(Pas de nom d'utilisateur indiqué)" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "Changer d'utilisateur" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "Ne peut s'authentifier" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "Réessayer l'opération ?" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "Une erreur a été retournée par le service web de Picasa:" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "Réessayer l'opération ?" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "Authentification Webalbum Picasa" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "" "Veuillez renseigner votre nom d'utilisateur et votre mot de passe pour le " "service Web Albums de Picasa" #: plugins/output-picasa/rs-picasa-client.c:234 msgid "Username: " msgstr "Nom d'utilisateur:" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "Mot de passe:" #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "Sauvegarder en PNG 16 bit linéaires" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "Copier les données EXIF dans les données XMP" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Sauvegarder en TIFF non compressé" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "Sauvegarder en TIFF 16 bit" #: plugins/output-tifffile/output-tifffile.c:108 msgid "TIFF (Tagged Image File Format)" msgstr "TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Nom de fichier original" #: src/filename.c:315 #, c-format msgid "%p - Path of original file" msgstr "%p - Nom de fichier original" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - Compteur incrémental" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s - Id de paramètres (A, B ou C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "%d - Date des EXIF (AAAA-MM-JJ)" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "%DY - Année des EXIF (AAAA)" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "%Dy - Année des EXIF (AA)" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "%Dm - Mois des EXIF (MM)" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "%DM - Mois des EXIF (Texte)" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "%Dd - Jour des EXIF (JJ)" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "%DD - Jour de la semaine des EXIF (Texte)" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "%t - Heure des EXIF (HH:MM:SS)" #: src/gtk-interface.c:154 msgid "Width" msgstr "Largeur" #: src/gtk-interface.c:154 msgid "Height" msgstr "Hauteur" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Ouverture de photo" #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "N'a pas pu ouvrir la photo" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Image ouverte" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "Priorité de photo changée (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "Priorité de photo changée (D)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "Priorité de photo changée (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "Incapable de détecter l'écran pour une pré-visualisation plein écran" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "Appuyer sur F10 pour retrouver la pré-visualisation sur cette fenêtre" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "" "Incapable de détecter plus d'un écran. Ne peut pas utiliser la fenêtre de " "pré-visualisation plein écran." #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "Sélectionnez l'écran pour la pré-visualisation en plein écran." #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "Sélectionnez l'écran pour la pré-visualisation en plein écran." #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "" "Sélectionnez OK pour utiliser cet écran pour la pré-visualisation en plein " "écran." #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Répertoire :" #: src/gtk-interface.c:777 src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Choisir le répertoire d'enregistrement" #: src/gtk-interface.c:793 src/rs-batch.c:1075 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Motif de nom de fichier :" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Exemple de nom de fichier :" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Type de fichier :" #. Add preferences box #: src/gtk-interface.c:879 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Préférences" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Couleur d'arrière plan de la prévisualisation :" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Hauteur de l'histogramme :" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Utiliser le thème système" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Placer le cache dans le répertoire de l'utilisateur" #: src/gtk-interface.c:926 msgid "Display Colorspace:" msgstr "Profil de colorimétrie pour l'affichage" #: src/gtk-interface.c:938 msgid "Exposure Mask Colorspace:" msgstr "Profil de colorimétrie pour le masque d'exposition" #: src/gtk-interface.c:1011 msgid "General" msgstr "Général" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "Exportation rapide" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "Ouverture du répertoire..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Ouvrir récursivement" #: src/gtk-interface.c:1465 msgid "Directory" msgstr "Répertoire" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "Recharche de tag" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Outils" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Lot" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Ouvrir" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Prêt" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "Progrès" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Ouvrir un répertoire" #: src/rs-actions.c:253 src/rs-batch.c:542 msgid "Could not create output directory." msgstr "N'a pu créer le répertoire de sortie" #: src/rs-actions.c:257 msgid "Exporting..." msgstr "Export en cours" #: src/rs-actions.c:265 msgid "File exported" msgstr "Fichier exporté" #: src/rs-actions.c:270 src/rs-actions.c:293 msgid "Export failed" msgstr "Échec de l'export" #: src/rs-actions.c:300 msgid "Exporting to GIMP..." msgstr "Export vers GIMP" #: src/rs-actions.c:305 msgid "Error exporting" msgstr "Erreur lors de l'export" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "Erreur lors de l'export vers GIMP" #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "Supression de photos" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "Vos fichiers seront effacés définitivement." #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Supprimer les photos" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "En attente de la fin des tâches en cours" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "Image en cours de copie vers le presse papier" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "Image copiée vers le presse papier" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "Erreur: impossibilité de copier l'image dans le presse papier" #. Build GUI #: src/rs-actions.c:463 msgid "Profile" msgstr "Profile" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Exposition" #: src/rs-actions.c:468 msgid "White balance" msgstr "Balance des blancs" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Netteté" #: src/rs-actions.c:470 msgid "Denoise" msgstr "Débruiter" #: src/rs-actions.c:471 msgid "Color denoise" msgstr "Débruitage des plans de couleur" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "Mixeur de canaux" #: src/rs-actions.c:473 msgid "TCA" msgstr "TCA" #: src/rs-actions.c:474 msgid "Vignetting" msgstr "Vignettage" #: src/rs-actions.c:475 src/rs-toolbox.c:803 msgid "Curve" msgstr "Courbe" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "Sélectionner Tout/Aucun" #: src/rs-actions.c:498 msgid "Select settings to copy" msgstr "Sélectionner les paramètres à copier" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Paramètres copiés" #: src/rs-actions.c:587 msgid "Pasting settings to images" msgstr "Paramètres en cours de copie" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Paramètres collés" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Rien à coller" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Buffer vide" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Balance des blancs automatique" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "Aucune balance des blancs disponible" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Balance des blancs de l'appareil photo" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "Tags, séparés par des espaces:" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "Ajouter des tags aux photos sélectionnées." #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "Affichage du masque d'exposition" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "Masquage du masque d'exposition" #: src/rs-actions.c:1067 msgid "Adding images to batch queue" msgstr "Ajout en cours des images au traitement par lot" #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "%d photos ajoutées au traitement par lot" #: src/rs-actions.c:1101 src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Sélectionner les paramètres\n" "à ajouter au traitement par lot" #: src/rs-actions.c:1188 msgid "Removing images from batch queue" msgstr "Suppression en cours des images du traitement par lot" #: src/rs-actions.c:1203 #, c-format msgid "%d photos removed from batch queue" msgstr "%d photos ajoutées au traitement par lot" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "Ajouter profile..." #: src/rs-actions.c:1266 msgid "All Profiles" msgstr "Tous les profils" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "Profile Appareil Photo (DCP)" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "Profils de colorimétrie (ICC et ICM)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Tous les fichiers" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "Un convertisseur de fichier RAW pour GTK+/GNOME" #: src/rs-actions.c:1412 msgid "_File" msgstr "_Fichier" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "_Édition" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "_Photo" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "Choisir la _priorité" #: src/rs-actions.c:1416 msgid "_White Balance" msgstr "_Balance des blancs" #: src/rs-actions.c:1417 msgid "_View" msgstr "_Vue" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "_Trier par" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "_Traitement par lot" #: src/rs-actions.c:1420 msgid "_Help" msgstr "_Aide" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "_Instantané" #. File menu #: src/rs-actions.c:1425 msgid "_Open Directory" msgstr "Ouvrir un répertoire" #: src/rs-actions.c:1426 msgid "_Quick Export" msgstr "_Export rapide" #: src/rs-actions.c:1427 msgid "_Export As" msgstr "Exporter _sous" #: src/rs-actions.c:1428 msgid "_Export to Gimp" msgstr "Exporter vers _GIMP" #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "_Copier l'image vers le presse papier" #: src/rs-actions.c:1430 msgid "_Reload directory" msgstr "_Recharger le répertoire" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "_Supprimer les photos marquées" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "_Quitter" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "Revenir aux _anciens paramètres" #: src/rs-actions.c:1436 msgid "_Copy settings" msgstr "Copier les paramètres" #: src/rs-actions.c:1437 msgid "_Paste settings" msgstr "Coller les paramètres" #: src/rs-actions.c:1438 msgid "_Reset settings" msgstr "Réinitialiser les paramètres" #: src/rs-actions.c:1439 msgid "_Save camera default settings" msgstr "_Sauvegarder les paramètres par défaut de l'appareil" #: src/rs-actions.c:1440 msgid "_Preferences" msgstr "_Préférences" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "Marquer la photo pour _suppression" #: src/rs-actions.c:1444 msgid "_1" msgstr "_1" #: src/rs-actions.c:1445 msgid "_2" msgstr "_2" #: src/rs-actions.c:1446 msgid "_3" msgstr "_3" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "_Supprimer la priorité" #: src/rs-actions.c:1448 msgid "_Auto" msgstr "_Auto" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "_Appareil" #: src/rs-actions.c:1450 msgid "_Crop" msgstr "_Cadrer" #: src/rs-actions.c:1451 msgid "_Uncrop" msgstr "Annuler le _cadrage" #: src/rs-actions.c:1452 msgid "_Straighten" msgstr "_Redresser" #: src/rs-actions.c:1453 msgid "_Unstraighten" msgstr "Annuler le _redressement" #: src/rs-actions.c:1454 msgid "_Group" msgstr "_Grouper" #: src/rs-actions.c:1455 msgid "_Ungroup" msgstr "_Dégrouper" #: src/rs-actions.c:1456 msgid "_Auto group" msgstr "Groupement automatique" #: src/rs-actions.c:1457 msgid "_Tag Photo..." msgstr "_Tag photo..." #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "_Tourner dans le sens horaire" #: src/rs-actions.c:1459 msgid "Rotate Counter Clockwise" msgstr "Tourner dans le sens trigonométrique" #: src/rs-actions.c:1460 msgid "Flip" msgstr "Retourner" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "Mirroir" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "Photo _précédente" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "Photo _suivante" #: src/rs-actions.c:1466 msgid "_Lens Library" msgstr "Base de donnée d'objectifs" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "_Prise de vue pilotée" #. Batch menu #: src/rs-actions.c:1470 msgid "_Add to batch queue" msgstr "Ajouter au traitement par lot" #: src/rs-actions.c:1471 msgid "_Add view to queue..." msgstr "Ajouter la _vue courante au traitement par lot" #: src/rs-actions.c:1472 msgid "_Remove from batch queue" msgstr "Supprimer du traitement par lot" #: src/rs-actions.c:1473 msgid "_Start" msgstr "_Démarrer" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "Documentation en ligne" #: src/rs-actions.c:1477 msgid "_About" msgstr "À _propos" #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "Zoom à la taille de la _fenêtre" #: src/rs-actions.c:1487 msgid "_Iconbox" msgstr "_Icônes" #: src/rs-actions.c:1488 msgid "_Toolbox" msgstr "_Outils" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "Plein _écran" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "_Montrer la photo sur le moniteur secondaire" #: src/rs-actions.c:1491 msgid "Show Filenames in Iconbox" msgstr "Montrer le nom de fichier dans la vue en icônes" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "Charger les images dans un format non-RAW" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "Ne pas charger les images sélectionnées" #: src/rs-actions.c:1494 msgid "_Exposure mask" msgstr "_Masque d'exposition" #: src/rs-actions.c:1495 msgid "_Split" msgstr "_Séparer" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "_Voil noir" #: src/rs-actions.c:1503 msgid "Name" msgstr "Nom" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "Timestamp" #: src/rs-actions.c:1505 msgid "ISO" msgstr "ISO" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "Focale" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "Vitesse d'obturation" #. Snapshot labels #: src/rs-actions.c:1513 src/rs-toolbox.c:207 src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1514 src/rs-toolbox.c:208 src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1515 src/rs-toolbox.c:209 src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Annuler" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Dernière image" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Temps restant: %dh %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "Traitement de l'image %d/%d" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Temps restant: ..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "Traitement de l'image 1/%d" #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "Chargement de %s ..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "Sauvegarde de %s ..." #: src/rs-batch.c:635 msgid "Could not export photo." msgstr "N'a pas pu exporter la photo" #: src/rs-batch.c:695 msgid "Icon" msgstr "Icône" #: src/rs-batch.c:702 msgid "Filename" msgstr "Nom de fichier" #: src/rs-batch.c:709 msgid "Setting" msgstr "Paramètre" #: src/rs-batch.c:802 msgid "Start" msgstr "Démarrer" #: src/rs-batch.c:805 msgid "Remove" msgstr "Supprimer" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Supprimer tout" #: src/rs-batch.c:916 src/rs-batch.c:1091 msgid "Edit output settings" msgstr "Éditer les paramètres de sortie" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Taille de la photo" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "Rapport constant" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Largeur constante" #: src/rs-batch.c:962 msgid "Constant height" msgstr "Hauteur constante" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Taille maximum" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Largeur de la photo :" #: src/rs-batch.c:978 src/rs-batch.c:987 msgid "pixels" msgstr "pixels" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "Hauteur de la photo :" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "Rapport de la photo :" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Largeur constante:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Hauteur constante :\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "Rapport constant :\n" "%d" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Taille maximum :\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Répertoire d'enregistrement" #: src/rs-batch.c:1100 msgid "Change" msgstr "Changer" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "Exporter les dimensions" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "Editeur du paramétrage par défaut de l'appareil" #: src/rs-camera-db.c:459 msgid "Model" msgstr "Modèle" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "Afficher les informations de localisation" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "Voil noir non dispoible" #: src/rs-preview-widget.c:887 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" "Votre configuration ne semble pas supporter les visuels RGBA et/ou le " "compositing. Veuillez vous référer au manuel de votre système afin d'activer " "les visuels RGBA et le compositing." #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Taille" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Grille" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Aucune" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "Sections d'or" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "Règle des tiers" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Triangles d'or #1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Triangles d'or #2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Triangles harmonieux #1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Triangles harmonieux #2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Aspect" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "Libre" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "Aspect Ratio d'origine" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "A4" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "16:9 (HDTV)" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "Rectangle d'or" #: src/rs-preview-widget.c:1180 src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Recadrer" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "Annuler le recadrage" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" "Cadrer: glisser la souris afin de sélectionner le cadrage désiré. Bouton " "droit de la souris au sein du cadre: appliquer le cadrage; En dehors du " "cadre: Annuler cadrage" #: src/rs-preview-widget.c:1238 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" "Redresser: dessiner une ligne sur l'image pour symboliser une horizontale ou " "une verticale. Bouton droit pour annuler." #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:522 msgid "Export File" msgstr "Exporter le fichier" #: src/rs-save-dialog.c:282 msgid "File not saved!" msgstr "Fichier non sauvegardé !" #: src/rs-save-dialog.c:299 #, c-format msgid "Exporting to %s" msgstr "Export encours vers %s" #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" "Sauvegarde du fichier \"%s\" impossible.\n" "\n" "Vérifiez que vous posséder les droits d'écriture sur le répertoire." #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "Écraser le fichier ?" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" "Le fichier \"%s\" existe déjà.\n" "\n" "Souhaitez vous écraser le fichier ?" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Garder l'aspect" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Largeur :" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Hauteur :" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Pourcentage :" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Toutes les photos (y compris celles supprimées)" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Photos de priorité 1" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Photos de priorité 2" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Photos de priorité 3" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Photos sans priorité" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Photos supprimées" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Priorités" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" "NB: la vue en icônes est désactivée. Les nouveaux fichiers ne seront pas " "chargés. Appuyer sur pour ré-activer la vue en icônes." #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" "%s\n" "\n" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "Fabricant: %s\n" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "Modèle: %s\n" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "Focale: %dmm\n" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "Vitesse d'obturation: %.1fs\n" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "Vitesse d'obturation: 1/%.0fs\n" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "Ouverture: F/%.01f\n" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "ISO: %u\n" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "Heure: %s" #: src/rs-store.c:1371 msgid "* (-)" msgstr "* (-)" #: src/rs-store.c:1372 msgid "1 (-)" msgstr "1 (-)" #: src/rs-store.c:1373 msgid "2 (-)" msgstr "2 (-)" #: src/rs-store.c:1374 msgid "3 (-)" msgstr "3 (-)" #: src/rs-store.c:1375 msgid "U (-)" msgstr "U (-)" #: src/rs-store.c:1376 msgid "D (-)" msgstr "D (-)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "Recherche de Tag [%s]" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "Erreur rapportée par la librarie GPhoto2:\n" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" "Erreur: GPhoto2 a retourné une valeur d'erreur %d\n" "Le message d'erreur est: %s\n" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "Activation du mode de capture des appareils Canon.\n" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "Activation du mode de capture des appareils Nikon.\n" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "Capture activée.\n" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "Le port indiqué (%s) ne peut être trouvé." #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "Le déplacement du fichier vers le répertoire courant a échoué !\n" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "Téléchargement et ajout de l'image.\n" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "Échec lors de l'écriture du fichier temporaire sur le disque" #: src/rs-tethered-shooting.c:558 msgid "Could not open image!\n" msgstr "N'a pas pu ouvrir la photo !\n" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "Capture en cours.\n" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" "Rawstudio a reçu une erreur %d en attendant le résultat de l'appareil.\n" "Détail de l'erreur: %s\n" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" "Rawstudio a reçu une erreur %d en attendant le résultat de l'appareil.\n" "Détail de l'erreur: %s\n" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "Fichier téléchargé avec succès.\n" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "Arrêt du pilotage de l'appareil.\n" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" "Rawstudio a reçu une erreur %d en attendant le résultat de l'appareil.\n" "Détail de l'erreur: %s\n" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" "Avertissement: Le téléchargement de l'image a été plus long que l'intervalle " "de prise de vue choisi.\n" "Le téléchargement a duré %.1f secondes.\n" "Il serait préférable d'augmenter la durée de l'intervalle de prise de vue.\n" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "Attente de l'image suivante.\n" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "Démarrer la prise de vue" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "Intervalle de prise de vue finie.\n" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "Déconnexion de l'appareil\n" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "Appareil %s sur le port %s n'a pu être démarré\n" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" "Erreur: l'initialisation de l'appareil a retourné le code %d.\n" "Le message d'erreur est: %s\n" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "Arrêt en cours du thread asynchrone \n" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "Trouvé %d appareils\n" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "Pas d'appareil sélectionné - Pas de connexion possible !\n" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "" "Arrêt en cours de la thread actuelle afin d'activer le contrôle à distance.\n" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "Arrêt déjà en cours de la thread de contrôle.\n" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "Démarrage de la thread de monitoring.\n" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "Thread de moniotring déjà présente.\n" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "Arrêt en cours de la thread de capture.\n" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "Pas d'appareil connecté.\n" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "" "Démarrage en cours de la thread de prise de vue à intervalle régulier.\n" #: src/rs-tethered-shooting.c:938 msgid "Stop Shooting" msgstr "Arrêter la prise de vue" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "Sélectionner l'appareil:" #: src/rs-tethered-shooting.c:1003 msgid "Take Photo" msgstr "Prendre la photo" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "Monitorer l'appareil" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "Déconnecter l'appareil" #. Status window #: src/rs-tethered-shooting.c:1022 msgid "Status:" msgstr "Statut:" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "Contrôle maître" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "Tags des nouvelles images:" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 msgid "Filename & Tags" msgstr "Nom de fichier & tags:" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "Secondes entre chaque prise de vue:" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "Mode de prise de vue à intervalle régulier" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "Minimiser cette fenêtre après la capture" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "Copier les paramètres de l'image active vers la nouvelle image" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "Ouvrir les nouveaux fichiers après la capture" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "Prise de vue pilotée par Rawstudio" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" "Bienvenue dans le mode de prise de vue pilotée !\n" "Assurez vous bien que votre appareil n'est pas monté par votre système " "d'exploitation.\n" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Histogramme" #: src/rs-toolbox.c:443 msgid "Reset" msgstr "Réinitialiser" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr ". Cliquer pour réinitialiser la valeur" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr ". Cliquer pour éditer la valeur" #: src/rs-toolbox.c:566 src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Ouvrir la courbe ..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "Sélectionner une courbe enregistrée" #: src/rs-toolbox.c:700 msgid "Select Action" msgstr "Sélectionner une action" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Sauvegarder la courbe sous ..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Réinitialiser la courbe" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "Ajustement automatique des extrémités de courbe" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "Éditer l'objectif" #. Pack everything nice #: src/rs-toolbox.c:800 msgid "Basic" msgstr "Basique" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "Mixeur de canaux" #: src/rs-toolbox.c:802 msgid "Lens Correction" msgstr "Correction d'objectif" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Retourne la photo" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Mirroir de la photo" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Tourne la photo de 90° dans le sens horaire" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Tourne la photo de 90° dans le sens trigonométrique" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Transformations" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "Objectif inconnu" #: src/rs-toolbox.c:1035 msgid "Lens Disabled" msgstr "Objectif désactivé" #: src/rs-toolbox.c:1043 msgid "No Lens Information" msgstr "Pas d'information sur l'objectif" #: src/rs-toolbox.c:1045 msgid "Camera Unknown" msgstr "Appareil inconnu" #: src/rs-toolbox.c:1050 msgid "No Photo" msgstr "Pas de photos" #: src/rs-toolbox.c:1259 msgid "_Previous" msgstr "Photo _précédente" #: src/rs-toolbox.c:1260 msgid "_Next" msgstr "Photo _suivante" #~ msgid " %s added to batch queue" #~ msgstr "%s ajouté au traitement par lot" #~ msgid "%s already added to batch queue" #~ msgstr "%s déjà ajouté au traitement par lot" #~ msgid "Not in batch queue" #~ msgstr "Pas dans le traitement par lot" #~ msgid "Processing photos" #~ msgstr "Photos en cours de traitement" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "Charger les photos 8 bit (JPEG, PNG, etc...)" #, fuzzy #~ msgid "Warmth" #~ msgstr "Température/Teinte" #, fuzzy #~ msgid "CA Red" #~ msgstr "Prêt" #~ msgid "Select color profile" #~ msgstr "Sélectionner un profil colorimétrique" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Profils colorimétriques (ICC et ICM)" #~ msgid "Not a valid color profile." #~ msgstr "Profil colorimétrique invalide." #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "" #~ "Le fichier sélectionné n'est pas un profil colorimétrique valide pour " #~ "cette version de Rawstudio." #~ msgid "Enable color management (experimental)" #~ msgstr "Activer la gestion colorimétrique (expérimental)" #~ msgid "Input profile" #~ msgstr "Profil d'entrée" #~ msgid "BuiltInRGBProfile" #~ msgstr "Profil RGB inclus" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Profil d'export" #~ msgid "Intent" #~ msgstr "Intention" #~ msgid "Perceptual" #~ msgstr "Perceptuel" #~ msgid "Relative colormetric" #~ msgstr "Colorimétrie relative" #~ msgid "Absolute colormetric" #~ msgstr "Colorimétrie absolue" #~ msgid "Colors" #~ msgstr "Couleurs" #, fuzzy #~ msgid "Change this" #~ msgstr "Changer" #~ msgid "Background renderer active" #~ msgstr "Rendu actif en tâche de fond" #~ msgid "File export canceled" #~ msgstr "Exportation du fichier annulé" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "16-bit TIFF (Tagged Image File Format)" #~ msgid "Rotate the photo 180 degrees" #~ msgstr "Tourne la photo de 180°" #~ msgid "Reset this setting" #~ msgstr "Réinitialiser ce paramètre" #~ msgid "_Zoom to 100%" #~ msgstr "_Zoom 100%" #~ msgid "Canon CR2" #~ msgstr "Canon CR2" #~ msgid "Canon CIFF" #~ msgstr "Canon CIFF" #~ msgid "Nikon NEF" #~ msgstr "Nikon NEF" #~ msgid "Minolta raw" #~ msgstr "Minolta raw" #~ msgid "Canon TIFF" #~ msgstr "Canon TIFF" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Panasonic raw" #~ msgstr "Panasonic raw" #~ msgid "Pentax raw" #~ msgstr "Pentax raw" #~ msgid "Adobe Digital negative" #~ msgstr "Adobe Digital negative" #~ msgid "Hasselblad" #~ msgstr "Hasselblad" rawstudio-2.0/po/ja.po0000644000175000017500000015200611546425272011701 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-03-26 03:39+0100\n" "PO-Revision-Date: 2011-03-24 10:07+0900\n" "Last-Translator: Ryo Fujita \n" "Language-Team: Rawstudio development \n" "Language: Japanese\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Japanese\n" "X-Poedit-Country: JAPAN\n" "X-Poedit-SourceCharset: utf-8\n" #: librawstudio/rs-lens-db-editor.c:325 msgid "All lenses" msgstr "全てのレンズ" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "lensfunデータベースの更新エラー" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "更新済みlensfunデータベース" #: librawstudio/rs-lens-db-editor.c:565 msgid "Rawstudio Lens Library" msgstr "Rawstudioのレンズライブラリ" #: librawstudio/rs-lens-db-editor.c:590 msgid "Lens make" msgstr "レンズメーカ" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "レンズモデル" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "焦点" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "絞り" #: librawstudio/rs-lens-db-editor.c:606 msgid "Camera make" msgstr "カメラメーカー" #: librawstudio/rs-lens-db-editor.c:610 msgid "Camera model" msgstr "カメラモデル" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "利用可能" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "lensfunデータベースを更新" #: librawstudio/rs-lens-db-editor.c:734 msgid "Could not create temporary directory." msgstr "テンポラリディレクトリが作成できません" #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "%s からファイルのリストを読み取れません" #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "%s からファイルを読み取れないか %s に書き込めません" #: librawstudio/rs-lens-db-editor.c:796 #, c-format msgid "Could not create datadir for lensfun - %s" msgstr "lensfun用のデータディレクトリが作成できません- %s" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "ファイル %s の %s へのコピーエラー\n" #: librawstudio/rs-lens-db-editor.c:939 msgid "Rawstudio Lens Editor" msgstr "Rawstudioのレンズエディタ" #: librawstudio/rs-lens-db-editor.c:950 msgid "Lens Make" msgstr "レンズメーカー" #: librawstudio/rs-lens-db-editor.c:954 msgid "Lens Model" msgstr "レンズモデル" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "焦点距離" #: librawstudio/rs-lens-db-editor.c:966 msgid "Camera Make" msgstr "カメラメーカー" #: librawstudio/rs-lens-db-editor.c:970 msgid "Camera Model" msgstr "カメラモデル" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "このレンズを使用可能にする" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "レンズをセットする" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "レンズライブラリ" #: librawstudio/rs-library.c:254 #, c-format msgid "Could not open database %s" msgstr "データベース %s を開けません" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "広角" #: librawstudio/rs-library.c:816 msgid "telephoto" msgstr "望遠" #: librawstudio/rs-library.c:832 msgid "January" msgstr "1月" #: librawstudio/rs-library.c:835 msgid "February" msgstr "2月" #: librawstudio/rs-library.c:838 msgid "March" msgstr "3月" #: librawstudio/rs-library.c:841 msgid "April" msgstr "4月" #: librawstudio/rs-library.c:844 msgid "May" msgstr "5月" #: librawstudio/rs-library.c:847 msgid "June" msgstr "6月" #: librawstudio/rs-library.c:850 msgid "July" msgstr "7月" #: librawstudio/rs-library.c:853 msgid "August" msgstr "8月" #: librawstudio/rs-library.c:856 msgid "September" msgstr "9月" #: librawstudio/rs-library.c:859 msgid "October" msgstr "10月" #: librawstudio/rs-library.c:862 msgid "November" msgstr "11月" #: librawstudio/rs-library.c:865 msgid "December" msgstr "12月" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "プロファイルを追加..." #: librawstudio/rs-profile-selector.c:242 msgid "Embedded Profile" msgstr "埋め込みプロファイル" #: librawstudio/rs-profile-selector.c:244 msgid "(Select Profile)" msgstr "(プロファイルの選択)" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "Expos" #: librawstudio/rs-settings.c:80 msgid "Exposure Compensation" msgstr "露出補正" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 msgid "Satur" msgstr "Satur" #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "飽和" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "Hue" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "色相の変更" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "Contr" #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "コントラスト" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temp" msgstr "Temp" #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "色温度" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "色合いの変更" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "WBAscii" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 msgid "Sharp" msgstr "Sharp" #: librawstudio/rs-settings.c:133 msgid "Sharpen Amount" msgstr "シャープネスの総量" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "Denoi" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "輝度ノイズの低減" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "ColDn" #: librawstudio/rs-settings.c:145 msgid "Colour Denoising" msgstr "色ノイズの低減" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "CA R" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "赤色収差補正" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "CA B" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "青色収差補正" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "Vign" #: librawstudio/rs-settings.c:163 msgid "Vignetting Correction" msgstr "色にじみ補正" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 msgid "Red" msgstr "Red" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "赤色総量調整" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "Green" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "緑色総量調整" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "青色総量調整" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "印刷用色空間, Adobe RGB (1998)互換" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "広いガマットの色空間" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 msgid "JPEG Quality" msgstr "JPEG画質" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "キャプション" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "Facebookへの写真のアップロード" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "ステップ1:" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "ステップ2:" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "Rawstudioを認証する" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "Facebookの不明なエラー" #: plugins/output-facebook/output-facebook.c:329 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" "Facebookアカウントへの写真のアップロードを可能にするため、Rawstudioを認証する" "必要があります。" #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "アルバム" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "アルバムの作成" #: plugins/output-flickr/output-flickr.c:113 msgid "Title" msgstr "タイトル" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "説明" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "タグ" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "公開 (誰でも閲覧可能)" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "友人に公開" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "家族に公開" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "Flickrへの写真のアップロード" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "認証中にエラーが発生しました。再度試してください。" #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" "rawstudioは認証が無効になったために写真をアップロード出来ませんでした。Flickr" "に写真をアップロードするために、rawstudioを再認証してください。" #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" "あなたのアカウントにアップロードするための認証をrawstudioが失ったようです。再" "度認証してください。" #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" "%s\n" "\n" "注意: このエラーはrawstudioが対応出来ません。エラーを発見したことと、より" "役立つエラーメッセージを表示出来るように、再現手順を知らせてください。感謝し" "ます!" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "Flickrのエラー" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" "Flickrアカウントへの写真のアップロードを可能にするため、Rawstudioを認証する必" "要があります。" #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 #, fuzzy msgid "Full export path" msgstr "書き出したファイル" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 msgid "Copy EXIF metadata" msgstr "EXIFメタデータのコピー" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "EXIFメタデータの保持" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "Picasaへの写真のアップロード" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "Picasaの不明なエラー" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "現在のユーザ:" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "(ログインに成功)" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "(ログインに失敗)" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "(ユーザが存在しない)" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "ユーザの切り替え" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "ログイン失敗" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "操作を再試行?" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "Picasaウェブサービスとの通信時にエラーが通知された:" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "操作を再試行しますか?" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "Picasaウェブアルバムの認証" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "Picasaウェブアルバムのユーザ名とパスワードを入力してください。" #: plugins/output-picasa/rs-picasa-client.c:234 msgid "Username: " msgstr "ユーザ名:" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "パスワード:" #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "16ビットリニアのPNGで保存" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "XMPへのEXIFメタデータのコピー" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "非圧縮TIFFで保存" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "16ビットTIFFで保存" #: plugins/output-tifffile/output-tifffile.c:108 msgid "TIFF (Tagged Image File Format)" msgstr "TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - 元のファイル名" #: src/filename.c:315 #, c-format msgid "%p - Path of original file" msgstr "%p - 元のファイルのパス" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - 加算カウンタ" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s - 設定ID (A, B もしくは C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "%d - EXIFの日付 (YYYY-MM-DD)" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "%DY - EXIFの年号 (YYYY)" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "%Dy - EXIFの年号 (YY)" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "%Dm - EXIFの月 (MM)" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "%DM - EXIFの月 (テキスト)" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "%Dd - EXIFの日 (DD)" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "%DD - EXIFの曜日" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "%t - EXIFの時刻 (HH:MM:SS)" #: src/gtk-interface.c:154 msgid "Width" msgstr "幅" #: src/gtk-interface.c:154 msgid "Height" msgstr "高さ" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "写真を開く..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "写真を開けません" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "開いているイメージ" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "変更された写真の優先度 (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "変更された写真の優先度 (D)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "変更された写真の優先度 (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "フルスクリーンのプレビューを表示する画面を特定できない" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "このウインドウのプレビューに戻るには F10 を押す" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "" "1つ以上のモニタが検出出来ません。フルスクリーンのプレビューを開けません" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "フルスクリーンのプレビューを開く画面の選択" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "フルスクリーンのプレビューの画面の選択" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "この画面をフルスクリーンのプレビューに使うにはOKを選択" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "ディレクトリ:" #: src/gtk-interface.c:777 src/rs-batch.c:1064 msgid "Choose output directory" msgstr "出力するディレクトリの選択" #: src/gtk-interface.c:793 src/rs-batch.c:1075 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "ファイル名のテンプレート:" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "ファイル名の例:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "ファイルタイプ:" #. Add preferences box #: src/gtk-interface.c:879 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "設定" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "プレビューの背景色:" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "ヒストグラムの高さ:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "システムテーマを使う" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "ホームディレクトリのキャッシュを指定" #: src/gtk-interface.c:926 msgid "Display Colorspace:" msgstr "ディスプレイの色空間:" #: src/gtk-interface.c:938 msgid "Exposure Mask Colorspace:" msgstr "露光マスクの色空間:" #: src/gtk-interface.c:1011 msgid "General" msgstr "一般" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "クイック書き出し" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "ディレクトリを開く..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "再帰的に開く" #: src/gtk-interface.c:1465 msgid "Directory" msgstr "ディレクトリ" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "タグ検索" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "ツール" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "バッチ" #: src/gtk-interface.c:1476 msgid "Open" msgstr "開く" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "準備完了" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "進捗" #: src/rs-actions.c:173 msgid "Open directory" msgstr "ディレクトリを開く" #: src/rs-actions.c:253 src/rs-batch.c:542 msgid "Could not create output directory." msgstr "出力ディレクトリを作成できません" #: src/rs-actions.c:257 msgid "Exporting..." msgstr "書き出し中..." #: src/rs-actions.c:265 msgid "File exported" msgstr "書き出したファイル" #: src/rs-actions.c:270 src/rs-actions.c:293 msgid "Export failed" msgstr "書き出し失敗" #: src/rs-actions.c:300 msgid "Exporting to GIMP..." msgstr "GIMPに書き出し..." #: src/rs-actions.c:305 msgid "Error exporting" msgstr "書き出しエラー" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "gimpへの写真の書き出しエラー。" #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "写真の削除" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "ファイルは完全に削除されます!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "写真の削除" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "作業の完了を待っています" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "クリップボードへのイメージの転送" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "クリップボードに転送されたイメージ" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "エラー: クリップボードにイメージを転送出来ません" #. Build GUI #: src/rs-actions.c:463 msgid "Profile" msgstr "プロファイル" #: src/rs-actions.c:464 msgid "Exposure" msgstr "露出" #: src/rs-actions.c:468 msgid "White balance" msgstr "ホワイトバランス" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "シャープネス" #: src/rs-actions.c:470 msgid "Denoise" msgstr "ノイズ低減" #: src/rs-actions.c:471 msgid "Color denoise" msgstr "色ノイズ低減" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "チャネルミキサー" #: src/rs-actions.c:473 msgid "TCA" msgstr "TCA" #: src/rs-actions.c:474 msgid "Vignetting" msgstr "色にじみ" #: src/rs-actions.c:475 src/rs-toolbox.c:803 msgid "Curve" msgstr "カーブ" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "全てを選択/選択解除" #: src/rs-actions.c:498 msgid "Select settings to copy" msgstr "コピーする設定の選択" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "コピーされた設定" #: src/rs-actions.c:587 msgid "Pasting settings to images" msgstr "イメージへの設定のペースト" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "ペーストされた設定" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "ペーストするものがありません" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "バッファが空です" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "自動ホワイトバランスに調整" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "設定元のホワイトバランスがありません" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "カメラのホワイトバランスに設定" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "スペースで区切られたタグ:" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "選択した写真にタグを追加する。" #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "露光マスクを表示" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "露光マスクを非表示" #: src/rs-actions.c:1067 msgid "Adding images to batch queue" msgstr "バッチ処理のキューにイメージを追加" #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "%d 枚の写真がバッチ処理のキューに追加された" #: src/rs-actions.c:1101 src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "バッチ処理のキューに追加する\n" "設定のいずれかを選択" #: src/rs-actions.c:1188 msgid "Removing images from batch queue" msgstr "バッチ処理のキューからイメージを取り除く" #: src/rs-actions.c:1203 #, c-format msgid "%d photos removed from batch queue" msgstr "%d 枚の写真がバッチ処理のキューから取り除かれた" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "プロファイルの追加..." #: src/rs-actions.c:1266 msgid "All Profiles" msgstr "全てのプロファイル" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "カメラプロファイル (DCP)" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "カラープロファイル (ICC と ICM)" #: src/rs-actions.c:1289 msgid "All files" msgstr "全てのファイル’" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "GTK+/GNOME用のRAW画像変換アプリ" #: src/rs-actions.c:1412 msgid "_File" msgstr "ファイル(_F)" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "編集(_E)" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "写真(_P)" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "優先度を設定(_S)" #: src/rs-actions.c:1416 msgid "_White Balance" msgstr "ホワイトバランス(_W)" #: src/rs-actions.c:1417 msgid "_View" msgstr "表示(_V)" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "並び替え(_S)" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "バッチ処理(_B)" #: src/rs-actions.c:1420 msgid "_Help" msgstr "ヘルプ(_H)" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "スナップショット(_S)" #. File menu #: src/rs-actions.c:1425 msgid "_Open Directory" msgstr "ディレクトリを開く(_O)" #: src/rs-actions.c:1426 msgid "_Quick Export" msgstr "クイック書き出し(_Q)" #: src/rs-actions.c:1427 msgid "_Export As" msgstr "別名で書き出し(_E)" #: src/rs-actions.c:1428 msgid "_Export to Gimp" msgstr "GIMPへの書き出し(_E)" #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "クリップボードにイメージを転送(_C)" #: src/rs-actions.c:1430 msgid "_Reload directory" msgstr "ディレクトリを再読込(_R)" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "フラグ付きの写真を削除(_D)" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "終了(_Q)" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "設定の復元(_R)" #: src/rs-actions.c:1436 msgid "_Copy settings" msgstr "設定のコピー(_C)" #: src/rs-actions.c:1437 msgid "_Paste settings" msgstr "設定のペースト(_P)" #: src/rs-actions.c:1438 msgid "_Reset settings" msgstr "設定のリセット(_R)" #: src/rs-actions.c:1439 msgid "_Save camera default settings" msgstr "カメラのデフォルト設定を保存(_S)" #: src/rs-actions.c:1440 msgid "_Preferences" msgstr "設定(_P)" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "削除する写真にフラグを付ける(_F)" #: src/rs-actions.c:1444 msgid "_1" msgstr "_1" #: src/rs-actions.c:1445 msgid "_2" msgstr "_2" #: src/rs-actions.c:1446 msgid "_3" msgstr "_3" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "優先度を削除(_R)" #: src/rs-actions.c:1448 msgid "_Auto" msgstr "自動(_A)" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "カメラ(_C)" #: src/rs-actions.c:1450 msgid "_Crop" msgstr "切り取り(_C)" #: src/rs-actions.c:1451 msgid "_Uncrop" msgstr "切り取りを解除(_U)" #: src/rs-actions.c:1452 msgid "_Straighten" msgstr "水平・垂直(_S)" #: src/rs-actions.c:1453 msgid "_Unstraighten" msgstr "水平・垂直を解除(_U)" #: src/rs-actions.c:1454 msgid "_Group" msgstr "グループ化(_G)" #: src/rs-actions.c:1455 msgid "_Ungroup" msgstr "グループ化を解除(_U)" #: src/rs-actions.c:1456 msgid "_Auto group" msgstr "自動グループ化(_A)" #: src/rs-actions.c:1457 msgid "_Tag Photo..." msgstr "写真のタグ付け...(_T)" #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "右回転" #: src/rs-actions.c:1459 msgid "Rotate Counter Clockwise" msgstr "左回転" #: src/rs-actions.c:1460 msgid "Flip" msgstr "上下反転" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "水平反転" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "前の写真(_P)" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "次の写真(_N)" #: src/rs-actions.c:1466 msgid "_Lens Library" msgstr "レンズライブラリ(_L)" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "リモート撮影(_T)" #. Batch menu #: src/rs-actions.c:1470 msgid "_Add to batch queue" msgstr "バッチ処理のキューに追加(_A)" #: src/rs-actions.c:1471 msgid "_Add view to queue..." msgstr "ビューをキューに追加(_A)" #: src/rs-actions.c:1472 msgid "_Remove from batch queue" msgstr "バッチ処理のキューから削除(_R)" #: src/rs-actions.c:1473 msgid "_Start" msgstr "開始(_S)" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "" #: src/rs-actions.c:1477 msgid "_About" msgstr "このプログラムについて(_A)" #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "画面に合わせる(_Z)" #: src/rs-actions.c:1487 msgid "_Iconbox" msgstr "アイコンボックス(_I)" #: src/rs-actions.c:1488 msgid "_Toolbox" msgstr "ツールボックス(_T)" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "フルスクリーン(_F)" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "副モニタで写真を表示(_S)" #: src/rs-actions.c:1491 msgid "Show Filenames in Iconbox" msgstr "アイコンボックスにファイル名を表示" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "RAW以外のイメージの読み込み" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "選択したイメージを読み込まない" #: src/rs-actions.c:1494 msgid "_Exposure mask" msgstr "露光マスク(_E)" #: src/rs-actions.c:1495 msgid "_Split" msgstr "分割(_S)" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "消灯(_L)" #: src/rs-actions.c:1503 msgid "Name" msgstr "名前" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "タイムスタンプ" #: src/rs-actions.c:1505 msgid "ISO" msgstr "ISO" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "焦点距離" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "シャッター速度" #. Snapshot labels #: src/rs-actions.c:1513 src/rs-toolbox.c:207 src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1514 src/rs-toolbox.c:208 src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1515 src/rs-toolbox.c:209 src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "キャンセル" #: src/rs-batch.c:464 msgid "Last image:" msgstr "最後のイメージ:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "残り時間: %dh %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "イメージ %d/%d を処理中" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "残り時間: ..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "イメージ 1/%d を処理中" #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "%s を読み込み中..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "%s を保存中..." #: src/rs-batch.c:635 msgid "Could not export photo." msgstr "写真を書き出せません。" #: src/rs-batch.c:695 msgid "Icon" msgstr "アイコン" #: src/rs-batch.c:702 msgid "Filename" msgstr "ファイル名" #: src/rs-batch.c:709 msgid "Setting" msgstr "設定" #: src/rs-batch.c:802 msgid "Start" msgstr "開始" #: src/rs-batch.c:805 msgid "Remove" msgstr "削除" #: src/rs-batch.c:808 msgid "Remove all" msgstr "全てを削除" #: src/rs-batch.c:916 src/rs-batch.c:1091 msgid "Edit output settings" msgstr "出力設定の編集" #: src/rs-batch.c:952 msgid "Photo size" msgstr "写真サイズ" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "縦横比固定" #: src/rs-batch.c:961 msgid "Constant width" msgstr "幅固定" #: src/rs-batch.c:962 msgid "Constant height" msgstr "高さ固定" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "最大サイズ" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "写真の幅:" #: src/rs-batch.c:978 src/rs-batch.c:987 msgid "pixels" msgstr "ピクセル数" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "写真の高さ:" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "写真の縦横比:" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "幅固定:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "高さ固定:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "縦横比固定:\n" "%d" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "最大サイズ:\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "出力ディレクトリ:" #: src/rs-batch.c:1100 msgid "Change" msgstr "変更" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "書き出す大きさ" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "カメラ初期設定エディタ" #: src/rs-camera-db.c:459 msgid "Model" msgstr "モデル" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "ディスプレイナビゲーション" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "消灯モードは利用できません" #: src/rs-preview-widget.c:887 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" "この設定はコンポジットの有無に関わらずRGBAをサポートしていないようです。オペ" "レーティングシステムのマニュアルを参照して、これらを利用可能にしてください。" #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "サイズ" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "グリッド" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "全て無し" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "黄金分割" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "三分割法" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "黄金三角比 #1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "黄金三角比 #2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "調和三角 #1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "調和三角 #2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "縦横比" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "非定型" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "元の縦横比" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "ISO 用紙 (A4)" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "16:9 (HDTV)" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "黄金長方形" #: src/rs-preview-widget.c:1180 src/rs-preview-widget.c:1191 msgid "Crop" msgstr "切り取る" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "切り取らない" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" "切り取り: 切り取る範囲をドラッグして選択します。切り取る範囲内で右クリック: " "切り取りを適用; 外側: 切り取りをキャンセル" #: src/rs-preview-widget.c:1238 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" "水平・垂直: 水平あるいは垂直にしたい直線をイメージ中に引きます。右クリックで" "キャンセル。" #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:522 msgid "Export File" msgstr "ファイルの書き出し" #: src/rs-save-dialog.c:282 msgid "File not saved!" msgstr "ファイルは保存されません!" #: src/rs-save-dialog.c:299 #, c-format msgid "Exporting to %s" msgstr "%s に書き出す" #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" "ファイル %s を保存できません。\n" "\n" "このフォルダの書き込み権限をチェックしてください。" #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "ファイルを上書きしますか?" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" "ファイル %s は既にあります。\n" "\n" "ファイルを上書きしますか?" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "縦横比を維持" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "幅:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "高さ:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "パーセント:" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "全ての写真 (削除したものを除く)" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "優先度 1 の写真" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "優先度 2 の写真" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "優先度 3 の写真" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "優先度のない写真" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "削除した写真" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "優先度" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" "注意: アイコン表示の更新は無効です。新しいファイルは読み込まれません! 再度有" "効にするには を押します。" #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" "%s\n" "\n" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "メーカー: %s\n" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "モデル: %s\n" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "焦点距離: %dmm\n" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "シャッター速度: %.1fs\n" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "シャッター速度: 1/%.0fs\n" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "絞り: F/%.01f\n" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "ISO: %u\n" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "時刻: %s" #: src/rs-store.c:1371 msgid "* (-)" msgstr "* (-)" #: src/rs-store.c:1372 msgid "1 (-)" msgstr "1 (-)" #: src/rs-store.c:1373 msgid "2 (-)" msgstr "2 (-)" #: src/rs-store.c:1374 msgid "3 (-)" msgstr "3 (-)" #: src/rs-store.c:1375 msgid "U (-)" msgstr "U (-)" #: src/rs-store.c:1376 msgid "D (-)" msgstr "D (-)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "タグ検索 [%s]" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "Gphoto2 がコンテキストエラーを通知:\n" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" "エラー: Gphoto2 がエラー値 %d を返した\n" "エラーメッセージ: %s\n" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "キヤノンのカメラ用のキャプチャモードを有効化\n" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "ニコンのカメラ用のキャプチャモードを有効化\n" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "キャプチャは有効\n" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "指定されたポート ('%s') が見つかりません。" #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "現在のディレクトリにファイルを移動できません!\n" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "イメージをダウンロード、追加中.\n" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "ディスク上の書き出し用一時ファイルが開けません" #: src/rs-tethered-shooting.c:558 msgid "Could not open image!\n" msgstr "イメージが開けません!\n" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "キャプチャ中.\n" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" "カメラの準備を待つ間に、モニタがエラー %d を受信しました。\n" "エラーテキスト: %s\n" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" "カメラからイメージをダウンロードする間に、エラー %d を受信しました。\n" "エラーテキスト: %s\n" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "カメラモニタを終了中。\n" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" "イメージのキャプチャ中にエラー %d を受信。\n" "エラーテキスト: %s\n" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" "警告: 間隔を設定する以上にイメージのキャプチャに時間がかかります。\n" "イメージのダウンロードに %.1f 秒かかります。\n" "間隔を増やすことを検討してください。\n" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "次のイメージを待っています。\n" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "撮影を開始" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "インターバル撮影を終了中です。\n" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "現在のカメラを切断中\n" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "カメラ %s (ポート %s )を開けません\n" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" "エラー: カメラの初期化の返り値 %d.\n" "エラーテキスト:%s\n" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "非同期スレッドを終了中\n" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "%d 台のカメラを検出\n" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "カメラが選択されていません - 接続できません!\n" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "リモートキャプチャを有効にするために実行中のスレッドを終了中。\n" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "既に実行中のスレッドを終了中。\n" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "モニタスレッドを開始中。\n" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "モニタスレッドは既に実行中。\n" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "インターバルキャプチャスレッドを終了中。\n" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "カメラが接続されていません。\n" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "インターバル撮影スレッドを開始中。\n" #: src/rs-tethered-shooting.c:938 msgid "Stop Shooting" msgstr "撮影を終了" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "カメラの選択:" #: src/rs-tethered-shooting.c:1003 msgid "Take Photo" msgstr "写真の撮影" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "カメラをモニタ" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "カメラの切断" #. Status window #: src/rs-tethered-shooting.c:1022 msgid "Status:" msgstr "ステータス:" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "主コントロール" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "新しいイメージのタグ:" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 msgid "Filename & Tags" msgstr "ファイル名 & タグ" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "各コマの秒間隔:" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "インターバル撮影" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "キャプチャ後にウインドウを最小化" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "新しいイメージに現在の設定をコピー" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "キャプチャ後に新しいイメージを開く" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "Rawstudioのリモート撮影" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" "リモート撮影へようこそ!\n" "カメラがオペレーティングシステムにマウントされていないことを確認してくださ" "い。\n" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "ヒストグラム" #: src/rs-toolbox.c:443 msgid "Reset" msgstr "リセット" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr ". クリックして値をリセット" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr ". クリックして値を編集" #: src/rs-toolbox.c:566 src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "カーブを開く..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "保存したカーブの選択" #: src/rs-toolbox.c:700 msgid "Select Action" msgstr "アクションの選択" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "カーブを別名で保存..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "カーブのリセット" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "自動的にカーブ端を調整" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "レンズの編集" #. Pack everything nice #: src/rs-toolbox.c:800 msgid "Basic" msgstr "基本" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "チャネルミキサー" #: src/rs-toolbox.c:802 msgid "Lens Correction" msgstr "レンズ補正" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "x軸で写真を反転" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "y軸で写真を反転" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "90度時計回りに写真を回転" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "90度反時計回りに写真を回転" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "変換" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "不明なレンズ" #: src/rs-toolbox.c:1035 msgid "Lens Disabled" msgstr "無効なレンズ" #: src/rs-toolbox.c:1043 msgid "No Lens Information" msgstr "レンズ情報無し" #: src/rs-toolbox.c:1045 msgid "Camera Unknown" msgstr "不明なカメラ" #: src/rs-toolbox.c:1050 msgid "No Photo" msgstr "写真がありません" #: src/rs-toolbox.c:1259 msgid "_Previous" msgstr "前(_P)" #: src/rs-toolbox.c:1260 msgid "_Next" msgstr "次(_N)" rawstudio-2.0/po/en.po0000644000175000017500000014712311546425272011715 00000000000000# English translation for Rawstudio. # Copyright (C) 2006-2008 Anders Brander and Anders Kvist # This file is distributed under the same license as the Rawstudio package. # # Simone Contini , 2008. msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-03-26 03:39+0100\n" "PO-Revision-Date: 2011-03-26 03:49+0100\n" "Last-Translator: Anders Kvist \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: English\n" #: librawstudio/rs-lens-db-editor.c:325 msgid "All lenses" msgstr "All lenses" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "Error updating LensFun database" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "LensFun database updated" #: librawstudio/rs-lens-db-editor.c:565 msgid "Rawstudio Lens Library" msgstr "Rawstudio Lens Library" #: librawstudio/rs-lens-db-editor.c:590 msgid "Lens make" msgstr "Lens make" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "Lens model" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "Focal" #: librawstudio/rs-lens-db-editor.c:602 #: librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "Aperture" #: librawstudio/rs-lens-db-editor.c:606 msgid "Camera make" msgstr "Camera make" #: librawstudio/rs-lens-db-editor.c:610 msgid "Camera model" msgstr "Camera model" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "Enabled" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "Update LensFun database" #: librawstudio/rs-lens-db-editor.c:734 msgid "Could not create temporary directory." msgstr "Could not create temporary directory." #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "Could not fetch list of files from %s." #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "Could not fetch file from %s or write it to %s." #: librawstudio/rs-lens-db-editor.c:796 #, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Could not create datadir for LensFun - %s" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "Error copying file %s to %s\n" #: librawstudio/rs-lens-db-editor.c:939 msgid "Rawstudio Lens Editor" msgstr "Rawstudio Lens Editor" #: librawstudio/rs-lens-db-editor.c:950 msgid "Lens Make" msgstr "Lens Make" #: librawstudio/rs-lens-db-editor.c:954 msgid "Lens Model" msgstr "Lens Model" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "Focal Length" #: librawstudio/rs-lens-db-editor.c:966 msgid "Camera Make" msgstr "Camera Make" #: librawstudio/rs-lens-db-editor.c:970 msgid "Camera Model" msgstr "Camera Model" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "Enable this lens" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "Set lens" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "Lens Library" #: librawstudio/rs-library.c:254 #, c-format msgid "Could not open database %s" msgstr "Could not open database %s" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "wideangle" #: librawstudio/rs-library.c:816 msgid "telephoto" msgstr "telephoto" #: librawstudio/rs-library.c:832 msgid "January" msgstr "January" #: librawstudio/rs-library.c:835 msgid "February" msgstr "February" #: librawstudio/rs-library.c:838 msgid "March" msgstr "March" #: librawstudio/rs-library.c:841 msgid "April" msgstr "April" #: librawstudio/rs-library.c:844 msgid "May" msgstr "May" #: librawstudio/rs-library.c:847 msgid "June" msgstr "June" #: librawstudio/rs-library.c:850 msgid "July" msgstr "July" #: librawstudio/rs-library.c:853 msgid "August" msgstr "August" #: librawstudio/rs-library.c:856 msgid "September" msgstr "September" #: librawstudio/rs-library.c:859 msgid "October" msgstr "October" #: librawstudio/rs-library.c:862 msgid "November" msgstr "November" #: librawstudio/rs-library.c:865 msgid "December" msgstr "December" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "Add profile ..." #: librawstudio/rs-profile-selector.c:242 msgid "Embedded Profile" msgstr "Embedded Profile" #: librawstudio/rs-profile-selector.c:244 msgid "(Select Profile)" msgstr "(Select Profile)" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "Expos" #: librawstudio/rs-settings.c:80 msgid "Exposure Compensation" msgstr "Exposure Compensation" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 msgid "Satur" msgstr "Satur" #: librawstudio/rs-settings.c:86 #: src/rs-actions.c:465 msgid "Saturation" msgstr "Saturation" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 #: src/rs-actions.c:466 msgid "Hue" msgstr "Hue" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "Hue Shift" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "Contr" #: librawstudio/rs-settings.c:98 #: src/rs-actions.c:467 msgid "Contrast" msgstr "Contrast" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 #: librawstudio/rs-settings.c:116 msgid "Temp" msgstr "Temp" #: librawstudio/rs-settings.c:104 #: librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "Temperature" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 #: librawstudio/rs-settings.c:122 msgid "Tint" msgstr "Tint" #: librawstudio/rs-settings.c:110 #: librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "Tint Shift" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "WBAscii" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 msgid "Sharp" msgstr "Sharp" #: librawstudio/rs-settings.c:133 msgid "Sharpen Amount" msgstr "Sharpen Amount" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "Denoi" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "Light Denoising" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "ColDn" #: librawstudio/rs-settings.c:145 msgid "Colour Denoising" msgstr "Colour Denoising" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "CA R" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "Red Chromatic Aberration Correction" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "CA B" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "Blue Chromatic Aberration Correction" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "Vign" #: librawstudio/rs-settings.c:163 msgid "Vignetting Correction" msgstr "Vignetting Correction" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 msgid "Red" msgstr "Red" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "Red Amount Adjustment" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "Green" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "Green Amount Adjustment" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "Blue Amount Adjustment" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "Print friendly color space, compatible with Adobe RGB (1998)" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "Large gamut color space" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 msgid "JPEG Quality" msgstr "JPEG Quality" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "Caption" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "Upload photo to Facebook" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "Step 1:" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "Step 2:" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "Authenticate Rawstudio" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "Unhandled error from Facebook" #: plugins/output-facebook/output-facebook.c:329 msgid "Rawstudio needs to be authenticated before it will be able to upload photos to your Facebook account." msgstr "Rawstudio needs to be authenticated before it will be able to upload photos to your Facebook account." #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "Albums" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "Create album" #: plugins/output-flickr/output-flickr.c:113 msgid "Title" msgstr "Title" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "Description" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "Tags" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "Public (everyone can see this)" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "Visible to Friends" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "Visible to Family" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "Upload photo to Flickr" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "We recieved an error during authentication. Please try again." #: plugins/output-flickr/output-flickr.c:306 msgid "Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr." #: plugins/output-flickr/output-flickr.c:309 msgid "It seems like rawstudio lost its authentication to upload to your account, please re-authenticate." msgstr "It seems like rawstudio lost its authentication to upload to your account, please re-authenticate." #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!" msgstr "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "Flickr error" #: plugins/output-flickr/output-flickr.c:374 msgid "Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account." msgstr "Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account." #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 msgid "Full export path" msgstr "Full export path" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "Color space used for saving" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 msgid "Copy EXIF metadata" msgstr "Copy Exif metadata" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "Retain Exif metadata" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "Upload photo to Picasa" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "Unhandled error from Picasa" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "Current User: " #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr " (Logged in succesfully)" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr " (Cannot log in)" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "(No user entered)" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "Switch User" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "Cannot log in" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "Retry Operation?" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "An error was returned when communicating with the Picasa web service:" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "Would you like to Retry the operation?" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "Picasa Webalbum Authentification" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "Please type in your username and password for Picasa Web Albums." #: plugins/output-picasa/rs-picasa-client.c:234 msgid "Username: " msgstr "Username: " #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "Password: " #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "Save 16 bit linear PNG" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "Copy Exif metadata to XMP" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Save uncompressed TIFF" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "Save 16 bit TIFF" #: plugins/output-tifffile/output-tifffile.c:108 msgid "TIFF (Tagged Image File Format)" msgstr "TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Original filename" #: src/filename.c:315 #, c-format msgid "%p - Path of original file" msgstr "%p - Path of original file" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - Incremental counter" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s - Setting id (A, B or C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "%d - Date from Exif (YYYY-MM-DD)" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "%DY - Year from Exif (YYYY)" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "%Dy - Year from Exif (YY)" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "%Dm - Month from Exif (MM)" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "%DM - Month from Exif (Text)" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "%Dd - Date from Exif (DD)" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "%DD - Day of week from Exif" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "%t - Time from Exif (HH:MM:SS)" #: src/gtk-interface.c:154 msgid "Width" msgstr "Width" #: src/gtk-interface.c:154 msgid "Height" msgstr "Height" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Opening photo ..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "Couldn't open photo" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Image opened" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "Changed photo priority (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "Changed photo priority (D)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "Changed photo priority (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "Unable to locate screen for fullscreen preview" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "Press F10 to return preview to this window" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "Unable to detect more than one monitor. Cannot open fullscreen preview" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "Select screen to open fullscreen preview" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "Select Screen for fullscreen preview" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "Select OK to use this screen for fullscreen preview" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Directory:" #: src/gtk-interface.c:777 #: src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Choose output directory" #: src/gtk-interface.c:793 #: src/rs-batch.c:1075 #: src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Filename template:" #: src/gtk-interface.c:806 #: src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Filename example:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "File type:" #. Add preferences box #: src/gtk-interface.c:879 #: src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Preferences" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Preview background color:" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Histogram height:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Use system theme" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Place cache in home directory" #: src/gtk-interface.c:926 msgid "Display Colorspace:" msgstr "Display Colorspace:" #: src/gtk-interface.c:938 msgid "Exposure Mask Colorspace:" msgstr "Exposure Mask Colorspace:" #: src/gtk-interface.c:1011 msgid "General" msgstr "General" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "Quick export" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "Opening directory..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Open recursive" #: src/gtk-interface.c:1465 msgid "Directory" msgstr "Directory" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "Tag search" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Tools" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Batch" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Open" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Ready" #: src/gtk-progress.c:63 #: src/gtk-progress.c:100 #: src/gtk-progress.c:123 msgid "Progress" msgstr "Progress" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Open directory" #: src/rs-actions.c:253 #: src/rs-batch.c:542 msgid "Could not create output directory." msgstr "Could not create output directory." #: src/rs-actions.c:257 msgid "Exporting..." msgstr "Exporting..." #: src/rs-actions.c:265 msgid "File exported" msgstr "File exported" #: src/rs-actions.c:270 #: src/rs-actions.c:293 msgid "Export failed" msgstr "Export failed" #: src/rs-actions.c:300 msgid "Exporting to GIMP..." msgstr "Exporting to GIMP..." #: src/rs-actions.c:305 msgid "Error exporting" msgstr "Error exporting" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "Error exporting photo to gimp." #: src/rs-actions.c:331 #: src/rs-actions.c:349 msgid "Deleting photos" msgstr "Deleting photos" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "Your files will be permanently deleted!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Delete photos" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "Waiting for jobs to finish" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "Copying image to clipboard" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "Image copied to clipboard" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "ERROR: Could not copy image to clipboard" #. Build GUI #: src/rs-actions.c:463 msgid "Profile" msgstr "Profile" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Exposure" #: src/rs-actions.c:468 msgid "White balance" msgstr "White balance" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Sharpen" #: src/rs-actions.c:470 msgid "Denoise" msgstr "Denoise" #: src/rs-actions.c:471 msgid "Color denoise" msgstr "Color denoise" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "Channel mixer" #: src/rs-actions.c:473 msgid "TCA" msgstr "TCA" #: src/rs-actions.c:474 msgid "Vignetting" msgstr "Vignetting" #: src/rs-actions.c:475 #: src/rs-toolbox.c:803 msgid "Curve" msgstr "Curve" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "Select All/None" #: src/rs-actions.c:498 msgid "Select settings to copy" msgstr "Select settings to copy" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Copied settings" #: src/rs-actions.c:587 msgid "Pasting settings to images" msgstr "Pasting settings to images" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Pasted settings" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Nothing to paste" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Buffer empty" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Adjusting to auto white balance" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "No white balance to set from" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Adjusting to camera white balance" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "Tags, separated by spaces:" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "Add tags to selected photo(s)." #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "Showing exposure mask" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "Hiding exposure mask" #: src/rs-actions.c:1067 msgid "Adding images to batch queue" msgstr "Adding images to batch queue" #: src/rs-actions.c:1084 #: src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "%d photos added to batch queue" #: src/rs-actions.c:1101 #: src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 #: src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 #: src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Select which settings to\n" "add to batch queue" #: src/rs-actions.c:1188 msgid "Removing images from batch queue" msgstr "Removing images from batch queue" #: src/rs-actions.c:1203 #, c-format msgid "%d photos removed from batch queue" msgstr "%d photos removed from batch queue" #. Not in any menu (yet) #: src/rs-actions.c:1254 #: src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "Add Profile ..." #: src/rs-actions.c:1266 msgid "All Profiles" msgstr "All Profiles" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "Camera Profiles (DCP)" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "Color Profiles (ICC and ICM)" #: src/rs-actions.c:1289 msgid "All files" msgstr "All files" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "A raw image converter for GTK+/GNOME" #: src/rs-actions.c:1412 msgid "_File" msgstr "_File" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "_Edit" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "_Photo" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "_Set Priority" #: src/rs-actions.c:1416 msgid "_White Balance" msgstr "_White Balance" #: src/rs-actions.c:1417 msgid "_View" msgstr "_View" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "_Sort by" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "_Batch" #: src/rs-actions.c:1420 msgid "_Help" msgstr "_Help" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "_Snapshot" #. File menu #: src/rs-actions.c:1425 msgid "_Open Directory" msgstr "_Open Directory" #: src/rs-actions.c:1426 msgid "_Quick Export" msgstr "_Quick Export" #: src/rs-actions.c:1427 msgid "_Export As" msgstr "_Export As" #: src/rs-actions.c:1428 msgid "_Export to Gimp" msgstr "_Export to Gimp" #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "_Copy Image to Clipboard" #: src/rs-actions.c:1430 msgid "_Reload directory" msgstr "_Reload directory" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "_Delete flagged photos" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "_Quit" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "_Revert settings" #: src/rs-actions.c:1436 msgid "_Copy settings" msgstr "_Copy settings" #: src/rs-actions.c:1437 msgid "_Paste settings" msgstr "_Paste settings" #: src/rs-actions.c:1438 msgid "_Reset settings" msgstr "_Reset settings" #: src/rs-actions.c:1439 msgid "_Save camera default settings" msgstr "_Save camera default settings" #: src/rs-actions.c:1440 msgid "_Preferences" msgstr "_Preferences" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "_Flag photo for deletion" #: src/rs-actions.c:1444 msgid "_1" msgstr "_1" #: src/rs-actions.c:1445 msgid "_2" msgstr "_2" #: src/rs-actions.c:1446 msgid "_3" msgstr "_3" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "_Remove priority" #: src/rs-actions.c:1448 msgid "_Auto" msgstr "_Auto" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "_Camera" #: src/rs-actions.c:1450 msgid "_Crop" msgstr "_Crop" #: src/rs-actions.c:1451 msgid "_Uncrop" msgstr "_Uncrop" #: src/rs-actions.c:1452 msgid "_Straighten" msgstr "_Straighten" #: src/rs-actions.c:1453 msgid "_Unstraighten" msgstr "_Unstraighten" #: src/rs-actions.c:1454 msgid "_Group" msgstr "_Group" #: src/rs-actions.c:1455 msgid "_Ungroup" msgstr "_Ungroup" #: src/rs-actions.c:1456 msgid "_Auto group" msgstr "_Auto group" #: src/rs-actions.c:1457 msgid "_Tag Photo..." msgstr "_Tag Photo..." #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "Rotate Clockwise" #: src/rs-actions.c:1459 msgid "Rotate Counter Clockwise" msgstr "Rotate Counter Clockwise" #: src/rs-actions.c:1460 msgid "Flip" msgstr "Flip" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "Mirror" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "_Previous photo" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "_Next Photo" #: src/rs-actions.c:1466 msgid "_Lens Library" msgstr "_Lens Library" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "_Tethered Shooting" #. Batch menu #: src/rs-actions.c:1470 msgid "_Add to batch queue" msgstr "_Add to batch queue" #: src/rs-actions.c:1471 msgid "_Add view to queue..." msgstr "_Add view to queue..." #: src/rs-actions.c:1472 msgid "_Remove from batch queue" msgstr "_Remove from batch queue" #: src/rs-actions.c:1473 msgid "_Start" msgstr "_Start" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "_Online Documentation" #: src/rs-actions.c:1477 msgid "_About" msgstr "_About" #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "_Zoom to fit" #: src/rs-actions.c:1487 msgid "_Iconbox" msgstr "_Iconbox" #: src/rs-actions.c:1488 msgid "_Toolbox" msgstr "_Toolbox" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "_Fullscreen" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "_Show Photo On Secondary Monitor" #: src/rs-actions.c:1491 msgid "Show Filenames in Iconbox" msgstr "Show Filenames in Iconbox" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "Load non-RAW images" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "Do not Load Selected Images" #: src/rs-actions.c:1494 msgid "_Exposure mask" msgstr "_Exposure mask" #: src/rs-actions.c:1495 msgid "_Split" msgstr "_Split" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "_Lights out" #: src/rs-actions.c:1503 msgid "Name" msgstr "Name" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "Timestamp" #: src/rs-actions.c:1505 msgid "ISO" msgstr "ISO" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "Focallength" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "Shutterspeed" #. Snapshot labels #: src/rs-actions.c:1513 #: src/rs-toolbox.c:207 #: src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1514 #: src/rs-toolbox.c:208 #: src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1515 #: src/rs-toolbox.c:209 #: src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Cancel" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Last image:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Time left: %dh %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "Processing Image %d/%d" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Time left: ..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "Processing Image 1/%d." #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "Loading %s ..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "Saving %s ..." #: src/rs-batch.c:635 msgid "Could not export photo." msgstr "Could not export photo." #: src/rs-batch.c:695 msgid "Icon" msgstr "Icon" #: src/rs-batch.c:702 msgid "Filename" msgstr "Filename" #: src/rs-batch.c:709 msgid "Setting" msgstr "Setting" #: src/rs-batch.c:802 msgid "Start" msgstr "Start" #: src/rs-batch.c:805 msgid "Remove" msgstr "Remove" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Remove all" #: src/rs-batch.c:916 #: src/rs-batch.c:1091 msgid "Edit output settings" msgstr "Edit output settings" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Photo size" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "Constant scale" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Constant width" #: src/rs-batch.c:962 msgid "Constant height" msgstr "Constant height" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Maximum size" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Photo width:" #: src/rs-batch.c:978 #: src/rs-batch.c:987 msgid "pixels" msgstr "pixels" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "Photo height:" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "Photo scale:" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Constant width:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Constant height:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "Constant Scale:\n" "%d" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Maximum size:\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Output directory:" #: src/rs-batch.c:1100 msgid "Change" msgstr "Change" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "Export dimensions" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "Camera defaults editor" #: src/rs-camera-db.c:459 msgid "Model" msgstr "Model" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "Display Navigation" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "Light out mode not available" #: src/rs-preview-widget.c:887 msgid "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing." msgstr "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing." #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Size" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Grid" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "None" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "Golden sections" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "Rule of thirds" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Golden triangles #1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Golden triangles #2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Harmonious triangles #1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Harmonious triangles #2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Aspect" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "Freeform" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "Original Aspect" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "ISO paper (A4)" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "16:9 (HDTV)" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "Golden rectangle" #: src/rs-preview-widget.c:1180 #: src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Crop" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "Don't crop" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel crop" msgstr "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel crop" #: src/rs-preview-widget.c:1238 msgid "Straighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels." msgstr "Straighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels." #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 #: src/rs-toolbox.c:522 msgid "Export File" msgstr "Export File" #: src/rs-save-dialog.c:282 msgid "File not saved!" msgstr "File not saved!" #: src/rs-save-dialog.c:299 #, c-format msgid "Exporting to %s" msgstr "Exporting to %s" #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "Overwrite File?" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Keep aspect" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Width:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Height:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Percent:" #. All #: src/rs-store.c:298 #: src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "All photos (excluding deleted)" #. 1 #: src/rs-store.c:302 #: src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Priority 1 photos" #. 2 #: src/rs-store.c:306 #: src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Priority 2 photos" #. 3 #: src/rs-store.c:310 #: src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Priority 3 photos" #. Unsorted #: src/rs-store.c:314 #: src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Unprioritized photos" #. Deleted #: src/rs-store.c:318 #: src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Deleted photos" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Priorities" #: src/rs-store.c:500 msgid "NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable." msgstr "NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable." #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" "%s\n" "\n" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "Make: %s\n" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "Model: %s\n" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "Focal length: %dmm\n" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "Shutter speed: %.1fs\n" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "Shutter speed: 1/%.0fs\n" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "Aperture: F/%.01f\n" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "ISO: %u\n" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "Time: %s" #: src/rs-store.c:1371 msgid "* (-)" msgstr "* (-)" #: src/rs-store.c:1372 msgid "1 (-)" msgstr "1 (-)" #: src/rs-store.c:1373 msgid "2 (-)" msgstr "2 (-)" #: src/rs-store.c:1374 msgid "3 (-)" msgstr "3 (-)" #: src/rs-store.c:1375 msgid "U (-)" msgstr "U (-)" #: src/rs-store.c:1376 msgid "D (-)" msgstr "D (-)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "Tag search [%s]" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "Gphoto2 reported Context Error:\n" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "Enabling capture mode for Canon cameras.\n" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "Enabling capture mode for Nikon cameras.\n" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "Capture Enabled.\n" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "The port you specified ('%s') can not be found." #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "Moving file to current directory failed!\n" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "Downloading and adding image.\n" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "Could not open temporary file on disk for writing" #: src/rs-tethered-shooting.c:558 msgid "Could not open image!\n" msgstr "Could not open image!\n" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "Capturing.\n" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "File Downloaded Succesfully.\n" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "Camera monitor shutting down.\n" #: src/rs-tethered-shooting.c:651 #: src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "Waiting for next image.\n" #: src/rs-tethered-shooting.c:692 #: src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "Start Shooting" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "Interval shooting shutting down.\n" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "Disconnecting current camera\n" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "Camera %s on port %s failed to open\n" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "Shutting down asynchronous thread\n" #: src/rs-tethered-shooting.c:784 #: src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "Found %d cameras\n" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "No camera selected - Cannot connect!\n" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "Shutting down running thread to enable remote capture.\n" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "Shutting down already running thread.\n" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "Staring Monitor Thread.\n" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "Monitor Thread already running.\n" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "Shutting down interval capture thread.\n" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "No camera connected.\n" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "Staring Interval Shooting Thread.\n" #: src/rs-tethered-shooting.c:938 msgid "Stop Shooting" msgstr "Stop Shooting" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "Select camera:" #: src/rs-tethered-shooting.c:1003 msgid "Take Photo" msgstr "Take Photo" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "Monitor Camera" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "Disconnect Camera" #. Status window #: src/rs-tethered-shooting.c:1022 msgid "Status:" msgstr "Status:" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "Master Control" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "Tags for new images:" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 msgid "Filename & Tags" msgstr "Filename & Tags" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "Seconds between each shot:" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "Interval Shooting" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "Minimize this window after capture" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "Copy settings from active to new image" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "Open new images after capture" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "Rawstudio Tethered Shooting" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Histogram" #: src/rs-toolbox.c:443 msgid "Reset" msgstr "Reset" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr ". Click to reset value" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr ". Click to edit value" #: src/rs-toolbox.c:566 #: src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Open curve ..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "Select Saved Curve" #: src/rs-toolbox.c:700 msgid "Select Action" msgstr "Select Action" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Save curve as ..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Reset curve" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "Auto adjust curve ends" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "Edit lens" #. Pack everything nice #: src/rs-toolbox.c:800 msgid "Basic" msgstr "Basic" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "Channel Mixer" #: src/rs-toolbox.c:802 msgid "Lens Correction" msgstr "Lens Correction" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Flip the photo over the x-axis" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Mirror the photo over the y-axis" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Rotate the photo 90 degrees clockwise" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Rotate the photo 90 degrees counter clockwise" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Transforms" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "Lens Unknown" #: src/rs-toolbox.c:1035 msgid "Lens Disabled" msgstr "Lens Disabled" #: src/rs-toolbox.c:1043 msgid "No Lens Information" msgstr "No Lens Information" #: src/rs-toolbox.c:1045 msgid "Camera Unknown" msgstr "Camera Unknown" #: src/rs-toolbox.c:1050 msgid "No Photo" msgstr "No Photo" #: src/rs-toolbox.c:1259 msgid "_Previous" msgstr "_Previous" #: src/rs-toolbox.c:1260 msgid "_Next" msgstr "_Next" #~ msgid " %s added to batch queue" #~ msgstr " %s added to batch queue" #~ msgid "%s already added to batch queue" #~ msgstr "%s already added to batch queue" #~ msgid "Not in batch queue" #~ msgstr "Not in batch queue" #~ msgid "Processing photos" #~ msgstr "Processing photos" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "Load 8 bit photos (jpeg, png, etc)" #, fuzzy #~ msgid "Warmth" #~ msgstr "Warmth/tint" #, fuzzy #~ msgid "CA Red" #~ msgstr "Ready" #~ msgid "Select color profile" #~ msgstr "Select color profile" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Color profiles (icc and icm)" #~ msgid "Not a valid color profile." #~ msgstr "Not a valid color profile." #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgid "Enable color management (experimental)" #~ msgstr "Enable color management (experimental)" #~ msgid "Input profile" #~ msgstr "Input profile" #~ msgid "BuiltInRGBProfile" #~ msgstr "BuiltInRGBProfile" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Export profile" #~ msgid "Intent" #~ msgstr "Intent" #~ msgid "Perceptual" #~ msgstr "Perceptual" #~ msgid "Relative colormetric" #~ msgstr "Relative colormetric" #~ msgid "Absolute colormetric" #~ msgstr "Absolute colormetric" #~ msgid "Colors" #~ msgstr "Colors" #, fuzzy #~ msgid "Change this" #~ msgstr "Change" #~ msgid "Background renderer active" #~ msgstr "Background renderer active" #~ msgid "File export canceled" #~ msgstr "File export canceled" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "16-bit TIFF (Tagged Image File Format)" #~ msgid "Rotate the photo 180 degrees" #~ msgstr "Rotate the photo 180 degrees" #~ msgid "Reset this setting" #~ msgstr "Reset this setting" #~ msgid "_Zoom to 100%" #~ msgstr "_Zoom to 100%" #~ msgid "Canon CR2" #~ msgstr "Canon CR2" #~ msgid "Canon CIFF" #~ msgstr "Canon CIFF" #~ msgid "Nikon NEF" #~ msgstr "Nikon NEF" #~ msgid "Minolta raw" #~ msgstr "Minolta raw" #~ msgid "Canon TIFF" #~ msgstr "Canon TIFF" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Panasonic raw" #~ msgstr "Panasonic raw" #~ msgid "Pentax raw" #~ msgstr "Pentax raw" #~ msgid "Adobe Digital negative" #~ msgstr "Adobe Digital negative" #~ msgid "Hasselblad" #~ msgstr "Hasselblad" rawstudio-2.0/po/Makefile.in.in0000644000175000017500000002026511547430026013414 00000000000000# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = @SHELL@ @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datarootdir = @datarootdir@ datadir = @datadir@ libdir = @libdir@ localedir = $(libdir)/locale gnulocaledir = $(datadir)/locale gettextsrcdir = $(datadir)/glib-2.0/gettext/po subdir = po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ CC = @CC@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge DEFS = @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = POFILES = @POFILES@ GMOFILES = @GMOFILES@ DISTFILES = LINGUAS ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ INSTOBJEXT = @INSTOBJEXT@ .SUFFIXES: .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat .c.o: $(COMPILE) $< .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -o $@ $< .po.gmo: file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) $(MSGFMT_OPTS) -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && $(GENCAT) $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ --keyword=C_:1c,2 \ --keyword=NC_:1c,2 \ --keyword=g_dcgettext:2 \ --keyword=g_dngettext:2,3 \ --keyword=g_dpgettext2:2c,3 \ --flag=N_:1:pass-c-format \ --flag=C_:2:pass-c-format \ --flag=NC_:2:pass-c-format \ --flag=g_dngettext:2:pass-c-format \ --flag=g_strdup_printf:1:c-format \ --flag=g_string_printf:2:c-format \ --flag=g_string_append_printf:2:c-format \ --flag=g_error_new:3:c-format \ --flag=g_set_error:4:c-format \ --flag=g_markup_printf_escaped:1:c-format \ --flag=g_log:3:c-format \ --flag=g_print:1:c-format \ --flag=g_printerr:1:c-format \ --flag=g_printf:1:c-format \ --flag=g_fprintf:2:c-format \ --flag=g_sprintf:2:c-format \ --flag=g_snprintf:3:c-format \ --flag=g_scanner_error:2:c-format \ --flag=g_scanner_warn:2:c-format \ --files-from=$(srcdir)/POTFILES.in \ && test ! -f $(GETTEXT_PACKAGE).po \ || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \ && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot ) install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ fi @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ case "$$cat" in \ *.gmo) destdir=$(gnulocaledir);; \ *) destdir=$(localedir);; \ esac; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $$dir; \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ fi; \ if test -r $$cat; then \ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ else \ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ fi; \ if test -r $$cat.m; then \ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ if test -r $(srcdir)/$$cat.m ; then \ $(INSTALL_DATA) $(srcdir)/$$cat.m \ $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ true; \ fi; \ fi; \ done if test "$(PACKAGE)" = "glib"; then \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ fi; \ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ done if test "$(PACKAGE)" = "glib"; then \ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ fi check: all dvi info tags TAGS ID: mostlyclean: rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f $(GMOFILES) distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) dist distdir: $(DISTFILES) dists="$(DISTFILES)"; \ for file in $$dists; do \ ln $(srcdir)/$$file $(distdir) 2> /dev/null \ || cp -p $(srcdir)/$$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ cd $(srcdir); \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ echo "$$lang:"; \ if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$cat failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done # POTFILES is created from POTFILES.in by stripping comments, empty lines # and Intltool tags (enclosed in square brackets), and appending a full # relative path to them POTFILES: POTFILES.in ( if test 'x$(srcdir)' != 'x.'; then \ posrcprefix='$(top_srcdir)/'; \ else \ posrcprefix="../"; \ fi; \ rm -f $@-t $@ \ && (sed -e '/^#/d' \ -e "s/^\[.*\] +//" \ -e '/^[ ]*$$/d' \ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ | sed -e '$$s/\\$$//') > $@-t \ && chmod a-w $@-t \ && mv $@-t $@ ) Makefile: Makefile.in.in ../config.status POTFILES cd .. \ && $(SHELL) ./config.status $(subdir)/$@.in # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/po/sv.po0000644000175000017500000014602511546425272011743 00000000000000# English translation for Rawstudio. # Copyright (C) 2006-2008 Anders Brander and Anders Kvist # This file is distributed under the same license as the Rawstudio package. # # Simone Contini , 2008. msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-03-26 03:39+0100\n" "PO-Revision-Date: 2011-03-22 20:56+0100\n" "Last-Translator: MArtin \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: English\n" #: librawstudio/rs-lens-db-editor.c:325 msgid "All lenses" msgstr "Alla objektiv" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "Fel vid öppnande av lensfun-databas" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "Lensfun-databas uppdaterad" #: librawstudio/rs-lens-db-editor.c:565 msgid "Rawstudio Lens Library" msgstr "Rawstudio Objektivbibliotek" #: librawstudio/rs-lens-db-editor.c:590 msgid "Lens make" msgstr "Objektivmärke" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "Objektivmodell" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "Brännvidd" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "Bländare" #: librawstudio/rs-lens-db-editor.c:606 msgid "Camera make" msgstr "Kameramärke" #: librawstudio/rs-lens-db-editor.c:610 msgid "Camera model" msgstr "Kameramodell" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "Aktiverad" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "Uppdatera lensfun-databas" #: librawstudio/rs-lens-db-editor.c:734 msgid "Could not create temporary directory." msgstr "Kunde inte skapa temporärkatalog" #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "Kunde inte hämta fillista från %s." #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "Kunde inte hämta fil från %s eller skriva den till %s." #: librawstudio/rs-lens-db-editor.c:796 #, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Kunde inte skapa katalog för lensfun - %s" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "Fel vid kopiering av fil %s till %s\n" #: librawstudio/rs-lens-db-editor.c:939 msgid "Rawstudio Lens Editor" msgstr "Rawstudio objektiveditor" #: librawstudio/rs-lens-db-editor.c:950 msgid "Lens Make" msgstr "Objektivmärle" #: librawstudio/rs-lens-db-editor.c:954 msgid "Lens Model" msgstr "Objetivmodell" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "Brännvidd" #: librawstudio/rs-lens-db-editor.c:966 msgid "Camera Make" msgstr "Kameramärke" #: librawstudio/rs-lens-db-editor.c:970 msgid "Camera Model" msgstr "Kameramodell" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "Aktivera detta objetiv" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "Ställ in objektiv" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "Objektivbilbiotek" #: librawstudio/rs-library.c:254 #, c-format msgid "Could not open database %s" msgstr "Kunde inte öppna databas %s" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "vidvinkel" #: librawstudio/rs-library.c:816 msgid "telephoto" msgstr "Telefoto" #: librawstudio/rs-library.c:832 msgid "January" msgstr "Januari" #: librawstudio/rs-library.c:835 msgid "February" msgstr "Februari" #: librawstudio/rs-library.c:838 msgid "March" msgstr "Mars" #: librawstudio/rs-library.c:841 msgid "April" msgstr "April" #: librawstudio/rs-library.c:844 msgid "May" msgstr "Maj" #: librawstudio/rs-library.c:847 msgid "June" msgstr "Juni" #: librawstudio/rs-library.c:850 msgid "July" msgstr "Juli" #: librawstudio/rs-library.c:853 msgid "August" msgstr "Augusti" #: librawstudio/rs-library.c:856 msgid "September" msgstr "September" #: librawstudio/rs-library.c:859 msgid "October" msgstr "Oktober" #: librawstudio/rs-library.c:862 msgid "November" msgstr "November" #: librawstudio/rs-library.c:865 msgid "December" msgstr "December" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "Lägg till profil..." #: librawstudio/rs-profile-selector.c:242 msgid "Embedded Profile" msgstr "Medföljande profil" #: librawstudio/rs-profile-selector.c:244 msgid "(Select Profile)" msgstr "Välj färgprofil" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "Exponering" #: librawstudio/rs-settings.c:80 msgid "Exposure Compensation" msgstr "Exponeringskompensation" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 msgid "Satur" msgstr "Färgmättnad" #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "Mättnad" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "Färgmättnad" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "Tonskifte" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "Kontrast" #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "Konstrast" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temp" msgstr "Temp" #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "Temperatur" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "Nyans" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "Nyanskifte" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "WBAscii" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 msgid "Sharp" msgstr "Skärp" #: librawstudio/rs-settings.c:133 msgid "Sharpen Amount" msgstr "Skärpemängd" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "Brusreducering" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "Luminansbrus-reducering" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "FärgBR" #: librawstudio/rs-settings.c:145 msgid "Colour Denoising" msgstr "Färgbrus-reducering" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "CA R" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "Korrigering för röd kromatisk aberration" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "CA B" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "Korrigering för blå kromatisk aberration" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "Vignettering" #: librawstudio/rs-settings.c:163 msgid "Vignetting Correction" msgstr "Vignetteringskorrektion" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 msgid "Red" msgstr "Röd" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "Korrigering av rött" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "Grön" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "Korrigering av grönt" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "Blå" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "Korrigering av blått" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "Skrivarvänlig färgrymd, kompatibel med Adobe RGB (1998)" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "Färgrymd med stort tonomfång" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 msgid "JPEG Quality" msgstr "JPEG-kvalitet" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "Bildtext" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "Ladda upp foto till Facebook" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "Steg 1:" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "Steg 2:" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "Verifiera Rawstudio" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "Ohanterat fel från Facebook" #: plugins/output-facebook/output-facebook.c:329 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" "Rawstudio behöver verifieras innan det kan ladda upp foton till Ditt " "Facebook-konto." #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "Album" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "Skapa album" #: plugins/output-flickr/output-flickr.c:113 msgid "Title" msgstr "Titel" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "Beskrivning" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "Taggar" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "Publik (alla kan se detta)" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "Synligt för vänner." #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "Synligt för familjen." #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "Ladda upp foto till Flickr" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "Ett fel uppstod vid verifiering. Vänligen försök igen." #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" "Rawstudio kunde inte ladda upp fotot eftersom verifieringen blivit " "återkallad. Vänligen verifiera Rawstudio igen för att ladda upp till Flickr." #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" "Det verkar som om Rawstudio förlorade sin verifiering. För att ladda upp " "till Ditt konto, vänligen verifiera Rawstudion igen." #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" "%s\n" "\n" "OBS! Detta fel fångades inte av Rawstudio. Vänligen låt oss veta att Du " "hittade det och hur man kan återskapa det så att vi kan skapa ett mer " "användbart felmeddelande. Tack!" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "Flickr-fel" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" "Rawstudio behöver verifieras innan det kan ladda upp foton till Ditt Flickr-" "konto." #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 #, fuzzy msgid "Full export path" msgstr "Fil exporterad" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 msgid "Copy EXIF metadata" msgstr "Kopiera EXIF-metadata" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "Behåll EXIF-metadata" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "Ladda upp foto till Picasa" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "Ohanterat fel från Picasa" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "Nuvarande användare:" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "(Loggade in med framgång)" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "(Kan inte logga in)" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "(Användare ej specificerad)" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "Växla användare" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "Kan inte logga in" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "Försök igen?" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "Ett fel uppstod under kommunikation med Picasas webbservice" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "Vill du försöka utföra operationen igen?" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "Verifiering för Picasa-webbalbum" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "Vänligen skriv in Ditt användarnamn och lösenord för Picasa-webbalbum" #: plugins/output-picasa/rs-picasa-client.c:234 msgid "Username: " msgstr "Användarnamn:" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "Lösenord:" #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "Spara 16-bitars linjär PNG" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "Kopiera EXIF-metadata till XMP" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Spara i okomprimerad TIFF" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "Spara 16-bitars TIFF" #: plugins/output-tifffile/output-tifffile.c:108 msgid "TIFF (Tagged Image File Format)" msgstr "TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Ursprungligt filnamn" #: src/filename.c:315 #, c-format msgid "%p - Path of original file" msgstr "%p - Filens ursprungliga sökväg" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - Ökande räknare" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s - Inställning (A, B eller C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "%d - Datum från EXIF (YYYY-MM_DD)" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "%DY - Årtal från EXIF (YYYY)" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "%Dy - Årtal från EXIF (YY)" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "%Dm - Månad från EXIF (MM)" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "%DM - Månad från EXIF (text)" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "%Dd - Datum från EXIF (DD)" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "%DD - Veckodag från EXIF" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "%t - Tidpunkt från EXIF (HH:MM:SS)" #: src/gtk-interface.c:154 msgid "Width" msgstr "Bredd" #: src/gtk-interface.c:154 msgid "Height" msgstr "Höjd" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Öppnar foto ..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "Kunde inte öppna foto" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Bild öppnad" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "Bildprioritet ändrad (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "Bildprioritet ändrad (D)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "Bildprioritet ändrad (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "Kan inte hitta skärm för fullskärmsförhandsgranskning." #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "Tryck F10 för att återställa förhandsgranskning till detta fönster." #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "" "Kan inte hitta mer än en skärm. Kan inte visa fullskärmsförhandsgranskning." #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "Välj skärm för att öppna fullskärmsförhandsgranskning" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "Välj skärm för fullskärmsförhandsgranskning" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "Tryck OK för att välja denna skärm för fullskärmsförhandsgranskning" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Katalog:" #: src/gtk-interface.c:777 src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Välj destinationskatalog" #: src/gtk-interface.c:793 src/rs-batch.c:1075 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Filnamnsmall:" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Filnamnsexampel:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Filtyp:" #. Add preferences box #: src/gtk-interface.c:879 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Egenskaper" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Förhandsgranska bakgrundsfärger:" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Histogramhöjd:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Använd systemtema" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Mellanlagra i hemkatalogen" #: src/gtk-interface.c:926 msgid "Display Colorspace:" msgstr "Visa färgprofil" #: src/gtk-interface.c:938 msgid "Exposure Mask Colorspace:" msgstr "Exponeringsmaskens färgrymd" #: src/gtk-interface.c:1011 msgid "General" msgstr "Allmän" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "Snabb-export" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "Öppnar katalog..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Öppna rekursivt" #: src/gtk-interface.c:1465 msgid "Directory" msgstr "Katalog" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "Sök taggar" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Verktyg" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Processering" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Öppna" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Färdig" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "Framgång" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Öppna katalog" #: src/rs-actions.c:253 src/rs-batch.c:542 msgid "Could not create output directory." msgstr "Kunde inte skapa utdata-katalog." #: src/rs-actions.c:257 msgid "Exporting..." msgstr "Exporterar..." #: src/rs-actions.c:265 msgid "File exported" msgstr "Fil exporterad" #: src/rs-actions.c:270 src/rs-actions.c:293 msgid "Export failed" msgstr "Export misslyckades" #: src/rs-actions.c:300 msgid "Exporting to GIMP..." msgstr "Exporterar till GIMP..." #: src/rs-actions.c:305 msgid "Error exporting" msgstr "Misslyckad export" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "Misslyckades exportera foto till gimp." #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "Raderar foton" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "Dina filer kommer raderas permanent!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Radera foton" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "Väntar på att uppgifter slutförs" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "Kopierar bild till minne" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "Bild kopierad till minne" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "FEL: Kunde inte kopiera bild till minne" #. Build GUI #: src/rs-actions.c:463 msgid "Profile" msgstr "Profil" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Exponering" #: src/rs-actions.c:468 msgid "White balance" msgstr "Vitbalans" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Mer skärpa" #: src/rs-actions.c:470 msgid "Denoise" msgstr "Brus-reducera" #: src/rs-actions.c:471 msgid "Color denoise" msgstr "Färgbrus-reducering" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "Kanalmixer" #: src/rs-actions.c:473 msgid "TCA" msgstr "" #: src/rs-actions.c:474 msgid "Vignetting" msgstr "Vignettering" #: src/rs-actions.c:475 src/rs-toolbox.c:803 msgid "Curve" msgstr "Kurva" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "Välj alla/ingen" #: src/rs-actions.c:498 msgid "Select settings to copy" msgstr "Välj inställning att kopiera" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Inställningar kopierade" #: src/rs-actions.c:587 msgid "Pasting settings to images" msgstr "Klistrar in inställningar till bilder" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Inklistrad inställning" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Inget att klistra in" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Buffert tom" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Justerar till automatisk vitbalans" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "No white balance to set from" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Justerar till kamerans vitbalans" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "Taggar, åtskilja av blanksteg:" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "Lägg till taggar till valda foto(n)" #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "Visar exponeringsmask" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "Döljer exponeringsmask" #: src/rs-actions.c:1067 msgid "Adding images to batch queue" msgstr "Lägg till bilder i processeringskö" #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "%d foton tillagda i processeringskön" #: src/rs-actions.c:1101 src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Välj vilken inställning som\n" "ska gälla för processeringkön" #: src/rs-actions.c:1188 msgid "Removing images from batch queue" msgstr "Tar bort bilder från processeringkö" #: src/rs-actions.c:1203 #, c-format msgid "%d photos removed from batch queue" msgstr "%d foton borttagna från processeringskön" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "Lägg till profil..." #: src/rs-actions.c:1266 msgid "All Profiles" msgstr "Alla profiler" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "Kameraprofiler (DCP)" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "Färgprofiler (ICC och ICM)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Alla filer" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "En råfilskonvertering för GTK+/GNOME" #: src/rs-actions.c:1412 msgid "_File" msgstr "_Fil" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "_Redigera" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "_Foto" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "_Sätt prioritet" #: src/rs-actions.c:1416 msgid "_White Balance" msgstr "Vit_balans" #: src/rs-actions.c:1417 msgid "_View" msgstr "_Visa" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "_Sortera på" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "_Processeringskö" #: src/rs-actions.c:1420 msgid "_Help" msgstr "_Hjälp" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "" #. File menu #: src/rs-actions.c:1425 msgid "_Open Directory" msgstr "_Öppna katalog" #: src/rs-actions.c:1426 msgid "_Quick Export" msgstr "_Snabbexportering" #: src/rs-actions.c:1427 msgid "_Export As" msgstr "_Exportera som" #: src/rs-actions.c:1428 msgid "_Export to Gimp" msgstr "_Exportera till Gimp" #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "_Kopiera bild till minne" #: src/rs-actions.c:1430 msgid "_Reload directory" msgstr "_Läs om katalog" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "_Radera markerade foton" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "_Avsluta" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "_Återställ inställningar" #: src/rs-actions.c:1436 msgid "_Copy settings" msgstr "_Kopiera inställningar" #: src/rs-actions.c:1437 msgid "_Paste settings" msgstr "_Klistra in inställningar" #: src/rs-actions.c:1438 msgid "_Reset settings" msgstr "_Nollställ inställningar" #: src/rs-actions.c:1439 msgid "_Save camera default settings" msgstr "_Spara kamerans standardinställningar" #: src/rs-actions.c:1440 msgid "_Preferences" msgstr "_Egenskaper" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "_Märk foto för radering" #: src/rs-actions.c:1444 msgid "_1" msgstr "_1" #: src/rs-actions.c:1445 msgid "_2" msgstr "_2" #: src/rs-actions.c:1446 msgid "_3" msgstr "_3" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "_Ta bort prioritet" #: src/rs-actions.c:1448 msgid "_Auto" msgstr "_Autojustera" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "_Kamera" #: src/rs-actions.c:1450 msgid "_Crop" msgstr "_Beskär" #: src/rs-actions.c:1451 msgid "_Uncrop" msgstr "_Beskär inte" #: src/rs-actions.c:1452 msgid "_Straighten" msgstr "_Rätta upp" #: src/rs-actions.c:1453 msgid "_Unstraighten" msgstr "_Rätta inte upp" #: src/rs-actions.c:1454 msgid "_Group" msgstr "_Gruppera" #: src/rs-actions.c:1455 msgid "_Ungroup" msgstr "_Gruppera inte" #: src/rs-actions.c:1456 msgid "_Auto group" msgstr "_Gruppera automatiskt" #: src/rs-actions.c:1457 msgid "_Tag Photo..." msgstr "_Tagga foto" #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "Rotera medurs" #: src/rs-actions.c:1459 msgid "Rotate Counter Clockwise" msgstr "Rotera moturs" #: src/rs-actions.c:1460 msgid "Flip" msgstr "Flippa" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "Spegelvänd" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "_Föregående foto" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "_Efterföljande foto" #: src/rs-actions.c:1466 msgid "_Lens Library" msgstr "_Objektivbibliotek" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "" #. Batch menu #: src/rs-actions.c:1470 msgid "_Add to batch queue" msgstr "_Lägg i processeringskö" #: src/rs-actions.c:1471 msgid "_Add view to queue..." msgstr "_Lägg till vy till kö..." #: src/rs-actions.c:1472 msgid "_Remove from batch queue" msgstr "_Ta bort från processeringskö" #: src/rs-actions.c:1473 msgid "_Start" msgstr "_Starta" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "" #: src/rs-actions.c:1477 msgid "_About" msgstr "_Om" #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "_Anpassad zoom" #: src/rs-actions.c:1487 msgid "_Iconbox" msgstr "_Ikonlåda" #: src/rs-actions.c:1488 msgid "_Toolbox" msgstr "_Verktygslåda" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "_Fullskärm" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "_Visa foto på sekundärskärm" #: src/rs-actions.c:1491 msgid "Show Filenames in Iconbox" msgstr "Visa filnamn i ikonvy" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "Läs in icke-RAW-filer" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "Läs inte in valda bilder" #: src/rs-actions.c:1494 msgid "_Exposure mask" msgstr "_Exponeringsmask" #: src/rs-actions.c:1495 msgid "_Split" msgstr "_Dela" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "" #: src/rs-actions.c:1503 msgid "Name" msgstr "Namn" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "Tidsstämpel" #: src/rs-actions.c:1505 msgid "ISO" msgstr "ISO" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "Brännvidd" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "Slutarhastighet" #. Snapshot labels #: src/rs-actions.c:1513 src/rs-toolbox.c:207 src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1514 src/rs-toolbox.c:208 src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1515 src/rs-toolbox.c:209 src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Avbryt" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Sista bild:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Återstående tid: %dh %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "Behandlar bild %d/%d" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Återstående tidt: ..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "Behandlar bild 1/%d." #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "Läser %s ..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "Sparar %s ..." #: src/rs-batch.c:635 msgid "Could not export photo." msgstr "Kunde inte exportera foto" #: src/rs-batch.c:695 msgid "Icon" msgstr "Ikon" #: src/rs-batch.c:702 msgid "Filename" msgstr "Filnamn" #: src/rs-batch.c:709 msgid "Setting" msgstr "Inställning" #: src/rs-batch.c:802 msgid "Start" msgstr "Starta" #: src/rs-batch.c:805 msgid "Remove" msgstr "Radera" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Radera alla" #: src/rs-batch.c:916 src/rs-batch.c:1091 msgid "Edit output settings" msgstr "Ändra utskriftsinställningar" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Fotostorlek" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "Konstant skalning" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Konstant bredd" #: src/rs-batch.c:962 msgid "Constant height" msgstr "Konstant höjd" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Maximal storlek" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Fotobredd:" #: src/rs-batch.c:978 src/rs-batch.c:987 msgid "pixels" msgstr "pixels" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "Fotohöjd:" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "Fotoskala:" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Konstant bredd:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Konstant höjd:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "Konstant skala:\n" "%d" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Maximal storlek:\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Destinationskatalog:" #: src/rs-batch.c:1100 msgid "Change" msgstr "Ändra" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "Exportera dimensioner" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "Editor för kamerans standardinställningar" #: src/rs-camera-db.c:459 msgid "Model" msgstr "Modell" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "Visa navigering" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "" #: src/rs-preview-widget.c:887 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Storlek" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Rutnät" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Ingen" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "Gyllene snittet" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "Tredjedels-regeln" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Gyllene trianglar #1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Gyllene trianglar #2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Harmoniska trianglar #1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Harmoniska trianglar #2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Förhållande" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "Friform" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "Ursprungligt sidoförhållande" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "ISO-papper (A4)" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "16:9 (HDTV)" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "Gyllene retangel" #: src/rs-preview-widget.c:1180 src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Beskär" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "Beskär inte" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" "Beskär: Dra för att välja område. Höger musknapp inom valt område beskär " "bilden. Utanför valt område avbryter." #: src/rs-preview-widget.c:1238 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" "Räta upp: Dra en linje som skall vara horisontell eller vertikal. Höger " "musknapp avbryter." #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:522 msgid "Export File" msgstr "Exportera Fil" #: src/rs-save-dialog.c:282 msgid "File not saved!" msgstr "Fil ej sparad!" #: src/rs-save-dialog.c:299 #, c-format msgid "Exporting to %s" msgstr "Exporterar till %s" #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" "Kunde inte spara fil %s\n" "\n" "Kontrollera att du har skrivrättigheter i denna katalog." #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "Skriv över fil?" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" "Filen '%s' existerar redan.\n" "\n" "Vill du skriva över den?" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Behåll höjd-breddförhållandet" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Bredd:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Höjd:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Procent:" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Alla foton (förutom raderade)" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Prioritet 1 foton" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Prioritet 2 foton" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Prioritet 3 foton" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Oprioriterade foton" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Raderade foton" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Prioriteter" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "Märke: %s\n" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "Modell: %s\n" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "Brännvidd: %dmm\n" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "Slutarhastighet: %.1fs\n" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "Slutarhastighet: 1/%.0fs\n" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "Bländare: F/%.01f\n" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "ISO: %u\n" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "Tid: %s" #: src/rs-store.c:1371 msgid "* (-)" msgstr "* (-)" #: src/rs-store.c:1372 msgid "1 (-)" msgstr "1 (-)" #: src/rs-store.c:1373 msgid "2 (-)" msgstr "2 (-)" #: src/rs-store.c:1374 msgid "3 (-)" msgstr "3 (-)" #: src/rs-store.c:1375 msgid "U (-)" msgstr "U (-)" #: src/rs-store.c:1376 msgid "D (-)" msgstr "D (-)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "Tagg-sökning [%s]" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "Porten Du specificerade ('%s') kunde inte hittas." #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "Flyttning av fil till nuvarande katalog misslyckades!\n" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "Laddar ner och lägger till bild.\n" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "Kunde inte öppna temporär katalog för skrivning." #: src/rs-tethered-shooting.c:558 msgid "Could not open image!\n" msgstr "Kunde inte öppna bild!\n" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "Fångar.\n" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "Väntar på nästa bild.\n" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "Börja fotografera" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "Kopplar från nuvarande kamera\n" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "Hittade %d kameror\n" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "Ingen kamera vald - kan ej ansluta!\n" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "Ingen kamera ansluten.\n" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:938 msgid "Stop Shooting" msgstr "Sluta fotografera" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "Välj kamera:" #: src/rs-tethered-shooting.c:1003 msgid "Take Photo" msgstr "Ta foto" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "Övervaka kamera" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "Koppla ifrån kamera" #. Status window #: src/rs-tethered-shooting.c:1022 msgid "Status:" msgstr "Status:" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "Huvudkontroll" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "Taggar för nya bilder:" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 msgid "Filename & Tags" msgstr "Filnamn & Taggar" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "Antal sekunder mellan bilder:" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "Intervallfotografering" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "Förminska detta fönster efter exponering" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "Kopiera inställningar från aktiv till ny bild" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "Öppna nya bilder efter fotografering" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Histogram" #: src/rs-toolbox.c:443 msgid "Reset" msgstr "Återställ" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr ". Klicka för att återställa värde" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr ". Klicka för att ändra värde" #: src/rs-toolbox.c:566 src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Öppna kurva ..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "Väölj sparad kurva" #: src/rs-toolbox.c:700 msgid "Select Action" msgstr "Välj aktivitet" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Spara kurva som ..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Återställ kurva" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "Autojustera kurvändpunkter" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "Redigera objektiv" #. Pack everything nice #: src/rs-toolbox.c:800 msgid "Basic" msgstr "Basal" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "Kanalmixer" #: src/rs-toolbox.c:802 msgid "Lens Correction" msgstr "Objektivkorrektion" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Vänd fotot lodrätt" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Vänd fotot vågrätt" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Rotera fotot 90 grader medsols" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Rotera fotot 90 grader motsols" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Transformera" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "Objektiv okänt" #: src/rs-toolbox.c:1035 msgid "Lens Disabled" msgstr "Objektiv ej aktiverat" #: src/rs-toolbox.c:1043 msgid "No Lens Information" msgstr "Ingen objektivinformation" #: src/rs-toolbox.c:1045 msgid "Camera Unknown" msgstr "Kamera okänd" #: src/rs-toolbox.c:1050 msgid "No Photo" msgstr "Ingen bild" #: src/rs-toolbox.c:1259 msgid "_Previous" msgstr "_Föregående" #: src/rs-toolbox.c:1260 msgid "_Next" msgstr "_Efterföljande" #~ msgid " %s added to batch queue" #~ msgstr " %s lägger till processeringskön" #~ msgid "%s already added to batch queue" #~ msgstr "%s redan tillagd i processeringskön" #~ msgid "Not in batch queue" #~ msgstr "Inte i satsprocesseringskön" #~ msgid "Processing photos" #~ msgstr "Bearbetar foton" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "Ladda 8 bitars foto (jpeg, png, etc)" #, fuzzy #~ msgid "Warmth" #~ msgstr "Värme/nyans" #, fuzzy #~ msgid "CA Red" #~ msgstr "Färdig" #~ msgid "Select color profile" #~ msgstr "Välj färgprofil" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Färgprofil (icc och icm)" #~ msgid "Not a valid color profile." #~ msgstr "Inte en giltig färgprofil." #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "" #~ "Filen du valde verkar inte vara en giltig färgprofilför denna version av " #~ "Rawstudio." #~ msgid "Enable color management (experimental)" #~ msgstr "Aktivera färghantering (exprementell)" #~ msgid "Input profile" #~ msgstr "Indata profil" #~ msgid "BuiltInRGBProfile" #~ msgstr "Inbyggd RGB-profilBuiltInRGBProfile" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Exportprofil" #~ msgid "Intent" #~ msgstr "Avsikt" #~ msgid "Perceptual" #~ msgstr "Uppfattning" #~ msgid "Relative colormetric" #~ msgstr "Relativ färgmetrisk" #~ msgid "Absolute colormetric" #~ msgstr "Absolut färgmetrisk" #~ msgid "Colors" #~ msgstr "Färger" #, fuzzy #~ msgid "Change this" #~ msgstr "Ändra" #~ msgid "Background renderer active" #~ msgstr "Bakgrundsrendering pågår" #~ msgid "File export canceled" #~ msgstr "Filexport avbruten" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "16-bit TIFF (Tagged Image File Format)" #~ msgid "Rotate the photo 180 degrees" #~ msgstr "Rotera fotot 180 grader" #~ msgid "Reset this setting" #~ msgstr "Återställ inställning" #~ msgid "_Zoom to 100%" #~ msgstr "_Zooma till 100%" #~ msgid "Canon CR2" #~ msgstr "Canon CR2" #~ msgid "Canon CIFF" #~ msgstr "Canon CIFF" #~ msgid "Nikon NEF" #~ msgstr "Nikon NEF" #~ msgid "Minolta raw" #~ msgstr "Minolta raw" #~ msgid "Canon TIFF" #~ msgstr "Canon TIFF" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Panasonic raw" #~ msgstr "Panasonic raw" #~ msgid "Pentax raw" #~ msgstr "Pentax raw" #~ msgid "Adobe Digital negative" #~ msgstr "Adobe Digital negative" #~ msgid "Hasselblad" #~ msgstr "Hasselblad" rawstudio-2.0/po/nl.gmo0000644000175000017500000001642611546436027012071 00000000000000       ( . E [ ] s |         ! / 9 ; A C J S c w }      ;CH PZlp u'    +@Rr {     % -3 al~    *.1`cfip   '3CS Zg w   % 4AzH')? HTei % "+DY_u    "4=D LVh mw' ( 9GV v"       2,D q}   (> S]5f %7LUo       +Ha w    Z'zcN5j^t|l! )sO*S@e< 0axXUH`m>RC.E B=y$&?%Q_iqhAd;629GK:~bIr,3pfW8 "/vL1wY(#P]4-MJk F DVT+}\[7gnuo{ A B C %%.1fs %2c - Incremental counter%dmm %f - Original filename* (%d)-1 (%d)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)AAdjusting to auto white balanceAdjusting to camera white balanceAll filesBBatchCCancelContrastCopied settingsCouldn't open photoCurveD (%d)Delete photosDeleted photosDeleting photosDirectory:Export FileExposureF/%.1f File exportedFile type:FilenameFilename example:Flip the photo over the x-axisGeneralGridHeight:HistogramHistogram height:HueIconImage openedJPEG (Joint Photographic Experts Group)Keep aspectLast image:Loading %s ...Mirror the photo over the y-axisNoneNothing to pasteOpenOpen curve ...Open recursiveOpening directory...Opening photo ...PNG (Portable Network Graphics)Percent:Photo sizePlace cache in home directoryPreferencesPreview background color:PrioritiesProgressQuick exportRawstudioReadyRemoveRemove allRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseSaturationSave curve as ...Save uncompressed TIFFSaving %s ...SettingSharpenSizeStartTime left: %dh %dm %dsTime left: ...ToolsTransformsU (%d)Use system themeWhite balanceWidth:Your files will be permanently deleted!_1_2_3_About_Add to batch queue_Auto_Batch_Camera_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Next Photo_Open Directory_Paste settings_Photo_Preferences_Previous photo_Quick Export_Quit_Reload directory_Remove priority_Reset settings_Revert settings_Set Priority_Split_Start_Straighten_Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelsProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-03-26 03:39+0100 PO-Revision-Date: 2008-05-05 00:22+0100 Last-Translator: O. Lavell Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit A B C %%.1fs %2c - Oplopende teller%dmm %f - Originele bestandsnaam* (%d)-1 (%d)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)AAanpassen naar automatische witbalansAanpassen naar camera witbalansAlle bestandenBBatchCAnnulerenContrastGekopieerde instellingenKan foto niet openenCurveD (%d)Foto's verwijderenVerwijderde foto'sFoto's verwijderenMap:Bestand exporterenBelichtingF/%.1f Bestand geëxporteerdBestandstype:BestandsnaamBestandsnaam voorbeeld:Spiegelen om X-asAlgemeenRasterHoogte:HistogramHoogte histogram:TintPictogramAfbeelding geopendJPEG (Joint Photographic Experts Group)Verhoudingen behoudenLaatste afbeelding:Laden %s ...Spiegelen om Y-asGeenNiets te plakkenOpenenCurve openen...Recursief openenMap openen...Foto openen...PNG (Portable Network Graphics)Percentage:AfbeeldingsgrootteCache in persoonlijke map plaatsenVoorkeurenVoorbeeld achtergrondkleur:PrioriteitenVoortgangSnelle exportRawstudioKlaarVerwijderenAlles verwijderen90 graden roteren270 graden roteren (90 graden tegen de klok)VerzadigingCurve bewaren als...Ongecomprimeerde TIFF opslaanBewaren %s ...InstellingVerscherpenGrootteStartTijd over: %dh %dm %dsTijd over: ...GereedschappenTransformatiesU (%d)Gebruik systeemthemaWitbalansBreedte:Bestanden zullen definitief verwijderd worden!_1_2_3_Info..._Toevoegen aan batch-rij_Auto_Batch_CameraInstellingen _kopiëren_Snijden_Verwijder gemarkeerde foto'sBe_werken_Exporteer als..._Exporteer naar Gimp_Bestand_Markeer voor verwijderen_Volledig scherm_Groeperen_Help_MiniaturenV_olgende fotoMap _openenInstellingen _plakken_Foto_Voorkeuren_Vorige foto_Vlugge export_AfsluitenMap _herladen_Verwijder prioriteitInstellingen _ongedaan makenInstellingen _herstellen_Prioriteit instellen_Splitsen_Start_Rechtzetten_GereedschappenSnijden ongedaan makenGroeperen ongedaan makenRechtzetten ongedaan maken_Weergave_Witbalans_Inpassenpixelsrawstudio-2.0/po/fi.po0000644000175000017500000014444211546425272011712 00000000000000# Rawstudio Finnish translation # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-03-26 19:45+0100\n" "PO-Revision-Date: 2011-03-28 17:54+0200\n" "Last-Translator: Tuomas Haarala\n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Finnish\n" "X-Poedit-Country: FINLAND\n" #: librawstudio/rs-lens-db-editor.c:325 msgid "All lenses" msgstr "Kaikki linssit" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "Virhe päivitettäessä linssitietokantaa" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "Linssitietokanta päivitetty" #: librawstudio/rs-lens-db-editor.c:565 msgid "Rawstudio Lens Library" msgstr "Rawstudio linssikirjasto" #: librawstudio/rs-lens-db-editor.c:590 msgid "Lens make" msgstr "Linssin valmistaja" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "Linssin malli" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "Polttoväli" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "Aukko" #: librawstudio/rs-lens-db-editor.c:606 msgid "Camera make" msgstr "Kameran valmistaja" #: librawstudio/rs-lens-db-editor.c:610 msgid "Camera model" msgstr "Kameran malli" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "Käytössä" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "Päivitä lensfun tietokanta" #: librawstudio/rs-lens-db-editor.c:734 msgid "Could not create temporary directory." msgstr "Väliaikaishakemiston luominen epäonnistui." #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "Tiedostoluettelon haku epäonnistui sijainnista %s." #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "Tiedoston haku lähteestä %s tai kirjoitus kohteeseen %s epäonnistui." #: librawstudio/rs-lens-db-editor.c:796 #, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Lensfun-datahakemiston luonti epäonnistui - %s" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "Virhe kopioitaessa tiedostoa %s sijaintiin %s\n" #: librawstudio/rs-lens-db-editor.c:939 msgid "Rawstudio Lens Editor" msgstr "Rawstudio linssieditori" #: librawstudio/rs-lens-db-editor.c:950 msgid "Lens Make" msgstr "Linssin valmistaja" #: librawstudio/rs-lens-db-editor.c:954 msgid "Lens Model" msgstr "Linssin malli" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "Polttoväli" #: librawstudio/rs-lens-db-editor.c:966 msgid "Camera Make" msgstr "Kameran valmistaja" #: librawstudio/rs-lens-db-editor.c:970 msgid "Camera Model" msgstr "Kameran malli" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "Käytä tätä linssiä" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "Aseta linssi" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "Linssikirjasto" #: librawstudio/rs-library.c:254 #, c-format msgid "Could not open database %s" msgstr "Virhe avattaessa tietokantaa %s" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "laajakulma" #: librawstudio/rs-library.c:816 msgid "telephoto" msgstr "teleobjektiivi" #: librawstudio/rs-library.c:832 msgid "January" msgstr "Tammikuu" #: librawstudio/rs-library.c:835 msgid "February" msgstr "Helmikuu" #: librawstudio/rs-library.c:838 msgid "March" msgstr "Maaliskuu" #: librawstudio/rs-library.c:841 msgid "April" msgstr "Huhtikuu" #: librawstudio/rs-library.c:844 msgid "May" msgstr "Toukokuu" #: librawstudio/rs-library.c:847 msgid "June" msgstr "Kesäkuu" #: librawstudio/rs-library.c:850 msgid "July" msgstr "Heinäkuu" #: librawstudio/rs-library.c:853 msgid "August" msgstr "Elokuu" #: librawstudio/rs-library.c:856 msgid "September" msgstr "Syyskuu" #: librawstudio/rs-library.c:859 msgid "October" msgstr "Lokakuu" #: librawstudio/rs-library.c:862 msgid "November" msgstr "Marraskuu" #: librawstudio/rs-library.c:865 msgid "December" msgstr "Joulukuu" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "Lisää profiili" #: librawstudio/rs-profile-selector.c:242 msgid "Embedded Profile" msgstr "Liitetty profiili" #: librawstudio/rs-profile-selector.c:244 msgid "(Select Profile)" msgstr "(Valitse profiili)" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "Valo" #: librawstudio/rs-settings.c:80 msgid "Exposure Compensation" msgstr "ValKo" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 msgid "Satur" msgstr "Väri" #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "Värikylläisyys" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "Sävy" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "Sävymuutos" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "Kont" #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "Kontrasti" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temp" msgstr "Lämp" #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "Värilämpötila" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "Väri" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "Värimuutos" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "WBAscii" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 msgid "Sharp" msgstr "Terä" #: librawstudio/rs-settings.c:133 msgid "Sharpen Amount" msgstr "Terävöitys" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "Kohi" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "Valoisuuskohinan poisto" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "Vkoh" #: librawstudio/rs-settings.c:145 msgid "Colour Denoising" msgstr "Värikohinan poisto" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "CA R" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "Punaisen väriaberraation korjaus" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "CA B" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "Sinisen väriaberraation korjaus" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "Vinj" #: librawstudio/rs-settings.c:163 msgid "Vignetting Correction" msgstr "Vinjetoinnin korjaus" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 msgid "Red" msgstr "Pun" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "Punaisuuden säätö" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "Vih" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "Vihreyden säätö" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "Sin" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "Sinisyyden säätö" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "Tulostusystävällinen väriavaruus, yhteensopiva Adobe RGB (1998)" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "Laaja värijakauma" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 msgid "JPEG Quality" msgstr "JPEG laatu" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "Otsikko" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "Lähetä kuva Facebookiin" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "Vaihe 1:" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "Vaihe 2:" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "Autentikoi Rawstudio" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "Kummastuttava virhe Facebookista" #: plugins/output-facebook/output-facebook.c:329 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" "Rawstudion täytyy autentikoitua pystyäkseen lähettämään kuviaFacebook-" "tilillesi." #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "Albumit" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "Luo albumi" #: plugins/output-flickr/output-flickr.c:113 msgid "Title" msgstr "Otsikko" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "Kuvaus" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "Merkki" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "Julkinen (kuka tahansa voi nähdä tämän)" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "Näkyy Ystäville" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "Näkyy Perheele" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "Lähetä kuva Flickr-palveluun" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "Ongelma autentikoitumisessa. Ole hyvä ja yritä uudelleen." #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" "Kuvan lähetys epäonnistui, koska autentikaatio on mitätöity. Ole hyvä ja " "autentikoi Rawstudio uudelleen lähettääksesi Flickr-palveluun." #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" "Hupsista - Rawstudio taisi kadottaa autentikaation lähettääksesi tilillesi, " "ole hyvä ja autentikoidu uudelleen." #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" "%s\n" "\n" "Huom: Tämän virheen käsittelyyn ei ole valmistauduttu. Ole ystävällinen " "ja kerro meille miten onnistuit tuottamaan tämän virheen, jotta voimme " "tehdähyödyllisemmän virheilmoituksen tämän tilalle. Kiitos!" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "Flickr-virhe" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" "Rawstudion täytyy autentikoitua pystyäkseen lähettämään kuviaFlickr-" "tilillesi." #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 msgid "Full export path" msgstr "Tiedosto viety" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "Tallennettaessa käytettävä väriavaruus" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 msgid "Copy EXIF metadata" msgstr "Kopioi EXIF kuvailutieto" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "Säilytä EXIF kuvailutieto" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "Lähetä kuva Picasaan" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "Käsittelemätön virhe Picasasta" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "Tämänhetkinen käyttäjä: " #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr " (onnistui sisäänkirjautumisessa)" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr " (Kirjautuminen ei onnistu)" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "(Ei käyttäjää)" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "Vaihda käyttäjä" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "Kirjautuminen ei onnistu" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "Yritä uudelleen?" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "Virhe kommunikoitaessa Picasa verkkopalvelun kanssa:" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "Haluatko yrittää toimintoa uudelleen?" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "Picasa Web Album tunnistautuminen" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "Syötä käyttäjätunnuksesi ja salasanasi Picasa Web Albums -palveluun." #: plugins/output-picasa/rs-picasa-client.c:234 msgid "Username: " msgstr "Käyttäjätunnus: " #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "Salasana: " #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "Tallenna 16bit lineaarinen PNG" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "Kopioi EXIF kuvailutieto XMP-tiedostoon" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Tallenna pakkaamaton TIFF" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "Tallenna 16bit TIFF" #: plugins/output-tifffile/output-tifffile.c:108 msgid "TIFF (Tagged Image File Format)" msgstr "TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Alkuperäinen tiedostonimi" #: src/filename.c:315 #, c-format msgid "%p - Path of original file" msgstr "%p - Alkuperäisen tiedoston polku" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - Inkrementaalinen laskuri" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s - Asetusvalinta (A, B tai C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "%d - Päiväys EXIFistä (YYYY-MM-DD)" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "%DY - Vuosi EXIFistä (YYYY)" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "%Dy - Vuosi EXIFistä (YY)" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "%Dm - Kuukausi EXIFistä (MM)" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "%DM - Kuukausi EXIFistä (teksti)" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "%Dd - Päiväys EXIFistä (DD)" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "%DD - Viikonpäivä EXIFistä" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "%t - Aika EXIFistä (HH:MM:SS)" #: src/gtk-interface.c:154 msgid "Width" msgstr "Leveys" #: src/gtk-interface.c:154 msgid "Height" msgstr "Korkeus" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Avataan kuvaa..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "Kuvan avaus epäonnistui" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Kuva avattu" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "Kuvan luokittelu vaihdettu (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "Kuvan luokittelu vaihdettu (D)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "Kuvan luokittelu vaihdettu (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "Näyttöä täyden ruudun esikatseluun ei löydy" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "Paina F10 palauttaaksesi esikatselun tähän ikkunaan" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "Vain yksi näyttö tunnistettu. Täyden ruudun esikatselu ei onnistu" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "Aloita koko ruudun esikatselu näytöllä" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "Valitse näyttö koko ruudun esikatselulle" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "Valite OK käyttääksesi tätä näyttöä koko ruudun esikatselulle" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Hakemisto:" #: src/gtk-interface.c:777 src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Valitse kohdehakemisto" #: src/gtk-interface.c:793 src/rs-batch.c:1075 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Tiedostonimen malli:" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Tiedostonimen esimerkki:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Tiedostotyyppi:" #. Add preferences box #: src/gtk-interface.c:879 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Asetukset" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Esikatselun taustaväri:" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Histogrammin korkeus:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Käytä järjestelmän teemaa" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Sijoita välimuisti kotihakemistoon" #: src/gtk-interface.c:926 msgid "Display Colorspace:" msgstr "Näytön väriavaruus:" #: src/gtk-interface.c:938 msgid "Exposure Mask Colorspace:" msgstr "Valotusmaskin väriavaruus:" #: src/gtk-interface.c:1011 msgid "General" msgstr "Yleinen" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "Pikavedos" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "Avataan hakemisto..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Rekursiivinen avaus" #: src/gtk-interface.c:1465 msgid "Directory" msgstr "Hakemisto" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "Merkin haku" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Työkalut" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Työjono" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Avaa" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Valmis" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "Edistyminen" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Avaa hakemisto" #: src/rs-actions.c:253 src/rs-batch.c:542 msgid "Could not create output directory." msgstr "Vientihakemiston avaus epäonnistui." #: src/rs-actions.c:257 msgid "Exporting..." msgstr "Viedään..." #: src/rs-actions.c:265 msgid "File exported" msgstr "Tiedosto viety" #: src/rs-actions.c:270 src/rs-actions.c:293 msgid "Export failed" msgstr "Vienti epäonnistui" #: src/rs-actions.c:300 msgid "Exporting to GIMP..." msgstr "Viedään GIMPiin..." #: src/rs-actions.c:305 msgid "Error exporting" msgstr "Virhe vietäessä" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "Virhe vietäessä kuvaa GIMPiin." #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "Tuhoan kuvat" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "Tiedostosi tullaan tuhoamaan pysyvästi!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Tuhoa kuvat" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "Odotetaan tehtävien valmistumista" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "Kopioin kuvan leikepöydälle" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "Kuva kopioitu leikepöydälle" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "VIRHE: Kuvan kopiointi leikepöydälle ei onnistunut" #. Build GUI #: src/rs-actions.c:463 msgid "Profile" msgstr "Profiili" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Valotus" #: src/rs-actions.c:468 msgid "White balance" msgstr "Valkotasapaino" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Terävöitä" #: src/rs-actions.c:470 msgid "Denoise" msgstr "Kohinanpoisto" #: src/rs-actions.c:471 msgid "Color denoise" msgstr "Värikohinan poisto" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "Värikanavasäädöt" #: src/rs-actions.c:473 msgid "TCA" msgstr "TCA" #: src/rs-actions.c:474 msgid "Vignetting" msgstr "Vinjetointi" #: src/rs-actions.c:475 src/rs-toolbox.c:803 msgid "Curve" msgstr "Käyrä" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "Valitse Kaikki/Ei mitään" #: src/rs-actions.c:498 msgid "Select settings to copy" msgstr "Valitse kopioitavat asetukset" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Asetukset kopioitu" #: src/rs-actions.c:587 msgid "Pasting settings to images" msgstr "Liitetään asetukset kuviin" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Asetukset liitetty" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Ei liitettävää" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Tyhjä puskuri" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Asetellaan automaattiseen valkotasapainoon" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "Ei valkotasapainoa josta asettaa" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Asetetaan kameran valkotasapainoon" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "Merkit eroteltuina välilyönnein:" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "Lisää merkit valittuihin kuviin" #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "Valotusmaski näkyy" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "Valotusmaski ei näy" #: src/rs-actions.c:1067 msgid "Adding images to batch queue" msgstr "Lisätään kuvat työjonoon" #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "%d kuvaa lisätty työjonoon" #: src/rs-actions.c:1101 src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Valitse millä asetuksilla\n" "kuva lisätään työjonoon" #: src/rs-actions.c:1188 msgid "Removing images from batch queue" msgstr "Poistan kuvat työjonosta" #: src/rs-actions.c:1203 #, c-format msgid "%d photos removed from batch queue" msgstr "%d kuvaa poistettu työjonosta" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "Lisää profiili ..." #: src/rs-actions.c:1266 msgid "All Profiles" msgstr "Kaikki profiilit" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "Kameran profiilit (DCP)" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "Väriprofiilit (ICC ja ICM)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Kaikki tiedostot" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "RAW-kuvamuunnin GTK+/GNOME-ympäristöön" #: src/rs-actions.c:1412 msgid "_File" msgstr "_Tiedosto" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "_Muokkaa" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "K_uva" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "_Luokittele" #: src/rs-actions.c:1416 msgid "_White Balance" msgstr "_Valkotasapaino" #: src/rs-actions.c:1417 msgid "_View" msgstr "_Näytä" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "Jä_rjestä" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "Työ_jono" #: src/rs-actions.c:1420 msgid "_Help" msgstr "_Apua" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "_Kuva" #. File menu #: src/rs-actions.c:1425 msgid "_Open Directory" msgstr "_Avaa hakemisto" #: src/rs-actions.c:1426 msgid "_Quick Export" msgstr "_Pikavienti" #: src/rs-actions.c:1427 msgid "_Export As" msgstr "_Vie nimellä" #: src/rs-actions.c:1428 msgid "_Export to Gimp" msgstr "Vie _GIMPiin" #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "Kopioi _Leikepöydälle" #: src/rs-actions.c:1430 msgid "_Reload directory" msgstr "L_ue hakemisto uudelleen" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "_Tuhoa merkityt tiedostot" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "L_opeta" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "_Palauta asetukset" #: src/rs-actions.c:1436 msgid "_Copy settings" msgstr "_Kopioi asetukset" #: src/rs-actions.c:1437 msgid "_Paste settings" msgstr "_Liitä asetukset" #: src/rs-actions.c:1438 msgid "_Reset settings" msgstr "_Palauta oletusasetukset" #: src/rs-actions.c:1439 msgid "_Save camera default settings" msgstr "_Tallenna asetukset kameran oletukseksi" #: src/rs-actions.c:1440 msgid "_Preferences" msgstr "_Asetukset" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "_Merkitse kuva tuhottavaksi" #: src/rs-actions.c:1444 msgid "_1" msgstr "_1" #: src/rs-actions.c:1445 msgid "_2" msgstr "_2" #: src/rs-actions.c:1446 msgid "_3" msgstr "_3" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "_Poista luokittelu" #: src/rs-actions.c:1448 msgid "_Auto" msgstr "_Auto" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "_Kamera" #: src/rs-actions.c:1450 msgid "_Crop" msgstr "_Rajaa" #: src/rs-actions.c:1451 msgid "_Uncrop" msgstr "Pois_ta rajaus" #: src/rs-actions.c:1452 msgid "_Straighten" msgstr "_Oikaise" #: src/rs-actions.c:1453 msgid "_Unstraighten" msgstr "_Poista oikaisu" #: src/rs-actions.c:1454 msgid "_Group" msgstr "_Ryhmitä" #: src/rs-actions.c:1455 msgid "_Ungroup" msgstr "_Pura ryhmitys" #: src/rs-actions.c:1456 msgid "_Auto group" msgstr "_Ryhmitä automaattisesti" #: src/rs-actions.c:1457 msgid "_Tag Photo..." msgstr "_Merkitse kuva..." #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "Kierrä myötäpäivään" #: src/rs-actions.c:1459 msgid "Rotate Counter Clockwise" msgstr "Kierrä vastapäivään" #: src/rs-actions.c:1460 msgid "Flip" msgstr "Käännä" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "Peilaa" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "_Edellinen kuva" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "_Seuraava kuva" #: src/rs-actions.c:1466 msgid "_Lens Library" msgstr "_Linssikirjasto" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "_Ohjattu kuvaus" #. Batch menu #: src/rs-actions.c:1470 msgid "_Add to batch queue" msgstr "_Lisää työjonoon" #: src/rs-actions.c:1471 msgid "_Add view to queue..." msgstr "Lisää työjonoon _näkymä..." #: src/rs-actions.c:1472 msgid "_Remove from batch queue" msgstr "_Poista työjonosta" #: src/rs-actions.c:1473 msgid "_Start" msgstr "_Aloita" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "_Dokumentaatio verkossa" #: src/rs-actions.c:1477 msgid "_About" msgstr "_Tietoja" #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "_Sovita näkymään" #: src/rs-actions.c:1487 msgid "_Iconbox" msgstr "_Ikoninäkymä" #: src/rs-actions.c:1488 msgid "_Toolbox" msgstr "_Työkalut" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "_Koko ruudun näkymä" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "_Näytä kuva toisella näytöllä" #: src/rs-actions.c:1491 msgid "Show Filenames in Iconbox" msgstr "Näytä tiedostonimet ikoninäkymässä" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "Lataa kaikki kuvatyypit" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "Älä lataa valittuja kuvia" #: src/rs-actions.c:1494 msgid "_Exposure mask" msgstr "_Valotusmaski" #: src/rs-actions.c:1495 msgid "_Split" msgstr "_Jaa näkymä" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "_Valot pois" #: src/rs-actions.c:1503 msgid "Name" msgstr "Nimi" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "Aikaleima" #: src/rs-actions.c:1505 msgid "ISO" msgstr "ISO" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "Polttoväli" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "Valotusaika" #. Snapshot labels #: src/rs-actions.c:1513 src/rs-toolbox.c:207 src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1514 src/rs-toolbox.c:208 src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1515 src/rs-toolbox.c:209 src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Peruuta" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Edellinen kuva:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Aikaa jäljellä: %dh %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "Käsitellään kuvaa %d/%d" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Aikaa jäljellä: ..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "Käsitellään kuvaa 1/%d" #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "Lataan %s ..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "Tallennan %s ..." #: src/rs-batch.c:635 msgid "Could not export photo." msgstr "Kuvan vienti epäonnistui." #: src/rs-batch.c:695 msgid "Icon" msgstr "Ikoni" #: src/rs-batch.c:702 msgid "Filename" msgstr "Tiedostonimi" #: src/rs-batch.c:709 msgid "Setting" msgstr "Asetus" #: src/rs-batch.c:802 msgid "Start" msgstr "Aloita" #: src/rs-batch.c:805 msgid "Remove" msgstr "Poista" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Poista kaikki" #: src/rs-batch.c:916 src/rs-batch.c:1091 msgid "Edit output settings" msgstr "Muuta vientiasetuksia" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Kuvan koko" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "Vakioitu kuvasuhde" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Vakioitu leveys" #: src/rs-batch.c:962 msgid "Constant height" msgstr "Vakioitu korkeus" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Maksimikoko" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Kuvan leveys:" #: src/rs-batch.c:978 src/rs-batch.c:987 msgid "pixels" msgstr "pikseliä" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "Kuvan korkeus:" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "Kuvasuhde:" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Vakioleveys:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Vakioitu korkeus:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "Vakioitu kuvasuhde:\n" "%d" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Maksimikoko:\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Vientihakemisto:" #: src/rs-batch.c:1100 msgid "Change" msgstr "Vaihda" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "Vie mittasuhteet" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "Kameran oletusarvojen editointi" #: src/rs-camera-db.c:459 msgid "Model" msgstr "Malli" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "Näyttönavigointi" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "Kevyt esikatselutila ei käytettävissä" #: src/rs-preview-widget.c:887 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" "Järjestelmäsi ei vaikuta tukevan RGBA-näkymiä ja/tai kompositontia. Tutustu " "järjestelmäsi ohjeistukseen RGBA-tuen käyttöönottamiseksi." #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Koko" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Hila" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Ei mitään" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "Kultainen leikkaus" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "Kolmanneksen sääntö" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Kultaiset kolmiot #1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Kultaiset kolmiot #2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Harmoniset kolmiot #1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Harmoniset kolmiot #2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Muoto" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "Vapaamuoto" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "Alkuperäinen muoto" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "ISO (A4)" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "16:9 (HDTV)" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "Kultainen suorakulmio" #: src/rs-preview-widget.c:1180 src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Rajaa" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "Peruuta" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" "Rajaa: Vedä valitaksesi rajattava alue. Oikea hiiren nappi rajatun aluen " "sisällärajaa; ulkopuolella peruuttaa rajauksen" #: src/rs-preview-widget.c:1238 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" "Oikaise: Vedä linja kuvaan kohtaan jonka tulisi olla vaaka- tai " "pystysuorassa. Oikea hiiren nappi peruuttaa." #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:522 msgid "Export File" msgstr "Vie tiedosto" #: src/rs-save-dialog.c:282 msgid "File not saved!" msgstr "Tiedosto ei tallennettu!" #: src/rs-save-dialog.c:299 #, c-format msgid "Exporting to %s" msgstr "Viedään kohteeseen %s" #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" "Ei voitu tallentaa tiedostoa: %s\n" "\n" "Tarkista että sinulla on kirjoitusoikeudet kohdehakemistoon." #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "Ylikirjoita tiedosto?" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" "Tiedosto '%s' on jo olemassa.\n" "\n" "Haluatko ylikirjoittaa tiedoston?" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Säilytä kuvasuhde" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Leveys:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Korkeus:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Prosentti:" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Kaikki kuvat (poislukien tuhotut)" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Luokan 1 kuvat" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Luokan 2 kuvat" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Luokan 3 kuvat" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Luokittelemattomat kuvat" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Tuhotut kuvat" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Luokittelu" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" "HUOMIO: Ikoninäkymän päivitys pois käytöstä. Uusia tiedostoja ei ladata! " "Paina ottaaksesi päivityksen uudelleen käyttöön." #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" "%s\n" "\n" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "Valmistaja: %s\n" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "Malli: %s\n" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "Polttoväli: %dmm\n" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "Valotusaika: %.1fs\n" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "Valotusaika: 1/%.0fs\n" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "Aukko: F/%.01f\n" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "ISO: %u\n" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "Aika: %s" #: src/rs-store.c:1371 msgid "* (-)" msgstr "* (-)" #: src/rs-store.c:1372 msgid "1 (-)" msgstr "1 (-)" #: src/rs-store.c:1373 msgid "2 (-)" msgstr "2 (-)" #: src/rs-store.c:1374 msgid "3 (-)" msgstr "3 (-)" #: src/rs-store.c:1375 msgid "U (-)" msgstr "U (-)" #: src/rs-store.c:1376 msgid "D (-)" msgstr "D (-)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "Merkin haku [%s]" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "Gphoto2 ilmoitti asiayhteysvirheestä:\n" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" "ERROR: Gphoto2 palautearvo %d ilmoittaa virheestä\n" "Virheviesti on: %s\n" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "Kuvaustila Canon-kameroille otetaan käyttöön.\n" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "Kuvaustila Nikon-kameroille otetaan käyttöön.\n" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "Kuvaustila käytössä.\n" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "Määrittelemääsi porttia ('%s') ei löydy." #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "Tiedostonsiirto tämänhetkiseen hakemistoon ei onnistunut!\n" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "Siirrän ja lisään kuvan.\n" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "Väliaikaistiedoston avaaminen levylle kirjoitusta varten ei onnistunut" #: src/rs-tethered-shooting.c:558 msgid "Could not open image!\n" msgstr "Kuvan avaus epäonnistui!\n" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "Kaappaan.\n" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" "Valvontasäie kohtasi virheen %d odottaessaan kameraa.\n" "Virheteksti: %s\n" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" "Virhe %d kohdattu siirrettäessä kuvaa kamerasta.\n" "Virheteksti: %s\n" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "Tiedosto siirretty onnistuneesti.\n" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "Kameran valvontasäie lopetetaan.\n" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" "Virhe %d kohdattu kaapattaessa kuvaa.\n" "Virheteksti: %s\n" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" "Varoitus: Kuvan ottaminen kesti kauemmin kuin asetettu ajastusväli on\n" "Kesti %.1f sekuntia siirtää kuva.\n" "Harkitse kuvausvälin kasvattamista.\n" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "Odotetaan seuraavaa kuvaa.\n" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "Aloita kuvaus" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "Ajastettu kuvaus lopetetaan.\n" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "Irroitan kytketyn kameran\n" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "Kamera %s portissa %s ei avautunut\n" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" "VIRHE: Kameran alustus palautti %d.\n" "Virheteksti: %s\n" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "Suljetaan asynkroninen säie\n" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "Löytyi %d kamera(a)\n" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "Ei kameraa valittuna - en voi yhdistää!\n" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "Lopetetaan nykyinen säie kuvankaappauksen mahdollistamiseksi.\n" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "Lopetetaan jo ajossa oleva säie.\n" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "Aloitetaan valvontasäie.\n" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "Valvontasäie jo toiminnassa.\n" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "Lopetetaan ajastetun kuvauksen säie.\n" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "Ei kytkettyä kameraa.\n" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "Aloitetaan ajastetun kuvauksen säie.\n" #: src/rs-tethered-shooting.c:938 msgid "Stop Shooting" msgstr "Lopeta kuvaus" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "Valitse kamera:" #: src/rs-tethered-shooting.c:1003 msgid "Take Photo" msgstr "Ota kuva" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "Tarkkaile kameraa" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "Irrota kamera" #. Status window #: src/rs-tethered-shooting.c:1022 msgid "Status:" msgstr "Tila:" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "Päähallinta" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "Merkit uusille kuville:" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 msgid "Filename & Tags" msgstr "Tiedostonimi & Merkit" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "Tauko kuvien välillä (s):" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "Ajastettu kuvaus" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "Minimoi tämä ikkuna kaappauksen jälkeen" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "Kopioi asetukset nykyisestä kuvasta uuteen" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "Avaa uudet kuvat kaappauksen jälkeen" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "Rawstudio ohjattu kuvaus" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" "Tervetuloa ohjattuun kuvaukseen!\n" "Varmista ettei kamerasi ole liitettynä käyttöjärjestelmän " "hakemistorakenteeseen.\n" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Histogrammi" #: src/rs-toolbox.c:443 msgid "Reset" msgstr "Palauta" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr ". Klikkaa nollataksesi arvo" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr ". Klikkaa muuttaaksesi arvoa" #: src/rs-toolbox.c:566 src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Avaa käyrä ..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "Valitse tallennettu käyrä" #: src/rs-toolbox.c:700 msgid "Select Action" msgstr "Valitse toiminne" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Tallenna käyrä nimellä ..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Nollaa käyrä" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "Asettele käyrän päät automaattisesti" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "Muokkaa linssiä" #. Pack everything nice #: src/rs-toolbox.c:800 msgid "Basic" msgstr "Perusasetukset" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "Väritasapaino" #: src/rs-toolbox.c:802 msgid "Lens Correction" msgstr "Linssivääristymän korjaus" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Käännä kuva x-akselin yli" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Peilaa kuva y-akselin yli" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Kierrä kuvaa 90 astetta myötäpäivään" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Kierrä kuvaa 90 astetta vastapäivään" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Muunnokset" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "Tuntematon linssi" #: src/rs-toolbox.c:1035 msgid "Lens Disabled" msgstr "Linssikorjaus pois käytöstä" #: src/rs-toolbox.c:1043 msgid "No Lens Information" msgstr "Ei linssitietoa" #: src/rs-toolbox.c:1045 msgid "Camera Unknown" msgstr "Tuntematon kamera" #: src/rs-toolbox.c:1050 msgid "No Photo" msgstr "Ei kuvaa" #: src/rs-toolbox.c:1259 msgid "_Previous" msgstr "_Edellinen" #: src/rs-toolbox.c:1260 msgid "_Next" msgstr "_Seuraava" rawstudio-2.0/po/ChangeLog0000644000175000017500000000000011526533646012506 00000000000000rawstudio-2.0/po/pl.po0000644000175000017500000015650211546425272011727 00000000000000# translation of pl.po to Polish # Polish translation for Rawstudio. # Copyright (C) 2006-2008 Anders Brander and Anders Kvist # This file is distributed under the same license as the Rawstudio package. # # Simone Contini , 2008. # Paweł Gołaszewski , 2008. # Krzysztof Kościuszkiewicz , 2008. # Łukasz Romanowicz , 2008. # Krzysztof Kościuszkiewicz , 2011. # Dariusz Duma , 2011. msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-03-26 15:22+0100\n" "PO-Revision-Date: 2011-03-26 15:45+0100\n" "Last-Translator: Dariusz Duma \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" "X-Poedit-Language: Polish\n" "X-Poedit-Country: POLAND\n" "X-Generator: Lokalize 1.2\n" #: librawstudio/rs-lens-db-editor.c:325 msgid "All lenses" msgstr "Wszystkie obiektywy" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "Błąd podczas aktualizacji bazy obiektywów" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "Zaktualizowano bazę obiektywów" #: librawstudio/rs-lens-db-editor.c:565 msgid "Rawstudio Lens Library" msgstr "Rawstudio - biblioteka obiektywów" #: librawstudio/rs-lens-db-editor.c:590 msgid "Lens make" msgstr "Producent obiektywu" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "Model obiektywu" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "Ogniskowa" #: librawstudio/rs-lens-db-editor.c:602 #: librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "Przysłony" #: librawstudio/rs-lens-db-editor.c:606 msgid "Camera make" msgstr "Producent aparatu" #: librawstudio/rs-lens-db-editor.c:610 msgid "Camera model" msgstr "Model aparatu" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "Włączony" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "Aktualizuj bazę obiektywów" #: librawstudio/rs-lens-db-editor.c:734 msgid "Could not create temporary directory." msgstr "Utworzenie katalogu tymczasowego nie powiodło się." #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "Nie powiodło się pobranie listy plików z %s." #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "Nie powiodło się pobranie pliku z %s lub zapis do %s." #: librawstudio/rs-lens-db-editor.c:796 #, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Nie powiodło się utworzenie katalogu dla bazy obiektywów - %s" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "Błąd podczas kopiowania pliku %s do %s\n" #: librawstudio/rs-lens-db-editor.c:939 msgid "Rawstudio Lens Editor" msgstr "Rawstudio - edytor obiektywów" #: librawstudio/rs-lens-db-editor.c:950 msgid "Lens Make" msgstr "Producent obiektywu" #: librawstudio/rs-lens-db-editor.c:954 msgid "Lens Model" msgstr "Model obiektywu" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "Ogniskowa" #: librawstudio/rs-lens-db-editor.c:966 msgid "Camera Make" msgstr "Producent aparatu" #: librawstudio/rs-lens-db-editor.c:970 msgid "Camera Model" msgstr "Model aparatu" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "Uwzględniaj ten obiektyw" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "Wybierz obiektyw" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "Biblioteka obiektywów" #: librawstudio/rs-library.c:254 #, c-format msgid "Could not open database %s" msgstr "Nie powiodło się otworzenie bazy danych %s" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "szerokokątny" #: librawstudio/rs-library.c:816 msgid "telephoto" msgstr "teleobiektyw" #: librawstudio/rs-library.c:832 msgid "January" msgstr "styczeń" #: librawstudio/rs-library.c:835 msgid "February" msgstr "luty" #: librawstudio/rs-library.c:838 msgid "March" msgstr "marzec" #: librawstudio/rs-library.c:841 msgid "April" msgstr "kwiecień" #: librawstudio/rs-library.c:844 msgid "May" msgstr "maj" #: librawstudio/rs-library.c:847 msgid "June" msgstr "czerwiec" #: librawstudio/rs-library.c:850 msgid "July" msgstr "lipiec" #: librawstudio/rs-library.c:853 msgid "August" msgstr "sierpień" #: librawstudio/rs-library.c:856 msgid "September" msgstr "wrzesień" #: librawstudio/rs-library.c:859 msgid "October" msgstr "październik" #: librawstudio/rs-library.c:862 msgid "November" msgstr "listopad" #: librawstudio/rs-library.c:865 msgid "December" msgstr "grudzień" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "f/%.1f " #: librawstudio/rs-metadata.c:544 #, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "Dodaj profil ..." #: librawstudio/rs-profile-selector.c:242 msgid "Embedded Profile" msgstr "Profil osadzony" #: librawstudio/rs-profile-selector.c:244 msgid "(Select Profile)" msgstr "(wybierz profil)" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "Eksp." #: librawstudio/rs-settings.c:80 msgid "Exposure Compensation" msgstr "Korekcja ekspozycji" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 msgid "Satur" msgstr "Nasyc." # should be a different string for color rendering intent #: librawstudio/rs-settings.c:86 #: src/rs-actions.c:465 msgid "Saturation" msgstr "Nasycenie" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 #: src/rs-actions.c:466 msgid "Hue" msgstr "Barwa" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "Przesunięcie barwowe" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "Kontr." #: librawstudio/rs-settings.c:98 #: src/rs-actions.c:467 msgid "Contrast" msgstr "Kontrast" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 #: librawstudio/rs-settings.c:116 msgid "Temp" msgstr "Temp." #: librawstudio/rs-settings.c:104 #: librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "Temperatura" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 #: librawstudio/rs-settings.c:122 msgid "Tint" msgstr "Odc." #: librawstudio/rs-settings.c:110 #: librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "Przesunięcie odcienia" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "WBAscii" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 msgid "Sharp" msgstr "Wyost." #: librawstudio/rs-settings.c:133 msgid "Sharpen Amount" msgstr "Stopień wyostrzenia" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "Odsz." #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "Odszumianie" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "OdszK." #: librawstudio/rs-settings.c:145 msgid "Colour Denoising" msgstr "Odszumianie barw" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "CA R" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "Korekcja czerwonej aberracji chromatycznej" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "CA B" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "Korekcja niebieskiej aberracji chromatycznej" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "Win." #: librawstudio/rs-settings.c:163 msgid "Vignetting Correction" msgstr "Korekcja winietowania" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 msgid "Red" msgstr "Czerw." #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "Korekcja barwy czerwonej" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "Ziel." #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "Korekcja barwy zielonej" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "Nieb." #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "Korekcja barwy niebieskiej" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "Przestrzeń barw zoptymalizowana dla wydruku, kompatybilna z Adobe RGB (1998)" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "Przestrzeń barw o szerokim zakresie odwzorowania" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 msgid "JPEG Quality" msgstr "Jakość JPEG" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "Podpis" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "Wyślij zdjęcie do Facebooka" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "Krok 1:" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "Krok 2:" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "Autentykacja Rawstudio" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "Nieobsłużony błąd komunikacji z serwisem Facebook" #: plugins/output-facebook/output-facebook.c:329 msgid "Rawstudio needs to be authenticated before it will be able to upload photos to your Facebook account." msgstr "Rawstudio musi zakończyć proces autentykacji zanim możliwe będzie wysyłanie zdjęć na konto serwisu Facebook." #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "Albumy" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "Utwórz album" #: plugins/output-flickr/output-flickr.c:113 msgid "Title" msgstr "Tytuł" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "Opis" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "Tagi" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "Publiczne (widoczne dla każdego)" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "Widoczne dla przyjaciół" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "Widoczne dla rodziny" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "Wyślij zdjęcie do serwisu Flickr" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "Wystąpił błąd podczas autentykacji. Proszę spróbować ponownie." #: plugins/output-flickr/output-flickr.c:306 msgid "Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "Rawstudio nie może wysłać zdjęcia ponieważ autoryzacja została cofnięta.Należy ponowić proces autentykacji Rawstudio z serwisem Flickr." #: plugins/output-flickr/output-flickr.c:309 msgid "It seems like rawstudio lost its authentication to upload to your account, please re-authenticate." msgstr "Autoryzacja Rawstudio została cofnięta.Należy ponowić proces autentykacji Rawstudio z serwisem Flickr." #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!" msgstr "" "%s\n" "\n" "Uwaga: program Rawstudio jeszcze nie potrafi obsłużyć powyższego błędu. Proszę skontaktować sie z twórcami programu w celu ulepszenia obsługi błędów." #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "Błąd serwisu Flickr" #: plugins/output-flickr/output-flickr.c:374 msgid "Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account." msgstr "Rawstudio musi przejść proces autentykacji zanim będzie możliwe wysyłanie zdjęć do serwisu Flickr." #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 msgid "Full export path" msgstr "Pełna ścieżka eksportu" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "Przestrzeń barw używana przy zapisie" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 msgid "Copy EXIF metadata" msgstr "Kopiuj metadane EXIF" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "Zachowaj metadane EXIF" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "Wyślij zdjęcie do serwisu Picasa" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "Nieobsługiwany błąd serwisu Picasa" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "Aktualny użytkownik: " #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr " (zalogowano pomyślnie)" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr " (nie można się zalogować)" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "(nie podano użytkownika)" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "Przełącz użytkownika" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "Nie można się zalogować" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "Powtórzyć operację?" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "Wystąpił błąd podczas komunikacji z serwisem Picasa:" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "Czy chcesz ponowić operację?" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "Autentykacja serwisu Picasa" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "Podaj nazwę użytkownika i hasło do serwisu Picasa." #: plugins/output-picasa/rs-picasa-client.c:234 msgid "Username: " msgstr "Użytkownik: " #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "Hasło: " #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "Zapisuj 16-bitowy liniowy PNG" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "Kopiuj metadane EXIF do XMP" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Zapisuj pliki TIFF bez kompresji" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "Zapisuj 16-bitowy TIFF" #: plugins/output-tifffile/output-tifffile.c:108 msgid "TIFF (Tagged Image File Format)" msgstr "TIFF (Tagged Image File Format)" # Comments for future translators # Uwagi dla kolejnych tłumaczy: # # Zastosowane konwencje: # # Settings (w sensie "A, B, C") to "zestawy parametrów", pojedyńcze # wartości suwaków w toolboxie to "parametry" # # Priorities to "priorytety", z braku pomysłu na coś bardziej # adekwatnego. # # Export został zamieniony na "konwersję", bo po polsku raczej mówi się o # "konwersji plików RAW". # # Wszystkie komunikaty pojawiające się na pasku stanu programu zostały # przetłumaczone na formę bezosobową lub stronę bierną. #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Oryginalna nazwa pliku" #: src/filename.c:315 #, c-format msgid "%p - Path of original file" msgstr "%p - Ścieżka oryginalnego pliku" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - Numer zdjęcia w kolejce" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s - Zestaw parametrów (A, B lub C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "%d - Data z EXIF (RRRR-MM-DD)" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "%DY - Rok z EXIF (RRRR)" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "%Dy - Rok z EXIF (RR)" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "%Dm - Miesiąc z EXIF (MM)" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "%DM - Miesiąc z EXIF (słownie)" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "%Dd - Dzień z EXIF (DD)" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "%DD - Dzień tygodnia z EXIF" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "%t - Czas z EXIF (GG:MM:SS)" #: src/gtk-interface.c:154 msgid "Width" msgstr "Szerokość" #: src/gtk-interface.c:154 msgid "Height" msgstr "Wysokość" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Otwieranie zdjęcia ..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "Otworzenie zdjęcia nie powiodło się" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Zdjęcie otworzone" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "Zmieniono priorytet zdjęcia (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "Zaznaczono zdjęcie do usunięcia (D)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "Zmieniono priorytet zdjęcia (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "Nie znaleziono wolnego ekranu dla podglądu pełnoekranowego" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "Naciśnij F10 aby przywrócić domyślną lokalizację okna podglądu" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "Nie wykryto dodatkowego monitora. Nie można włączyć podglądu pełnoekranowego." #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "Wybierz ekran do otworzenia podglądu pełnoekranowego" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "Wybierz ekran do podglądu pełnoekranowego" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "Zaakceptuj użycie tego ekranu do podglądu pełnoekranowego" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Katalog:" #: src/gtk-interface.c:777 #: src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Wybierz katalog docelowy" #: src/gtk-interface.c:793 #: src/rs-batch.c:1075 #: src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Wzorzec nazwy pliku:" #: src/gtk-interface.c:806 #: src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Przykładowa nazwa:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Typ pliku:" #. Add preferences box #: src/gtk-interface.c:879 #: src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Ustawienia" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Kolor tła podglądu:" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Wysokość histogramu:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Użyj skórki systemowej" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Przechowuj pliki podręczne w katalogu domowym" #: src/gtk-interface.c:926 msgid "Display Colorspace:" msgstr "Przestrzeń barw wyświetlania:" #: src/gtk-interface.c:938 msgid "Exposure Mask Colorspace:" msgstr "Przestrzeń barw maski ekspozycji:" #: src/gtk-interface.c:1011 msgid "General" msgstr "Ogólne" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "Szybka konwersja" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "Otwieranie katalogu..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Przeszukuj podkatalogi" #: src/gtk-interface.c:1465 msgid "Directory" msgstr "Katalog" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "Wyszukiwanie tagów" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Narzędzia" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Kolejka" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Otwórz" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Gotowe" #: src/gtk-progress.c:63 #: src/gtk-progress.c:100 #: src/gtk-progress.c:123 msgid "Progress" msgstr "Postęp" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Otwórz katalog" #: src/rs-actions.c:253 #: src/rs-batch.c:542 msgid "Could not create output directory." msgstr "Nie powiodło się utworzenie katalogu docelowego." #: src/rs-actions.c:257 msgid "Exporting..." msgstr "Eksportowanie..." #: src/rs-actions.c:265 msgid "File exported" msgstr "Eksportowanie zakończone" #: src/rs-actions.c:270 #: src/rs-actions.c:293 msgid "Export failed" msgstr "Eksportowanie nie powiodło się" #: src/rs-actions.c:300 msgid "Exporting to GIMP..." msgstr "Eksportowanie do programu GIMP..." #: src/rs-actions.c:305 msgid "Error exporting" msgstr "Błąd podczas eksportu" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "Błąd podczas eksportowania zdjęcia do programu GIMP." #: src/rs-actions.c:331 #: src/rs-actions.c:349 msgid "Deleting photos" msgstr "Usuwanie zdjęć" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "Twoje pliki zostaną nieodwracalnie usunięte!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Usuń zdjęcia" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "Oczekiwanie na zakończenie pozostałych zadań" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "Kopiowanie zdjęcia do schowka" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "Skopiowano zdjęcie do schowka" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "Błąd - nie można skopiować zdjęcia do schowka" #. Build GUI #: src/rs-actions.c:463 msgid "Profile" msgstr "Profil" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Ekspozycja" #: src/rs-actions.c:468 msgid "White balance" msgstr "Balans bieli" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Wyostrzanie" #: src/rs-actions.c:470 msgid "Denoise" msgstr "Odszumianie" #: src/rs-actions.c:471 msgid "Color denoise" msgstr "Odszumianie barw" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "Mikser kanałów" #: src/rs-actions.c:473 msgid "TCA" msgstr "TCA" #: src/rs-actions.c:474 msgid "Vignetting" msgstr "Winietowanie" #: src/rs-actions.c:475 #: src/rs-toolbox.c:803 msgid "Curve" msgstr "Krzywa" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "Zaznacz wszystkie/usuń zaznaczenie" #: src/rs-actions.c:498 msgid "Select settings to copy" msgstr "Wybierz parametry do skopiowania" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Skopiowano parametry" #: src/rs-actions.c:587 msgid "Pasting settings to images" msgstr "Aplikowanie parametry do zdjęć" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Zaaplikowano parametry" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Brak parametrów do zastosowania" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Bufor jest pusty" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Ustawiono automatyczny balans bieli" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "Brak wzorca balansu bieli" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Ustawiono balans bieli z aparatu" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "Tagi rozdzielone spacjami:" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "Dodaj tagi do zaznaczonych zdjęć." # not entirely sure when this string shows up #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "Włączono widok maski ekspozycji" # not entirely sure when this string shows up #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "Ukryto widok maski ekspozycji" #: src/rs-actions.c:1067 msgid "Adding images to batch queue" msgstr "Dodawanie zdjęć do kolejki" #: src/rs-actions.c:1084 #: src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "%d zdjęć dodanych do kolejki" #: src/rs-actions.c:1101 #: src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 #: src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 #: src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Które zestawy parametrów\n" "dodać do kolejki?" #: src/rs-actions.c:1188 msgid "Removing images from batch queue" msgstr "Usuwanie zdjęć z kolejki" #: src/rs-actions.c:1203 #, c-format msgid "%d photos removed from batch queue" msgstr "%d zdjęć usuniętych z kolejki" #. Not in any menu (yet) #: src/rs-actions.c:1254 #: src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "Dodaj profil ..." #: src/rs-actions.c:1266 msgid "All Profiles" msgstr "Wszystkie profile" # ################ FIXME: KK tutaj przerwałem #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "Profil kamery (DCP)" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "Profile kolorów (icc oraz icm)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Wszystkie pliki" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "Program do konwersji plików RAW dla GTK+/GNOME" #: src/rs-actions.c:1412 msgid "_File" msgstr "_Plik" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "_Edycja" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "_Zdjęcie" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "Zmień _priorytet" #: src/rs-actions.c:1416 msgid "_White Balance" msgstr "_Balans bieli" #: src/rs-actions.c:1417 msgid "_View" msgstr "_Widok" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "_Sortuj wg" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "_Kolejka" #: src/rs-actions.c:1420 msgid "_Help" msgstr "_Pomoc" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "_Migawka" #. File menu #: src/rs-actions.c:1425 msgid "_Open Directory" msgstr "_Otwórz katalog" #: src/rs-actions.c:1426 msgid "_Quick Export" msgstr "_Szybka konwersja" #: src/rs-actions.c:1427 msgid "_Export As" msgstr "_Konwertuj do..." #: src/rs-actions.c:1428 msgid "_Export to Gimp" msgstr "_Eksportuj do GIMP" #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "_Kopiuj zdjęcie do schowka" #: src/rs-actions.c:1430 msgid "_Reload directory" msgstr "_Przeładuj katalog" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "_Usuń oznaczone zdjęcia" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "Za_kończ" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "_Cofnij zmiany" #: src/rs-actions.c:1436 msgid "_Copy settings" msgstr "_Kopiuj parametry" #: src/rs-actions.c:1437 msgid "_Paste settings" msgstr "_Wklej parametry" #: src/rs-actions.c:1438 msgid "_Reset settings" msgstr "_Parametry domyślne" #: src/rs-actions.c:1439 msgid "_Save camera default settings" msgstr "_Zapisz parametry domyślne aparatu" #: src/rs-actions.c:1440 msgid "_Preferences" msgstr "_Ustawienia" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "_Oznacz do usunięcia" #: src/rs-actions.c:1444 msgid "_1" msgstr "_1" #: src/rs-actions.c:1445 msgid "_2" msgstr "_2" #: src/rs-actions.c:1446 msgid "_3" msgstr "_3" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "_Usuń priorytet" #: src/rs-actions.c:1448 msgid "_Auto" msgstr "_Auto" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "_Z aparatu" #: src/rs-actions.c:1450 msgid "_Crop" msgstr "_Przytnij" #: src/rs-actions.c:1451 msgid "_Uncrop" msgstr "_Cofnij przycinanie" #: src/rs-actions.c:1452 msgid "_Straighten" msgstr "_Wyprostuj" #: src/rs-actions.c:1453 msgid "_Unstraighten" msgstr "_Cofnij prostowanie" #: src/rs-actions.c:1454 msgid "_Group" msgstr "_Grupuj" #: src/rs-actions.c:1455 msgid "_Ungroup" msgstr "_Anuluj grupowanie" #: src/rs-actions.c:1456 msgid "_Auto group" msgstr "Grupuj a_utomatycznie" #: src/rs-actions.c:1457 msgid "_Tag Photo..." msgstr "_Tagi zdjęcia..." #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "Obróć o 90 stopni zgodnie z ruchem wskazówek zegara" #: src/rs-actions.c:1459 msgid "Rotate Counter Clockwise" msgstr "Obróć o 90 stopni przeciwnie do ruchu wskazówek zegara" #: src/rs-actions.c:1460 msgid "Flip" msgstr "Odbij pionowo" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "Odbij poziomo" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "_Poprzednie zdjęcie" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "_Następne zdjęcie" #: src/rs-actions.c:1466 msgid "_Lens Library" msgstr "_Baza obiektywów" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "_Rejestrowanie bezpośrednie" #. Batch menu #: src/rs-actions.c:1470 msgid "_Add to batch queue" msgstr "_Dodaj do kolejki" #: src/rs-actions.c:1471 msgid "_Add view to queue..." msgstr "_Dodaj bieżący widok do kolejki..." #: src/rs-actions.c:1472 msgid "_Remove from batch queue" msgstr "_Usuń z kolejki" #: src/rs-actions.c:1473 msgid "_Start" msgstr "_Rozpocznij konwersję" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "_Dokumentacja on-line" #: src/rs-actions.c:1477 msgid "_About" msgstr "_O programie" #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "_Dopasuj do okna" #: src/rs-actions.c:1487 msgid "_Iconbox" msgstr "_Miniaturki" #: src/rs-actions.c:1488 msgid "_Toolbox" msgstr "_Panel narzędzi" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "Pełny _ekran" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "_Pokaż zdjęcie na drugim monitorze" #: src/rs-actions.c:1491 msgid "Show Filenames in Iconbox" msgstr "Wyświetlaj nazwy plików pod miniaturami" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "Wczytuj nie tylko zdjęcia RAW" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "Nie wczytuj wybranych zdjęć" #: src/rs-actions.c:1494 msgid "_Exposure mask" msgstr "_Maska ekspozycji" #: src/rs-actions.c:1495 msgid "_Split" msgstr "Podgląd _dzielony" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "_Zaciemnienie" #: src/rs-actions.c:1503 msgid "Name" msgstr "Nazwy pliku" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "Daty wykonania" #: src/rs-actions.c:1505 msgid "ISO" msgstr "ISO" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "Ogniskowej" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "Czasu naświetlania" #. Snapshot labels #: src/rs-actions.c:1513 #: src/rs-toolbox.c:207 #: src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1514 #: src/rs-toolbox.c:208 #: src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1515 #: src/rs-toolbox.c:209 #: src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Anuluj" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Ostatnie zdjęcie:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Pozostały czas: %dh %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "Przetwarzanie zdjęcia %d/%d" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Pozostały czas: ..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "Przetwarzanie zdjęcia 1/%d." #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "Ładowanie %s ..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "Zapisywanie %s ..." #: src/rs-batch.c:635 msgid "Could not export photo." msgstr "Konwertowanie zdjęcia nie powiodło się" #: src/rs-batch.c:695 msgid "Icon" msgstr "Ikona" #: src/rs-batch.c:702 msgid "Filename" msgstr "Nazwa pliku" #: src/rs-batch.c:709 msgid "Setting" msgstr "Zestaw parametrów" #: src/rs-batch.c:802 msgid "Start" msgstr "Rozpocznij konwersję" #: src/rs-batch.c:805 msgid "Remove" msgstr "Usuń" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Usuń wszystkie" #: src/rs-batch.c:916 #: src/rs-batch.c:1091 msgid "Edit output settings" msgstr "Edytuj parametry wyjściowe" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Wielkość zdjęcia" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "Skaluj do" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Stała szerokość" #: src/rs-batch.c:962 msgid "Constant height" msgstr "Stała wysokość" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Ogranicz oba wymiary" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Szerokość:" #: src/rs-batch.c:978 #: src/rs-batch.c:987 msgid "pixels" msgstr "pikseli" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "Wysokość:" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "Skaluj do:" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Stała szerokość:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Stała wysokość:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "Skaluj do:\n" "%d" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Ogranicz wymiary do:\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Katalog docelowy:" #: src/rs-batch.c:1100 msgid "Change" msgstr "Zmień" # "export dimensions" - maybe just plain "dimensions" instead? #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "Wymiary zdjęć" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "Edytor ustawień aparatu" #: src/rs-camera-db.c:459 msgid "Model" msgstr "Model" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "Wyświetl sterowanie" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "Zaciemnienie niedostępne" #: src/rs-preview-widget.c:887 msgid "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing." msgstr "Twoje ustawienia nie wspierają wizualizacji RGBA i/lub kompozycji. Sprawdź poradnik dla systemu aby uaktywnić RGBA i kompozycję." #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Wymiary" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Siatka" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Brak" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "Złoty podział" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "Trójpodział" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Złote trójkąty #1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Złote trójkąty #2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Trójkąty harmoniczne #1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Trójkąty harmoniczne #2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Stosunek krawędzi" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "Dowolnie" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "Oryginalny wygląd" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "Papier A4" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Szerokie XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "16:9 (HDTV)" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Podwójne XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "Złoty podział" #: src/rs-preview-widget.c:1180 #: src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Przytnij" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "Anuluj" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel crop" msgstr "Kadrowanie: Przeciągnij, aby wybrać obszar przycięcia. Prawy przycisk myszy wewnątrz kadrowanego obszaru: Zatwierdza; Na zewnątrz: Anuluje" #: src/rs-preview-widget.c:1238 msgid "Straighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels." msgstr "Prostowanie: Narysuj linię na zdjęciu, która powinna być pozioma lub pionowa. Prawy przycisk myszy anuluje." #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 #: src/rs-toolbox.c:522 msgid "Export File" msgstr "Konwertuj plik" #: src/rs-save-dialog.c:282 msgid "File not saved!" msgstr "Plik nie został zapisany!" #: src/rs-save-dialog.c:299 #, c-format msgid "Exporting to %s" msgstr "Konwertowanie do pliku %s" #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" "Nie mogę zapisać pliku: %s\n" "\n" "Sprawdź, czy posiadasz prawa zapisu do tego folderu." #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "Nadpisać plik?" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" "Plik '%s' już istnieje.\n" "\n" "Czy chcesz go zmienić?" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Zachowuj proporcje" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Szerokość:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Wysokość:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Procent:" #. All #: src/rs-store.c:298 #: src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Wszystkie zdjęcia (bez usuniętych)" #. 1 #: src/rs-store.c:302 #: src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Zdjęcia z priorytetem 1" #. 2 #: src/rs-store.c:306 #: src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Zdjęcia z priorytetem 2" #. 3 #: src/rs-store.c:310 #: src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Zdjęcia z priorytetem 3" #. Unsorted #: src/rs-store.c:314 #: src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Zdjęcia bez przypisanego priorytetu" #. Deleted #: src/rs-store.c:318 #: src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Zdjęcia do usunięcia" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Priorytety" #: src/rs-store.c:500 msgid "NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable." msgstr "UWAGA: Aktualizacja widoku ikon wyłączona. Nowe pliki nie zostaną wczytane! Naciśnij aby włączyć ponownie. " #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" "%s\n" "\n" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "Data wykonania: %s\n" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "Model: %s\n" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "Ogniskowa: %dmm\n" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "Czas naświetlania: %.1fs\n" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "Czas naświetlania: 1/%.0fs\n" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "Przysłona: F/%.01f\n" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "ISO: %u\n" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "Data wykonania: %s" #: src/rs-store.c:1371 msgid "* (-)" msgstr "* (-)" #: src/rs-store.c:1372 msgid "1 (-)" msgstr "1 (-)" #: src/rs-store.c:1373 msgid "2 (-)" msgstr "2 (-)" #: src/rs-store.c:1374 msgid "3 (-)" msgstr "3 (-)" #: src/rs-store.c:1375 msgid "U (-)" msgstr "U (-)" #: src/rs-store.c:1376 msgid "D (-)" msgstr "D (-)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "Wyszukanie tagu [%s]" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "Gphoto2 zgłosił błąd kontekstu:\n" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" "BŁĄD: Gphoto2 zwrócił kod błędu %d\n" "Komunikat błędu: %s\n" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "Aktywowanie trybu przechwytywania dla aparatów Canon.\n" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "Aktywowanie trybu przychwytywania dla aparatów Nikon.\n" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "Przechwytywanie włączone.\n" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "Port który wskazano ('%s') nie został odnaleziony." #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "Przenoszenie pliku do bieżącego folderu nie powiodło się!\n" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "Pobieranie i dodawanie zdjęcia.\n" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "Nie można otworzyć do zapisu tymczasowego pliku na dysku" #: src/rs-tethered-shooting.c:558 msgid "Could not open image!\n" msgstr "Otworzenie zdjęcia nie powiodło się\n" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "Przechwytywanie.\n" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" "Monitoring otrzymał błąd %d, podczas oczekiwania na aparat.\n" "Treść komunikatu: %s\n" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" "Otrzymano błąd %d, podczas pobierania zdjęcia z aparatu.\n" "Treść komunikatu: %s\n" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "Pobieranie pliku zakończone powodzeniem.\n" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "Zamykanie monitorowania aparatu.\n" #: src/rs-tethered-shooting.c:651 #: src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" "Otrzymano błąd %d, podczas przechwytywania zdjęcia.\n" "Treść komunikatu: %s\n" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" "Ostrzeżenie: przechwytywanie zdjęcia zajęło więcej czasu niż ustawiony interwał\n" "Pobranie zdjęcia trwało %.1f sekund.\n" "Rozważ zwiększenie interwału.\n" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "Oczekiwanie na kolejne zdjęcie.\n" #: src/rs-tethered-shooting.c:692 #: src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "Gadatliwe rejestrowanie" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "Rejestrowanie z interwałem zakończone.\n" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "Odłączanie bieżącego aparatu\n" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "Nie powiodła sie komunikacja z aparatem %s poprzez port %s\n" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" "Błąd inicjalizacji aparatu nr %d.\n" "Treść komunikatu: %s\n" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "Zamykanie trybu asynchronicznego\n" #: src/rs-tethered-shooting.c:784 #: src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "Odnaleziono %d aparatów\n" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "Nie wybrano aparatu - nie można nawiązać połączenia!\n" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "Zamykanie działającego trybu i aktywowanie zdalnego przechwytywania.\n" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "Zamykanie działającego trybu.\n" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "Gadatliwy tryb monitoringu.\n" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "Tryb monitoringu jest już uruchomiony.\n" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "Zamykanie trybu przechwytywania z interwałem.\n" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "Brak połączenia z aparatem.\n" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "Gadatliwy tryb rejestrowania z interwałem.\n" #: src/rs-tethered-shooting.c:938 msgid "Stop Shooting" msgstr "Zakończ rejestrowanie" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "Wybór aparatu:" #: src/rs-tethered-shooting.c:1003 msgid "Take Photo" msgstr "Zrób zdjęcie" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "Monitoruj aparat" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "Odłącz aparat" # should be a different string for color rendering intent #. Status window #: src/rs-tethered-shooting.c:1022 msgid "Status:" msgstr "Status:" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "Ustawienia główne" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "Tagi dla nowych zdjęć:" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 msgid "Filename & Tags" msgstr "Nazwa & Tagi" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "Sekundy pomiędzy każdym ujęciem" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "Rejestrowanie z interwałem" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "Zminimalizuj to okno po przechwyceniu" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "Skopiuj ustawienia z aktywnego do nowego zdjęcia" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "Otwórz nowe zdjęcia po przechwyceniu" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "Rawstudio - rejestrowanie bezpośrednie" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" "Witaj w rejestrowaniu bezpośrednim!\n" "Upewnij się, że aparat nie jest zamontowany w systemie operacyjnym.\n" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Histogram" #: src/rs-toolbox.c:443 msgid "Reset" msgstr "Reset" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr ". Kliknij żeby zresetować wartość" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr ". Kliknij żeby edytować wartość" #: src/rs-toolbox.c:566 #: src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Otwórz krzywą ..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "Wybierz zapisaną krzywą" #: src/rs-toolbox.c:700 msgid "Select Action" msgstr "Wybierz" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Zapisz krzywą jako ..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Przywróć domyślną krzywą" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "Automatycznie ustaw końce krzywej" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "Edytuj obietyw" #. Pack everything nice #: src/rs-toolbox.c:800 msgid "Basic" msgstr "Podstawowe" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "Mikser kanałów" #: src/rs-toolbox.c:802 msgid "Lens Correction" msgstr "Korekcja obiektywu" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Odbicie lustrzane w pionie" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Odbicie lustrzane w poziomie" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Obróc zdjęcie o 90 stopni zgodnie z ruchem wskazówek zegara" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Obróć zdjęcie o 90 stopni przeciwnie do ruchu wskazówek zegara" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Przekształcenia" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "Obiektyw nieznany" #: src/rs-toolbox.c:1035 msgid "Lens Disabled" msgstr "Obiektyw zablokowany" #: src/rs-toolbox.c:1043 msgid "No Lens Information" msgstr "Brak informacji o obiektywie" #: src/rs-toolbox.c:1045 msgid "Camera Unknown" msgstr "Brak informacji o aparacie" #: src/rs-toolbox.c:1050 msgid "No Photo" msgstr "Brak zdjęcia" #: src/rs-toolbox.c:1259 msgid "_Previous" msgstr "_Poprzednie zdjęcie" #: src/rs-toolbox.c:1260 msgid "_Next" msgstr "_Następne zdjęcie" #~ msgid " %s added to batch queue" #~ msgstr " %s - dodano do kolejki" #~ msgid "%s already added to batch queue" #~ msgstr "%s znajduje się już w kolejce" #~ msgid "Not in batch queue" #~ msgstr "Zdjęcia nie ma w kolejce" #~ msgid "Processing photos" #~ msgstr "Przetwarzanie zdjęć" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "Otwieraj 8-bitowe zdjęcia (jpeg, png, itp.)" #, fuzzy #~ msgid "Warmth" #~ msgstr "Temperatura/zabarwienie" #, fuzzy #~ msgid "CA Red" #~ msgstr "Gotowe" #~ msgid "Select color profile" #~ msgstr "Wybierz profil kolorów" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Profile kolorów (icc oraz icm)" #~ msgid "Not a valid color profile." #~ msgstr "To nie jest prawidłowy profil kolorów." #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "" #~ "Wybrany plik wydaje się nie być prawidłowym profilem kolorów dla tej " #~ "wersji Rawstudio." #~ msgid "Enable color management (experimental)" #~ msgstr "Włącz zarządzanie kolorami (eksperymentalne)" # I'm not really sure is it the camera profile or some other? #~ msgid "Input profile" #~ msgstr "Profil wejściowy" #~ msgid "BuiltInRGBProfile" #~ msgstr "Wbudowany profil RGB" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Profil wyjściowy" #~ msgid "Intent" #~ msgstr "Tryb odwzorowania" #~ msgid "Perceptual" #~ msgstr "Percepcyjny" #~ msgid "Relative colormetric" #~ msgstr "Kolorymetryczny względny" #~ msgid "Absolute colormetric" #~ msgstr "Kolorymetryczny bezwzględny" #~ msgid "Colors" #~ msgstr "Kolory" #, fuzzy #~ msgid "Change this" #~ msgstr "Zmień" #~ msgid "Background renderer active" #~ msgstr "Przygotowywanie obrazu" #~ msgid "File export canceled" #~ msgstr "Konwersja anulowana" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "16-bitowy TIFF (Tagged Image File Format)" #~ msgid "Rotate the photo 180 degrees" #~ msgstr "Obróć zdjęcie o 180 stopni" #~ msgid "Reset this setting" #~ msgstr "Przywróć wartość domyślną" #~ msgid "_Zoom to 100%" #~ msgstr "_Skala 1:1" #~ msgid "Canon CR2" #~ msgstr "Canon CR2" #~ msgid "Canon CIFF" #~ msgstr "Canon CIFF" #~ msgid "Nikon NEF" #~ msgstr "Nikon NEF" #~ msgid "Minolta raw" #~ msgstr "Minolta raw" #~ msgid "Canon TIFF" #~ msgstr "Canon TIFF" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Olympus" #~ msgstr "Olympus" #~ msgid "Panasonic raw" #~ msgstr "Panasonic raw" #~ msgid "Pentax raw" #~ msgstr "Pentax raw" #~ msgid "Adobe Digital negative" #~ msgstr "Adobe Digital negative" #~ msgid "Hasselblad" #~ msgstr "Hasselblad" rawstudio-2.0/po/ru.gmo0000644000175000017500000010345111546436027012101 00000000000000 WX%Y%j%%%%%%%%%%&!&<& V&w&"&&&&& ','>'O'e'z'|''''' '' '( ( (5(K( `(k(o((((((()&)6)F)$H)m)}))))!) * * * )*4*ES************$+ 3+@+B+G+ L+ X+e+{+ + ++ ++ ++++ , %, 3,A,Y,_, |,,,,,,,, --%-.->-Q-&k--)-"-%- ./8.&h...1.N.B/ V/c/h/w/}/// ///// / / 0 0030 O0<Z0 00000)0) 141Q1a11 11 111 112 2#2=2E2 N2\2 l2w2222 2222 2 2 33$353=3N3^3r333333333 344 4'4+4:4@4E4 _4l4b~4'4 555#5 (545 L5X5 h5 u5 5 5 5 55555666 *676M6"Q6t6 {6666666%67,717B7K7S7X7g7v77777777 8'878R8 [8 i8 v8 8 88@8 9*9E9 _9j9|9999999 9 ::+:B:^:d:h:#~:: : :: ::: ;;%7;-];;; ;;;;; ; < %<3<3C<w<$<<(<<+< +=5=>=F=L=T=c=}= ======= = === >> >5> P>[> `>Al>>> >> >>> >??.0?_?}?????? @ @)@ .@9@O@a@=t@]@ AA$A&+A.RAAAAAAAA AAAAAB B!B 'B2BBBQBWB pB|BBB B BB BBBBB B CC "C0C6CHCaCrCCC C C CCCC D DD.D7D?D HDVD\D kDxD D DDD4F; GIGMGQGUGWG)^G'G)G#G!G# HDH.dHJHMH,I)4I9^I6I,I,I)JIJ_JtJ=xJ9JJKK $K0K AKMKQKgK|KK KKK!K5K#L&3LZL sL"LLLL7L"M":MH]MQMgMW`NNNNN3 OQ=OO OO O,O*P+P#-PQP `P4kP[PPQQQ'$QLQfQ!Q'QQQ0Q,R%=RcR3rR2R2R S(S5DS zS,SS4S*S'(T!PT%rTT!T%T T U8U0UU7UsU82VTkVIVY W9dWlWG X;SX;XbX.Y+YY Z(!Z JZWZmZZZZZ ZZ[)[8[#H[+l[5[[6Q\4\0\2\!]H2]H{]?]$^,)^FV^%^&^9^$_09_(j_ __+_9_`$`#3`W`w``%`#`#` aaL/a%|a%a'aab-(b Vb)abb,b,bc8c Kc4Vc4c c c0c d$#dHdOdid"mddd:dd$d!e'ee f ff)f9Iff%f#f-fg%8g-^gg0g@g?h^hzhhh%h.hiGieiHti i"i i+i$j,4jTaj5jjAj 5kBkQk2bkkJk'k%&l"Lloll"ll l4l<#m`mpmmmm+m: nVEnnZn oo(2o([o(o+o*opp$p8p Vp/`p-p#p pp8p_7qqqSqr!r,?r lr5r=rLsTNss ssQs=6t)tt(tt4tu':ubu2uRvlvcv8vf(wwww ww!w:x8Ixx x xxx x x!x'y9y=y]y zy,y5yy zz^%z,z$zzzz{%{<{Y{o{`{L{J2|(}|.|)|'|''}KO} } }}/}~-~pG~~R l y2N  #)8M 6ǀ ׀;*!L1d $%Ɂ )&Dk$ق 'C$b ރ *#3W v$E"=% cqӅ$&$?d$̆  qo&x5<M"/x_1jzV]n3\tD6JQBHb.;EqY5]UP7 GM),^;'jRAg=1YBrFW7yr~<ack` " sVO._=d-bTKCv/w{&A#(*>v6i!l%Zu0F:|~[E%a2e8}49LKoDw?!m$H^{Z)9:LX men*[`pX2yCl |8NJ$t-fISO>4@IW} 3G NQ0 z\+(p Rhg'@#uT Sd,Pk+s?cfhUi (Cannot log in) (Logged in succesfully) A B C %%.1fs %2c - Incremental counter%DD - Day of week from EXIF%DM - Month from EXIF (Text)%DY - Year from EXIF (YYYY)%Dd - Date from EXIF (DD)%Dm - Month from EXIF (MM)%Dy - Year from EXIF (YY)%d - Date from EXIF (YYYY-MM-DD)%d photos added to batch queue%d photos removed from batch queue%dmm %f - Original filename%p - Path of original file%s - Setting id (A, B or C)%t - Time from EXIF (HH:MM:SS)(No user entered)(Select Profile)* (%d)* (-)-. Click to edit value. Click to reset value1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Aperture: F/%.01f Focal length: %dmm ISO: %u Make: %s Model: %s Shutter speed: %.1fs Shutter speed: 1/%.0fs Time: %s%s AA raw image converter for GTK+/GNOMEAdd Profile ...Add profile ...Add tags to selected photo(s).Adding images to batch queueAdjusting to auto white balanceAdjusting to camera white balanceAlbumsAll ProfilesAll filesAll lensesAll photos (excluding deleted)An error was returned when communicating with the Picasa web service:ApertureAprilAspectAugustAuthenticate RawstudioAuto adjust curve endsBBasicBatchBlueBlue Amount AdjustmentBlue Chromatic Aberration CorrectionBuffer emptyCCA BCA RCamera MakeCamera ModelCamera Profiles (DCP)Camera UnknownCamera makeCamera modelCancelCannot log inCaptionCapturing. ChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Channel MixerChannel mixerChoose output directoryColDnColor Profiles (ICC and ICM)Color denoiseColor space used for savingColour DenoisingConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrContrastCopied settingsCopy EXIF metadataCopy EXIF metadata to XMPCopy settings from active to new imageCopying image to clipboardCould not create datadir for lensfun - %sCould not create output directory.Could not create temporary directory.Could not export photo.Could not fetch file from %s or write it to %s.Could not fetch list of files from %s.Could not open database %sCould not open image! Could not open temporary file on disk for writingCould not save file: %s Check that you have write permissions to this folder.Couldn't open photoCreate albumCropCurrent User: CurveD (%d)D (-)DecemberDelete photosDeleted photosDeleting photosDenoiDenoiseDescriptionDirectoryDirectory:Disconnect CameraDisplay Colorspace:Do not Load Selected ImagesDon't cropERROR: Gphoto2 returned error value %d Error message is: %s Edit lensEdit output settingsEmbedded ProfileEnable this lensEnabledEnabling capture mode for Canon cameras. Enabling capture mode for Nikon cameras. Error copying file %s to %s Error exportingError exporting photo to gimp.Error updating lensfun databaseExport FileExport dimensionsExport failedExporting to %sExporting to GIMP...Exporting...ExposExposureExposure CompensationExposure Mask Colorspace:F/%.1f FebruaryFile exportedFile not saved!File type:FilenameFilename & TagsFilename example:Filename template:Flickr errorFlipFlip the photo over the x-axisFocalFocal LengthFocallengthFound %d cameras FreeformFull export pathGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2GreenGreen Amount AdjustmentGridHarmonious triangles #1Harmonious triangles #2HeightHeight:Hiding exposure maskHistogramHistogram height:HueHue ShiftISOISO paper (A4)ISO%dIconImage copied to clipboardImage openedInterval ShootingIt seems like rawstudio lost its authentication to upload to your account, please re-authenticate.JPEG (Joint Photographic Experts Group)JPEG QualityJanuaryJulyJuneKeep aspectLarge gamut color spaceLast image:Lens CorrectionLens LibraryLens MakeLens ModelLens UnknownLens makeLens modelLensfun database updatedLight DenoisingLight out mode not availableLoad non-RAW imagesLoading %s ...MarchMaster ControlMaximum sizeMaximum size: %d x %dMayMinimize this window after captureMirrorMirror the photo over the y-axisModelMonitor CameraNameNo Lens InformationNo PhotoNo camera connected. No camera selected - Cannot connect! No white balance to set fromNoneNothing to pasteNovemberOctoberOpenOpen curve ...Open directoryOpen new images after captureOpen recursiveOpening directory...Opening photo ...Original AspectOutput directory:Overwrite File?PNG (Portable Network Graphics)Password: Pasted settingsPasting settings to imagesPercent:Photo height:Photo scale:Photo sizePhoto width:Picasa Webalbum AuthentificationPlace cache in home directoryPlease type in your username and password for Picasa Web Albums.PreferencesPress F10 to return preview to this windowPreview background color:PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProcessing Image %d/%dProcessing Image 1/%d.ProfileProgressPublic (everyone can see this)Quick exportRawstudioRawstudio Lens EditorRawstudio Lens LibraryRawstudio Tethered ShootingReadyRedRed Amount AdjustmentRed Chromatic Aberration CorrectionRemoveRemove allRemoving images from batch queueResetReset curveRetain EXIF metadataRetry Operation?Rotate ClockwiseRotate Counter ClockwiseRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturSaturationSave 16 bit TIFFSave 16 bit linear PNGSave curve as ...Save uncompressed TIFFSaving %s ...Seconds between each shot:Select ActionSelect All/NoneSelect OK to use this screen for fullscreen previewSelect Saved CurveSelect Screen for fullscreen previewSelect camera:Select screen to open fullscreen previewSelect settings to copySelect which settings to add to batch queueSeptemberSet lensSettingSharpSharpenSharpen AmountShow Filenames in IconboxShowing exposure maskShutterspeedSizeStartStart ShootingStatus:Step 1:Step 2:Stop ShootingSwitch UserTCATIFF (Tagged Image File Format)Tag searchTagsTags for new images:Tags, separated by spaces:Take PhotoTempTemperatureThe file '%s' already exists. Do you want to overwrite the file?Time left: %dh %dm %dsTime left: ...TimestampTintTint ShiftTitleToolsTransformsU (%d)U (-)Unable to locate screen for fullscreen previewUnhandled error from FacebookUnhandled error from PicasaUnprioritized photosUpdate lensfun databaseUpload photo to FacebookUpload photo to FlickrUpload photo to PicasaUse system themeUsername: VignVignettingVignetting CorrectionVisible to FamilyVisible to FriendsWe recieved an error during authentication. Please try again.Welcome to Tethered shooting! Make sure your camera is NOT mounted in your operating system. White balanceWidthWidth:Would you like to Retry the operation?Your files will be permanently deleted!_1_2_3_About_Add to batch queue_Add view to queue..._Auto_Auto group_Batch_Camera_Copy Image to Clipboard_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Lens Library_Lights out_Next_Next Photo_Online Documentation_Open Directory_Paste settings_Photo_Preferences_Previous_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Save camera default settings_Set Priority_Show Photo On Secondary Monitor_Snapshot_Sort by_Split_Start_Straighten_Tag Photo..._Tethered Shooting_Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelstelephotowideangleProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-04-03 23:10+0200 PO-Revision-Date: 2011-04-01 03:42+0400 Last-Translator: Александр Прокудин Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: UTF-8 Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); 10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); (Невозможно авторизоваться) (Авторизация выполнена успешно) A B C %%.1fs %2c — увеличение номера%DD — день недели из Exif%DM — месяц из Exif (текст)%DY — год из Exif (ГГГГ)%Dd — дата из Exif (ДД)%Dm — месяц из Exif (ММ)%Dy — год из Exif (ГГ)%d — дата из Exif (ГГГГ-ММ-ДД)%d снимков добавлено в очередь на проявкуУдалено снимков из очереди на обработку: %d%dмм %f — исходное имя файла%p — размещение исходного файла%s — набор параметров (A, B или C)%t — время из Exif (ЧЧ-ММ-СС)(Не указан пользователь)(Выбрать профиль)* (%d)* (-)—. Щёлкните для изменения значения. Щёлкните для сброса изменений1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35мм)4:38:3 (Dualhead XGA)Апертура: F/%.01f Фокусное расстояние: %dмм ISO: %u Производитель: %s Модель: %s Выдержка: %.1fс Выдержка: 1/%.0fс Время: %s%s AОбработка снимков RAW для GTK+/GNOMEДобавить профиль...Добавить профиль...Добавить метки к выбранным фотографиямФотографии добавляются в очередь на экспортВыполняется коррекция с автоматическим балансом белогоВыполняется коррекция по балансу белого камерыАльбомыВсе профилиВсе файлыВсе объективыВсе снимки (кроме удалённых)При взаимодействии с PicasaWeb произошла ошибка:ДиафрагмаАпрельСоотношениеАвгустАутентифицировать RawstudioПоправить концы кривойBОсновные параметрыЭкспортСинийИзменение количества синегоКоррекция хроматических аберраций в синем каналеБуфер пустCХА, сХА, кПроизводитель камерыМодель камерыПрофили камер (DCP)Камера неизвестнаПроизводитель камерыМодель камерыОтменитьНе удалось авторизоватьсяНазваниеВыполняется захват. СменитьИзменён приоритет снимка (%d)Изменён приоритет снимка (*)Изменён приоритет снимка (D)Микшер каналовМикшер каналовУкажите каталог для экспортаЦвШумЦветовые профили (ICC и ICM)Цветной шумПространство для сохраненияУдаление цветного шумаПостоянный масштаб: %dПостоянная высотаПостоянная высота: %dМасштабированиеПостоянная ширинаПостоянная ширина: %dКонтр.КонтрастПараметры проявки скопированыСкопировать метаданные ExifСкопировать метаданные Exif в XMPКопировать параметры обработки из активной в новые фотографииФото копируется в буфер обменаНе удалось создать каталог для данных LensFun — %sНе удалось создать каталог для экспортаНе удалось создать каталог для временных файлов.Не удалось экспортировать фотоНе удалось получить список файлов из %s или записать его в %s.Не удалось получить список файлов из %s.Не удалось открыть базу данных %sНе удалось открыть изображение! Не удалось открыть временный файл на диске для записиНе удалось сохранить файл: %s Проверьте, есть ли у вас права на запись в эту папку.Не удалось открыть фотоСоздать альбомКадрироватьТекущий пользователь:КриваяD (%d)D (-)ДекабрьУдалить снимкиУдалённые снимкиУдаляются снимкиЯркШумПодавление шумаОписаниеКаталогКаталог:Отсоединить камеруПространство монитора: Не загружать выделяемые фотоНе кадрироватьОшибка: gphoto2 возвратил значение ошибки %d Текст ошибки: %s Изменить параметры объективаИзменить параметры экспортаВыберите цветовой профильИспользовать этот объективВключеноВключается режим захвата для камер Canon. Включается режим захвата для камер Nikon. Ошибка при копировании файла %s в %s Ошибка при экспортеОшибка при экспорте в GIMPОшибка при обновлении базы данных LensFunЭкспортировать файлРазмеры при экспортеНе удалось экспортировать фотоЭкспорт в %sВыполняется экспорт в GIMP…Выполняется экспорт…Экспоз.ЭкспозицияКомпенсация экспозицииПространство маски экспозиции:F/%.1f ФевральФайл экспортированФайл не сохранён!Тип файла:Имя файлаИмена файлов и меткиПример имени файла:Шаблон имени файла:Ошибка FlickrОтразитьЗеркально отразить по горизонтальной осиФокусное расстояниеФокусное расстояниеФокусному расстояниюНайдено камер: %d ПроизвольноеПолный путь для экспортаОбщиеЗолотой прямоугольникЗолотое сечениеЗолотые треугольники №1Золотые треугольники №2ЗелёныйИзменение количества зелёногоСеткаГармоничные треугольники №1Гармоничные треугольники №2ВысотаВысота:Прячется маска экспозицииГистограммаВысота гистограммы:ТонСмещение тонаISOФормат бумаги ISO (A4)ISO%dМинитюраФото скопировано в буфер обменаСнимок открытСъёмка с интерваломПохоже, что Rawstudio потерял авторизацию вашей учётной записи, аутентифицируйтесь заново.JPEG (Joint Photographic Experts Group)Качество JPEG:ЯнварьИюльИюньСохранять соотношениеПространство с широким охватомПоследнее фото:Коррекция искаженийКаталог объективовПроизводитель объективаМодель объективаОбъектив неизвестенПроизводитель объективаМодель объективаБаза данных LensFun обновленаПодавление шума в яркостном каналеРежим выключения света недоступенЗагружать не-RAWЗагружается %s ...МартОбщее управлениеМаксимальный размерМаксимальный размер: %d x %dМайСкрывать это окно по завершении съёмкиЗеркалоЗеркально отразить по вертикальной осиМодельСледить за камеройИмениНет данных об объективеНет фотоНет подключённых камер. Нет выбранных камер — соединение невозможно! Неоткуда взять баланс белогоНетНет применяемых параметров проявкиНоябрьОктябрьКаталогиЗагрузить кривую из файла...Открыть каталогОткрывать новые фотографии после съёмкиОткрывать рекурсивноОткрывается каталогОткрывается фото...ИсходноеКаталог вывода:Перезаписать файл?PNG (Portable Network Graphics)Пароль:Параметры проявки примененыПараметры обработки применяютсяПроцент:Высота снимка:Масштаб снимка:Размер снимка:Ширина снимка:Авторизация на Picasa WebalbumХранить кэш в домашнем каталогеУкажите имя пользователя и пароль на Picasa Web Albums.ПараметрыНажмите F10 для возврата предпросмотра в этом окнеЦвет фона:ПриоритетыСнимки с приоритетом 1Снимки с приоритетом 2Снимки с приоритетом 3Обрабатывается фото %d/%dОбрабатывается фото 1/%dПрофильПрогрессВидно всемБыстрый экспортRawstudioРедактор объективов RawstudioКаталог объективов RawstudioУправление камеройГотовоКрасныйИзменение количества красногоКоррекция хроматических аберраций в красном каналеУдалитьУдалить всеФотографии удаляются из очереди на обработкуСброситьОбнулить кривуюСохранить метаданные ExifПопытаться снова?Повернуть по часовой стрелкеПовернуть против часовой стрелкиПовернуть снимок на 90° по часовой стрелкеПовернуть снимок на 90° против часовой стрелкиПравило третейНасыщ.НасыщенностьСохранить TIFF с 16 разрядами на цветовой каналСохранить 16-разрядный линейный PNGСохранить кривую как...Сохранить несжатый TIFFСохраняется %s ...Секунд между каждым снимком:Выбрать действиеВыбрать или снять всёНажмите ОК, чтобы использовать этот экран для полноэкранного просмотраВыбрать сохранённую кривуюВыберите экран для полноэкранного просмотраВыберите камеру:Выберите экран для открытия полноэкранного просмотраВыберите копируемые параметрыВыберите, какие параметры добавить в очередь на проявкуСентябрьВыбрать объективПараметрРезк.РезкостьВеличина резкостиПоказывать имена файлов в лентеПоказывается маска экспозицииВыдержкеРазмерНачатьНачать съёмкуСостояние:Шаг 1:Шаг 2:Остановить съёмкуСменить пользователяTCATIFF (Tagged Image File Format)Поиск по меткамМеткиМетки для новых снимков:Разделённые пробелами метки:Сделать снимокТемп.ТемператураФайл '%s' уже существует. Вы хотите перезаписать его?Осталось времени: %dh %dm %dsОсталось времени: ...ВремениОттенокСмещение оттенкаНазваниеИнструментыПреобразованияU (%d)U (-)Не удаётся найти экран для полноэкранного просмотраНеобрабатываемая ошибка, переданная FacebookНеобрабатываемая ошибка, переданная PicasaСнимки без приоритетаОбновить базу данных LensFunЗагрузить фото на FacebookЗагрузить фото на FlickrЗагрузить фото на PicasaИспользовать системный стиль оформленияИмя пользователя:Виньет.ВиньетированиеКоррекция виньетированияВидно семьеВидно друзьямВо время аутентификации произошла ошибка. Попытайтесь снова.Здесь вы можете управлять съёмкой. Убедитесь, что камера не смонтирована в системе. Баланс белогоШиринаШирина:Вы хотите попытаться снова?Ваши файлы будут удалены безвозвратно!_1_2_3_О программе_Добавить в очередьДобавить _всю серию в очередь…_АвтоСгруппировать _автоматически_Экспорт_КамераС_копировать фото в буфер обмена_Скопировать параметры_Кадрировать_Удалить помеченные снимки_ПравкаЭкспортировать _как_Экспортировать в GIMPМ_аска экспозиции_ФайлПо_метить для удаленияП_олноэкранный режимС_группировать_СправкаПанель _эскизов_Каталог объективов_Выключить свет_Следующий_Следующее фото_Справка в Сети_Открыть каталог_Вставить параметрыС_нимок_Параметры_Предыдущий_Предыдущее фотоБыстрый экспортВ_ыход_Перезагрузить каталог_Удалить из очереди_Снять приоритет_Забыть параметры_Отменить изменения_Использовать для камеры по умолчанию_Указать приоритетПоказать фото на втором _монитореС_нимок_Сортировать по_Разделить_Начать экспорт_Выровнять_Добавить метку..._Управление камеройПанель _инструментов_Снять кадрирование_РазгруппироватьСн_ять выравнивание_Вид_Баланс белого_Уместить в окнепикселовтелефотоширокоугольныйrawstudio-2.0/po/ru.po0000644000175000017500000017005311546425272011737 00000000000000# translation of Rawstudio to Russian # Copyright (C) 2009 rawstudio Alexandre Prokoudine # This file is distributed under the same license as the PACKAGE package. # # Александр Прокудин , 2007-2011 # msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-04-03 23:10+0200\n" "PO-Revision-Date: 2011-04-01 03:42+0400\n" "Last-Translator: Александр Прокудин \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: UTF-8\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n" "%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2); 10<=4 && (n%100<10 || n" "%100>=20) ? 1 : 2);\n" #: librawstudio/rs-lens-db-editor.c:325 msgid "All lenses" msgstr "Все объективы" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "Ошибка при обновлении базы данных LensFun" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "База данных LensFun обновлена" #: librawstudio/rs-lens-db-editor.c:565 msgid "Rawstudio Lens Library" msgstr "Каталог объективов Rawstudio" #: librawstudio/rs-lens-db-editor.c:590 msgid "Lens make" msgstr "Производитель объектива" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "Модель объектива" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "Фокусное расстояние" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1530 msgid "Aperture" msgstr "Диафрагма" #: librawstudio/rs-lens-db-editor.c:606 msgid "Camera make" msgstr "Производитель камеры" #: librawstudio/rs-lens-db-editor.c:610 msgid "Camera model" msgstr "Модель камеры" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "Включено" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "Обновить базу данных LensFun" #: librawstudio/rs-lens-db-editor.c:734 msgid "Could not create temporary directory." msgstr "Не удалось создать каталог для временных файлов." #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "Не удалось получить список файлов из %s." #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "Не удалось получить список файлов из %s или записать его в %s." #: librawstudio/rs-lens-db-editor.c:796 #, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Не удалось создать каталог для данных LensFun — %s" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "Ошибка при копировании файла %s в %s\n" #: librawstudio/rs-lens-db-editor.c:939 msgid "Rawstudio Lens Editor" msgstr "Редактор объективов Rawstudio" #: librawstudio/rs-lens-db-editor.c:950 msgid "Lens Make" msgstr "Производитель объектива" #: librawstudio/rs-lens-db-editor.c:954 msgid "Lens Model" msgstr "Модель объектива" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "Фокусное расстояние" #: librawstudio/rs-lens-db-editor.c:966 msgid "Camera Make" msgstr "Производитель камеры" #: librawstudio/rs-lens-db-editor.c:970 msgid "Camera Model" msgstr "Модель камеры" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "Использовать этот объектив" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "Выбрать объектив" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "Каталог объективов" #: librawstudio/rs-library.c:254 #, c-format msgid "Could not open database %s" msgstr "Не удалось открыть базу данных %s" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "широкоугольный" #: librawstudio/rs-library.c:816 msgid "telephoto" msgstr "телефото" #: librawstudio/rs-library.c:832 msgid "January" msgstr "Январь" #: librawstudio/rs-library.c:835 msgid "February" msgstr "Февраль" #: librawstudio/rs-library.c:838 msgid "March" msgstr "Март" #: librawstudio/rs-library.c:841 msgid "April" msgstr "Апрель" #: librawstudio/rs-library.c:844 msgid "May" msgstr "Май" #: librawstudio/rs-library.c:847 msgid "June" msgstr "Июнь" #: librawstudio/rs-library.c:850 msgid "July" msgstr "Июль" #: librawstudio/rs-library.c:853 msgid "August" msgstr "Август" #: librawstudio/rs-library.c:856 msgid "September" msgstr "Сентябрь" #: librawstudio/rs-library.c:859 msgid "October" msgstr "Октябрь" #: librawstudio/rs-library.c:862 msgid "November" msgstr "Ноябрь" #: librawstudio/rs-library.c:865 msgid "December" msgstr "Декабрь" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dмм " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "Добавить профиль..." #: librawstudio/rs-profile-selector.c:242 msgid "Embedded Profile" msgstr "Выберите цветовой профиль" #: librawstudio/rs-profile-selector.c:244 msgid "(Select Profile)" msgstr "(Выбрать профиль)" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "Экспоз." #: librawstudio/rs-settings.c:80 msgid "Exposure Compensation" msgstr "Компенсация экспозиции" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 msgid "Satur" msgstr "Насыщ." #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "Насыщенность" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "Тон" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "Смещение тона" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "Контр." #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "Контраст" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temp" msgstr "Темп." #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "Температура" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "Оттенок" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "Смещение оттенка" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 msgid "Sharp" msgstr "Резк." #: librawstudio/rs-settings.c:133 msgid "Sharpen Amount" msgstr "Величина резкости" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "ЯркШум" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "Подавление шума в яркостном канале" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "ЦвШум" #: librawstudio/rs-settings.c:145 msgid "Colour Denoising" msgstr "Удаление цветного шума" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "ХА, к" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "Коррекция хроматических аберраций в красном канале" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "ХА, с" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "Коррекция хроматических аберраций в синем канале" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "Виньет." #: librawstudio/rs-settings.c:163 msgid "Vignetting Correction" msgstr "Коррекция виньетирования" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 msgid "Red" msgstr "Красный" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "Изменение количества красного" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "Зелёный" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "Изменение количества зелёного" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "Синий" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "Изменение количества синего" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "Пространство с широким охватом" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 msgid "JPEG Quality" msgstr "Качество JPEG:" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "Название" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "Загрузить фото на Facebook" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "Шаг 1:" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "Шаг 2:" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "Аутентифицировать Rawstudio" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "Необрабатываемая ошибка, переданная Facebook" #: plugins/output-facebook/output-facebook.c:329 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "Альбомы" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "Создать альбом" #: plugins/output-flickr/output-flickr.c:113 msgid "Title" msgstr "Название" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "Описание" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "Метки" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "Видно всем" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "Видно друзьям" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "Видно семье" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "Загрузить фото на Flickr" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "Во время аутентификации произошла ошибка. Попытайтесь снова." #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" "Похоже, что Rawstudio потерял авторизацию вашей учётной записи, " "аутентифицируйтесь заново." #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "Ошибка Flickr" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 msgid "Full export path" msgstr "Полный путь для экспорта" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "Пространство для сохранения" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 msgid "Copy EXIF metadata" msgstr "Скопировать метаданные Exif" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "Сохранить метаданные Exif" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "Загрузить фото на Picasa" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "Необрабатываемая ошибка, переданная Picasa" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "Текущий пользователь:" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr " (Авторизация выполнена успешно)" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr " (Невозможно авторизоваться)" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "(Не указан пользователь)" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "Сменить пользователя" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "Не удалось авторизоваться" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "Попытаться снова?" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "При взаимодействии с PicasaWeb произошла ошибка:" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "Вы хотите попытаться снова?" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "Авторизация на Picasa Webalbum" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "Укажите имя пользователя и пароль на Picasa Web Albums." #: plugins/output-picasa/rs-picasa-client.c:234 msgid "Username: " msgstr "Имя пользователя:" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "Пароль:" #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "Сохранить 16-разрядный линейный PNG" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "Скопировать метаданные Exif в XMP" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Сохранить несжатый TIFF" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "Сохранить TIFF с 16 разрядами на цветовой канал" #: plugins/output-tifffile/output-tifffile.c:108 msgid "TIFF (Tagged Image File Format)" msgstr "TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f — исходное имя файла" #: src/filename.c:315 #, c-format msgid "%p - Path of original file" msgstr "%p — размещение исходного файла" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c — увеличение номера" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s — набор параметров (A, B или C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "%d — дата из Exif (ГГГГ-ММ-ДД)" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "%DY — год из Exif (ГГГГ)" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "%Dy — год из Exif (ГГ)" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "%Dm — месяц из Exif (ММ)" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "%DM — месяц из Exif (текст)" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "%Dd — дата из Exif (ДД)" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "%DD — день недели из Exif" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "%t — время из Exif (ЧЧ-ММ-СС)" #: src/gtk-interface.c:154 msgid "Width" msgstr "Ширина" #: src/gtk-interface.c:154 msgid "Height" msgstr "Высота" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Открывается фото..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "Не удалось открыть фото" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Снимок открыт" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "Изменён приоритет снимка (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "Изменён приоритет снимка (D)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "Изменён приоритет снимка (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "Не удаётся найти экран для полноэкранного просмотра" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "Нажмите F10 для возврата предпросмотра в этом окне" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "Выберите экран для открытия полноэкранного просмотра" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "Выберите экран для полноэкранного просмотра" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "Нажмите ОК, чтобы использовать этот экран для полноэкранного просмотра" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Каталог:" #: src/gtk-interface.c:777 src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Укажите каталог для экспорта" #: src/gtk-interface.c:793 src/rs-batch.c:1075 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Шаблон имени файла:" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Пример имени файла:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Тип файла:" #. Add preferences box #: src/gtk-interface.c:879 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Параметры" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Цвет фона:" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Высота гистограммы:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Использовать системный стиль оформления" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Хранить кэш в домашнем каталоге" #: src/gtk-interface.c:926 msgid "Display Colorspace:" msgstr "Пространство монитора: " #: src/gtk-interface.c:938 msgid "Exposure Mask Colorspace:" msgstr "Пространство маски экспозиции:" #: src/gtk-interface.c:1011 msgid "General" msgstr "Общие" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "Быстрый экспорт" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "Открывается каталог" #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Открывать рекурсивно" #: src/gtk-interface.c:1465 msgid "Directory" msgstr "Каталог" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "Поиск по меткам" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Инструменты" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Экспорт" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Каталоги" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Готово" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "Прогресс" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Открыть каталог" #: src/rs-actions.c:253 src/rs-batch.c:542 msgid "Could not create output directory." msgstr "Не удалось создать каталог для экспорта" #: src/rs-actions.c:257 msgid "Exporting..." msgstr "Выполняется экспорт…" #: src/rs-actions.c:265 msgid "File exported" msgstr "Файл экспортирован" #: src/rs-actions.c:270 src/rs-actions.c:293 msgid "Export failed" msgstr "Не удалось экспортировать фото" #: src/rs-actions.c:300 msgid "Exporting to GIMP..." msgstr "Выполняется экспорт в GIMP…" #: src/rs-actions.c:305 msgid "Error exporting" msgstr "Ошибка при экспорте" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "Ошибка при экспорте в GIMP" #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "Удаляются снимки" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "Ваши файлы будут удалены безвозвратно!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Удалить снимки" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "Фото копируется в буфер обмена" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "Фото скопировано в буфер обмена" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "" #. Build GUI #: src/rs-actions.c:463 msgid "Profile" msgstr "Профиль" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Экспозиция" #: src/rs-actions.c:468 msgid "White balance" msgstr "Баланс белого" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Резкость" #: src/rs-actions.c:470 msgid "Denoise" msgstr "Подавление шума" #: src/rs-actions.c:471 msgid "Color denoise" msgstr "Цветной шум" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "Микшер каналов" #: src/rs-actions.c:473 msgid "TCA" msgstr "TCA" #: src/rs-actions.c:474 msgid "Vignetting" msgstr "Виньетирование" #: src/rs-actions.c:475 src/rs-toolbox.c:803 msgid "Curve" msgstr "Кривая" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "Выбрать или снять всё" #: src/rs-actions.c:498 msgid "Select settings to copy" msgstr "Выберите копируемые параметры" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Параметры проявки скопированы" #: src/rs-actions.c:587 msgid "Pasting settings to images" msgstr "Параметры обработки применяются" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Параметры проявки применены" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Нет применяемых параметров проявки" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Буфер пуст" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Выполняется коррекция с автоматическим балансом белого" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "Неоткуда взять баланс белого" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Выполняется коррекция по балансу белого камеры" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "Разделённые пробелами метки:" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "Добавить метки к выбранным фотографиям" #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "Показывается маска экспозиции" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "Прячется маска экспозиции" #: src/rs-actions.c:1067 msgid "Adding images to batch queue" msgstr "Фотографии добавляются в очередь на экспорт" #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "%d снимков добавлено в очередь на проявку" #: src/rs-actions.c:1101 src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Выберите, какие параметры\n" "добавить в очередь на проявку" #: src/rs-actions.c:1188 msgid "Removing images from batch queue" msgstr "Фотографии удаляются из очереди на обработку" #: src/rs-actions.c:1203 #, c-format msgid "%d photos removed from batch queue" msgstr "Удалено снимков из очереди на обработку: %d" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1505 msgid "Add Profile ..." msgstr "Добавить профиль..." #: src/rs-actions.c:1266 msgid "All Profiles" msgstr "Все профили" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "Профили камер (DCP)" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "Цветовые профили (ICC и ICM)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Все файлы" #: src/rs-actions.c:1399 msgid "A raw image converter for GTK+/GNOME" msgstr "Обработка снимков RAW для GTK+/GNOME" #: src/rs-actions.c:1436 msgid "_File" msgstr "_Файл" #: src/rs-actions.c:1437 msgid "_Edit" msgstr "_Правка" #: src/rs-actions.c:1438 msgid "_Photo" msgstr "С_нимок" #: src/rs-actions.c:1439 msgid "_Set Priority" msgstr "_Указать приоритет" #: src/rs-actions.c:1440 msgid "_White Balance" msgstr "_Баланс белого" #: src/rs-actions.c:1441 msgid "_View" msgstr "_Вид" #: src/rs-actions.c:1442 msgid "_Sort by" msgstr "_Сортировать по" #: src/rs-actions.c:1443 msgid "_Batch" msgstr "_Экспорт" #: src/rs-actions.c:1444 msgid "_Help" msgstr "_Справка" #: src/rs-actions.c:1446 msgid "_Snapshot" msgstr "С_нимок" #. File menu #: src/rs-actions.c:1449 msgid "_Open Directory" msgstr "_Открыть каталог" #: src/rs-actions.c:1450 msgid "_Quick Export" msgstr "Быстрый экспорт" #: src/rs-actions.c:1451 msgid "_Export As" msgstr "Экспортировать _как" #: src/rs-actions.c:1452 msgid "_Export to Gimp" msgstr "_Экспортировать в GIMP" #: src/rs-actions.c:1453 msgid "_Copy Image to Clipboard" msgstr "С_копировать фото в буфер обмена" #: src/rs-actions.c:1454 msgid "_Reload directory" msgstr "_Перезагрузить каталог" #: src/rs-actions.c:1455 msgid "_Delete flagged photos" msgstr "_Удалить помеченные снимки" #: src/rs-actions.c:1456 msgid "_Quit" msgstr "В_ыход" #. Edit menu #: src/rs-actions.c:1459 msgid "_Revert settings" msgstr "_Отменить изменения" #: src/rs-actions.c:1460 msgid "_Copy settings" msgstr "_Скопировать параметры" #: src/rs-actions.c:1461 msgid "_Paste settings" msgstr "_Вставить параметры" #: src/rs-actions.c:1462 msgid "_Reset settings" msgstr "_Забыть параметры" #: src/rs-actions.c:1463 msgid "_Save camera default settings" msgstr "_Использовать для камеры по умолчанию" #: src/rs-actions.c:1464 msgid "_Preferences" msgstr "_Параметры" #. Photo menu #: src/rs-actions.c:1467 msgid "_Flag photo for deletion" msgstr "По_метить для удаления" #: src/rs-actions.c:1468 msgid "_1" msgstr "_1" #: src/rs-actions.c:1469 msgid "_2" msgstr "_2" #: src/rs-actions.c:1470 msgid "_3" msgstr "_3" #: src/rs-actions.c:1471 msgid "_Remove priority" msgstr "_Снять приоритет" #: src/rs-actions.c:1472 msgid "_Auto" msgstr "_Авто" #: src/rs-actions.c:1473 msgid "_Camera" msgstr "_Камера" #: src/rs-actions.c:1474 msgid "_Crop" msgstr "_Кадрировать" #: src/rs-actions.c:1475 msgid "_Uncrop" msgstr "_Снять кадрирование" #: src/rs-actions.c:1476 msgid "_Straighten" msgstr "_Выровнять" #: src/rs-actions.c:1477 msgid "_Unstraighten" msgstr "Сн_ять выравнивание" #: src/rs-actions.c:1478 msgid "_Group" msgstr "С_группировать" #: src/rs-actions.c:1479 msgid "_Ungroup" msgstr "_Разгруппировать" #: src/rs-actions.c:1480 msgid "_Auto group" msgstr "Сгруппировать _автоматически" #: src/rs-actions.c:1481 msgid "_Tag Photo..." msgstr "_Добавить метку..." #: src/rs-actions.c:1482 msgid "Rotate Clockwise" msgstr "Повернуть по часовой стрелке" #: src/rs-actions.c:1483 msgid "Rotate Counter Clockwise" msgstr "Повернуть против часовой стрелки" #: src/rs-actions.c:1484 msgid "Flip" msgstr "Отразить" #: src/rs-actions.c:1485 msgid "Mirror" msgstr "Зеркало" #. View menu #: src/rs-actions.c:1488 msgid "_Previous photo" msgstr "_Предыдущее фото" #: src/rs-actions.c:1489 msgid "_Next Photo" msgstr "_Следующее фото" #: src/rs-actions.c:1490 msgid "_Lens Library" msgstr "_Каталог объективов" #: src/rs-actions.c:1491 msgid "_Tethered Shooting" msgstr "_Управление камерой" #. Batch menu #: src/rs-actions.c:1494 msgid "_Add to batch queue" msgstr "_Добавить в очередь" #: src/rs-actions.c:1495 msgid "_Add view to queue..." msgstr "Добавить _всю серию в очередь…" #: src/rs-actions.c:1496 msgid "_Remove from batch queue" msgstr "_Удалить из очереди" #: src/rs-actions.c:1497 msgid "_Start" msgstr "_Начать экспорт" #. help menu #: src/rs-actions.c:1500 msgid "_Online Documentation" msgstr "_Справка в Сети" #: src/rs-actions.c:1501 msgid "_About" msgstr "_О программе" #: src/rs-actions.c:1510 msgid "_Zoom to fit" msgstr "_Уместить в окне" #: src/rs-actions.c:1511 msgid "_Iconbox" msgstr "Панель _эскизов" #: src/rs-actions.c:1512 msgid "_Toolbox" msgstr "Панель _инструментов" #: src/rs-actions.c:1513 msgid "_Fullscreen" msgstr "П_олноэкранный режим" #: src/rs-actions.c:1514 msgid "_Show Photo On Secondary Monitor" msgstr "Показать фото на втором _мониторе" #: src/rs-actions.c:1515 msgid "Show Filenames in Iconbox" msgstr "Показывать имена файлов в ленте" #: src/rs-actions.c:1516 msgid "Load non-RAW images" msgstr "Загружать не-RAW" #: src/rs-actions.c:1517 msgid "Do not Load Selected Images" msgstr "Не загружать выделяемые фото" #: src/rs-actions.c:1518 msgid "_Exposure mask" msgstr "М_аска экспозиции" #: src/rs-actions.c:1519 msgid "_Split" msgstr "_Разделить" #: src/rs-actions.c:1521 msgid "_Lights out" msgstr "_Выключить свет" #: src/rs-actions.c:1527 msgid "Name" msgstr "Имени" #: src/rs-actions.c:1528 msgid "Timestamp" msgstr "Времени" #: src/rs-actions.c:1529 msgid "ISO" msgstr "ISO" #: src/rs-actions.c:1531 msgid "Focallength" msgstr "Фокусному расстоянию" #: src/rs-actions.c:1532 msgid "Shutterspeed" msgstr "Выдержке" #. Snapshot labels #: src/rs-actions.c:1537 src/rs-toolbox.c:207 src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1538 src/rs-toolbox.c:208 src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1539 src/rs-toolbox.c:209 src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Отменить" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Последнее фото:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Осталось времени: %dh %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "Обрабатывается фото %d/%d" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Осталось времени: ..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "Обрабатывается фото 1/%d" #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "Загружается %s ..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "Сохраняется %s ..." #: src/rs-batch.c:635 msgid "Could not export photo." msgstr "Не удалось экспортировать фото" #: src/rs-batch.c:695 msgid "Icon" msgstr "Минитюра" #: src/rs-batch.c:702 msgid "Filename" msgstr "Имя файла" #: src/rs-batch.c:709 msgid "Setting" msgstr "Параметр" #: src/rs-batch.c:802 msgid "Start" msgstr "Начать" #: src/rs-batch.c:805 msgid "Remove" msgstr "Удалить" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Удалить все" #: src/rs-batch.c:916 src/rs-batch.c:1091 msgid "Edit output settings" msgstr "Изменить параметры экспорта" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Размер снимка:" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "Масштабирование" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Постоянная ширина" #: src/rs-batch.c:962 msgid "Constant height" msgstr "Постоянная высота" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Максимальный размер" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Ширина снимка:" #: src/rs-batch.c:978 src/rs-batch.c:987 msgid "pixels" msgstr "пикселов" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "Высота снимка:" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "Масштаб снимка:" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Постоянная ширина:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Постоянная высота:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "Постоянный масштаб:\n" "%d" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Максимальный размер:\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Каталог вывода:" #: src/rs-batch.c:1100 msgid "Change" msgstr "Сменить" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "Размеры при экспорте" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "" #: src/rs-camera-db.c:459 msgid "Model" msgstr "Модель" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "Режим выключения света недоступен" #: src/rs-preview-widget.c:887 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Размер" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "—" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Сетка" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Нет" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "Золотое сечение" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "Правило третей" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Золотые треугольники №1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Золотые треугольники №2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Гармоничные треугольники №1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Гармоничные треугольники №2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Соотношение" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "Произвольное" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "Исходное" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "Формат бумаги ISO (A4)" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35мм)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "16:9 (HDTV)" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "Золотой прямоугольник" #: src/rs-preview-widget.c:1180 src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Кадрировать" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "Не кадрировать" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" #: src/rs-preview-widget.c:1238 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:522 msgid "Export File" msgstr "Экспортировать файл" #: src/rs-save-dialog.c:282 msgid "File not saved!" msgstr "Файл не сохранён!" #: src/rs-save-dialog.c:299 #, c-format msgid "Exporting to %s" msgstr "Экспорт в %s" #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" "Не удалось сохранить файл: %s\n" "\n" "Проверьте, есть ли у вас права на запись в эту папку." #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "Перезаписать файл?" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" "Файл '%s' уже существует.\n" "\n" "Вы хотите перезаписать его?" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Сохранять соотношение" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Ширина:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Высота:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Процент:" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Все снимки (кроме удалённых)" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Снимки с приоритетом 1" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Снимки с приоритетом 2" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Снимки с приоритетом 3" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Снимки без приоритета" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Удалённые снимки" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Приоритеты" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" "%s\n" "\n" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "Производитель: %s\n" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "Модель: %s\n" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "Фокусное расстояние: %dмм\n" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "Выдержка: %.1fс\n" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "Выдержка: 1/%.0fс\n" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "Апертура: F/%.01f\n" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "ISO: %u\n" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "Время: %s" #: src/rs-store.c:1371 msgid "* (-)" msgstr "* (-)" #: src/rs-store.c:1372 msgid "1 (-)" msgstr "1 (-)" #: src/rs-store.c:1373 msgid "2 (-)" msgstr "2 (-)" #: src/rs-store.c:1374 msgid "3 (-)" msgstr "3 (-)" #: src/rs-store.c:1375 msgid "U (-)" msgstr "U (-)" #: src/rs-store.c:1376 msgid "D (-)" msgstr "D (-)" #: src/rs-tag-gui.c:65 #, fuzzy, c-format msgid "Tag search [%s]" msgstr "Поиск по меткам" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" "Ошибка: gphoto2 возвратил значение ошибки %d\n" "Текст ошибки: %s\n" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "Включается режим захвата для камер Canon.\n" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "Включается режим захвата для камер Nikon.\n" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "" #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "Не удалось открыть временный файл на диске для записи" #: src/rs-tethered-shooting.c:558 msgid "Could not open image!\n" msgstr "Не удалось открыть изображение!\n" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "Выполняется захват.\n" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "Начать съёмку" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "Найдено камер: %d\n" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "Нет выбранных камер — соединение невозможно!\n" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "Нет подключённых камер.\n" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:938 msgid "Stop Shooting" msgstr "Остановить съёмку" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "Выберите камеру:" #: src/rs-tethered-shooting.c:1003 msgid "Take Photo" msgstr "Сделать снимок" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "Следить за камерой" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "Отсоединить камеру" #. Status window #: src/rs-tethered-shooting.c:1022 msgid "Status:" msgstr "Состояние:" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "Общее управление" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "Метки для новых снимков:" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 msgid "Filename & Tags" msgstr "Имена файлов и метки" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "Секунд между каждым снимком:" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "Съёмка с интервалом" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "Скрывать это окно по завершении съёмки" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "Копировать параметры обработки из активной в новые фотографии" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "Открывать новые фотографии после съёмки" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "Управление камерой" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" "Здесь вы можете управлять съёмкой.\n" "Убедитесь, что камера не смонтирована в системе.\n" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Гистограмма" #: src/rs-toolbox.c:443 msgid "Reset" msgstr "Сбросить" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr ". Щёлкните для сброса изменений" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr ". Щёлкните для изменения значения" #: src/rs-toolbox.c:566 src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Загрузить кривую из файла..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "Выбрать сохранённую кривую" #: src/rs-toolbox.c:700 msgid "Select Action" msgstr "Выбрать действие" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Сохранить кривую как..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Обнулить кривую" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "Поправить концы кривой" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "Изменить параметры объектива" #. Pack everything nice #: src/rs-toolbox.c:800 msgid "Basic" msgstr "Основные параметры" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "Микшер каналов" #: src/rs-toolbox.c:802 msgid "Lens Correction" msgstr "Коррекция искажений" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Зеркально отразить по горизонтальной оси" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Зеркально отразить по вертикальной оси" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Повернуть снимок на 90° по часовой стрелке" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Повернуть снимок на 90° против часовой стрелки" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Преобразования" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "Объектив неизвестен" #: src/rs-toolbox.c:1035 msgid "Lens Disabled" msgstr "" #: src/rs-toolbox.c:1043 msgid "No Lens Information" msgstr "Нет данных об объективе" #: src/rs-toolbox.c:1045 msgid "Camera Unknown" msgstr "Камера неизвестна" #: src/rs-toolbox.c:1050 msgid "No Photo" msgstr "Нет фото" #: src/rs-toolbox.c:1259 msgid "_Previous" msgstr "_Предыдущий" #: src/rs-toolbox.c:1260 msgid "_Next" msgstr "_Следующий" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "Загружать 8-разрядные снимки (JPEG, PNG и т.д.)" #~ msgid " %s added to batch queue" #~ msgstr "%s добавлен в очередь на проявку" #~ msgid "%s already added to batch queue" #~ msgstr "%s уже добавлен в очередь на проявку" #~ msgid "Not in batch queue" #~ msgstr "Не в очереди на проявку" #~ msgid "Processing photos" #~ msgstr "Проявка снимков" #~ msgid "Warmth" #~ msgstr "Теплота" #~ msgid "CA Red" #~ msgstr "ХА, красный" #~ msgid "CA Blue" #~ msgstr "ХА, синий" #~ msgid "Select color profile" #~ msgstr "Выберите цветовой профиль" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Цветовые профили (icc и icm)" #~ msgid "Not a valid color profile." #~ msgstr "Это некорректный цветовой профиль." #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "" #~ "Указанный вами файл не похож на корректный цветовой профиль, который " #~ "можно было бы использовать в Rawstudio." #~ msgid "Enable color management (experimental)" #~ msgstr "Включить управление цветом" #~ msgid "Input profile" #~ msgstr "Профиль камеры: " #~ msgid "BuiltInRGBProfile" #~ msgstr "Встроенный профиль RGB" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Профиль экспорта: " #~ msgid "Intent" #~ msgstr "Цветопередача: " #~ msgid "Perceptual" #~ msgstr "Воспринимаемая" #~ msgid "Relative colormetric" #~ msgstr "Относительная колориметрическая" #~ msgid "Absolute colormetric" #~ msgstr "Абсолютная колориметрическая" #~ msgid "Colors" #~ msgstr "Цвета" #, fuzzy #~ msgid "Change this" #~ msgstr "Сменить" #~ msgid "How much image will be sharpened" #~ msgstr "Насколько будет повышена резкость" #~ msgid "Background renderer active" #~ msgstr "Фоновый отрисовщик активен" #~ msgid "File export canceled" #~ msgstr "Экспорт снимков отменен" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "16-разрядный TIFF (Tagged Image File Format)" #~ msgid "Rotate the photo 180 degrees" #~ msgstr "Повернуть снимок на 180°" #~ msgid "Reset this setting" #~ msgstr "Сбросить этот параметр" #~ msgid "_Zoom to 100%" #~ msgstr "_Масштаб 1:1" #~ msgid "Canon CR2" #~ msgstr "Canon CR2" #~ msgid "Canon CIFF" #~ msgstr "Canon CIFF" #~ msgid "Nikon NEF" #~ msgstr "Nikon NEF" #~ msgid "Minolta raw" #~ msgstr "Minolta RAW" #~ msgid "Canon TIFF" #~ msgstr "Canon TIFF" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Olympus" #~ msgstr "Olympus" #~ msgid "Panasonic raw" #~ msgstr "Panasonic RAW" #~ msgid "Pentax raw" #~ msgstr "Pentax RAW" #~ msgid "Adobe Digital negative" #~ msgstr "Adobe Digital Negative" #~ msgid "Hasselblad" #~ msgstr "Hasselblad" #~ msgid "Epson" #~ msgstr "Epson" #~ msgid "Split" #~ msgstr "Разделить" #~ msgid "Exp. mask" #~ msgstr "Маска экспозиции" #~ msgid "Toggle exposure mask" #~ msgstr "Переключить маску экспозиции" #~ msgid "Set zoom" #~ msgstr "Укажите масштаб отображения снимка" #~ msgid "Zoom out" #~ msgstr "Отдалить" #~ msgid "Zoom in" #~ msgstr "Приблизить" #~ msgid "Zoom to fit" #~ msgstr "Уместить в окне" #~ msgid "Zoom to 100%" #~ msgstr "Показать 100%" #~ msgid "Zoom:" #~ msgstr "Масштаб:" #~ msgid "Straighten" #~ msgstr "Выровнять" #~ msgid "Unstraighten" #~ msgstr "Снять выравнивание" #~ msgid "/File/_Open directory..." #~ msgstr "/Файл/_Открыть каталог..." #, fuzzy #~ msgid "/File/_Quick export" #~ msgstr "/Файл/_Экспортировать" #~ msgid "/File/_Export as..." #~ msgstr "/Файл/Экспортировать _как..." #~ msgid "/File/_Reload" #~ msgstr "/Файл/_Перезагрузить" #~ msgid "/_Batch/_Add to batch queue" #~ msgstr "/Пакетная обработка/_Добавить в очередь" #~ msgid "/_Batch/_Remove from batch queue" #~ msgstr "/Пакетная обработка/_Удалить из очереди" #~ msgid "CW" #~ msgstr "CW" #~ msgid "180" #~ msgstr "180°" #~ msgid "CCW" #~ msgstr "CCW" #~ msgid "Scale" #~ msgstr "Масштаб" rawstudio-2.0/po/cs.gmo0000644000175000017500000002062511546436027012061 00000000000000, 0 1 5 9 = ? Y _ v         $ 8 !X z          #;JYbr   .7I\a # 8BTXg l'y    05DSew    0B KU[ b m%y-  +JRZ p}   .#*1HN T` fry   -C Yevz 1'%$J'[ "!!!=Odm  +=FNap " ! :Db  '*>Qfo* "8X mw8 ,E N X dn}@C%,Da+s     , D _ r +|      ! !'! ?!I!]! p!|!7S~,c hvVafg8+n\&FQmq^MA P3;Ib" LJ#>!oXNrZ*dytuT%e_l 2 K9wO=0:/.jR['- 6HBCzYUkG1s}x<i$D5E(Wp?@)|]{4` A B C %%2c - Incremental counter%dmm %f - Original filename* (%d)1 (%d)10:8 (SXGA)16:10 (Wide XGA)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)AA raw image converter for GTK+/GNOMEAdjusting to auto white balanceAdjusting to camera white balanceAll filesAll photos (excluding deleted)ApertureAspectBBatchBuffer emptyCCancelChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Choose output directoryConstant scaleConstant widthContrastCopied settingsCouldn't open photoCropCurveD (%d)Delete photosDeleted photosDeleting photosError exportingError exporting photo to gimp.Export FileExposureF/%.1f File exportedFilenameFilename example:Filename template:FlipFlip the photo over the x-axisFocallengthFreeformGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2GridHarmonious triangles #1Harmonious triangles #2Height:Hiding exposure maskHistogramHistogram height:HueISO paper (A4)IconImage openedJPEG (Joint Photographic Experts Group)Keep aspectLast image:Loading %s ...Maximum sizeMirrorMirror the photo over the y-axisNo white balance to set fromNoneNothing to pasteOpenOpen curve ...Open directoryOpening photo ...Output directory:PNG (Portable Network Graphics)Pasted settingsPercent:Photo sizePhoto width:Place cache in home directoryPreferencesPreview background color:Priority 1 photosPriority 2 photosPriority 3 photosProgressRawstudioReadyRemoveRemove allReset curveRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturationSave curve as ...Save uncompressed TIFFSaving %s ...Select which settings to add to batch queueSettingSharpenShowing exposure maskShutterspeedSizeStartTimestampToolsTransformsU (%d)Unprioritized photosUse system themeWhite balanceWidth:Your files will be permanently deleted!_About_Batch_Delete flagged photos_Edit_File_Fullscreen_Help_Next Photo_Photo_Previous photo_Quit_Revert settings_Set Priority_View_Zoom to fitProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-03-26 03:39+0100 PO-Revision-Date: 2008-04-17 22:04+0100 Last-Translator: Anders Kvist Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 1.11.4 Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2; X-Poedit-Language: Czech X-Poedit-Country: CZECH REPUBLIC A B C %%2c - vzestupné počítadlo%dmm %f - Původní jméno souboru* (%d)1 (%d)10:8 (SXGA)16:10 (Wide XGA)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)AKonvertor obrazového formátu raw pro GTK+/GNOMEAutomatická úprava vyvážení bíléVyvážení bílé podle fotoaparátuVšechny souboryVšechny fotografie (kromě smazaných)ClonaPoměr stranBDávkaPrázdný bufferCZrušitZměněna priorita fotografie (%d)Změněna priorita fotografie (*)Změněna priorita fotografie (D)Zvolte výstupní adresářKonstatní poměrKonstantní šířkaKontrastZkopírovaná nastaveníNelze otevřít fotografiiOříznoutKřivkaD (%d)Smazat fotografieSmazané fotografieMazání fotografiíChyba exportuChyba exportu do gimpu.Exportovat souborExpoziceF/%.1f Soubor exportovánJméno souboruPříklad jména souboru:Šablona jména souboru:PřevrátitPřevrátit fotografii podle osy xOhniskoVolněObecnéZlatý obdélníkZlaté řezyZlaté trojúhelníky #1Zlaté trojúhelníky #2MřížkaHarmonické trojúhelníky #1Harmonické trojúhelníky #2Výška:Skrytí expoziční maskyHistogramVýška histogramu:OdstínFormát A4IkonaObrázek otevřenJPEG (Joint Photographic Experts Group)Zachovat poměr stranPoslední obrázek:Načítá se %s...Maximální velikostZrcadlitZrcadlit fotografii podle osy yNeexistuje vyvážení bílé k nastaveníŽádnýNic ke vloženíOtevřítOtevřít křivku...Otevřít adresářOtevírá se fotografie...Výstupní adresář:PNG (Portable Network Graphics)Vložená nastaveníProcento:Velikost fotografieŠířka fotografieUmístit vyrovnávací paměť do domovského adresářePředvolbyNáhled barvy pozadí:Fotografie s prioritou 1Fotografie s prioritou 2Fotografie s prioritou 3PrůběhRawstudioPřipravenoOdstranitOdstranit všeResetovat křivkuOtočit fotografii o 90 stupňů ve směru hodinových ručičekOtočit fotografii o 90 stupňů proti směru hodinových ručičekPravidlo třetinSytostUložit křivku jako...Uložit nekomprimovaný TIFFUkládá se %s...Zvolte, která nastavení přidat do frontyNastaveníDoostřeníZobrazení expoziční maskyExpoziceVelikostSpustitČasové razítkoNástrojeTransformaceU (%d)Fotografie bez priorityPoužít systémové témaVyvážení bíléŠířka:Vaše soubory budou trvale smazány!O aplikaci_Dávka_Smazat označené fotografie_Úpravy_Soubor_Celá obrazovka_Nápověda_Další fotografie_Fotografie_Předchozí fotografie_Ukončit_Obnovit nastavení_Nastavit prioritu_Zobrazení_Přiblížit podle oknarawstudio-2.0/po/cs.po0000644000175000017500000014602511546425272011720 00000000000000# translation of cs.po to # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # # Jakub Friedl , 2007. # Roman Schulz , 2009. msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-03-26 03:39+0100\n" "PO-Revision-Date: 2008-04-17 22:04+0100\n" "Last-Translator: Anders Kvist \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.11.4\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" "X-Poedit-Language: Czech\n" "X-Poedit-Country: CZECH REPUBLIC\n" #: librawstudio/rs-lens-db-editor.c:325 #, fuzzy msgid "All lenses" msgstr "Všechny soubory" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "" #: librawstudio/rs-lens-db-editor.c:565 #, fuzzy msgid "Rawstudio Lens Library" msgstr "Otevřít adresář" #: librawstudio/rs-lens-db-editor.c:590 #, fuzzy msgid "Lens make" msgstr "Poslední obrázek:" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "" #: librawstudio/rs-lens-db-editor.c:598 #, fuzzy msgid "Focal" msgstr "Ohnisko" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "Clona" #: librawstudio/rs-lens-db-editor.c:606 msgid "Camera make" msgstr "" #: librawstudio/rs-lens-db-editor.c:610 msgid "Camera model" msgstr "" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:734 #, fuzzy msgid "Could not create temporary directory." msgstr "Zvolte výstupní adresář" #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:796 #, fuzzy, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Zvolte výstupní adresář" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "" #: librawstudio/rs-lens-db-editor.c:939 #, fuzzy msgid "Rawstudio Lens Editor" msgstr "Otevřít adresář" #: librawstudio/rs-lens-db-editor.c:950 #, fuzzy msgid "Lens Make" msgstr "Poslední obrázek:" #: librawstudio/rs-lens-db-editor.c:954 #, fuzzy msgid "Lens Model" msgstr "Poslední obrázek:" #: librawstudio/rs-lens-db-editor.c:958 #, fuzzy msgid "Focal Length" msgstr "Ohnisko" #: librawstudio/rs-lens-db-editor.c:966 msgid "Camera Make" msgstr "" #: librawstudio/rs-lens-db-editor.c:970 msgid "Camera Model" msgstr "" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "" #: librawstudio/rs-library.c:254 #, fuzzy, c-format msgid "Could not open database %s" msgstr "Nelze otevřít fotografii" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "" #: librawstudio/rs-library.c:816 #, fuzzy msgid "telephoto" msgstr "Smazat fotografie" #: librawstudio/rs-library.c:832 msgid "January" msgstr "" #: librawstudio/rs-library.c:835 msgid "February" msgstr "" #: librawstudio/rs-library.c:838 msgid "March" msgstr "" #: librawstudio/rs-library.c:841 msgid "April" msgstr "" #: librawstudio/rs-library.c:844 msgid "May" msgstr "" #: librawstudio/rs-library.c:847 msgid "June" msgstr "" #: librawstudio/rs-library.c:850 msgid "July" msgstr "" #: librawstudio/rs-library.c:853 msgid "August" msgstr "" #: librawstudio/rs-library.c:856 msgid "September" msgstr "" #: librawstudio/rs-library.c:859 msgid "October" msgstr "" #: librawstudio/rs-library.c:862 msgid "November" msgstr "" #: librawstudio/rs-library.c:865 msgid "December" msgstr "" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, fuzzy, c-format msgid "%.1fs " msgstr "%.1f " #: librawstudio/rs-metadata.c:540 #, fuzzy, c-format msgid "1/%.0fs " msgstr "1/%.0f " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, fuzzy, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "" #: librawstudio/rs-profile-selector.c:242 #, fuzzy msgid "Embedded Profile" msgstr "Vyberte barevný profil" #: librawstudio/rs-profile-selector.c:244 #, fuzzy msgid "(Select Profile)" msgstr "Vyberte barevný profil" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 #, fuzzy msgid "Expos" msgstr "Expozice" #: librawstudio/rs-settings.c:80 #, fuzzy msgid "Exposure Compensation" msgstr "Adresář pro export:" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 #, fuzzy msgid "Satur" msgstr "Sytost" #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "Sytost" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "Odstín" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 #, fuzzy msgid "Contr" msgstr "Kontrast" #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "Kontrast" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 #, fuzzy msgid "Temp" msgstr "Časové razítko" #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 #, fuzzy msgid "Temperature" msgstr "Clona" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 #, fuzzy msgid "Sharp" msgstr "Doostření" #: librawstudio/rs-settings.c:133 #, fuzzy msgid "Sharpen Amount" msgstr "Doostření" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "" #: librawstudio/rs-settings.c:145 #, fuzzy msgid "Colour Denoising" msgstr "Barvy" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "" #: librawstudio/rs-settings.c:163 #, fuzzy msgid "Vignetting Correction" msgstr "Zlaté řezy" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 #, fuzzy msgid "Red" msgstr "Připraveno" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 #, fuzzy msgid "JPEG Quality" msgstr "Kvalita JPEG:" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:329 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "" #: plugins/output-flickr/output-flickr.c:113 #, fuzzy msgid "Title" msgstr "_Soubor" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "" #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 #, fuzzy msgid "Full export path" msgstr "Soubor exportován" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 #, fuzzy msgid "Copy EXIF metadata" msgstr "Chybí metadata" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "" #: plugins/output-picasa/rs-picasa-client.c:234 #, fuzzy msgid "Username: " msgstr "Jméno souboru" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "" #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Uložit nekomprimovaný TIFF" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "" #: plugins/output-tifffile/output-tifffile.c:108 #, fuzzy msgid "TIFF (Tagged Image File Format)" msgstr "8-bit TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Původní jméno souboru" #: src/filename.c:315 #, fuzzy, c-format msgid "%p - Path of original file" msgstr "%f - Původní jméno souboru" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - vzestupné počítadlo" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "" #: src/gtk-interface.c:154 #, fuzzy msgid "Width" msgstr "Šířka:" #: src/gtk-interface.c:154 #, fuzzy msgid "Height" msgstr "Výška:" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Otevírá se fotografie..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "Nelze otevřít fotografii" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Obrázek otevřen" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "Změněna priorita fotografie (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "Změněna priorita fotografie (D)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "Změněna priorita fotografie (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:775 #, fuzzy msgid "Directory:" msgstr "Adresář otevřen" #: src/gtk-interface.c:777 src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Zvolte výstupní adresář" #: src/gtk-interface.c:793 src/rs-batch.c:1075 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Šablona jména souboru:" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Příklad jména souboru:" #: src/gtk-interface.c:817 #, fuzzy msgid "File type:" msgstr "Šablona jména souboru:" #. Add preferences box #: src/gtk-interface.c:879 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Předvolby" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Náhled barvy pozadí:" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Výška histogramu:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Použít systémové téma" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Umístit vyrovnávací paměť do domovského adresáře" #: src/gtk-interface.c:926 #, fuzzy msgid "Display Colorspace:" msgstr "Profil obrazovky" #: src/gtk-interface.c:938 #, fuzzy msgid "Exposure Mask Colorspace:" msgstr "Expozice" #: src/gtk-interface.c:1011 msgid "General" msgstr "Obecné" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 #, fuzzy msgid "Quick export" msgstr "Soubor exportován" #: src/gtk-interface.c:1333 #, fuzzy msgid "Opening directory..." msgstr "Otevírá se adresář..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 #, fuzzy msgid "Open recursive" msgstr "Otevřít křivku..." #: src/gtk-interface.c:1465 #, fuzzy msgid "Directory" msgstr "Adresář otevřen" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Nástroje" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Dávka" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Otevřít" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Připraveno" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "Průběh" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Otevřít adresář" #: src/rs-actions.c:253 src/rs-batch.c:542 #, fuzzy msgid "Could not create output directory." msgstr "Zvolte výstupní adresář" #: src/rs-actions.c:257 #, fuzzy msgid "Exporting..." msgstr "Chyba exportu" #: src/rs-actions.c:265 msgid "File exported" msgstr "Soubor exportován" #: src/rs-actions.c:270 src/rs-actions.c:293 #, fuzzy msgid "Export failed" msgstr "Exportovat soubor" #: src/rs-actions.c:300 #, fuzzy msgid "Exporting to GIMP..." msgstr "Chyba exportu" #: src/rs-actions.c:305 msgid "Error exporting" msgstr "Chyba exportu" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "Chyba exportu do gimpu." #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "Mazání fotografií" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "Vaše soubory budou trvale smazány!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Smazat fotografie" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "" #. Build GUI #: src/rs-actions.c:463 #, fuzzy msgid "Profile" msgstr "Všechny soubory" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Expozice" #: src/rs-actions.c:468 msgid "White balance" msgstr "Vyvážení bílé" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Doostření" #: src/rs-actions.c:470 msgid "Denoise" msgstr "" #: src/rs-actions.c:471 #, fuzzy msgid "Color denoise" msgstr "Barvy" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "" #: src/rs-actions.c:473 msgid "TCA" msgstr "" #: src/rs-actions.c:474 #, fuzzy msgid "Vignetting" msgstr "Nastavení" #: src/rs-actions.c:475 src/rs-toolbox.c:803 msgid "Curve" msgstr "Křivka" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "" #: src/rs-actions.c:498 #, fuzzy msgid "Select settings to copy" msgstr "Vyberte nastavení pro vložení" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Zkopírovaná nastavení" #: src/rs-actions.c:587 #, fuzzy msgid "Pasting settings to images" msgstr "Vložená nastavení" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Vložená nastavení" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Nic ke vložení" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Prázdný buffer" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Automatická úprava vyvážení bílé" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "Neexistuje vyvážení bílé k nastavení" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Vyvážení bílé podle fotoaparátu" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "" #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "Zobrazení expoziční masky" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "Skrytí expoziční masky" #: src/rs-actions.c:1067 #, fuzzy msgid "Adding images to batch queue" msgstr "Pohled(y) přidány do fronty" #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, fuzzy, c-format msgid "%d photos added to batch queue" msgstr "Přidáno do fronty" #: src/rs-actions.c:1101 src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Zvolte, která nastavení\n" "přidat do fronty" #: src/rs-actions.c:1188 #, fuzzy msgid "Removing images from batch queue" msgstr "Odstraněno z fronty" #: src/rs-actions.c:1203 #, fuzzy, c-format msgid "%d photos removed from batch queue" msgstr "Přidáno do fronty" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "" #: src/rs-actions.c:1266 #, fuzzy msgid "All Profiles" msgstr "Všechny soubory" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "" #: src/rs-actions.c:1282 #, fuzzy msgid "Color Profiles (ICC and ICM)" msgstr "Barevné profily (icc a icm)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Všechny soubory" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "Konvertor obrazového formátu raw pro GTK+/GNOME" #: src/rs-actions.c:1412 msgid "_File" msgstr "_Soubor" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "_Úpravy" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "_Fotografie" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "_Nastavit prioritu" #: src/rs-actions.c:1416 #, fuzzy msgid "_White Balance" msgstr "Vyvážení bílé" #: src/rs-actions.c:1417 msgid "_View" msgstr "_Zobrazení" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "_Dávka" #: src/rs-actions.c:1420 msgid "_Help" msgstr "_Nápověda" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "" #. File menu #: src/rs-actions.c:1425 #, fuzzy msgid "_Open Directory" msgstr "Otevřít adresář" #: src/rs-actions.c:1426 #, fuzzy msgid "_Quick Export" msgstr "Soubor exportován" #: src/rs-actions.c:1427 #, fuzzy msgid "_Export As" msgstr "Export" #: src/rs-actions.c:1428 #, fuzzy msgid "_Export to Gimp" msgstr "Exportní profil" #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "" #: src/rs-actions.c:1430 #, fuzzy msgid "_Reload directory" msgstr "Otevřít adresář" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "_Smazat označené fotografie" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "_Ukončit" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "_Obnovit nastavení" #: src/rs-actions.c:1436 #, fuzzy msgid "_Copy settings" msgstr "Zkopírovaná nastavení" #: src/rs-actions.c:1437 #, fuzzy msgid "_Paste settings" msgstr "Vložená nastavení" #: src/rs-actions.c:1438 #, fuzzy msgid "_Reset settings" msgstr "Resetovat toto nastavení" #: src/rs-actions.c:1439 #, fuzzy msgid "_Save camera default settings" msgstr "Resetovat toto nastavení" #: src/rs-actions.c:1440 #, fuzzy msgid "_Preferences" msgstr "Předvolby" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "" #: src/rs-actions.c:1444 msgid "_1" msgstr "" #: src/rs-actions.c:1445 msgid "_2" msgstr "" #: src/rs-actions.c:1446 msgid "_3" msgstr "" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "" #: src/rs-actions.c:1448 #, fuzzy msgid "_Auto" msgstr "Zrušit oříznutí" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "" #: src/rs-actions.c:1450 #, fuzzy msgid "_Crop" msgstr "Oříznout" #: src/rs-actions.c:1451 #, fuzzy msgid "_Uncrop" msgstr "Zrušit oříznutí" #: src/rs-actions.c:1452 #, fuzzy msgid "_Straighten" msgstr "Narovnat" #: src/rs-actions.c:1453 #, fuzzy msgid "_Unstraighten" msgstr "Zrušit narovnání" #: src/rs-actions.c:1454 #, fuzzy msgid "_Group" msgstr "Oříznout" #: src/rs-actions.c:1455 #, fuzzy msgid "_Ungroup" msgstr "Zrušit oříznutí" #: src/rs-actions.c:1456 #, fuzzy msgid "_Auto group" msgstr "Zrušit oříznutí" #: src/rs-actions.c:1457 #, fuzzy msgid "_Tag Photo..." msgstr "_Fotografie" #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "" #: src/rs-actions.c:1459 #, fuzzy msgid "Rotate Counter Clockwise" msgstr "Otočit fotografii o 90 stupňů ve směru hodinových ručiček" #: src/rs-actions.c:1460 msgid "Flip" msgstr "Převrátit" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "Zrcadlit" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "_Předchozí fotografie" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "_Další fotografie" #: src/rs-actions.c:1466 #, fuzzy msgid "_Lens Library" msgstr "Otevřít adresář" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "" #. Batch menu #: src/rs-actions.c:1470 #, fuzzy msgid "_Add to batch queue" msgstr "Přidat do fronty" #: src/rs-actions.c:1471 #, fuzzy msgid "_Add view to queue..." msgstr "_Přidat aktuální pohled do fronty" #: src/rs-actions.c:1472 #, fuzzy msgid "_Remove from batch queue" msgstr "Odstraněno z fronty" #: src/rs-actions.c:1473 #, fuzzy msgid "_Start" msgstr "Spustit" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "" #: src/rs-actions.c:1477 msgid "_About" msgstr "O aplikaci" #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "_Přiblížit podle okna" #: src/rs-actions.c:1487 #, fuzzy msgid "_Iconbox" msgstr "Ikona" #: src/rs-actions.c:1488 #, fuzzy msgid "_Toolbox" msgstr "Nástroje" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "_Celá obrazovka" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "" #: src/rs-actions.c:1491 #, fuzzy msgid "Show Filenames in Iconbox" msgstr "Zobrazit jména souborů v pohledu na ikony" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "" #: src/rs-actions.c:1494 #, fuzzy msgid "_Exposure mask" msgstr "Expozice" #: src/rs-actions.c:1495 msgid "_Split" msgstr "" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "" #: src/rs-actions.c:1503 msgid "Name" msgstr "" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "Časové razítko" #: src/rs-actions.c:1505 #, fuzzy msgid "ISO" msgstr "ISO%d" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "Ohnisko" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "Expozice" #. Snapshot labels #: src/rs-actions.c:1513 src/rs-toolbox.c:207 src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1514 src/rs-toolbox.c:208 src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1515 src/rs-toolbox.c:209 src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Zrušit" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Poslední obrázek:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "" #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "" #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "Načítá se %s..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "Ukládá se %s..." #: src/rs-batch.c:635 #, fuzzy msgid "Could not export photo." msgstr "Nelze otevřít fotografii" #: src/rs-batch.c:695 msgid "Icon" msgstr "Ikona" #: src/rs-batch.c:702 msgid "Filename" msgstr "Jméno souboru" #: src/rs-batch.c:709 msgid "Setting" msgstr "Nastavení" #: src/rs-batch.c:802 msgid "Start" msgstr "Spustit" #: src/rs-batch.c:805 msgid "Remove" msgstr "Odstranit" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Odstranit vše" #: src/rs-batch.c:916 src/rs-batch.c:1091 #, fuzzy msgid "Edit output settings" msgstr "/_Úpravy/_Kopírovat nastavení" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Velikost fotografie" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "Konstatní poměr" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Konstantní šířka" #: src/rs-batch.c:962 #, fuzzy msgid "Constant height" msgstr "Výška histogramu:" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Maximální velikost" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Šířka fotografie" #: src/rs-batch.c:978 src/rs-batch.c:987 msgid "pixels" msgstr "" #: src/rs-batch.c:985 #, fuzzy msgid "Photo height:" msgstr "Výška histogramu:" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" #: src/rs-batch.c:1035 #, fuzzy, c-format msgid "" "Constant height:\n" "%d" msgstr "Výška histogramu:" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Výstupní adresář:" #: src/rs-batch.c:1100 #, fuzzy msgid "Change" msgstr "Zrušit" #: src/rs-batch.c:1105 #, fuzzy msgid "Export dimensions" msgstr "Adresář pro export:" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "" #: src/rs-camera-db.c:459 msgid "Model" msgstr "" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "" #: src/rs-preview-widget.c:887 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Velikost" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Mřížka" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Žádný" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "Zlaté řezy" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "Pravidlo třetin" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Zlaté trojúhelníky #1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Zlaté trojúhelníky #2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Harmonické trojúhelníky #1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Harmonické trojúhelníky #2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Poměr stran" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "Volně" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "Formát A4" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "Zlatý obdélník" #: src/rs-preview-widget.c:1180 src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Oříznout" #: src/rs-preview-widget.c:1182 #, fuzzy msgid "Don't crop" msgstr "Zrušit oříznutí" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" #: src/rs-preview-widget.c:1238 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:522 msgid "Export File" msgstr "Exportovat soubor" #: src/rs-save-dialog.c:282 #, fuzzy msgid "File not saved!" msgstr "Soubor exportován" #: src/rs-save-dialog.c:299 #, fuzzy, c-format msgid "Exporting to %s" msgstr "Exportuje se soubor..." #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Zachovat poměr stran" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Šířka:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Výška:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Procento:" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Všechny fotografie (kromě smazaných)" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Fotografie s prioritou 1" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Fotografie s prioritou 2" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Fotografie s prioritou 3" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Fotografie bez priority" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Smazané fotografie" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 #, fuzzy msgid "Priorities" msgstr "Průběh" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "" #: src/rs-store.c:1371 #, fuzzy msgid "* (-)" msgstr "* (%d)" #: src/rs-store.c:1372 #, fuzzy msgid "1 (-)" msgstr "1 (%d)" #: src/rs-store.c:1373 #, fuzzy msgid "2 (-)" msgstr "2 (%d)" #: src/rs-store.c:1374 #, fuzzy msgid "3 (-)" msgstr "3 (%d)" #: src/rs-store.c:1375 #, fuzzy msgid "U (-)" msgstr "U (%d)" #: src/rs-store.c:1376 #, fuzzy msgid "D (-)" msgstr "D (%d)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "" #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "" #: src/rs-tethered-shooting.c:558 #, fuzzy msgid "Could not open image!\n" msgstr "Nelze otevřít fotografii" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:938 #, fuzzy msgid "Stop Shooting" msgstr "Nastavení" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "" #: src/rs-tethered-shooting.c:1003 #, fuzzy msgid "Take Photo" msgstr "_Fotografie" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "" #. Status window #: src/rs-tethered-shooting.c:1022 #, fuzzy msgid "Status:" msgstr "Sytost" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 #, fuzzy msgid "Filename & Tags" msgstr "Příklad jména souboru:" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Histogram" #: src/rs-toolbox.c:443 #, fuzzy msgid "Reset" msgstr "Resetovat křivku" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr "" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr "" #: src/rs-toolbox.c:566 src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Otevřít křivku..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "" #: src/rs-toolbox.c:700 #, fuzzy msgid "Select Action" msgstr "Nastavení" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Uložit křivku jako..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Resetovat křivku" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "" #. Pack everything nice #: src/rs-toolbox.c:800 #, fuzzy msgid "Basic" msgstr "Dávka" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "" #: src/rs-toolbox.c:802 #, fuzzy msgid "Lens Correction" msgstr "Zlaté řezy" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Převrátit fotografii podle osy x" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Zrcadlit fotografii podle osy y" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Otočit fotografii o 90 stupňů ve směru hodinových ručiček" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Otočit fotografii o 90 stupňů proti směru hodinových ručiček" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Transformace" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "" #: src/rs-toolbox.c:1035 #, fuzzy msgid "Lens Disabled" msgstr "Poslední obrázek:" #: src/rs-toolbox.c:1043 #, fuzzy msgid "No Lens Information" msgstr "Zlaté řezy" #: src/rs-toolbox.c:1045 msgid "Camera Unknown" msgstr "" #: src/rs-toolbox.c:1050 #, fuzzy msgid "No Photo" msgstr "Smazané fotografie" #: src/rs-toolbox.c:1259 #, fuzzy msgid "_Previous" msgstr "_Předchozí fotografie" #: src/rs-toolbox.c:1260 #, fuzzy msgid "_Next" msgstr "_Další fotografie" #, fuzzy #~ msgid " %s added to batch queue" #~ msgstr "Přidáno do fronty" #, fuzzy #~ msgid "%s already added to batch queue" #~ msgstr "Je již ve frontě" #~ msgid "Not in batch queue" #~ msgstr "Není ve frontě" #~ msgid "Processing photos" #~ msgstr "Zpracovávají se fotografie" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "Načíst 8bitové fotografie (JPEG, PNG, apod.)" #, fuzzy #~ msgid "Warmth" #~ msgstr "Teplota/tónování" #, fuzzy #~ msgid "CA Red" #~ msgstr "Připraveno" #~ msgid "Select color profile" #~ msgstr "Vyberte barevný profil" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Barevné profily (icc a icm)" #~ msgid "Not a valid color profile." #~ msgstr "Není platný barevný profil." #, fuzzy #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "Zvolený soubor zřejmě není platným barevným profilem." #~ msgid "Enable color management (experimental)" #~ msgstr "Povolit správu barev (experimentální)" #~ msgid "Input profile" #~ msgstr "Vstupní profil" #~ msgid "BuiltInRGBProfile" #~ msgstr "Vestavěný RGB profil" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Exportní profil" #~ msgid "Intent" #~ msgstr "Záměr" #~ msgid "Perceptual" #~ msgstr "Perceptuální" #~ msgid "Relative colormetric" #~ msgstr "Relativní kolorimetrický" #~ msgid "Absolute colormetric" #~ msgstr "Absolutní kolorimetrický" #~ msgid "Colors" #~ msgstr "Barvy" #, fuzzy #~ msgid "Change this" #~ msgstr "Zrušit" #~ msgid "Background renderer active" #~ msgstr "Vykreslování pozadí aktivní" #~ msgid "File export canceled" #~ msgstr "Export souboru zrušen" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "16-bit TIFF (Tagged Image File Format)" #~ msgid "Rotate the photo 180 degrees" #~ msgstr "Otočit fotografii o 180 stupňů" #~ msgid "Reset this setting" #~ msgstr "Resetovat toto nastavení" #~ msgid "_Zoom to 100%" #~ msgstr "_Přiblížit 100%" #~ msgid "Canon CR2" #~ msgstr "Canon CR2" #~ msgid "Canon CIFF" #~ msgstr "Canon CIFF" #~ msgid "Nikon NEF" #~ msgstr "Nikon NEF" #~ msgid "Minolta raw" #~ msgstr "Minolta raw" #~ msgid "Canon TIFF" #~ msgstr "Canon TIFF" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Panasonic raw" #~ msgstr "Panasonic raw" #~ msgid "Pentax raw" #~ msgstr "Pentax raw" #~ msgid "/File/_Open directory..." #~ msgstr "/Soubor/_Otevřít adresář..." #, fuzzy #~ msgid "/File/_Quick export" #~ msgstr "/Soubor/_Exportovat" #~ msgid "/File/_Export as..." #~ msgstr "/Soubor/_Exportovat jako..." #~ msgid "/File/_Reload" #~ msgstr "/Soubor/_Znovu načíst" #~ msgid "/_Edit/_Paste settings" #~ msgstr "/_Úpravy/_Vložit nastavení" #~ msgid "/_Edit/_Reset current settings" #~ msgstr "/_Úpravy/_Resetovat aktuální nastavení" #~ msgid "/_Edit/sep1" #~ msgstr "/_Úpravy/sep1" #~ msgid "/_Edit/_Preferences" #~ msgstr "/_Úpravy/_Předvolby" #~ msgid "/_Photo/_Set priority/_2" #~ msgstr "/_Fotografie/_Nastavit prioritu/_2" #~ msgid "/_Photo/_Set priority/_3" #~ msgstr "/_Fotografie/_Nastavit prioritu/_3" #~ msgid "/_Photo/_Set priority/_Remove priority" #~ msgstr "/_Fotografie/_Nastavit prioritu/_Odstranit prioritu" #~ msgid "/_Photo/_White balance/_Auto" #~ msgstr "/_Fotografie/_Vyvážení bílé/_Automaticky" #~ msgid "/_Photo/_White balance/_Camera" #~ msgstr "/_Fotografie/_Vyvážení bílé/_Fotoaparát" #~ msgid "/_Photo/_Uncrop" #~ msgstr "/_Fotografie/_Zrušit oříznutí" #~ msgid "/_Photo/_Straighten" #~ msgstr "/_Fotografie/_Narovnat" #~ msgid "/_Photo/_Unstraighten" #~ msgstr "/_Fotografie/_Zrušit narovnání" #, fuzzy #~ msgid "/_Photo/_Group photos" #~ msgstr "/_Fotografie/_Oříznout" #, fuzzy #~ msgid "/_Photo/_Ungroup photos" #~ msgstr "/_Fotografie/_Zrušit oříznutí" #~ msgid "/_View/sep1" #~ msgstr "/_Zobrazení/sep1" #~ msgid "/_View/_Zoom in" #~ msgstr "/_Zobrazení/_Příbližit" #~ msgid "/_View/_Zoom out" #~ msgstr "/_Zobrazení/_Oddálit" #~ msgid "/_View/_Zoom to fit" #~ msgstr "/_Zobrazeni/_Přiblížit podle okna" #~ msgid "/_View/_Zoom to 100%" #~ msgstr "/_Zobrazení/_Přiblížit 100%" #~ msgid "/_View/sep2" #~ msgstr "/_Zobrazení/sep2" #~ msgid "/_View/_Icon Box" #~ msgstr "/_Zobrazení/_Panel ikon" #~ msgid "/_View/_Tool Box" #~ msgstr "/_Zobrazení/_Nástrojový panel" #~ msgid "/_View/sep3" #~ msgstr "/_Zobrazení/sep3" #~ msgid "/_View/_Show exposure mask" #~ msgstr "/_Zobrazení/_Zobrazit expoziční masku" #~ msgid "/_Batch/_Add to batch queue" #~ msgstr "/_Dávka/_Přidat do fronty" #~ msgid "/_Batch/_Remove from batch queue" #~ msgstr "/_Dávka/_Odstranit z fronty" #~ msgid "/_Batch/_Start" #~ msgstr "/_Dávka/_Spustit" #, fuzzy #~ msgid "Toggle exposure mask" #~ msgstr "Zobrazení expoziční masky" #, fuzzy #~ msgid "Zoom out" #~ msgstr "/_Zobrazení/_Oddálit" #, fuzzy #~ msgid "Zoom in" #~ msgstr "/_Zobrazení/_Příbližit" #~ msgid "Apply" #~ msgstr "Použít" #~ msgid "Export filename:" #~ msgstr "Jméno souboru pro export:" #~ msgid "Export filetype:" #~ msgstr "Typ souboru pro export:" #~ msgid "px" #~ msgstr "px" #~ msgid "Set image size by scale:" #~ msgstr "nastavit velikost obrázku měřítkem:" #~ msgid "Set image size by width:" #~ msgstr "Nastavit velikost obrázku podle šířky:" #~ msgid "Set image size by height:" #~ msgstr "Nastavit velikost obrázku podle výšky:" #~ msgid "%d x %d" #~ msgstr "%d x %d" #~ msgid "Left-click and drag to draw guide" #~ msgstr "Vytvořte vodítko kliknutím levým tlačítkem a tažením" #~ msgid "Cancel straighten" #~ msgstr "Zrušit narovnání" #~ msgid "Angle: %.02f" #~ msgstr "Úhel: %.02f" #~ msgid "CW" #~ msgstr "Ve směru hodinových ručiček" #~ msgid "180" #~ msgstr "180" #~ msgid "CCW" #~ msgstr "Proti směru hodinových ručiček" #~ msgid "Open Curve ..." #~ msgstr "Otevřít křivku..." #~ msgid "Scale" #~ msgstr "Měřítko" rawstudio-2.0/po/pt_BR.po0000644000175000017500000012636411546425272012325 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-03-26 03:39+0100\n" "PO-Revision-Date: 2008-05-20 18:29-0300\n" "Last-Translator: Rafael Sachetto \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #: librawstudio/rs-lens-db-editor.c:325 #, fuzzy msgid "All lenses" msgstr "Todos os arquivos" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "" #: librawstudio/rs-lens-db-editor.c:565 #, fuzzy msgid "Rawstudio Lens Library" msgstr "Rawstudio" #: librawstudio/rs-lens-db-editor.c:590 #, fuzzy msgid "Lens make" msgstr "Última imagem:" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "" #: librawstudio/rs-lens-db-editor.c:606 msgid "Camera make" msgstr "" #: librawstudio/rs-lens-db-editor.c:610 msgid "Camera model" msgstr "" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:734 #, fuzzy msgid "Could not create temporary directory." msgstr "Escolha o diretório de saída" #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:796 #, fuzzy, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Escolha o diretório de saída" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "" #: librawstudio/rs-lens-db-editor.c:939 #, fuzzy msgid "Rawstudio Lens Editor" msgstr "Rawstudio" #: librawstudio/rs-lens-db-editor.c:950 #, fuzzy msgid "Lens Make" msgstr "Última imagem:" #: librawstudio/rs-lens-db-editor.c:954 #, fuzzy msgid "Lens Model" msgstr "Última imagem:" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "" #: librawstudio/rs-lens-db-editor.c:966 msgid "Camera Make" msgstr "" #: librawstudio/rs-lens-db-editor.c:970 msgid "Camera Model" msgstr "" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "" #: librawstudio/rs-library.c:254 #, c-format msgid "Could not open database %s" msgstr "" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "" #: librawstudio/rs-library.c:816 #, fuzzy msgid "telephoto" msgstr "Apagar fotos" #: librawstudio/rs-library.c:832 msgid "January" msgstr "" #: librawstudio/rs-library.c:835 msgid "February" msgstr "" #: librawstudio/rs-library.c:838 msgid "March" msgstr "" #: librawstudio/rs-library.c:841 msgid "April" msgstr "" #: librawstudio/rs-library.c:844 #, fuzzy msgid "May" msgstr "Mamiya" #: librawstudio/rs-library.c:847 msgid "June" msgstr "" #: librawstudio/rs-library.c:850 msgid "July" msgstr "" #: librawstudio/rs-library.c:853 msgid "August" msgstr "" #: librawstudio/rs-library.c:856 msgid "September" msgstr "" #: librawstudio/rs-library.c:859 msgid "October" msgstr "" #: librawstudio/rs-library.c:862 msgid "November" msgstr "" #: librawstudio/rs-library.c:865 msgid "December" msgstr "" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, fuzzy, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "" #: librawstudio/rs-profile-selector.c:242 #, fuzzy msgid "Embedded Profile" msgstr "Selecione o perfil de cores" #: librawstudio/rs-profile-selector.c:244 #, fuzzy msgid "(Select Profile)" msgstr "Selecione o perfil de cores" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "" #: librawstudio/rs-settings.c:80 #, fuzzy msgid "Exposure Compensation" msgstr "Exportar dimensões" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 #, fuzzy msgid "Satur" msgstr "Saturação" #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "Saturação" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "" #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temp" msgstr "" #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 #, fuzzy msgid "Sharp" msgstr "Começar" #: librawstudio/rs-settings.c:133 msgid "Sharpen Amount" msgstr "" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "" #: librawstudio/rs-settings.c:145 #, fuzzy msgid "Colour Denoising" msgstr "Cores" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "" #: librawstudio/rs-settings.c:163 #, fuzzy msgid "Vignetting Correction" msgstr "Configuração" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 #, fuzzy msgid "Red" msgstr "Pronto" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 #, fuzzy msgid "JPEG Quality" msgstr "Qualidade JPEG:" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:329 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "" #: plugins/output-flickr/output-flickr.c:113 #, fuzzy msgid "Title" msgstr "_Arquivo" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "" #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 #, fuzzy msgid "Full export path" msgstr "Arquivo exportado" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 #, fuzzy msgid "Copy EXIF metadata" msgstr "Sem metadados" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "" #: plugins/output-picasa/rs-picasa-client.c:234 #, fuzzy msgid "Username: " msgstr "Nome do arquivo:" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "" #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "" #: plugins/output-tifffile/output-tifffile.c:108 #, fuzzy msgid "TIFF (Tagged Image File Format)" msgstr "8-bit TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Arquivo original" #: src/filename.c:315 #, fuzzy, c-format msgid "%p - Path of original file" msgstr "%f - Arquivo original" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "" #: src/gtk-interface.c:154 #, fuzzy msgid "Width" msgstr "Largura:" #: src/gtk-interface.c:154 #, fuzzy msgid "Height" msgstr "Altura" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Abrindo foto ..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Imagem aberta" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Diretório:" #: src/gtk-interface.c:777 src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Escolha o diretório de saída" #: src/gtk-interface.c:793 src/rs-batch.c:1075 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Exemplo de nome de arquivo:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Tipo do arquivo:" #. Add preferences box #: src/gtk-interface.c:879 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Preferências" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "" #: src/gtk-interface.c:926 msgid "Display Colorspace:" msgstr "" #: src/gtk-interface.c:938 msgid "Exposure Mask Colorspace:" msgstr "" #: src/gtk-interface.c:1011 msgid "General" msgstr "Gera;" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "Abrido diretório..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Abrir recursivamente" #: src/gtk-interface.c:1465 #, fuzzy msgid "Directory" msgstr "Diretório:" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Ferramentas" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Lote" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Abrir" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Pronto" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "Progresso" #: src/rs-actions.c:173 msgid "Open directory" msgstr "" #: src/rs-actions.c:253 src/rs-batch.c:542 #, fuzzy msgid "Could not create output directory." msgstr "Escolha o diretório de saída" #: src/rs-actions.c:257 #, fuzzy msgid "Exporting..." msgstr "Exportando arquivo ..." #: src/rs-actions.c:265 msgid "File exported" msgstr "Arquivo exportado" #: src/rs-actions.c:270 src/rs-actions.c:293 #, fuzzy msgid "Export failed" msgstr "Exportar arquivo" #: src/rs-actions.c:300 #, fuzzy msgid "Exporting to GIMP..." msgstr "Exportando arquivo ..." #: src/rs-actions.c:305 msgid "Error exporting" msgstr "" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "" #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "Apagando fotos" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "Seus arquivos serão permanentemente apagado!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Apagar fotos" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "" #. Build GUI #: src/rs-actions.c:463 #, fuzzy msgid "Profile" msgstr "Todos os arquivos" #: src/rs-actions.c:464 msgid "Exposure" msgstr "" #: src/rs-actions.c:468 msgid "White balance" msgstr "" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "" #: src/rs-actions.c:470 msgid "Denoise" msgstr "" #: src/rs-actions.c:471 #, fuzzy msgid "Color denoise" msgstr "Cores" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "" #: src/rs-actions.c:473 msgid "TCA" msgstr "" #: src/rs-actions.c:474 #, fuzzy msgid "Vignetting" msgstr "Configuração" #: src/rs-actions.c:475 src/rs-toolbox.c:803 msgid "Curve" msgstr "Curva" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "" #: src/rs-actions.c:498 msgid "Select settings to copy" msgstr "" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Configurações copiadas" #: src/rs-actions.c:587 #, fuzzy msgid "Pasting settings to images" msgstr "Configurações coladas" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Configurações coladas" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Nada para colar" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Buffer vazio" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "" #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "" #: src/rs-actions.c:1067 msgid "Adding images to batch queue" msgstr "" #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "" #: src/rs-actions.c:1101 src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" #: src/rs-actions.c:1188 msgid "Removing images from batch queue" msgstr "" #: src/rs-actions.c:1203 #, c-format msgid "%d photos removed from batch queue" msgstr "" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "" #: src/rs-actions.c:1266 #, fuzzy msgid "All Profiles" msgstr "Todos os arquivos" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "" #: src/rs-actions.c:1289 msgid "All files" msgstr "Todos os arquivos" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "" #: src/rs-actions.c:1412 msgid "_File" msgstr "_Arquivo" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "_Editar" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "_Foto" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "Ajustar _prioridade" #: src/rs-actions.c:1416 msgid "_White Balance" msgstr "_Balanço de branco" #: src/rs-actions.c:1417 msgid "_View" msgstr "_Visualizar" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "_Lote" #: src/rs-actions.c:1420 msgid "_Help" msgstr "A_juda" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "" #. File menu #: src/rs-actions.c:1425 msgid "_Open Directory" msgstr "" #: src/rs-actions.c:1426 msgid "_Quick Export" msgstr "" #: src/rs-actions.c:1427 msgid "_Export As" msgstr "" #: src/rs-actions.c:1428 msgid "_Export to Gimp" msgstr "" #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "" #: src/rs-actions.c:1430 msgid "_Reload directory" msgstr "" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "_Sair" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "" #: src/rs-actions.c:1436 msgid "_Copy settings" msgstr "" #: src/rs-actions.c:1437 msgid "_Paste settings" msgstr "" #: src/rs-actions.c:1438 msgid "_Reset settings" msgstr "" #: src/rs-actions.c:1439 #, fuzzy msgid "_Save camera default settings" msgstr "Configurações coladas" #: src/rs-actions.c:1440 msgid "_Preferences" msgstr "" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "" #: src/rs-actions.c:1444 msgid "_1" msgstr "_1" #: src/rs-actions.c:1445 msgid "_2" msgstr "_2" #: src/rs-actions.c:1446 msgid "_3" msgstr "_3" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "_Remover prioridade" #: src/rs-actions.c:1448 msgid "_Auto" msgstr "" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "" #: src/rs-actions.c:1450 msgid "_Crop" msgstr "" #: src/rs-actions.c:1451 msgid "_Uncrop" msgstr "" #: src/rs-actions.c:1452 msgid "_Straighten" msgstr "" #: src/rs-actions.c:1453 msgid "_Unstraighten" msgstr "" #: src/rs-actions.c:1454 msgid "_Group" msgstr "" #: src/rs-actions.c:1455 msgid "_Ungroup" msgstr "" #: src/rs-actions.c:1456 msgid "_Auto group" msgstr "" #: src/rs-actions.c:1457 #, fuzzy msgid "_Tag Photo..." msgstr "_Foto" #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "" #: src/rs-actions.c:1459 msgid "Rotate Counter Clockwise" msgstr "" #: src/rs-actions.c:1460 msgid "Flip" msgstr "" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "" #: src/rs-actions.c:1466 msgid "_Lens Library" msgstr "" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "" #. Batch menu #: src/rs-actions.c:1470 msgid "_Add to batch queue" msgstr "" #: src/rs-actions.c:1471 msgid "_Add view to queue..." msgstr "" #: src/rs-actions.c:1472 msgid "_Remove from batch queue" msgstr "" #: src/rs-actions.c:1473 msgid "_Start" msgstr "" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "" #: src/rs-actions.c:1477 msgid "_About" msgstr "" #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "" #: src/rs-actions.c:1487 msgid "_Iconbox" msgstr "" #: src/rs-actions.c:1488 msgid "_Toolbox" msgstr "" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "_Tela cheia" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "" #: src/rs-actions.c:1491 msgid "Show Filenames in Iconbox" msgstr "" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "" #: src/rs-actions.c:1494 msgid "_Exposure mask" msgstr "" #: src/rs-actions.c:1495 msgid "_Split" msgstr "" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "" #: src/rs-actions.c:1503 msgid "Name" msgstr "" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "" #: src/rs-actions.c:1505 #, fuzzy msgid "ISO" msgstr "ISO%d" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "" #. Snapshot labels #: src/rs-actions.c:1513 src/rs-toolbox.c:207 src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1514 src/rs-toolbox.c:208 src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1515 src/rs-toolbox.c:209 src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Cancelar" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Última imagem:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Tempo restante: %dh %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Tempo restante: ..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "" #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "Carregando %s ..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "Salvando %s ..." #: src/rs-batch.c:635 msgid "Could not export photo." msgstr "" #: src/rs-batch.c:695 msgid "Icon" msgstr "Ícone" #: src/rs-batch.c:702 msgid "Filename" msgstr "Nome do arquivo" #: src/rs-batch.c:709 msgid "Setting" msgstr "Configuração" #: src/rs-batch.c:802 msgid "Start" msgstr "Começar" #: src/rs-batch.c:805 msgid "Remove" msgstr "Remover" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Remover todos" #: src/rs-batch.c:916 src/rs-batch.c:1091 #, fuzzy msgid "Edit output settings" msgstr "Configurações copiadas" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Tamanho da foto" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Largura constante" #: src/rs-batch.c:962 msgid "Constant height" msgstr "Altura constante" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Tamanho máximo" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Largura da foto:" #: src/rs-batch.c:978 src/rs-batch.c:987 msgid "pixels" msgstr "pixels" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "Altura da foto:" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Largura constante:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Altura constante:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Maximum size:\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Diretório de saída:" #: src/rs-batch.c:1100 msgid "Change" msgstr "Modificar" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "Exportar dimensões" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "" #: src/rs-camera-db.c:459 msgid "Model" msgstr "" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "" #: src/rs-preview-widget.c:887 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Tamanho" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Grade" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Nenhuma" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Aspecto" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "ISO paper (A4)" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "" #: src/rs-preview-widget.c:1180 src/rs-preview-widget.c:1191 msgid "Crop" msgstr "" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" #: src/rs-preview-widget.c:1238 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:522 msgid "Export File" msgstr "Exportar arquivo" #: src/rs-save-dialog.c:282 #, fuzzy msgid "File not saved!" msgstr "Arquivo exportado" #: src/rs-save-dialog.c:299 #, fuzzy, c-format msgid "Exporting to %s" msgstr "Exportando arquivo ..." #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Manter aspecto" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Largura:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Altura" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Percentual:" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Todas as fotos (exceto as apagadas)" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Fotos sem prioridade" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Fotos apagadas" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Prioridades" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "" #: src/rs-store.c:1371 #, fuzzy msgid "* (-)" msgstr "* (%d)" #: src/rs-store.c:1372 #, fuzzy msgid "1 (-)" msgstr "1 (%d)" #: src/rs-store.c:1373 #, fuzzy msgid "2 (-)" msgstr "2 (%d)" #: src/rs-store.c:1374 #, fuzzy msgid "3 (-)" msgstr "3 (%d)" #: src/rs-store.c:1375 #, fuzzy msgid "U (-)" msgstr "U (%d)" #: src/rs-store.c:1376 #, fuzzy msgid "D (-)" msgstr "D (%d)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "" #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "" #: src/rs-tethered-shooting.c:558 msgid "Could not open image!\n" msgstr "" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:938 #, fuzzy msgid "Stop Shooting" msgstr "Configuração" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "" #: src/rs-tethered-shooting.c:1003 #, fuzzy msgid "Take Photo" msgstr "_Foto" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "" #. Status window #: src/rs-tethered-shooting.c:1022 #, fuzzy msgid "Status:" msgstr "Saturação" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 #, fuzzy msgid "Filename & Tags" msgstr "Exemplo de nome de arquivo:" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Histograma" #: src/rs-toolbox.c:443 #, fuzzy msgid "Reset" msgstr "Reiniciar curva" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr "" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr "" #: src/rs-toolbox.c:566 src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Abrir curva ..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "" #: src/rs-toolbox.c:700 #, fuzzy msgid "Select Action" msgstr "Configuração" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Salvar curva como ..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Reiniciar curva" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "" #. Pack everything nice #: src/rs-toolbox.c:800 #, fuzzy msgid "Basic" msgstr "Lote" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "" #: src/rs-toolbox.c:802 msgid "Lens Correction" msgstr "" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "" #: src/rs-toolbox.c:1035 #, fuzzy msgid "Lens Disabled" msgstr "Última imagem:" #: src/rs-toolbox.c:1043 msgid "No Lens Information" msgstr "" #: src/rs-toolbox.c:1045 msgid "Camera Unknown" msgstr "" #: src/rs-toolbox.c:1050 #, fuzzy msgid "No Photo" msgstr "_Foto" #: src/rs-toolbox.c:1259 msgid "_Previous" msgstr "" #: src/rs-toolbox.c:1260 msgid "_Next" msgstr "" #~ msgid "Processing photos" #~ msgstr "Processando fotos" #, fuzzy #~ msgid "CA Red" #~ msgstr "Pronto" #~ msgid "Select color profile" #~ msgstr "Selecione o perfil de cores" #~ msgid "Not a valid color profile." #~ msgstr "Não é um perfil de cor válido." #~ msgid "Input profile" #~ msgstr "Perfil de entrada" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Exportar perfil" #~ msgid "Colors" #~ msgstr "Cores" #, fuzzy #~ msgid "Change this" #~ msgstr "Modificar" #~ msgid "File export canceled" #~ msgstr "Exportação de arquivo cancelada" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "16-bit TIFF (Tagged Image File Format)" #~ msgid "Canon CR2" #~ msgstr "Canon CR2" #~ msgid "Canon CIFF" #~ msgstr "Canon CIFF" #~ msgid "Nikon NEF" #~ msgstr "Nikon NEF" #~ msgid "Minolta raw" #~ msgstr "Minolta raw" #~ msgid "Canon TIFF" #~ msgstr "Canon TIFF" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Panasonic raw" #~ msgstr "Panasonic raw" #~ msgid "Pentax raw" #~ msgstr "Pentax raw" #~ msgid "Hasselblad" #~ msgstr "Hasselblad" rawstudio-2.0/po/hu.po0000644000175000017500000014156611546425272011734 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-03-26 03:39+0100\n" "PO-Revision-Date: 2010-07-31 21:50+0100\n" "Last-Translator: Andras Dosztal \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Hungarian\n" "X-Poedit-Country: HUNGARY\n" "X-Poedit-SourceCharset: utf-8\n" #: librawstudio/rs-lens-db-editor.c:325 #, fuzzy msgid "All lenses" msgstr "Minden fájl" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "" #: librawstudio/rs-lens-db-editor.c:565 msgid "Rawstudio Lens Library" msgstr "" #: librawstudio/rs-lens-db-editor.c:590 #, fuzzy msgid "Lens make" msgstr "Lencse tiltva" #: librawstudio/rs-lens-db-editor.c:594 #, fuzzy msgid "Lens model" msgstr "Lencse tiltva" #: librawstudio/rs-lens-db-editor.c:598 #, fuzzy msgid "Focal" msgstr "Fókusztávolság" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "Rekesz" #: librawstudio/rs-lens-db-editor.c:606 #, fuzzy msgid "Camera make" msgstr "_Fényképezőgép" #: librawstudio/rs-lens-db-editor.c:610 #, fuzzy msgid "Camera model" msgstr "_Fényképezőgép" #: librawstudio/rs-lens-db-editor.c:614 #, fuzzy msgid "Enabled" msgstr "Lencse tiltva" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:734 #, fuzzy msgid "Could not create temporary directory." msgstr "Válassza ki a kimeneti könyvtárat" #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:796 #, fuzzy, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Válassza ki a kimeneti könyvtárat" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "" #: librawstudio/rs-lens-db-editor.c:939 #, fuzzy msgid "Rawstudio Lens Editor" msgstr "_Lencseszerkesztő" #: librawstudio/rs-lens-db-editor.c:950 #, fuzzy msgid "Lens Make" msgstr "Lencse tiltva" #: librawstudio/rs-lens-db-editor.c:954 #, fuzzy msgid "Lens Model" msgstr "Lencse tiltva" #: librawstudio/rs-lens-db-editor.c:958 #, fuzzy msgid "Focal Length" msgstr "Fókusztávolság" #: librawstudio/rs-lens-db-editor.c:966 #, fuzzy msgid "Camera Make" msgstr "_Fényképezőgép" #: librawstudio/rs-lens-db-editor.c:970 #, fuzzy msgid "Camera Model" msgstr "_Fényképezőgép" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "" #: librawstudio/rs-lens-db-editor.c:998 #, fuzzy msgid "Set lens" msgstr "Lencse szerkesztése" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "" #: librawstudio/rs-library.c:254 #, fuzzy, c-format msgid "Could not open database %s" msgstr "A fényképet nem lehetett megnyitni" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "" #: librawstudio/rs-library.c:816 #, fuzzy msgid "telephoto" msgstr "Fényképek törlése" #: librawstudio/rs-library.c:832 msgid "January" msgstr "" #: librawstudio/rs-library.c:835 msgid "February" msgstr "" #: librawstudio/rs-library.c:838 msgid "March" msgstr "" #: librawstudio/rs-library.c:841 msgid "April" msgstr "" #: librawstudio/rs-library.c:844 msgid "May" msgstr "" #: librawstudio/rs-library.c:847 msgid "June" msgstr "" #: librawstudio/rs-library.c:850 msgid "July" msgstr "" #: librawstudio/rs-library.c:853 msgid "August" msgstr "" #: librawstudio/rs-library.c:856 msgid "September" msgstr "" #: librawstudio/rs-library.c:859 msgid "October" msgstr "" #: librawstudio/rs-library.c:862 msgid "November" msgstr "" #: librawstudio/rs-library.c:865 msgid "December" msgstr "" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "" #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "" #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "" #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "" #: librawstudio/rs-metadata.c:544 #, fuzzy, c-format msgid "ISO%d" msgstr "ISO" #: librawstudio/rs-profile-selector.c:238 #, fuzzy msgid "Add profile ..." msgstr "Profil hozzáadása" #: librawstudio/rs-profile-selector.c:242 #, fuzzy msgid "Embedded Profile" msgstr "Profil hozzáadása" #: librawstudio/rs-profile-selector.c:244 #, fuzzy msgid "(Select Profile)" msgstr "Válasszon színprofilt" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "Expo" #: librawstudio/rs-settings.c:80 #, fuzzy msgid "Exposure Compensation" msgstr "Exportálás méretei" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 msgid "Satur" msgstr "Szatur" #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "Szaturáció" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "Színárnyalat" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "Kontr" #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "Kontraszt" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temp" msgstr "Hőmérséklet" #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 #, fuzzy msgid "Temperature" msgstr "Rekesz" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "Árnyalat" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 msgid "Sharp" msgstr "Éles" #: librawstudio/rs-settings.c:133 #, fuzzy msgid "Sharpen Amount" msgstr "Élesítés" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "Zajcsökk" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "SzZajcsökk" #: librawstudio/rs-settings.c:145 #, fuzzy msgid "Colour Denoising" msgstr "Színzajcsökkentés" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "CA R" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "CA B" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "Viny" #: librawstudio/rs-settings.c:163 #, fuzzy msgid "Vignetting Correction" msgstr "Lencsekorrekciók" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 msgid "Red" msgstr "Vörös" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "Zöld" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "Kék" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 msgid "JPEG Quality" msgstr "JPEG minőség" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "" #: plugins/output-facebook/output-facebook.c:132 #, fuzzy msgid "Upload photo to Facebook" msgstr "Fénykép feltöltése Flickrre" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "Első lépés:" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "Második lépés" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "Rawstudio azonosítása" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:329 #, fuzzy msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" "A Rawstudionak először azonosítania kell Önt, mielőtt fényképeket töltene " "fel a Flickrre" #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "" #: plugins/output-flickr/output-flickr.c:113 msgid "Title" msgstr "Cím" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "Leírás" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "Címkék" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "Publikus (mindenki láthatja)" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "Barátok láthatják" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "Család láthatja" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "Fénykép feltöltése Flickrre" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "Hiba történt az azonosítás során. Próbálja újra." #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" "A Rawstudio nem tudta feltölteni a képet, mert az azonosítás vissza lett " "vonva. A fájlok megosztásához a Azonosítsa magát ismét a Flickren." #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" "A Rawstudio elvesztette az azonosítót a fiókjához, azonosítsa magát ismét." #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" "%s\n" "\n" "Ezzel a hibával a Rawstudio még nem találkozott, Kérjük, össza meg " "velünk, hogyan találta, és hogyan lehet előidézni, hogy hasznosabb " "hibaüzenetet tudjunk írni. Köszönjük!" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "Flickr hiba" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" "A Rawstudionak először azonosítania kell Önt, mielőtt fényképeket töltene " "fel a Flickrre" #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 #, fuzzy msgid "Full export path" msgstr "Fájl exportálva" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 msgid "Copy EXIF metadata" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "" #: plugins/output-picasa/output-picasa.c:123 #, fuzzy msgid "Upload photo to Picasa" msgstr "Fénykép feltöltése Flickrre" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "" #: plugins/output-picasa/rs-picasa-client.c:234 msgid "Username: " msgstr "" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "" #: plugins/output-pngfile/output-pngfile.c:90 #, fuzzy msgid "Save 16 bit linear PNG" msgstr "16 bites TIFF mentése" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Tömörítetlen TIFF mentése" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "16 bites TIFF mentése" #: plugins/output-tifffile/output-tifffile.c:108 msgid "TIFF (Tagged Image File Format)" msgstr "TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Eredeti fájlnév" #: src/filename.c:315 #, fuzzy, c-format msgid "%p - Path of original file" msgstr "%f - Eredeti fájlnév" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - Növekvő számláló" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s - Beállítás ID (A, B vagy C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "%d - EXIF dátum (ÉÉÉÉ-HH-NN)" #: src/filename.c:319 #, fuzzy msgid "%DY - Year from EXIF (YYYY)" msgstr "%d - EXIF dátum (ÉÉÉÉ-HH-NN)" #: src/filename.c:320 #, fuzzy msgid "%Dy - Year from EXIF (YY)" msgstr "%d - EXIF dátum (ÉÉÉÉ-HH-NN)" #: src/filename.c:321 #, fuzzy msgid "%Dm - Month from EXIF (MM)" msgstr "%d - EXIF dátum (ÉÉÉÉ-HH-NN)" #: src/filename.c:322 #, fuzzy msgid "%DM - Month from EXIF (Text)" msgstr "%d - EXIF dátum (ÉÉÉÉ-HH-NN)" #: src/filename.c:323 #, fuzzy msgid "%Dd - Date from EXIF (DD)" msgstr "%d - EXIF dátum (ÉÉÉÉ-HH-NN)" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "%t - EXIF idő (ÓÓ:PP:MM)" #: src/gtk-interface.c:154 #, fuzzy msgid "Width" msgstr "Szélesség:" #: src/gtk-interface.c:154 #, fuzzy msgid "Height" msgstr "Magasság" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Fénykép megnyitása" #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "A fényképet nem lehetett megnyitni" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Fénykép megnyitva" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "A fénykép prioritása megváltoztatva (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "A fénykép prioritása megváltoztatva (T)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "A fénykép prioritása megváltoztatva (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Könyvtár:" #: src/gtk-interface.c:777 src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Válassza ki a kimeneti könyvtárat" #: src/gtk-interface.c:793 src/rs-batch.c:1075 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Fájlnév sablon:" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Fájlnév példa:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Fájl típusa:" #. Add preferences box #: src/gtk-interface.c:879 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Beállítások" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Előnézet háttérszíne:" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Hisztogram magassága:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Rendszertéma használata" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Gyorsítótár elhelezése a home könyvtárban" #: src/gtk-interface.c:926 #, fuzzy msgid "Display Colorspace:" msgstr "Kijelző profilja" #: src/gtk-interface.c:938 #, fuzzy msgid "Exposure Mask Colorspace:" msgstr "E_xpozíció maszk" #: src/gtk-interface.c:1011 msgid "General" msgstr "Általános" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "Gyors exportálás" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "Könyvtár megnyitása..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Rekurzív megnyitás" #: src/gtk-interface.c:1465 msgid "Directory" msgstr "Könyvtár" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "Címke keresés" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Eszközök" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Kötegelés" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Megnyitás" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Kész" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "Folyamat" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Könyvtár megnyitása" #: src/rs-actions.c:253 src/rs-batch.c:542 #, fuzzy msgid "Could not create output directory." msgstr "Válassza ki a kimeneti könyvtárat" #: src/rs-actions.c:257 #, fuzzy msgid "Exporting..." msgstr "Exportálás a(z) %s helyre" #: src/rs-actions.c:265 msgid "File exported" msgstr "Fájl exportálva" #: src/rs-actions.c:270 src/rs-actions.c:293 msgid "Export failed" msgstr "Exportálás sikertelen" #: src/rs-actions.c:300 #, fuzzy msgid "Exporting to GIMP..." msgstr "Exportálás a(z) %s helyre" #: src/rs-actions.c:305 msgid "Error exporting" msgstr "Hiba az exportálásban" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "Hiba a fénykép GIMP-be epxortálásában" #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "Fényképek törlése" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "A fájlok véglegesentörölve lesznek!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Fényképek törlése" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "" #. Build GUI #: src/rs-actions.c:463 #, fuzzy msgid "Profile" msgstr "Minden profil" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Expozíció" #: src/rs-actions.c:468 msgid "White balance" msgstr "Fehéregyensúly" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Élesítés" #: src/rs-actions.c:470 msgid "Denoise" msgstr "Zajcsökkentés" #: src/rs-actions.c:471 msgid "Color denoise" msgstr "Színzaj csökkentése" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "Csatornakeverő" #: src/rs-actions.c:473 msgid "TCA" msgstr "TCA" #: src/rs-actions.c:474 msgid "Vignetting" msgstr "Vinyettálás" #: src/rs-actions.c:475 src/rs-toolbox.c:803 msgid "Curve" msgstr "Görbe" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "" #: src/rs-actions.c:498 #, fuzzy msgid "Select settings to copy" msgstr "Válassza ki a beillesztendő beállításokat" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Beállítások átmásolva" #: src/rs-actions.c:587 #, fuzzy msgid "Pasting settings to images" msgstr "Beillesztett beállítások" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Beillesztett beállítások" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Nincs mit beilleszteni" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Üres puffer" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Fehéregyensúly automatikus beállítása" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "Nincs fehéregyensúly, amiből állítani lehetne" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Fehéregyensúly beállítása a fényképezőgépére" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "" #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "Expozíciós maszk megjelenítése" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "Expozíciós maszk elrejtése" #: src/rs-actions.c:1067 #, fuzzy msgid "Adding images to batch queue" msgstr "_Hozzáadás a sorhoz" #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "%d fénykép hozzáadva a kötegelt feldolgozáshoz" #: src/rs-actions.c:1101 src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Válassza ki, melyik beállításokat\n" "adja hozzá a kötegelt sorhoz" #: src/rs-actions.c:1188 #, fuzzy msgid "Removing images from batch queue" msgstr "Eltávolítva a kötegelt feldolgozásból" #: src/rs-actions.c:1203 #, fuzzy, c-format msgid "%d photos removed from batch queue" msgstr "%d fénykép hozzáadva a kötegelt feldolgozáshoz" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "Profil hozzáadása" #: src/rs-actions.c:1266 msgid "All Profiles" msgstr "Minden profil" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "Fényképezőgép profilok (DCP)" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "Színprofil (ICC és ICM)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Minden fájl" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "Nyerskép-átalakító GTK+/GNOME alá" #: src/rs-actions.c:1412 msgid "_File" msgstr "_Fájl" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "_Szerkesztés" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "_Fénykép" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "_Prioritás beállítása" #: src/rs-actions.c:1416 msgid "_White Balance" msgstr "Fehér_egyensúly" #: src/rs-actions.c:1417 msgid "_View" msgstr "_Nézet" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "_Rendezés" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "_Kötegelés" #: src/rs-actions.c:1420 msgid "_Help" msgstr "_Súgó" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "" #. File menu #: src/rs-actions.c:1425 msgid "_Open Directory" msgstr "_Könyvtár megnyitása" #: src/rs-actions.c:1426 msgid "_Quick Export" msgstr "_Gyors exportálás" #: src/rs-actions.c:1427 msgid "_Export As" msgstr "_Exportálás másként" #: src/rs-actions.c:1428 msgid "_Export to Gimp" msgstr "Exportálás G_IMP-be" #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "" #: src/rs-actions.c:1430 msgid "_Reload directory" msgstr "Könyvtár új_ratöltése" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "Megjelölt képek _törlése" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "_Kilépés" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "Beállítások _visszaállítása" #: src/rs-actions.c:1436 msgid "_Copy settings" msgstr "Beállítások má_solása" #: src/rs-actions.c:1437 msgid "_Paste settings" msgstr "Beállítások _beszúrása" #: src/rs-actions.c:1438 msgid "_Reset settings" msgstr "Beállítások _alapálapotba tevése" #: src/rs-actions.c:1439 #, fuzzy msgid "_Save camera default settings" msgstr "Alapértelmesett beállítások _mentése" #: src/rs-actions.c:1440 msgid "_Preferences" msgstr "_Beállítások" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "Fénykép megjelölése _törlésre" #: src/rs-actions.c:1444 msgid "_1" msgstr "_1" #: src/rs-actions.c:1445 msgid "_2" msgstr "_2" #: src/rs-actions.c:1446 msgid "_3" msgstr "_3" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "Prioritás tö_rlése" #: src/rs-actions.c:1448 msgid "_Auto" msgstr "_Automata" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "_Fényképezőgép" #: src/rs-actions.c:1450 msgid "_Crop" msgstr "_Levágás" #: src/rs-actions.c:1451 msgid "_Uncrop" msgstr "Levágás _megszüntetése" #: src/rs-actions.c:1452 msgid "_Straighten" msgstr "_Kiegyenesítés" #: src/rs-actions.c:1453 msgid "_Unstraighten" msgstr "Egyenesítés me_gszüntetése" #: src/rs-actions.c:1454 msgid "_Group" msgstr "_Csoportosítás" #: src/rs-actions.c:1455 msgid "_Ungroup" msgstr "Csoportosítás me_gszüntetése" #: src/rs-actions.c:1456 msgid "_Auto group" msgstr "A_utomata csoportosítás" #: src/rs-actions.c:1457 msgid "_Tag Photo..." msgstr "Fénykép _címkézése" #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "Forgatás jobbra" #: src/rs-actions.c:1459 msgid "Rotate Counter Clockwise" msgstr "Forgatás balra" #: src/rs-actions.c:1460 msgid "Flip" msgstr "Megfordítás" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "Tükrözés" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "_Előző fénykép" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "_Következő fénykép" #: src/rs-actions.c:1466 #, fuzzy msgid "_Lens Library" msgstr "_Lencseszerkesztő" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "" #. Batch menu #: src/rs-actions.c:1470 msgid "_Add to batch queue" msgstr "_Hozzáadás a sorhoz" #: src/rs-actions.c:1471 #, fuzzy msgid "_Add view to queue..." msgstr "_Jelenlegi nézet hozzáadása a sorhoz" #: src/rs-actions.c:1472 msgid "_Remove from batch queue" msgstr "_Eltávolítás a sorból" #: src/rs-actions.c:1473 msgid "_Start" msgstr "_Indítás" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "" #: src/rs-actions.c:1477 msgid "_About" msgstr "_Névjegy" #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "_Nagyítás a szélekig" #: src/rs-actions.c:1487 msgid "_Iconbox" msgstr "_Ikonkészlet" #: src/rs-actions.c:1488 msgid "_Toolbox" msgstr "E_szközkészlet" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "_Teljes képernyő" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "" #: src/rs-actions.c:1491 #, fuzzy msgid "Show Filenames in Iconbox" msgstr "Fájlnevek megjelenítése ikonnézetben" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "" #: src/rs-actions.c:1494 msgid "_Exposure mask" msgstr "E_xpozíció maszk" #: src/rs-actions.c:1495 msgid "_Split" msgstr "_Felosztás" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "_Lights out" #: src/rs-actions.c:1503 msgid "Name" msgstr "Név" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "Időbélyeg" #: src/rs-actions.c:1505 msgid "ISO" msgstr "ISO" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "Fókusztávolság" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "Zársebesség" #. Snapshot labels #: src/rs-actions.c:1513 src/rs-toolbox.c:207 src/rs-toolbox.c:1252 msgid " A " msgstr " A" #: src/rs-actions.c:1514 src/rs-toolbox.c:208 src/rs-toolbox.c:1253 msgid " B " msgstr " B" #: src/rs-actions.c:1515 src/rs-toolbox.c:209 src/rs-toolbox.c:1254 msgid " C " msgstr " C" #: src/rs-batch.c:459 msgid "Cancel" msgstr "Mégse" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Utolsó kép:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Hátralevő idő: %d:%d:%d" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Hátralevő idő..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "" #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "%s betöltése..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "%s mentése..." #: src/rs-batch.c:635 #, fuzzy msgid "Could not export photo." msgstr "A fényképet nem lehetett megnyitni" #: src/rs-batch.c:695 msgid "Icon" msgstr "Ikon" #: src/rs-batch.c:702 msgid "Filename" msgstr "Fájlnév" #: src/rs-batch.c:709 msgid "Setting" msgstr "Beállítás" #: src/rs-batch.c:802 msgid "Start" msgstr "Indítás" #: src/rs-batch.c:805 msgid "Remove" msgstr "Eltávolítás" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Az összes eltávolítása" #: src/rs-batch.c:916 src/rs-batch.c:1091 #, fuzzy msgid "Edit output settings" msgstr "Beállítások má_solása" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Fénykép mérete" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "Állandó arány" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Állandó szélesség" #: src/rs-batch.c:962 msgid "Constant height" msgstr "Állandó magasság" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Maximális méret" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Képszélesség:" #: src/rs-batch.c:978 src/rs-batch.c:987 msgid "pixels" msgstr "pixel" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "Képmagasság:" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "Fénykép arányai:" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Állandó szélesség:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Állandó magasság:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "Állandó arány:\n" "%d" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Maximális méret:\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Kimeneti könyvtár:" #: src/rs-batch.c:1100 msgid "Change" msgstr "Módosít" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "Exportálás méretei" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "" #: src/rs-camera-db.c:459 msgid "Model" msgstr "" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "Navigáció megjelenítése" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "A 'light out' mód nem elérhető" #: src/rs-preview-widget.c:887 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Méret" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Rács" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Nincs" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "Arany kiválasztás" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "Harmadolás szabálya" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Arany háromszög 1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Arany háromszög 2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Harmonikus háromszög 1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Harmonikus háromszög 2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Nézőpont" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "Freeform" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "A4 papír" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "16:9 (HDTV)" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "Arany téglalap" #: src/rs-preview-widget.c:1180 src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Levágás" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "Ne vágja le" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" #: src/rs-preview-widget.c:1238 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:522 msgid "Export File" msgstr "Exportált fájl" #: src/rs-save-dialog.c:282 #, fuzzy msgid "File not saved!" msgstr "Fájl exportálva" #: src/rs-save-dialog.c:299 #, c-format msgid "Exporting to %s" msgstr "Exportálás a(z) %s helyre" #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Képarány megtartása" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Szélesség:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Magasság" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Százalék:" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Minden fénykép (kivéve a törölteket)" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Elsődleges prioritású fényképek" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Másodlagos prioritású fényképek" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Harmadlagos prioritású fényképek" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "N (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Prioritás Néküli fényképek" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "T (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Törölt fényképek" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Prioritások" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" "%s\n" "\n" #: src/rs-store.c:633 #, fuzzy, c-format msgid "Make: %s\n" msgstr "Idő: %s" #: src/rs-store.c:635 #, fuzzy, c-format msgid "Model: %s\n" msgstr "Idő: %s" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "Fókusztávolság: %dmm\n" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "Zársebesség: %.1fs\n" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "Zársebesség: 1/%.0fs\n" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "Rekesz: F/%.01f\n" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "ISO: %u\n" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "Idő: %s" #: src/rs-store.c:1371 #, fuzzy msgid "* (-)" msgstr "* (%d)" #: src/rs-store.c:1372 #, fuzzy msgid "1 (-)" msgstr "1 (%d)" #: src/rs-store.c:1373 #, fuzzy msgid "2 (-)" msgstr "2 (%d)" #: src/rs-store.c:1374 #, fuzzy msgid "3 (-)" msgstr "3 (%d)" #: src/rs-store.c:1375 #, fuzzy msgid "U (-)" msgstr "N (%d)" #: src/rs-store.c:1376 #, fuzzy msgid "D (-)" msgstr "T (%d)" #: src/rs-tag-gui.c:65 #, fuzzy, c-format msgid "Tag search [%s]" msgstr "Címke keresés" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "" #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "" #: src/rs-tethered-shooting.c:558 #, fuzzy msgid "Could not open image!\n" msgstr "A fényképet nem lehetett megnyitni" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:938 #, fuzzy msgid "Stop Shooting" msgstr "Beállítás" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "" #: src/rs-tethered-shooting.c:1003 #, fuzzy msgid "Take Photo" msgstr "Fénykép _címkézése" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "" #. Status window #: src/rs-tethered-shooting.c:1022 #, fuzzy msgid "Status:" msgstr "Szatur" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 #, fuzzy msgid "Filename & Tags" msgstr "Fájlnév példa:" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Hisztogram" #: src/rs-toolbox.c:443 msgid "Reset" msgstr "Visszaállítás" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr "" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr "" #: src/rs-toolbox.c:566 src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Görbe megnyitása..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "" #: src/rs-toolbox.c:700 #, fuzzy msgid "Select Action" msgstr "Beállítás" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Görbe mentése másként..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Görbe visszaállítása" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "Görbe végeinek automatikus állítása" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "Lencse szerkesztése" #. Pack everything nice #: src/rs-toolbox.c:800 msgid "Basic" msgstr "Alap" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "Csatornakeverő" #: src/rs-toolbox.c:802 #, fuzzy msgid "Lens Correction" msgstr "Lencsekorrekciók" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Fénykép megfordítása az x-tengely mentén" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Fénykép tükrözése az y-tengely mentén" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Kép forgatása 90 fokkal jobbra" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Kép forgatása 90 fokkal balra" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Transzformációk" #: src/rs-toolbox.c:1033 #, fuzzy msgid "Lens Unknown" msgstr "Lencse ismeretlen" #: src/rs-toolbox.c:1035 #, fuzzy msgid "Lens Disabled" msgstr "Lencse tiltva" #: src/rs-toolbox.c:1043 #, fuzzy msgid "No Lens Information" msgstr "Lencsekorrekciók" #: src/rs-toolbox.c:1045 #, fuzzy msgid "Camera Unknown" msgstr "Fényképezőgép ismeretlen" #: src/rs-toolbox.c:1050 #, fuzzy msgid "No Photo" msgstr "Nincs fénykép" #: src/rs-toolbox.c:1259 #, fuzzy msgid "_Previous" msgstr "_Előző fénykép" #: src/rs-toolbox.c:1260 #, fuzzy msgid "_Next" msgstr "_Következő fénykép" #~ msgid " %s added to batch queue" #~ msgstr "%s hozzáadva a kötegelt feldolgozáshoz" #~ msgid "%s already added to batch queue" #~ msgstr "%s már hozzá lett adva a kötegelt feldolgozáshoz" #~ msgid "Not in batch queue" #~ msgstr "Nincs a kötegelt feldolgozásban" #~ msgid "Processing photos" #~ msgstr "Fényképek feldolgozása" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "8 bites fotók (jpeg, png, stb.) betöltése" #~ msgid "Warmth" #~ msgstr "Melegség" #~ msgid "CA Red" #~ msgstr "CA Vörös" #~ msgid "CA Blue" #~ msgstr "CA Kék" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Színprofilok (ICC és ICM)" #~ msgid "Not a valid color profile." #~ msgstr "Nem érvényes színprofil." #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "" #~ "A kiválasztott fájl nem tartalmaz érvényes színprofilt a Rawstudio ezen " #~ "verziójához." #~ msgid "Enable color management (experimental)" #~ msgstr "Színmenedzsment engedélyezése (Kísérleti)" #~ msgid "Input profile" #~ msgstr "Bemenet profilja" #~ msgid "BuiltInRGBProfile" #~ msgstr "BeépítettRGBProfil" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Exportálás profilja" #~ msgid "Intent" #~ msgstr "Cél" #~ msgid "Perceptual" #~ msgstr "Érzékelő" #~ msgid "Relative colormetric" #~ msgstr "Relative colormetric" #~ msgid "Absolute colormetric" #~ msgstr "Absolute colormetric" #~ msgid "Colors" #~ msgstr "Színek" rawstudio-2.0/po/da.gmo0000644000175000017500000007654111546436027012050 00000000000000Dl((((((((((()7)Q)l) ))")))*!***++'+=+R+T+j++++ ++ ++++ ,#, 8,C,G,Z,t,,,,,,,--$ -E-U-e---!-- - - . .E+.q.z..........$. ////$$/ I/ U/b/x// / /// /// 00040O0 j0 x0000 000011&151H1N1W1g1z1&11)1"2%#2I2/a2&22212N3k3 33k33 44(4=4 F4T4c4s4y4 4 4 444444 5 5(?5<h515 55566) 6)J6t6666 66 6 77 17>7D7M7c7}777 77 77778 8$8)8H8 N8 [8g8y8888888 89 9#9(9@9X9_9g9 |999 999999 99!9b:': :::: :: :: ; ; $; .; 9; F; P;[;t;;;;;; ;;;"<#< *<K<Q< `<G<)<Y<M=R=f=o=%========>>0>?>T>f>v>>> >>>> > ? ? ? *?K?@i? ?*??<? 8@C@U@g@y@@@@@ @ @@AAe7AcABB<BJBC C#6CZC aC lCC CCCCC%C-DCDRD XDcDtDDD DD DD3D/E$BEgE(vEE+E EEEEF FF5F KF&XF"F'F7FG"G*GCGIGXG`GhG pGg~G GGG H!H1H6HKH fHqH vHAH/HH I I$I )I4I:I @IKIaIFvI.II J&J;JSJlJJJ JJ JJJJK K$K=K=K]L pL~LL&L.LLuMxM{M~MMMM MMMMMMMN N&N6NENKN dNpNwN}N N NN NNNNN N NO O$O*O_>` T```w`` `'`'`%`$a:a'Ya aaaaaaa ab!b:bBbJbbbrbbbbbbbbb b c c!c4c8cIcQcbcscc#cccccdd d(d BdLd^dcdtdxddd&d dddd'eeeee e e ff ,f:fIf Xf cfpf fff!ff fg gg*gGg$Kgpgvggg$gOg2htKhhh hh)h )iJiPicilitiyii!iiiiii jjk kkkkl'l?l FlQlol ~lllljlh=mmAnKFnKnnn)n)o /o:oZo bopo ooo o oop pp(p>pPp fptppp9pp#p q7-q%eq>q q q qqqqr(r@rPrhr$r*r r%rss$s4s;4baXXDC UO'*?9Q[ (CLepIRK!!LxPD)Ns =6nu%2d_^&I8yY/@hfiNt% SAJ<T.~A[ .:8'2w$ lWM 4a z+k&zF3lZ>1S57runv (Cannot log in) (Logged in succesfully) A B C %%.1fs %2c - Incremental counter%DD - Day of week from EXIF%DM - Month from EXIF (Text)%DY - Year from EXIF (YYYY)%Dd - Date from EXIF (DD)%Dm - Month from EXIF (MM)%Dy - Year from EXIF (YY)%d - Date from EXIF (YYYY-MM-DD)%d photos added to batch queue%d photos removed from batch queue%dmm %f - Original filename%p - Path of original file%s Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!%s - Setting id (A, B or C)%t - Time from EXIF (HH:MM:SS)(No user entered)(Select Profile)* (%d)* (-)-. Click to edit value. Click to reset value1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Aperture: F/%.01f Focal length: %dmm ISO: %u Make: %s Model: %s Shutter speed: %.1fs Shutter speed: 1/%.0fs Time: %s%s AA raw image converter for GTK+/GNOMEAdd Profile ...Add profile ...Add tags to selected photo(s).Adding images to batch queueAdjusting to auto white balanceAdjusting to camera white balanceAlbumsAll ProfilesAll filesAll lensesAll photos (excluding deleted)An error was returned when communicating with the Picasa web service:ApertureAprilAspectAugustAuthenticate RawstudioAuto adjust curve endsBBasicBatchBlueBlue Amount AdjustmentBlue Chromatic Aberration CorrectionBuffer emptyCCA BCA RCamera %s on port %s failed to open Camera MakeCamera ModelCamera Profiles (DCP)Camera UnknownCamera defaults editorCamera makeCamera modelCamera monitor shutting down. CancelCannot log inCaptionCapture Enabled. Capturing. ChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Channel MixerChannel mixerChoose output directoryColDnColor Profiles (ICC and ICM)Color denoiseColour DenoisingConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrContrastCopied settingsCopy EXIF metadataCopy EXIF metadata to XMPCopy settings from active to new imageCopying image to clipboardCould not create datadir for lensfun - %sCould not create output directory.Could not create temporary directory.Could not export photo.Could not fetch file from %s or write it to %s.Could not fetch list of files from %s.Could not open database %sCould not open image! Could not open temporary file on disk for writingCould not save file: %s Check that you have write permissions to this folder.Couldn't open photoCreate albumCropCrop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel cropCurrent User: CurveD (%d)D (-)DecemberDelete photosDeleted photosDeleting photosDenoiDenoiseDescriptionDirectoryDirectory:Disconnect CameraDisconnecting current camera Display Colorspace:Display NavigationDo not Load Selected ImagesDon't cropDownloading and adding image. ERROR: Could not copy image to clipboardERROR: Gphoto2 returned error value %d Error message is: %s ERROR: Init camera returned %d. Error text is:%s Edit lensEdit output settingsEmbedded ProfileEnable this lensEnabledEnabling capture mode for Canon cameras. Enabling capture mode for Nikon cameras. Error copying file %s to %s Error exportingError exporting photo to gimp.Error updating lensfun databaseExport FileExport dimensionsExport failedExporting to %sExporting to GIMP...Exporting...ExposExposureExposure CompensationExposure Mask Colorspace:F/%.1f FebruaryFile Downloaded Succesfully. File exportedFile not saved!File type:FilenameFilename & TagsFilename example:Filename template:Flickr errorFlipFlip the photo over the x-axisFocalFocal LengthFocallengthFound %d cameras FreeformFull export pathGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2Gphoto2 reported Context Error: GreenGreen Amount AdjustmentGridHarmonious triangles #1Harmonious triangles #2HeightHeight:Hiding exposure maskHistogramHistogram height:HueHue ShiftISOISO paper (A4)ISO%dIconImage copied to clipboardImage openedInterval ShootingInterval shooting shutting down. It seems like rawstudio lost its authentication to upload to your account, please re-authenticate.JPEG (Joint Photographic Experts Group)JPEG QualityJanuaryJulyJuneKeep aspectLarge gamut color spaceLast image:Lens CorrectionLens DisabledLens LibraryLens MakeLens ModelLens UnknownLens makeLens modelLensfun database updatedLight DenoisingLight out mode not availableLoad non-RAW imagesLoading %s ...MarchMaster ControlMaximum sizeMaximum size: %d x %dMayMinimize this window after captureMirrorMirror the photo over the y-axisModelMonitor CameraMonitor Thread already running. Monitor recieved error %d, while waiting for camera. Error text is: %s Moving file to current directory failed! NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable.NameNo Lens InformationNo PhotoNo camera connected. No camera selected - Cannot connect! No white balance to set fromNoneNothing to pasteNovemberOctoberOpenOpen curve ...Open directoryOpen new images after captureOpen recursiveOpening directory...Opening photo ...Original AspectOutput directory:Overwrite File?PNG (Portable Network Graphics)Password: Pasted settingsPasting settings to imagesPercent:Photo height:Photo scale:Photo sizePhoto width:Picasa Webalbum AuthentificationPlace cache in home directoryPlease type in your username and password for Picasa Web Albums.PreferencesPress F10 to return preview to this windowPreview background color:Print friendly color space, compatible with Adobe RGB (1998)PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProcessing Image %d/%dProcessing Image 1/%d.ProfileProgressPublic (everyone can see this)Quick exportRawstudioRawstudio Lens EditorRawstudio Lens LibraryRawstudio Tethered ShootingRawstudio needs to be authenticated before it will be able to upload photos to your Facebook account.Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account.Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr.ReadyRecieved error %d, while capturing image. Error text is: %s Recieved error %d, while downloading image from camera. Error text is: %s RedRed Amount AdjustmentRed Chromatic Aberration CorrectionRemoveRemove allRemoving images from batch queueResetReset curveRetain EXIF metadataRetry Operation?Rotate ClockwiseRotate Counter ClockwiseRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturSaturationSave 16 bit TIFFSave 16 bit linear PNGSave curve as ...Save uncompressed TIFFSaving %s ...Seconds between each shot:Select ActionSelect All/NoneSelect OK to use this screen for fullscreen previewSelect Saved CurveSelect Screen for fullscreen previewSelect camera:Select screen to open fullscreen previewSelect settings to copySelect which settings to add to batch queueSeptemberSet lensSettingSharpSharpenSharpen AmountShow Filenames in IconboxShowing exposure maskShutterspeedShutting down already running thread. Shutting down asynchronous thread Shutting down interval capture thread. Shutting down running thread to enable remote capture. SizeStaring Interval Shooting Thread. Staring Monitor Thread. StartStart ShootingStatus:Step 1:Step 2:Stop ShootingStraighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels.Switch UserTCATIFF (Tagged Image File Format)Tag searchTag search [%s]TagsTags for new images:Tags, separated by spaces:Take PhotoTempTemperatureThe file '%s' already exists. Do you want to overwrite the file?The port you specified ('%s') can not be found.Time left: %dh %dm %dsTime left: ...TimestampTintTint ShiftTitleToolsTransformsU (%d)U (-)Unable to detect more than one monitor. Cannot open fullscreen previewUnable to locate screen for fullscreen previewUnhandled error from FacebookUnhandled error from PicasaUnprioritized photosUpdate lensfun databaseUpload photo to FacebookUpload photo to FlickrUpload photo to PicasaUse system themeUsername: VignVignettingVignetting CorrectionVisible to FamilyVisible to FriendsWBAsciiWaiting for jobs to finishWaiting for next image. Warning: It took longer time to capture the image than the set interval It took %.1f seconds to download the image. Consider increasing the interval. We recieved an error during authentication. Please try again.Welcome to Tethered shooting! Make sure your camera is NOT mounted in your operating system. White balanceWidthWidth:Would you like to Retry the operation?Your files will be permanently deleted!Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing._1_2_3_About_Add to batch queue_Add view to queue..._Auto_Auto group_Batch_Camera_Copy Image to Clipboard_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Lens Library_Lights out_Next_Next Photo_Online Documentation_Open Directory_Paste settings_Photo_Preferences_Previous_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Save camera default settings_Set Priority_Show Photo On Secondary Monitor_Snapshot_Sort by_Split_Start_Straighten_Tag Photo..._Tethered Shooting_Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelstelephotowideangleProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-03-27 23:20+0200 PO-Revision-Date: 2011-03-27 23:22+0100 Last-Translator: Anders Kvist Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: Danish X-Poedit-Country: DENMARK (Kunne ikke logge ind)(Login lykkedes) A B C %%.1fs %2c - Stigende tæller%DD - Navn på dagen fra Exif%DM - Måned fra Exif (Tekst)%DY - År fra Exif (ÅÅÅÅ)%Dd - Dato fra Exif (DD)%Dm - Måned fra Exif (MM)%Dy - År fra Exif (ÅÅ)%d - Dato fra Exif (ÅÅÅÅ-MM-DD)%d fotos tilføjet til eksportkøen%d fotos fjernet fra eksportkøen%dmm %f - Originalt filnavn%p - Sti til oprindelig fil%s Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!%s - Indstillings (A, B eller C)%t - Tid fra Exif (HH:MM:SS)(Ingen bruger indtastet)(Vælg farveprofil)* (%d)* (-)-. Klik for at rette værdi. Klik for at nulstille værdi1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Blænde: F/%.01f Fokus længde: %dmm ISO: %u Producent: %s Model: %s Lukkerhastighed: %.1fs Lukkerhastighed: 1/%.0fs Tid: %s%s AEn raw fotokonverter til GTK+/GNOMETilføj profil...Tilføj profilTilføj tags til valgte billede(r).Tilføjer billeder til eksportkøenJusterer efter auto hvidbalanceJusterer efter kameraets hvidbalanceAlbumsAlle profilerAlle filerAlle linserAlle fotos (undtaget slettede)Der blev retuneret en fejl under kommunikationen med Picasas webservice:BlændeAprilForholdAugustAutentificér RawstudioAutoindstil kurveenderBBasisEksportkøBlåJustering af blå komponentBlå korrigering for Kromatisk AbberationBufferen er tomCKA BKA RKunne ikke åbne kameraet %s på port %s KameraproducentKameramodelKameraprofiler (DCP)Ukendt kameraRediger kamera standardindstillingerKameraproducentKameramodelKameraovervågning lukker ned. AfbrydKunne ikke logge indOverskriftOptagelse slået til. Optager. SkiftFotoprioritet ændret (%d)Fotoprioritet ændret (*)Fotoprioritet ændret (D)KanalmixerKanalmixerVælg output bibliotekFrvStFarveprofiler (icc og icm)Farve støjfjernelseFarve støjreduktionFast målestok: %dFast højdeFast højde: %dFast målestokFast breddeFast bredde: %dKontrKontrastIndstillinger kopieretKopier Exif metadataKopier Exif metadata til XMPKopier opsætning fra valgt til nyt billedeKopierer billede til udklipsholderKunne ikke oprette datafolder til LensFun - %sVælg output folderKunne ikke oprette midlertidig mappeKunne ikke åbne fotoKunne ikke hente fil fra %s eller skrive den til %s.Kunne ikke hente listen af filer fra %s.Kunne ikke åbne database %sKunne ikke åbne foto! Kunne ikke åbne midlertidig fil på disken til skrivning.Kunne ikke gemme filen: %s Undersøg om du har skriverettigheder til mappen.Kunne ikke åbne fotoOpret albumBeskærBeskær: Træk for at markere område til beskæring. Højre musetast inden for området: Godkend beskæring; Udenfor: Annuller beskæringAktuel bruger:KurveD (%d)D (-)DecemberSlet fotosSlettede fotosSletter fotosStøjStøjfjernelseBeskrivelseFolderBibliotek:Afbryd forbindelsen til kameraKobler nuværende kamera fra Skærmprofil:Skærm navigationUndlad at åbne valgte billederAfbryd cropHenter og tilføjer billede. FEJL: Kunne ikke kopiere billedet til udklipsholderFEJL: Gphoto2 returnerede fejlværdien %d Fejlbeskeden er: %s FEJL: Initialisering af kamerareturnerede %d. Fejltekst er:%s Vælg linseRedigér indstillingerIndbygget farveprofilKorrigér denne linseSlået tilSlår optagelse til på Canon kameraer Slår optagelse til på Nikon kameraer Kunne ikke kopiere fil fra %s til %s Fejl ved eksporteringFejl ved eksportering til GimpFejl ved opdatering af LensFun databaseEksporter filEksportdimensionerFejl under eksporteringEksporterer %sEksporterer til GIMP...Eksporterer...EkspoEksponeringEksponeringsjusteringFarveprofil for EksponeringsmaskeF/%.1f FebruarFil hentet successrigt Fil eksporteretFil ikke gemt!Filtype:FilnavnFilnavn & TagsEksempel på filnavn:Filnavns skabelon:Fejl ved FlickrVendVend foto over x-aksenFokallængdeFokallængdeFokuslængdeFandt %d kameraer FriFuld eksport stiGenerelGylden rektangelGyldne sektionerGyldne trekanter #1Gyldne trekanter #2Gphoto2 rapporterede kontekstfejl: GrønJustering af grøn komponentGitterHarmoniske trekanter #1Harmoniske trekanter #2HøjdeHøjde:Skjuler eksponeringsmaskeHistogramHistogram højde:ToneFarveforskydningISOISO papir (A4)ISO%dIkonBilledet er kopieret til udklipsholderFoto åbnetInterval skydningIntervaloptagelse lukker ned. Rawstudio kunne ikke lægge billeder op på Flickr, fordi godkendelsen er trukket tilbage. Du skal autentificere Rawstudio igen for at lægge billeder på FlickrJPEG (Joint Photographic Experts Group)JPEG kvalitet:JanuarJuliJuniBevar aspektFarverum med stort farvespektrumSidste foto:LinsekorrektionLinse inaktivLinsebibliotekLinseproducentLinsemodelUkendt linseLinseproducentLinsemodelLensFun database opdateretStøjreduktion i lysSluk lyset mode ikke tilgængeligÅben ikke-RAW billederÅbner %s ...MartsKamerakontrolMaksimal størrelseMaksimal størrelse: %d x %dMajMinimer dette vindue efter optagelseSpejlVend foto over y-aksenModelOvervåg kameraOvervågningstråd kører allerede. Overvågning modtog fejl %d, mens den ventede på kameraet. Fejlteksten er: %s Kunne ikke flytte filen til den nuværende mappe! BEMÆRK: Opdatering af foto er slået fra. Nye filer vil ikke blive indlæst! Tryk for at slå det til igen.NavnIngen linse-informationerIntet fotoIntet kamera valgt. Intet kamera valgt - kan ikke tilslutte! Ingen hvidbalance at justere fraIngenIntet at indsætteNovemberOktoberÅbnÅbn kurve ...Åbn bibliotekÅben nyt billede efter optagelseÅbn rekursivtÅbn bibliotek...Åbner foto ...Originalt aspektOutput bibliotek:Overskriv fil?PNG (Portable Network Graphics)Kodeord:Indstillinger indsatIndsætter indstillinger på billederProcent:Fotohøjde:Fotomålestok:FotostørrelseFotobredde:Picasa Webalbum brugergodkendelsePlacer cache i hjemme bibliotekSkriv venligst dit brugernavn og password til Picasa Web Albums.EgenskaberTryk F10 for at flytte visningen til dette vindueBaggrundsfarveFarverum, beregnet til print, kompatibelt med Adobe RGB (1998)PrioriteterPrioritet 1 fotosPrioritet 2 fotosPrioritet 3 fotosBehandler billede %d/%dBehandler billede 1/%d.ProfilFremskridtOffentlig (alle kan se dette)Hurtig eksportRawstudioRawstudio LinseeditorRawstudio linsebibliotekRawstudio Kablet OptagelseRawstudio skal autentificeres før du vil være i stand til at lægge billeder ind på din Facebook-konto.Rawstudio skal autentificeres før du vil være i stand til at lægge billeder ind på din Flickr-konto.Rawstudio kunne ikke lægge billeder op på Flickr, fordi godkendelsen er udløbet. Du skal autentificere Rawstudio igen for at lægge billeder på FlickrKlarModtog fejl %d, imens billedet blev optaget af kameraet. Fejlteksten er:%s Modtog fejl %d, imens billedet blev hentet fra kameraet. Fejlteksten er:%s RødJustering af rød komponentRød korrigering for Kromatisk AbberationFjernFjern alleFjerner billeder fra eksportkøNulstilNulstil kurveBehold Exif metadataForsøg igen?Roter med uretRoter mod uretRotér fotoet 90 grader med uretRotér fotoet 90 grader mod uretTrediedelsreglenFarveFarvemætningGem 16 bit TIFFGem 16 bit linær PNGGem kurve som ...Gem TIFF ukomprimeretGemmer %s ...Sekunder imellem hver skud:Vælg HandlingVælg Alle/IngenVælg OK for at bruge denne skærm til fuldskærmsvisningVælg gemt kurveVælg skærm til fuldskærmsvisningVælg kamera:Vælg hvilken skærm dit fuldskærmsfoto skal vises påVælg indstillinger der skal kopieresVælg hvilke indstillinger der skal tilføjes til eksportkøenSeptemberVælg linseIndstillingSkarpSkarphedSkarphedsjusteringVis filnavne under ikonerViser eksponeringsmaskeLukkerhastighedLukker kørende tråd. Lukker asynkron tråd Lukker tråd til intervaloptagelse. Lukker tråd for at åbne fjernoptagelse. Størrelse:Starter tråd til intervaloptagelse. Starter overvågningstråd. StartStart OptagelseStatus:Trin 1:Trin 2:Stop OptagelseOpretning: Træk en linie i billedet der skal være horisontal eller vertikal. Højre musetast afbryder.Skift brugerTCATIFF (Tagged Image File Format)Søg nøgleordNøgleordssøgning [%s]NøgleordTags til nye billeder:Tags, separeret af mellemrum:Tag billedeTempTemperaturFilen '%s' eksisterer allerede. Ønsker du at overskrive filen?Den angivne port ('%s') kunne ikke findes.Tid tilbage: %dt %dm %dsTid tilbage: ...TidspunktNuancGrønstikforskydningTitelVærktøjerTransformationerU (%d)U (-)Kunne ikke finde mere end en skærm. Kan ikke åbne fuldskærmsvisningKunne ikke finde skærm til fuldskærmsvisningFejl modtaget fra FacebookFejl modtaget fra PicasaUprioriterede fotosOpdatér LensFun databaseSend billede til FacebookSend billede til FlickrSend billede til PicasaBrug systemtemaBrugernavn:VignVignetteringKorrektion af vignetteringSynlig for familieSynlig for vennerWBAsciiVenter på at baggrundsjobs bliver færdigeVenter på næste billede. Advarsel: Det tog længere tid at hente billedet end det angivne interval Det tog %.1f sekunder at hente billedet. Overvej om du skal sætte et længere interval. Vi har modtaget en fejl i autentificeringen af dif. Prøv igen.Velkommen til kablet optagelse! Vær sikker på at dit kamera ikke er aktivt i dit operativsystem. HvidbalanceBreddeBredde:Vil du prøve igen?Dine filer vil blive slettet permanent!Din opsætning understøtter ikke RGBA visuals/compositing. Undersøg sit operativsystem om det er muligt at få dette slået til._1_2_3_Om_Tilføj til Eksportkøen_Tilføj nuværende visning til eksportkøen_Auto_Autogruppering_Eksportkø_Kamera_Kopier billede til udklipsholder_Kopier indstillinger_Beskær_Slet markerede fotos_Rediger_Eksporter som..._Eksporter til Gimp _Eksponeringsmaske_Filer_Markér foto til sletning_Fuld skærm_Gruppér_Hjælp_Ikoner_Linsebibliotek_Sluk lyset_Næste foto_Næste fotoOnline dokumentation_Åbn bibliotek_Indsæt indstillinger_Foto_Egenskaber_Foregående foto_Foregående foto_Hurtig Eksportering_Afslut_Genindlæs bibliotek_Fjern fra eksportkøen_Fjern prioritet_Nulstil denne indstilling_Nulstil ændringer_Gem indstillinger som standard for kamera_Sæt_prioritet_Vis billede på sekundær skærm_Snapshot_Sorter efter_Delt visning_Start_Ret foto op_Marker foto_Kablet Optagelse_Værktøjer_Annuller beskæring_Fjern gruppering_Fjern fotoopretning_Vis_Hvidbalance_Tilpas zoom til vinduepixelsTelefotovidvinkelrawstudio-2.0/po/nb.gmo0000644000175000017500000007600211546436027012053 00000000000000,<H(I(Z(s(w({((((((((),) F)g)")))))******++*+A+W+l+ u++ ++++++ +,,,4,O,_,p,,,,,,$,--%-D-a-!-- - - --E-1.:.@.G.N.e.|.~....$. ....$. / /"/8/G/ ^/ j/w// /// ////0 *0 80F0^0d0 00000000111'1:1&T1{1)1"1%1 2/!2&Q2x2212N2+3 ?3L3kQ333333 44#43494 A4 M4 W4b4t4444 44(4<(51e5 55555)5) 646Q6a66 66 666 667 7#7=7E7 N7\7 l7w7777 7777 7 7 88$8,8=8M8a8 u888888888 99)9 -979;9J9P9U9 o9|9!9b9': ;:H:P:U: Z:f: ~:: : : : : : : ::;;2;F;U;[; j;w;;";; ;;; ;G<)Z<Y<<<<=%=<=Y=^=o=x=========>>)> I>T>d>> > > > > >>@> ;?*G?r?<? ???? @!@8@@@I@ h@ u@@@@e@c.AAB<%BJbBBB#BB B BC $C0CECVCgC%C-CCC CCDD.D EDSD nD|D3DD$DD(E0E+HE tE~EEEEEEE E&E"F'3F7[FF"FFFFFFF GgG wGGG GGGGG GH HAH/UHHH HH HHH HHHFI.NI}IIIIIIJ+J g+gcg#h(h HhUh/oh"hhhhhhh ii&i6iHiXiji{iiiiii i i j j'jGj:ej j3j$j6k ;k Ek Qk ]kikkkkkk kkklJ2lQ}lYl)m7.mIfmmm)mm m%n*n:nJnfnvnnnnnooo"o;oNo eo"ro ooEoo- p 7p>DppCp p p p qqq2qIqaqqqq(q;q r!r4rQrWrjrqryr rjr rs ss s,s0sGsasjs os5zs)sss tt!t3t:t CtOtetS{t-ttu5uIuduuuu uu uuuv"v*vDv]v=vu,w wwww'wwxxxxxx xx y y(y?yTy]ysy{yyyyy yyyyyz z z z.zDz Jz Uz czqzzzzz zz"z {{;{L{S{Z{`{ i{s{{{{{{ {{{{ { W(#isE&!;e(_gU67KR=lK].316{+[^B:Qd2[|OE05 t .p,uNY;*4  ]59 l<LJ XV=qmvdA/IhYxfx,n`hZaok?L> B&D\NG<T9\?'k#{jeyZFSMw OP0TfCz!$yz_vPA%) @F>iCrtjU~"V@}DIbH4Qb$'n/s -q-MS~c1u%p:m"aw`*^XoR+})r|W7J8g Gc2H83 (Cannot log in) (Logged in succesfully) A B C %%.1fs %2c - Incremental counter%DD - Day of week from EXIF%DM - Month from EXIF (Text)%DY - Year from EXIF (YYYY)%Dd - Date from EXIF (DD)%Dm - Month from EXIF (MM)%Dy - Year from EXIF (YY)%d - Date from EXIF (YYYY-MM-DD)%d photos added to batch queue%d photos removed from batch queue%dmm %f - Original filename%p - Path of original file%s Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!%s - Setting id (A, B or C)%t - Time from EXIF (HH:MM:SS)(No user entered)(Select Profile)* (%d)* (-)-. Click to edit value. Click to reset value1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Aperture: F/%.01f Focal length: %dmm ISO: %u Make: %s Model: %s Shutter speed: %.1fs Shutter speed: 1/%.0fs Time: %s%s AA raw image converter for GTK+/GNOMEAdd Profile ...Add profile ...Add tags to selected photo(s).Adding images to batch queueAdjusting to auto white balanceAdjusting to camera white balanceAlbumsAll ProfilesAll filesAll lensesAll photos (excluding deleted)An error was returned when communicating with the Picasa web service:ApertureAprilAspectAugustAuthenticate RawstudioAuto adjust curve endsBBasicBatchBlueBlue Amount AdjustmentBlue Chromatic Aberration CorrectionBuffer emptyCCA BCA RCamera %s on port %s failed to open Camera MakeCamera ModelCamera Profiles (DCP)Camera UnknownCamera defaults editorCamera makeCamera modelCamera monitor shutting down. CancelCannot log inCaptionCapture Enabled. Capturing. ChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Channel MixerChannel mixerChoose output directoryColDnColor Profiles (ICC and ICM)Color denoiseColour DenoisingConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrContrastCopied settingsCopy EXIF metadataCopy EXIF metadata to XMPCopy settings from active to new imageCopying image to clipboardCould not create datadir for lensfun - %sCould not create output directory.Could not create temporary directory.Could not export photo.Could not fetch file from %s or write it to %s.Could not fetch list of files from %s.Could not open database %sCould not open image! Could not open temporary file on disk for writingCould not save file: %s Check that you have write permissions to this folder.Couldn't open photoCreate albumCropCrop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel cropCurrent User: CurveD (%d)D (-)DecemberDelete photosDeleted photosDeleting photosDenoiDenoiseDescriptionDirectoryDirectory:Disconnect CameraDisconnecting current camera Display Colorspace:Display NavigationDo not Load Selected ImagesDon't cropDownloading and adding image. ERROR: Could not copy image to clipboardERROR: Gphoto2 returned error value %d Error message is: %s ERROR: Init camera returned %d. Error text is:%s Edit lensEdit output settingsEmbedded ProfileEnable this lensEnabledEnabling capture mode for Canon cameras. Enabling capture mode for Nikon cameras. Error copying file %s to %s Error exportingError exporting photo to gimp.Error updating lensfun databaseExport FileExport dimensionsExport failedExporting to %sExporting to GIMP...Exporting...ExposExposureExposure CompensationExposure Mask Colorspace:F/%.1f FebruaryFile exportedFile not saved!File type:FilenameFilename & TagsFilename example:Filename template:Flickr errorFlipFlip the photo over the x-axisFocalFocal LengthFocallengthFound %d cameras FreeformGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2Gphoto2 reported Context Error: GreenGreen Amount AdjustmentGridHarmonious triangles #1Harmonious triangles #2HeightHeight:Hiding exposure maskHistogramHistogram height:HueHue ShiftISOISO paper (A4)ISO%dIconImage copied to clipboardImage openedInterval ShootingInterval shooting shutting down. It seems like rawstudio lost its authentication to upload to your account, please re-authenticate.JPEG (Joint Photographic Experts Group)JPEG QualityJanuaryJulyJuneKeep aspectLarge gamut color spaceLast image:Lens CorrectionLens DisabledLens LibraryLens MakeLens ModelLens UnknownLens makeLens modelLensfun database updatedLight DenoisingLight out mode not availableLoad non-RAW imagesLoading %s ...MarchMaster ControlMaximum sizeMaximum size: %d x %dMayMinimize this window after captureMirrorMirror the photo over the y-axisModelMonitor CameraMonitor Thread already running. Monitor recieved error %d, while waiting for camera. Error text is: %s Moving file to current directory failed! NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable.NameNo Lens InformationNo PhotoNo camera connected. No camera selected - Cannot connect! No white balance to set fromNoneNothing to pasteNovemberOctoberOpenOpen curve ...Open directoryOpen new images after captureOpen recursiveOpening directory...Opening photo ...Original AspectOutput directory:Overwrite File?PNG (Portable Network Graphics)Password: Pasted settingsPasting settings to imagesPercent:Photo height:Photo scale:Photo sizePhoto width:Picasa Webalbum AuthentificationPlace cache in home directoryPlease type in your username and password for Picasa Web Albums.PreferencesPress F10 to return preview to this windowPreview background color:Print friendly color space, compatible with Adobe RGB (1998)PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProcessing Image %d/%dProcessing Image 1/%d.ProfileProgressPublic (everyone can see this)Quick exportRawstudioRawstudio Lens EditorRawstudio Lens LibraryRawstudio Tethered ShootingRawstudio needs to be authenticated before it will be able to upload photos to your Facebook account.Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account.Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr.ReadyRecieved error %d, while capturing image. Error text is: %s Recieved error %d, while downloading image from camera. Error text is: %s RedRed Amount AdjustmentRed Chromatic Aberration CorrectionRemoveRemove allRemoving images from batch queueResetReset curveRetain EXIF metadataRetry Operation?Rotate ClockwiseRotate Counter ClockwiseRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturSaturationSave 16 bit TIFFSave 16 bit linear PNGSave curve as ...Save uncompressed TIFFSaving %s ...Seconds between each shot:Select ActionSelect All/NoneSelect OK to use this screen for fullscreen previewSelect Saved CurveSelect Screen for fullscreen previewSelect camera:Select screen to open fullscreen previewSelect settings to copySelect which settings to add to batch queueSeptemberSet lensSettingSharpSharpenSharpen AmountShow Filenames in IconboxShowing exposure maskShutterspeedShutting down already running thread. Shutting down asynchronous thread Shutting down interval capture thread. Shutting down running thread to enable remote capture. SizeStaring Interval Shooting Thread. Staring Monitor Thread. StartStart ShootingStatus:Step 1:Step 2:Stop ShootingStraighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels.Switch UserTCATIFF (Tagged Image File Format)Tag searchTag search [%s]TagsTags for new images:Tags, separated by spaces:Take PhotoTempTemperatureThe file '%s' already exists. Do you want to overwrite the file?The port you specified ('%s') can not be found.Time left: %dh %dm %dsTime left: ...TimestampTintTint ShiftTitleToolsTransformsU (%d)U (-)Unable to detect more than one monitor. Cannot open fullscreen previewUnable to locate screen for fullscreen previewUnhandled error from FacebookUnhandled error from PicasaUnprioritized photosUpdate lensfun databaseUpload photo to FacebookUpload photo to FlickrUpload photo to PicasaUse system themeUsername: VignVignettingVignetting CorrectionVisible to FamilyVisible to FriendsWBAsciiWaiting for jobs to finishWaiting for next image. Warning: It took longer time to capture the image than the set interval It took %.1f seconds to download the image. Consider increasing the interval. We recieved an error during authentication. Please try again.Welcome to Tethered shooting! Make sure your camera is NOT mounted in your operating system. White balanceWidthWidth:Would you like to Retry the operation?Your files will be permanently deleted!Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing._1_2_3_About_Add to batch queue_Add view to queue..._Auto_Auto group_Batch_Camera_Copy Image to Clipboard_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Lens Library_Lights out_Next_Next Photo_Open Directory_Paste settings_Photo_Preferences_Previous_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Save camera default settings_Set Priority_Show Photo On Secondary Monitor_Snapshot_Sort by_Split_Start_Straighten_Tag Photo..._Tethered Shooting_Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelstelephotowideangleProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-04-04 22:15+0200 PO-Revision-Date: 2011-04-04 21:11+0200 Last-Translator: Stian Grindvoll Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: Norwegian Bokmal X-Poedit-Country: NORWAY Plural-Forms: (Kan ikke logge inn)(Logget inn) A B C %%.1fs %2c - Økende teller%DD - Dag i uken fra EXIF%DM - Måne fra EXIF (Text)%DY - År fra EXIF (ÅÅÅÅ)%Dd - Dato fra EXIF (DD)%Dm - Måne fra EXIF (MM)%Dy - År fra EXIF (ÅÅ)%d - Dato fra EXIF (ÅÅÅÅ-MM-DD)%d bilder lagt til i prosesseringskø%d bilder fjernet fra prosesseringskø%dmm%f - Opprinnelig filnavn%p - Sti til opprinnelig fil%s Melding: Denne feilen ble ikke fanget opp av Rawstudio. Vennligst fortell oss at du fant en feil og hvordan vi kan gjenskape den slik at vi kan lage en mer brukervennlig feilmelding. Takk! %s - Innstilling (A, B eller C)%t - Tid fra EXIF (TT:MM:SS)(ingen bruker)Velg fargeprofil* (%d)* (%d)-. Klikk for å velge verdi. Klikk for å nullstille verdi1 (%d)1 (%d)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (%d)3 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)Blender: F/%.01f Fokuslengde: %dmm ISO: %u Produsent: %s Modell: %s Lukkerhastighet: %.1fs Lukkerhastighet: 1/%.0fs Tid: %s%s AEn råfilkonverterer for GTK+/GNOMELegg til profil ...Ny pofile ...Legg til tag på valgte bilde(r)La til bilder i prosesseringskøen.Justerer til automatisk hvitbalanseJusterer etter kameraets hvitbalanseAlbumAlle profilerAlle filerAlle ObjektiverAlle bilder (unntatt slettede)Det oppstod en feil ved kommunikasjon med web tjenesten til Picasa:Lys åpningAprilAspektAugustAutentiser RawstudioAutojustér endepunkterBBasisProsesseringskøBlåJuster Mengde: BlåBlå korrigering for Kromatisk AbberationBufferet er tomtCKA BKA RKamera %s på port %s feilet å åpne Kamera ProdusentKamera ModellKameraprofiler (DCP)Ukjent KameraStandard kamera redigererKamera produsentKamera modellStopper kameramonitoreringen. AvbrytKan ikke logge innBildetekstAktiviserte opptak. Fanger bilder. EndreBildeprioritet endret (%d)Bildeprioritet endret (*)Bildeprioritet endret (S)KanalmixerKanalmixerVelg katalog til utdataFrvStFargeprofiler (icc og icm)FargestøyStøyreduksjon i fargerKonstant målestokk: %dKonstant høydeKonstant høyde: %dKonstant målestokkKonstant breddeKonstant bredde: %dKontrKontrastInnstillinger kopiertKopier EXIF metadataKopier EXIF metadata til XMPKopier instilling fra aktiv til nytt bildeKopierer bilde til minneKunne ikke lage datakatalog for lensfun - %sKunne ikke lage katalog for eksportering.Kunne ikke lage midlertidig katalogKlarte ikke å eksportere bildeKunne ikke hente fil fra %s eller skrive til %s.Kunne ikke hente liste over filer fra %s.Klarte ikke å åpne database %sKlarte ikke å åpne bildet! Klarte ikke åpne midlertidig fil på disk for skrivning.Kunne ikke lagre fil: %s Sjekk at du har skrivetilgang til katalogen.Klarte ikke å åpne bildeLag albumBeskjærBeskjær: Dra for å velge området du vil beskjære. Høyre museknapp inne i området: Godkjenn beskjæring. Annuller beskjæringNåværende bruker:KurveS (%d)D (%d)DesemberSlett bilderSlettede bilderSletter bilderStøyfjStøyfjernerBeskrivelseKatalog:Katalog:Frakoble kameratKoble fra det aktive kameraet. SkjermprofilBilde NavigasjonIkke last inn valgte bilderIkke beskjærLaster ned og legger til bildet. FEIL: Kunne ikke kopiere bilde til minnetFEIL: Gphoto2 returnerte feil verdi %d Feilmeldingen er: %s FEIL: Initialiseringen av kamera returnerte %d Feilmeldingen er: %s Editer ObjektivRediger eksport innstillingerVelg fargeprofilAktiver objektivetAktivAktiviser opptak for Canon Kameraer. Aktiviser opptak for Nikon kameraer. Feil ved kopiering av fil %s til %s Eksporteringen mislyktesKlarte ikke å eksportere bildet til gimp.Feil ved oppdatering av lensfun databasenEksporter filEksporteringsdimensjonerEksporteringen mislyktesEksporterer fil til %sEksporterer til GIMP...Eksporter filEkspoEksponeringEksponeringskompensasjonEksponeringsmaskeF/%.1f FebruarFil eksportertFil ble ikke lagret!Filtype:FilnavnFilnavn & TagEksempel på filnavn:Mal for filnavn:Flickr feilSnuSpeil bildet om x-aksenFokalFokus LengdeFokuslengdeFant %d kameraer. FriGenereltGyllent rektangelGylne snittGylne triangler #1Gylne triangler #2Gphoto2 rapporterte kontekst feil: GrønnJuster Mengde: GrønnRutenettHarmoniske triangler #1Harmoniske triangler #2Høyde:Høyde:Skjuler eksponeringsmaskeHistogramHøyde på histogram:ToneFargeforskyvningISOISO-papir (A4)ISO%dIkonBilde kopiert til minneBilde åpnetKontinuerlig bildetagningStopper kontinuerlig kamera tagning Rawstudio mistet tilgangen til å laste opp på dint konto, vennligst autentifiser deg på nytt.JPEG (Joint Photographic Experts Group)JPEG Kvalitet:JanuarJuliJuniBehold høyde/bredde-forholdStort farge registerSiste bilde:LinsekorreksjonDeaktivert ObjektivObjektiv BibliotekObjektiv ProdusentObjektiv ModellUkjent ObjektivObjektiv produsentObjektiv modellLensfun databasen er oppdatertStøyreduksjon i lysLys av mode ikke tilgjengeligÅpne kke-RAW bilderLeser %s ...MarsMaster kontrollMaksimal størrelseMaksimal størrelse: %d x %dMaiMinimaliser dette vinduet etter tatt bildeSpeilSpeil bildet om y-aksenModellOvervåke KameraetJobbmonitoren er allerede startet. Monitoreringen mottok feilen %d, når den ventet på kameraet. Feilmeldingen er: %s Flytting av fil til aktive katalog feilet! Notat: Iconview oppdatering deaktivert. Nye filer vil ikke åpnes! Press for å reaktivere.NavnIngen informasjon om objektivetIngen bilderIngen kamera koblet til. Ingen kamera valgt - Klarer ikke å koble til. Ingen hvitbalanse å justere etterIngenIkke noe å lime innNovemberOktoberÅpneÅpne kurve...Åpne katalogÅpne det nye bildetÅpne rekursivtÅpner katalog...Åpner bilde...Orgintal AspektetEksport katalog:Overskrive filen?PNG (Portable Network Graphics)Passord:Innlimte innstillingerLimer inn innstillingerProsent:Bildehøyde: Målestokk: BildestørrelseBildebredde: Picasa Webalbum AutentifiseringMellomlagre i hjemmekatalogenSkriv inn ditt brukernavn og passord for Picasa Web Album.EgenskaperTrykk F10 for å flytte visningen til dette vinduetBakgrunnsfarge for forhåndsvisning:Print farge området, kompatibelt med Adobe RGB (1998)PrioritetPrioritet 1Prioritet 2Prioritet 3Prosesserer bilde %d/%dProsesserer bilde 1/%d.ProfilFremgangOffentlig (Alle kan se dette)HurtigeksporteringRawstudioRawstudio Objektiv VelgerRawstudio Objektiv BibliotekRawstudio fjernstyringRawstudio må være autentisert med Facebook før du kan laste opp bilder.Du må autentifisere Rawstudio før du kan laste opp bilder til din Flickr konto.Rawstudio klarte ikke å laste opp bildet da autentiseringen er blitt fratatt. Vennligst KlarFikk feilen %d, i bildetagningen. Feilmeldingen er: %s Mottatt feil %d ved nedlasting av bilde fra kamera. Feilmeldingen er: %s RødJuster Mengde: RødRød korrigering for Kromatisk AbberationFjernFjern alleFjerner bilder fra prosesseringskøenNullstill kurveNullstill kurveTa vare på EXIF metadataenPrøv på nytt?Rotér bildet 90° mot høyreRotér bildet 90° mot venstreRotér bildet 90° mot høyreRotér bildet 90° mot venstreTredjedelsregelenMetnMetningLagre 16 bits TIFFLagre 16 bit lineær PNGLagre kurve som...Lagre TIFF ukomprimertLagrer %s...Sekunder mellom hvert fanget bildeInnstillingVelg alle/IngenVelg OK for å bruke denne skjermen til forhåndsvisning i fullskjermVelg lagret kurveVelg skjerm for forhåndsvisning i fullskjermVelg kamera:Velg hvilken skjerm for å åpne forhåndsvisning i fullskjermLim inn innstillinger:Velg hvilke innstillinger som skal gjelde for satsvis prosessering.SeptemberVelg ObjektivInnstillingBildeskarphetGjør skarpereSkarphetsjusteringVis filnavn ved ikonerViser eksponeringsmaskeLukkerhastighetStopper kjørende jobb. Slår av asynkron jobb Stopper kontinuerlig bildetagnings jobb Stopper kjørende jobb for å klargjøre for fjerntagning. StørrelseStarte kontinuerlig bildetagning Starter jobb monitoreringen StartStart bildetagningStatusSteg 1:Steg 2:Stop tagningOpprettning: Tegn en linje i bildet som skal være horisontal eller vertikal. Høyre museknapp annullerer.Bytt BrukerTCA8 bits TIFFTag søkTag søk [%s]TagTag for de nye bildeneTag, skilt med mellomrom:Ta BildeTempTemperaturFilen '%s' finnes allerede. Vil du overskrive filen?Spesifiserte port ('%s') ble ikke funnet.Gjenstående tid: %dh %dm %dsGjenstående tid: ...TidsstempelNyanseNyanseforskyvningTittleVerktøyTransformerU (%d)U (%d)Kunne ikke finne mere enn en skjerm. Kan ikke åpne forhåndsvisningen i fullskjermKunne ikke finne skjerm for fullskjermvisningUbehandlet feil fra FacebookUbehandlet feil fra PicasaUprioriterte bilderOppdater lensfun databasenLast opp foto til FacebookLast opp foto til FlickrLast opp bilde til PicasaBruk systeminnstillingerBrukernavn:VignVignettingVignetting KorreksjonSynlig for FamilieSynlig for VennerWBAsciiVenter på utført arbeidVenter på neste bilde. Advarsel: Det tok lengre tid å fange bilde enn satt intervall Det tok %.f1 sekunder å laste ned bildet. Prøv å øke intervall instillingen. Vi fikk en feil under autentiseringen. Vennligst prøv igjen.Velkommen til fjernstyring av kameraet! Pass på så kameraet ikke er opptatt med andre oppgaver i operativsystemet. HvitbalanseBredde:Bredde:Vil du prøve på nytt?Filene vil bli slettet for godt!Ditt oppsett ser ikke ut til å støtte RGBA visualisering og/eller komposisjon. Benytt manualen for ditt operativsystem for å aktivisere RGBA visualisering og komposisjon._1_2_3OmLegg til i prosesseringskøLegg aktiv visning i køenAutomatiskAutomatisk gruppeProsesseringskøFra kameraKopier bilde til minneKopier innstillingerBeskjærSlett _merkede bilderRedigerEksporter som...Eksporter til gimpEksponeringsmaskeFilMerk bilde for slettingFullskjermGruppérHjelpIkonerObjektiv bibliotekLys avNeste bildeNeste bildeÅpne katalogLim inn innstillingerBildeEgenskaperForrige bildeForrige bildeHurtigeksporteringAvsluttLes katalog på nyFjern fra prosesseringskøenFjern prioritetNullstillNullstill endringerLagre standard kamera instillingerSett prioritetVis bildet på en annen skjermØyeblikksbildetSorterSplittStartRett oppTag BildeFjerntagning av bilderVerktøyFjern beskjæringLøs opp gruppeFjern opprettingVisHvitbalanseBeste tilpasningpikslertelefotovidvinkelrawstudio-2.0/po/sv.gmo0000644000175000017500000006756711546436027012124 00000000000000<_\%%%&& &&&&2&N&k&&&& &&"'9'?'V'q'(5(T(f(w(((((((( )) ").)2)H)])s) )))))))**/*N*^*$`******!+#+ *+ 7+ A+L+Ek+++++++++, ,,$&, K,X,Z,_, d, p,},,, , ,, ,, ,,--9- T- b-p--- -----...2.8.A.Q.d.&~..).".% /3//K/&{///1/N0U0 i0v0k{00001'1 01>1M1]1c1 k1 w1 111111 1 2()2 R2\2q2222222 33 %333C3 X3e3k3t3333 33 3333 4 4-424Q4 W4 d4p444444444445/565>5 S5]5o5 s5}55555 55b5'76 _6l6t6y6 ~66 66 6 6 6 6 6 6 77)797M7\7b7 q7~77"77 777)7"8'8;8D8%Z888888888899)9;9K9]9m9 9999 9 9 9 9 9 :@>: :*::<: ;;*;<;N;e;|;;; ; ;;;e;cV<<G=M=Q=#g== = == ====>% >-F>t>> >>>>> >> ??3,?`?$s??(??+? @@'@/@5@=@L@f@ |@@@@@@@ @g@ 1A=A ]AhAxA}AA AA AAA/ B;BRB aBkB pB{BB BBBFB.C3CQCmCCCCCC CC D D#D5DHDPDkD=D DDD&D.E3E6E9EYEY ZY eY pY{YYYYYYYYYZZ&Z>ZDZKZ cZmZ }Z ZZZZZZ ZZZ'r[ [[[[![[ [\\0\B\ Q\_\o\~\\\\\\ \\ ]"]*&] Q]]]s]z]6]]] ]]$^)^F^L^a^j^r^y^^%^^^^^_(_9_ Y_d_&|__ _ _ _ _!__I` ``Hk`"`9` aa/aAaSaha}a aa a aaaUaSKbb2c:c?c*Tcc c%c cccc c dd6dUd gdud~dddd dd eeI*ete0e e;ef>#f bflf ff f fffffff ggg#g\5ggg ggggh"h*h /h6:h1qhhh hh hhh ii)iO>i:iiijj/jLjgjjj j jjjjk# k/k9Ik kkk+k+kkkkkkl 4lAlWlilqllll llllmm !m -m7m ?mJm]mmmmmm m mmmmm n,n?nZn&vnnn nnn n no oo,o=o CoNo]odo moNBW:{sk UlT))0R_L0O 6JFgF mk$/A;4N-1Mj]puV51'Q/DoQ7z5Z$^j&XHmU\! z<hfV[a#b:#D?h^g=r9Sq`p6~}oRG(s[<}S\|!*L,9(|->t.CP*x v7wJ24`l'wIEIE%MY@qiZ 3 e", %T82;i=cta?X8yCAcK_HnGvKr+eO~d>P{uxB]"@nWb+y3  . &dYf (Cannot log in) (Logged in succesfully) A B C %%.1fs %2c - Incremental counter%DD - Day of week from EXIF%DM - Month from EXIF (Text)%DY - Year from EXIF (YYYY)%Dd - Date from EXIF (DD)%Dm - Month from EXIF (MM)%Dy - Year from EXIF (YY)%d - Date from EXIF (YYYY-MM-DD)%d photos added to batch queue%d photos removed from batch queue%dmm %f - Original filename%p - Path of original file%s Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!%s - Setting id (A, B or C)%t - Time from EXIF (HH:MM:SS)(No user entered)(Select Profile)* (%d)* (-)-. Click to edit value. Click to reset value1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Aperture: F/%.01f Focal length: %dmm ISO: %u Make: %s Model: %s Shutter speed: %.1fs Shutter speed: 1/%.0fs Time: %sAA raw image converter for GTK+/GNOMEAdd Profile ...Add profile ...Add tags to selected photo(s).Adding images to batch queueAdjusting to auto white balanceAdjusting to camera white balanceAlbumsAll ProfilesAll filesAll lensesAll photos (excluding deleted)An error was returned when communicating with the Picasa web service:ApertureAprilAspectAugustAuthenticate RawstudioAuto adjust curve endsBBasicBatchBlueBlue Amount AdjustmentBlue Chromatic Aberration CorrectionBuffer emptyCCA BCA RCamera MakeCamera ModelCamera Profiles (DCP)Camera UnknownCamera defaults editorCamera makeCamera modelCancelCannot log inCaptionCapturing. ChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Channel MixerChannel mixerChoose output directoryColDnColor Profiles (ICC and ICM)Color denoiseColour DenoisingConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrContrastCopied settingsCopy EXIF metadataCopy EXIF metadata to XMPCopy settings from active to new imageCopying image to clipboardCould not create datadir for lensfun - %sCould not create output directory.Could not create temporary directory.Could not export photo.Could not fetch file from %s or write it to %s.Could not fetch list of files from %s.Could not open database %sCould not open image! Could not open temporary file on disk for writingCould not save file: %s Check that you have write permissions to this folder.Couldn't open photoCreate albumCropCrop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel cropCurrent User: CurveD (%d)D (-)DecemberDelete photosDeleted photosDeleting photosDenoiDenoiseDescriptionDirectoryDirectory:Disconnect CameraDisconnecting current camera Display Colorspace:Display NavigationDo not Load Selected ImagesDon't cropDownloading and adding image. ERROR: Could not copy image to clipboardEdit lensEdit output settingsEmbedded ProfileEnable this lensEnabledError copying file %s to %s Error exportingError exporting photo to gimp.Error updating lensfun databaseExport FileExport dimensionsExport failedExporting to %sExporting to GIMP...Exporting...ExposExposureExposure CompensationExposure Mask Colorspace:F/%.1f FebruaryFile exportedFile not saved!File type:FilenameFilename & TagsFilename example:Filename template:Flickr errorFlipFlip the photo over the x-axisFocalFocal LengthFocallengthFound %d cameras FreeformGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2GreenGreen Amount AdjustmentGridHarmonious triangles #1Harmonious triangles #2HeightHeight:Hiding exposure maskHistogramHistogram height:HueHue ShiftISOISO paper (A4)ISO%dIconImage copied to clipboardImage openedInterval ShootingIt seems like rawstudio lost its authentication to upload to your account, please re-authenticate.JPEG (Joint Photographic Experts Group)JPEG QualityJanuaryJulyJuneKeep aspectLarge gamut color spaceLast image:Lens CorrectionLens DisabledLens LibraryLens MakeLens ModelLens UnknownLens makeLens modelLensfun database updatedLight DenoisingLoad non-RAW imagesLoading %s ...MarchMaster ControlMaximum sizeMaximum size: %d x %dMayMinimize this window after captureMirrorMirror the photo over the y-axisModelMonitor CameraMoving file to current directory failed! NameNo Lens InformationNo PhotoNo camera connected. No camera selected - Cannot connect! No white balance to set fromNoneNothing to pasteNovemberOctoberOpenOpen curve ...Open directoryOpen new images after captureOpen recursiveOpening directory...Opening photo ...Original AspectOutput directory:Overwrite File?PNG (Portable Network Graphics)Password: Pasted settingsPasting settings to imagesPercent:Photo height:Photo scale:Photo sizePhoto width:Picasa Webalbum AuthentificationPlace cache in home directoryPlease type in your username and password for Picasa Web Albums.PreferencesPress F10 to return preview to this windowPreview background color:Print friendly color space, compatible with Adobe RGB (1998)PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProcessing Image %d/%dProcessing Image 1/%d.ProfileProgressPublic (everyone can see this)Quick exportRawstudioRawstudio Lens EditorRawstudio Lens LibraryRawstudio needs to be authenticated before it will be able to upload photos to your Facebook account.Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account.Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr.ReadyRedRed Amount AdjustmentRed Chromatic Aberration CorrectionRemoveRemove allRemoving images from batch queueResetReset curveRetain EXIF metadataRetry Operation?Rotate ClockwiseRotate Counter ClockwiseRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturSaturationSave 16 bit TIFFSave 16 bit linear PNGSave curve as ...Save uncompressed TIFFSaving %s ...Seconds between each shot:Select ActionSelect All/NoneSelect OK to use this screen for fullscreen previewSelect Saved CurveSelect Screen for fullscreen previewSelect camera:Select screen to open fullscreen previewSelect settings to copySelect which settings to add to batch queueSeptemberSet lensSettingSharpSharpenSharpen AmountShow Filenames in IconboxShowing exposure maskShutterspeedSizeStartStart ShootingStatus:Step 1:Step 2:Stop ShootingStraighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels.Switch UserTIFF (Tagged Image File Format)Tag searchTag search [%s]TagsTags for new images:Tags, separated by spaces:Take PhotoTempTemperatureThe file '%s' already exists. Do you want to overwrite the file?The port you specified ('%s') can not be found.Time left: %dh %dm %dsTime left: ...TimestampTintTint ShiftTitleToolsTransformsU (%d)U (-)Unable to detect more than one monitor. Cannot open fullscreen previewUnable to locate screen for fullscreen previewUnhandled error from FacebookUnhandled error from PicasaUnprioritized photosUpdate lensfun databaseUpload photo to FacebookUpload photo to FlickrUpload photo to PicasaUse system themeUsername: VignVignettingVignetting CorrectionVisible to FamilyVisible to FriendsWBAsciiWaiting for jobs to finishWaiting for next image. We recieved an error during authentication. Please try again.White balanceWidthWidth:Would you like to Retry the operation?Your files will be permanently deleted!_1_2_3_About_Add to batch queue_Add view to queue..._Auto_Auto group_Batch_Camera_Copy Image to Clipboard_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Lens Library_Next_Next Photo_Open Directory_Paste settings_Photo_Preferences_Previous_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Save camera default settings_Set Priority_Show Photo On Secondary Monitor_Sort by_Split_Start_Straighten_Tag Photo..._Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelstelephotowideangleProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-03-26 03:39+0100 PO-Revision-Date: 2011-03-22 20:56+0100 Last-Translator: MArtin Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: English (Kan inte logga in)(Loggade in med framgång) A B C %%.1fs %2c - Ökande räknare%DD - Veckodag från EXIF%DM - Månad från EXIF (text)%DY - Årtal från EXIF (YYYY)%Dd - Datum från EXIF (DD)%Dm - Månad från EXIF (MM)%Dy - Årtal från EXIF (YY)%d - Datum från EXIF (YYYY-MM_DD)%d foton tillagda i processeringskön%d foton borttagna från processeringskön%dmm %f - Ursprungligt filnamn%p - Filens ursprungliga sökväg%s OBS! Detta fel fångades inte av Rawstudio. Vänligen låt oss veta att Du hittade det och hur man kan återskapa det så att vi kan skapa ett mer användbart felmeddelande. Tack!%s - Inställning (A, B eller C)%t - Tidpunkt från EXIF (HH:MM:SS)(Användare ej specificerad)Välj färgprofil* (%d)* (-)-. Klicka för att ändra värde. Klicka för att återställa värde1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Bländare: F/%.01f Brännvidd: %dmm ISO: %u Märke: %s Modell: %s Slutarhastighet: %.1fs Slutarhastighet: 1/%.0fs Tid: %sAEn råfilskonvertering för GTK+/GNOMELägg till profil...Lägg till profil...Lägg till taggar till valda foto(n)Lägg till bilder i processeringsköJusterar till automatisk vitbalansJusterar till kamerans vitbalansAlbumAlla profilerAlla filerAlla objektivAlla foton (förutom raderade)Ett fel uppstod under kommunikation med Picasas webbserviceBländareAprilFörhållandeAugustiVerifiera RawstudioAutojustera kurvändpunkterBBasalProcesseringBlåKorrigering av blåttKorrigering för blå kromatisk aberrationBuffert tomCCA BCA RKameramärkeKameramodellKameraprofiler (DCP)Kamera okändEditor för kamerans standardinställningarKameramärkeKameramodellAvbrytKan inte logga inBildtextFångar. ÄndraBildprioritet ändrad (%d)Bildprioritet ändrad (*)Bildprioritet ändrad (D)KanalmixerKanalmixerVälj destinationskatalogFärgBRFärgprofiler (ICC och ICM)Färgbrus-reduceringFärgbrus-reduceringKonstant skala: %dKonstant höjdKonstant höjd: %dKonstant skalningKonstant breddKonstant bredd: %dKontrastKonstrastInställningar kopieradeKopiera EXIF-metadataKopiera EXIF-metadata till XMPKopiera inställningar från aktiv till ny bildKopierar bild till minneKunde inte skapa katalog för lensfun - %sKunde inte skapa utdata-katalog.Kunde inte skapa temporärkatalogKunde inte exportera fotoKunde inte hämta fil från %s eller skriva den till %s.Kunde inte hämta fillista från %s.Kunde inte öppna databas %sKunde inte öppna bild! Kunde inte öppna temporär katalog för skrivning.Kunde inte spara fil %s Kontrollera att du har skrivrättigheter i denna katalog.Kunde inte öppna fotoSkapa albumBeskärBeskär: Dra för att välja område. Höger musknapp inom valt område beskär bilden. Utanför valt område avbryter.Nuvarande användare:KurvaD (%d)D (-)DecemberRadera fotonRaderade fotonRaderar fotonBrusreduceringBrus-reduceraBeskrivningKatalogKatalog:Koppla ifrån kameraKopplar från nuvarande kamera Visa färgprofilVisa navigeringLäs inte in valda bilderBeskär inteLaddar ner och lägger till bild. FEL: Kunde inte kopiera bild till minneRedigera objektivÄndra utskriftsinställningarMedföljande profilAktivera detta objetivAktiveradFel vid kopiering av fil %s till %s Misslyckad exportMisslyckades exportera foto till gimp.Fel vid öppnande av lensfun-databasExportera FilExportera dimensionerExport misslyckadesExporterar till %sExporterar till GIMP...Exporterar...ExponeringExponeringExponeringskompensationExponeringsmaskens färgrymdF/%.1f FebruariFil exporteradFil ej sparad!Filtyp:FilnamnFilnamn & TaggarFilnamnsexampel:Filnamnsmall:Flickr-felFlippaVänd fotot lodrättBrännviddBrännviddBrännviddHittade %d kameror FriformAllmänGyllene retangelGyllene snittetGyllene trianglar #1Gyllene trianglar #2GrönKorrigering av gröntRutnätHarmoniska trianglar #1Harmoniska trianglar #2HöjdHöjd:Döljer exponeringsmaskHistogramHistogramhöjd:FärgmättnadTonskifteISOISO-papper (A4)ISO%dIkonBild kopierad till minneBild öppnadIntervallfotograferingDet verkar som om Rawstudio förlorade sin verifiering. För att ladda upp till Ditt konto, vänligen verifiera Rawstudion igen.JPEG (Joint Photographic Experts Group)JPEG-kvalitetJanuariJuliJuniBehåll höjd-breddförhållandetFärgrymd med stort tonomfångSista bild:ObjektivkorrektionObjektiv ej aktiveratObjektivbilbiotekObjektivmärleObjetivmodellObjektiv okäntObjektivmärkeObjektivmodellLensfun-databas uppdateradLuminansbrus-reduceringLäs in icke-RAW-filerLäser %s ...MarsHuvudkontrollMaximal storlekMaximal storlek: %d x %dMajFörminska detta fönster efter exponeringSpegelvändVänd fotot vågrättModellÖvervaka kameraFlyttning av fil till nuvarande katalog misslyckades! NamnIngen objektivinformationIngen bildIngen kamera ansluten. Ingen kamera vald - kan ej ansluta! No white balance to set fromIngenInget att klistra inNovemberOktoberÖppnaÖppna kurva ...Öppna katalogÖppna nya bilder efter fotograferingÖppna rekursivtÖppnar katalog...Öppnar foto ...Ursprungligt sidoförhållandeDestinationskatalog:Skriv över fil?PNG (Portable Network Graphics)Lösenord:Inklistrad inställningKlistrar in inställningar till bilderProcent:Fotohöjd:Fotoskala:FotostorlekFotobredd:Verifiering för Picasa-webbalbumMellanlagra i hemkatalogenVänligen skriv in Ditt användarnamn och lösenord för Picasa-webbalbumEgenskaperTryck F10 för att återställa förhandsgranskning till detta fönster.Förhandsgranska bakgrundsfärger:Skrivarvänlig färgrymd, kompatibel med Adobe RGB (1998)PrioriteterPrioritet 1 fotonPrioritet 2 fotonPrioritet 3 fotonBehandlar bild %d/%dBehandlar bild 1/%d.ProfilFramgångPublik (alla kan se detta)Snabb-exportRawstudioRawstudio objektiveditorRawstudio ObjektivbibliotekRawstudio behöver verifieras innan det kan ladda upp foton till Ditt Facebook-konto.Rawstudio behöver verifieras innan det kan ladda upp foton till Ditt Flickr-konto.Rawstudio kunde inte ladda upp fotot eftersom verifieringen blivit återkallad. Vänligen verifiera Rawstudio igen för att ladda upp till Flickr.FärdigRödKorrigering av röttKorrigering för röd kromatisk aberrationRaderaRadera allaTar bort bilder från processeringköÅterställÅterställ kurvaBehåll EXIF-metadataFörsök igen?Rotera medursRotera motursRotera fotot 90 grader medsolsRotera fotot 90 grader motsolsTredjedels-regelnFärgmättnadMättnadSpara 16-bitars TIFFSpara 16-bitars linjär PNGSpara kurva som ...Spara i okomprimerad TIFFSparar %s ...Antal sekunder mellan bilder:Välj aktivitetVälj alla/ingenTryck OK för att välja denna skärm för fullskärmsförhandsgranskningVäölj sparad kurvaVälj skärm för fullskärmsförhandsgranskningVälj kamera:Välj skärm för att öppna fullskärmsförhandsgranskningVälj inställning att kopieraVälj vilken inställning som ska gälla för processeringkönSeptemberStäll in objektivInställningSkärpMer skärpaSkärpemängdVisa filnamn i ikonvyVisar exponeringsmaskSlutarhastighetStorlekStartaBörja fotograferaStatus:Steg 1:Steg 2:Sluta fotograferaRäta upp: Dra en linje som skall vara horisontell eller vertikal. Höger musknapp avbryter.Växla användareTIFF (Tagged Image File Format)Sök taggarTagg-sökning [%s]TaggarTaggar för nya bilder:Taggar, åtskilja av blanksteg:Ta fotoTempTemperaturFilen '%s' existerar redan. Vill du skriva över den?Porten Du specificerade ('%s') kunde inte hittas.Återstående tid: %dh %dm %dsÅterstående tidt: ...TidsstämpelNyansNyanskifteTitelVerktygTransformeraU (%d)U (-)Kan inte hitta mer än en skärm. Kan inte visa fullskärmsförhandsgranskning.Kan inte hitta skärm för fullskärmsförhandsgranskning.Ohanterat fel från FacebookOhanterat fel från PicasaOprioriterade fotonUppdatera lensfun-databasLadda upp foto till FacebookLadda upp foto till FlickrLadda upp foto till PicasaAnvänd systemtemaAnvändarnamn:VignetteringVignetteringVignetteringskorrektionSynligt för familjen.Synligt för vänner.WBAsciiVäntar på att uppgifter slutförsVäntar på nästa bild. Ett fel uppstod vid verifiering. Vänligen försök igen.VitbalansBreddBredd:Vill du försöka utföra operationen igen?Dina filer kommer raderas permanent!_1_2_3_Om_Lägg i processeringskö_Lägg till vy till kö..._Autojustera_Gruppera automatiskt_Processeringskö_Kamera_Kopiera bild till minne_Kopiera inställningar_Beskär_Radera markerade foton_Redigera_Exportera som_Exportera till Gimp_Exponeringsmask_Fil_Märk foto för radering_Fullskärm_Gruppera_Hjälp_Ikonlåda_Objektivbibliotek_Efterföljande_Efterföljande foto_Öppna katalog_Klistra in inställningar_Foto_Egenskaper_Föregående_Föregående foto_Snabbexportering_Avsluta_Läs om katalog_Ta bort från processeringskö_Ta bort prioritet_Nollställ inställningar_Återställ inställningar_Spara kamerans standardinställningar_Sätt prioritet_Visa foto på sekundärskärm_Sortera på_Dela_Starta_Rätta upp_Tagga foto_Verktygslåda_Beskär inte_Gruppera inte_Rätta inte upp_VisaVit_balans_Anpassad zoompixelsTelefotovidvinkelrawstudio-2.0/po/fi.gmo0000644000175000017500000007755211546436027012065 00000000000000L|((((((((( )&)C)_)y)) ))")**.*I** +,+>+O+e+z+|+++++ ++ +, , ,5,K, `,k,o,,,,,,,-&-6-F-$H-m-}----!- . . . ).4.ES............$/ 3/@/B/G/$L/ q/ }//// / /// 000 -090@0\0w0 0 0000 001$171G1[1j1y111111&11)2"D2%g22/2&2231.3N`33 33k3A4P4V4l44 44444 4 4 4445*5=5 Y5d5(5<515 6%6:6K6\6)d6)66667 $707 B7P7`7 u77777777 77 88"868H8 [8h8m88 8 888888899 (9I9O9g9l99999 999 9999:: ":/:!A:bc:': ::;; ;; 1;=; M; [; h; r; }; ; ;;;;;;<< <*<@<"D<g< n<<< <G<) =Y7=====%== >>">+>3>8>G>V>t>>>>>>> >??2? ;? I? V? a? n??@? ?*?%@<?@ |@@@@@@@@@ A (A2AHA_Ae{AcAEBB<BJC`CdC#zCC C CC CCC DD%3D-YDDD DDDDD DE !E/E3?EsE$EE(EE+E 'F1F:FBFHFPF_FyF F&F"F'F7GFG"KGnGGGGGG GgG *H6H:H ZHeHuHzHH HH HAH/I8IOI ^IhI mIxI~I IIIFI.J0JNJjJJJJJJ JJ J K K2KEKMKhKK=L]VL LLL&L.L%MMMMMMMM MN NN-NmBWm mmmmmmn n+n Hn Rn\ntnnVnTnRoo6oC pdphp!}pp pppppqq-q*Eq(pqqqqqqqr2rCr_rprErr*rs)(sRs6pss sss s s's t t"+tNt&lt?tt&ttu !u/u5u>u GumUuuuu uvvv"6vYvbvhv@yv-vvw w&w ,w8w @w JwUwkwDw0w w!x9xRxoxxxxxx xyy'y9y"Aydyy;zwMzzzz'z/ {;{{{{{{{|| 1|;|C|[|m|t|| | | | ||| |} }} +} 7}A}P}h}x}} } }} }}}}} ~#~'6~ ^~"j~~ ~ ~~~~~ ~~~ "2 FP _#m<W^uIO=+$>b7w# )H{7KLJ}>;q]G+O"3En_`dFvRp N1'QShna8\Dc ~lX!"Wi1%p0NM;Pra4Y&9 fC -x[@(Fb9dsC5,4J|h `?tj<U.@kTK\Mki= )usP* Syfj(?T%zrw}2G!6c&[ |U*{ZyHzog6Qtl xm5:-_AXqIe.A/D,VZBv~:E2e'^/$8BgoL YR3V 0] (Cannot log in) (Logged in succesfully) A B C %%.1fs %2c - Incremental counter%DD - Day of week from EXIF%DM - Month from EXIF (Text)%DY - Year from EXIF (YYYY)%Dd - Date from EXIF (DD)%Dm - Month from EXIF (MM)%Dy - Year from EXIF (YY)%d - Date from EXIF (YYYY-MM-DD)%d photos added to batch queue%d photos removed from batch queue%dmm %f - Original filename%p - Path of original file%s Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!%s - Setting id (A, B or C)%t - Time from EXIF (HH:MM:SS)(No user entered)(Select Profile)* (%d)* (-)-. Click to edit value. Click to reset value1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Aperture: F/%.01f Focal length: %dmm ISO: %u Make: %s Model: %s Shutter speed: %.1fs Shutter speed: 1/%.0fs Time: %s%s AA raw image converter for GTK+/GNOMEAdd Profile ...Add profile ...Add tags to selected photo(s).Adding images to batch queueAdjusting to auto white balanceAdjusting to camera white balanceAlbumsAll ProfilesAll filesAll lensesAll photos (excluding deleted)An error was returned when communicating with the Picasa web service:ApertureAprilAspectAugustAuthenticate RawstudioAuto adjust curve endsBBasicBatchBlueBlue Amount AdjustmentBlue Chromatic Aberration CorrectionBuffer emptyCCA BCA RCamera %s on port %s failed to open Camera MakeCamera ModelCamera Profiles (DCP)Camera UnknownCamera defaults editorCamera makeCamera modelCamera monitor shutting down. CancelCannot log inCaptionCapture Enabled. Capturing. ChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Channel MixerChannel mixerChoose output directoryColDnColor Profiles (ICC and ICM)Color denoiseColor space used for savingColour DenoisingConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrContrastCopied settingsCopy EXIF metadataCopy EXIF metadata to XMPCopy settings from active to new imageCopying image to clipboardCould not create datadir for lensfun - %sCould not create output directory.Could not create temporary directory.Could not export photo.Could not fetch file from %s or write it to %s.Could not fetch list of files from %s.Could not open database %sCould not open image! Could not open temporary file on disk for writingCould not save file: %s Check that you have write permissions to this folder.Couldn't open photoCreate albumCropCrop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel cropCurrent User: CurveD (%d)D (-)DecemberDelete photosDeleted photosDeleting photosDenoiDenoiseDescriptionDirectoryDirectory:Disconnect CameraDisconnecting current camera Display Colorspace:Display NavigationDo not Load Selected ImagesDon't cropDownloading and adding image. ERROR: Could not copy image to clipboardERROR: Gphoto2 returned error value %d Error message is: %s ERROR: Init camera returned %d. Error text is:%s Edit lensEdit output settingsEmbedded ProfileEnable this lensEnabledEnabling capture mode for Canon cameras. Enabling capture mode for Nikon cameras. Error copying file %s to %s Error exportingError exporting photo to gimp.Error updating lensfun databaseExport FileExport dimensionsExport failedExporting to %sExporting to GIMP...Exporting...ExposExposureExposure CompensationExposure Mask Colorspace:F/%.1f FebruaryFile Downloaded Succesfully. File exportedFile not saved!File type:FilenameFilename & TagsFilename example:Filename template:Flickr errorFlipFlip the photo over the x-axisFocalFocal LengthFocallengthFound %d cameras FreeformFull export pathGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2Gphoto2 reported Context Error: GreenGreen Amount AdjustmentGridHarmonious triangles #1Harmonious triangles #2HeightHeight:Hiding exposure maskHistogramHistogram height:HueHue ShiftISOISO paper (A4)ISO%dIconImage copied to clipboardImage openedInterval ShootingInterval shooting shutting down. It seems like rawstudio lost its authentication to upload to your account, please re-authenticate.JPEG (Joint Photographic Experts Group)JPEG QualityJanuaryJulyJuneKeep aspectLarge gamut color spaceLast image:Lens CorrectionLens DisabledLens LibraryLens MakeLens ModelLens UnknownLens makeLens modelLensfun database updatedLight DenoisingLight out mode not availableLoad non-RAW imagesLoading %s ...MarchMaster ControlMaximum sizeMaximum size: %d x %dMayMinimize this window after captureMirrorMirror the photo over the y-axisModelMonitor CameraMonitor Thread already running. Monitor recieved error %d, while waiting for camera. Error text is: %s Moving file to current directory failed! NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable.NameNo Lens InformationNo PhotoNo camera connected. No camera selected - Cannot connect! No white balance to set fromNoneNothing to pasteNovemberOctoberOpenOpen curve ...Open directoryOpen new images after captureOpen recursiveOpening directory...Opening photo ...Original AspectOutput directory:Overwrite File?PNG (Portable Network Graphics)Password: Pasted settingsPasting settings to imagesPercent:Photo height:Photo scale:Photo sizePhoto width:Picasa Webalbum AuthentificationPlace cache in home directoryPlease type in your username and password for Picasa Web Albums.PreferencesPress F10 to return preview to this windowPreview background color:Print friendly color space, compatible with Adobe RGB (1998)PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProcessing Image %d/%dProcessing Image 1/%d.ProfileProgressPublic (everyone can see this)Quick exportRawstudioRawstudio Lens EditorRawstudio Lens LibraryRawstudio Tethered ShootingRawstudio needs to be authenticated before it will be able to upload photos to your Facebook account.Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account.Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr.ReadyRecieved error %d, while capturing image. Error text is: %s Recieved error %d, while downloading image from camera. Error text is: %s RedRed Amount AdjustmentRed Chromatic Aberration CorrectionRemoveRemove allRemoving images from batch queueResetReset curveRetain EXIF metadataRetry Operation?Rotate ClockwiseRotate Counter ClockwiseRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturSaturationSave 16 bit TIFFSave 16 bit linear PNGSave curve as ...Save uncompressed TIFFSaving %s ...Seconds between each shot:Select ActionSelect All/NoneSelect OK to use this screen for fullscreen previewSelect Saved CurveSelect Screen for fullscreen previewSelect camera:Select screen to open fullscreen previewSelect settings to copySelect which settings to add to batch queueSeptemberSet lensSettingSharpSharpenSharpen AmountShow Filenames in IconboxShowing exposure maskShutterspeedShutting down already running thread. Shutting down asynchronous thread Shutting down interval capture thread. Shutting down running thread to enable remote capture. SizeStaring Interval Shooting Thread. Staring Monitor Thread. StartStart ShootingStatus:Step 1:Step 2:Stop ShootingStraighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels.Switch UserTCATIFF (Tagged Image File Format)Tag searchTag search [%s]TagsTags for new images:Tags, separated by spaces:Take PhotoTempTemperatureThe file '%s' already exists. Do you want to overwrite the file?The port you specified ('%s') can not be found.Time left: %dh %dm %dsTime left: ...TimestampTintTint ShiftTitleToolsTransformsU (%d)U (-)Unable to detect more than one monitor. Cannot open fullscreen previewUnable to locate screen for fullscreen previewUnhandled error from FacebookUnhandled error from PicasaUnprioritized photosUpdate lensfun databaseUpload photo to FacebookUpload photo to FlickrUpload photo to PicasaUse system themeUsername: VignVignettingVignetting CorrectionVisible to FamilyVisible to FriendsWBAsciiWaiting for jobs to finishWaiting for next image. Warning: It took longer time to capture the image than the set interval It took %.1f seconds to download the image. Consider increasing the interval. We recieved an error during authentication. Please try again.Welcome to Tethered shooting! Make sure your camera is NOT mounted in your operating system. White balanceWidthWidth:Would you like to Retry the operation?Your files will be permanently deleted!Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing._1_2_3_About_Add to batch queue_Add view to queue..._Auto_Auto group_Batch_Camera_Copy Image to Clipboard_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Lens Library_Lights out_Next_Next Photo_Online Documentation_Open Directory_Paste settings_Photo_Preferences_Previous_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Save camera default settings_Set Priority_Show Photo On Secondary Monitor_Snapshot_Sort by_Split_Start_Straighten_Tag Photo..._Tethered Shooting_Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelstelephotowideangleProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-03-26 19:45+0100 PO-Revision-Date: 2011-03-28 17:54+0200 Last-Translator: Tuomas Haarala Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: Finnish X-Poedit-Country: FINLAND (Kirjautuminen ei onnistu) (onnistui sisäänkirjautumisessa) A B C %%.1fs %2c - Inkrementaalinen laskuri%DD - Viikonpäivä EXIFistä%DM - Kuukausi EXIFistä (teksti)%DY - Vuosi EXIFistä (YYYY)%Dd - Päiväys EXIFistä (DD)%Dm - Kuukausi EXIFistä (MM)%Dy - Vuosi EXIFistä (YY)%d - Päiväys EXIFistä (YYYY-MM-DD)%d kuvaa lisätty työjonoon%d kuvaa poistettu työjonosta%dmm %f - Alkuperäinen tiedostonimi%p - Alkuperäisen tiedoston polku%s Huom: Tämän virheen käsittelyyn ei ole valmistauduttu. Ole ystävällinen ja kerro meille miten onnistuit tuottamaan tämän virheen, jotta voimme tehdähyödyllisemmän virheilmoituksen tämän tilalle. Kiitos!%s - Asetusvalinta (A, B tai C)%t - Aika EXIFistä (HH:MM:SS)(Ei käyttäjää)(Valitse profiili)* (%d)* (-)-. Klikkaa muuttaaksesi arvoa. Klikkaa nollataksesi arvo1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Aukko: F/%.01f Polttoväli: %dmm ISO: %u Valmistaja: %s Malli: %s Valotusaika: %.1fs Valotusaika: 1/%.0fs Aika: %s%s ARAW-kuvamuunnin GTK+/GNOME-ympäristöönLisää profiili ...Lisää profiiliLisää merkit valittuihin kuviinLisätään kuvat työjonoonAsetellaan automaattiseen valkotasapainoonAsetetaan kameran valkotasapainoonAlbumitKaikki profiilitKaikki tiedostotKaikki linssitKaikki kuvat (poislukien tuhotut)Virhe kommunikoitaessa Picasa verkkopalvelun kanssa:AukkoHuhtikuuMuotoElokuuAutentikoi RawstudioAsettele käyrän päät automaattisestiBPerusasetuksetTyöjonoSinSinisyyden säätöSinisen väriaberraation korjausTyhjä puskuriCCA BCA RKamera %s portissa %s ei avautunut Kameran valmistajaKameran malliKameran profiilit (DCP)Tuntematon kameraKameran oletusarvojen editointiKameran valmistajaKameran malliKameran valvontasäie lopetetaan. PeruutaKirjautuminen ei onnistuOtsikkoKuvaustila käytössä. Kaappaan. VaihdaKuvan luokittelu vaihdettu (%d)Kuvan luokittelu vaihdettu (*)Kuvan luokittelu vaihdettu (D)VäritasapainoVärikanavasäädötValitse kohdehakemistoVkohVäriprofiilit (ICC ja ICM)Värikohinan poistoTallennettaessa käytettävä väriavaruusVärikohinan poistoVakioitu kuvasuhde: %dVakioitu korkeusVakioitu korkeus: %dVakioitu kuvasuhdeVakioitu leveysVakioleveys: %dKontKontrastiAsetukset kopioituKopioi EXIF kuvailutietoKopioi EXIF kuvailutieto XMP-tiedostoonKopioi asetukset nykyisestä kuvasta uuteenKopioin kuvan leikepöydälleLensfun-datahakemiston luonti epäonnistui - %sVientihakemiston avaus epäonnistui.Väliaikaishakemiston luominen epäonnistui.Kuvan vienti epäonnistui.Tiedoston haku lähteestä %s tai kirjoitus kohteeseen %s epäonnistui.Tiedostoluettelon haku epäonnistui sijainnista %s.Virhe avattaessa tietokantaa %sKuvan avaus epäonnistui! Väliaikaistiedoston avaaminen levylle kirjoitusta varten ei onnistunutEi voitu tallentaa tiedostoa: %s Tarkista että sinulla on kirjoitusoikeudet kohdehakemistoon.Kuvan avaus epäonnistuiLuo albumiRajaaRajaa: Vedä valitaksesi rajattava alue. Oikea hiiren nappi rajatun aluen sisällärajaa; ulkopuolella peruuttaa rajauksenTämänhetkinen käyttäjä: KäyräD (%d)D (-)JoulukuuTuhoa kuvatTuhotut kuvatTuhoan kuvatKohiKohinanpoistoKuvausHakemistoHakemisto:Irrota kameraIrroitan kytketyn kameran Näytön väriavaruus:NäyttönavigointiÄlä lataa valittuja kuviaPeruutaSiirrän ja lisään kuvan. VIRHE: Kuvan kopiointi leikepöydälle ei onnistunutERROR: Gphoto2 palautearvo %d ilmoittaa virheestä Virheviesti on: %s VIRHE: Kameran alustus palautti %d. Virheteksti: %s Muokkaa linssiäMuuta vientiasetuksiaLiitetty profiiliKäytä tätä linssiäKäytössäKuvaustila Canon-kameroille otetaan käyttöön. Kuvaustila Nikon-kameroille otetaan käyttöön. Virhe kopioitaessa tiedostoa %s sijaintiin %s Virhe vietäessäVirhe vietäessä kuvaa GIMPiin.Virhe päivitettäessä linssitietokantaaVie tiedostoVie mittasuhteetVienti epäonnistuiViedään kohteeseen %sViedään GIMPiin...Viedään...ValoValotusValKoValotusmaskin väriavaruus:F/%.1f HelmikuuTiedosto siirretty onnistuneesti. Tiedosto vietyTiedosto ei tallennettu!Tiedostotyyppi:TiedostonimiTiedostonimi & MerkitTiedostonimen esimerkki:Tiedostonimen malli:Flickr-virheKäännäKäännä kuva x-akselin yliPolttoväliPolttoväliPolttoväliLöytyi %d kamera(a) VapaamuotoTiedosto vietyYleinenKultainen suorakulmioKultainen leikkausKultaiset kolmiot #1Kultaiset kolmiot #2Gphoto2 ilmoitti asiayhteysvirheestä: VihVihreyden säätöHilaHarmoniset kolmiot #1Harmoniset kolmiot #2KorkeusKorkeus:Valotusmaski ei näyHistogrammiHistogrammin korkeus:SävySävymuutosISOISO (A4)ISO%dIkoniKuva kopioitu leikepöydälleKuva avattuAjastettu kuvausAjastettu kuvaus lopetetaan. Hupsista - Rawstudio taisi kadottaa autentikaation lähettääksesi tilillesi, ole hyvä ja autentikoidu uudelleen.JPEG (Joint Photographic Experts Group)JPEG laatuTammikuuHeinäkuuKesäkuuSäilytä kuvasuhdeLaaja värijakaumaEdellinen kuva:Linssivääristymän korjausLinssikorjaus pois käytöstäLinssikirjastoLinssin valmistajaLinssin malliTuntematon linssiLinssin valmistajaLinssin malliLinssitietokanta päivitettyValoisuuskohinan poistoKevyt esikatselutila ei käytettävissäLataa kaikki kuvatyypitLataan %s ...MaaliskuuPäähallintaMaksimikokoMaksimikoko: %d x %dToukokuuMinimoi tämä ikkuna kaappauksen jälkeenPeilaaPeilaa kuva y-akselin yliMalliTarkkaile kameraaValvontasäie jo toiminnassa. Valvontasäie kohtasi virheen %d odottaessaan kameraa. Virheteksti: %s Tiedostonsiirto tämänhetkiseen hakemistoon ei onnistunut! HUOMIO: Ikoninäkymän päivitys pois käytöstä. Uusia tiedostoja ei ladata! Paina ottaaksesi päivityksen uudelleen käyttöön.NimiEi linssitietoaEi kuvaaEi kytkettyä kameraa. Ei kameraa valittuna - en voi yhdistää! Ei valkotasapainoa josta asettaaEi mitäänEi liitettävääMarraskuuLokakuuAvaaAvaa käyrä ...Avaa hakemistoAvaa uudet kuvat kaappauksen jälkeenRekursiivinen avausAvataan hakemisto...Avataan kuvaa...Alkuperäinen muotoVientihakemisto:Ylikirjoita tiedosto?PNG (Portable Network Graphics)Salasana: Asetukset liitettyLiitetään asetukset kuviinProsentti:Kuvan korkeus:Kuvasuhde:Kuvan kokoKuvan leveys:Picasa Web Album tunnistautuminenSijoita välimuisti kotihakemistoonSyötä käyttäjätunnuksesi ja salasanasi Picasa Web Albums -palveluun.AsetuksetPaina F10 palauttaaksesi esikatselun tähän ikkunaanEsikatselun taustaväri:Tulostusystävällinen väriavaruus, yhteensopiva Adobe RGB (1998)LuokitteluLuokan 1 kuvatLuokan 2 kuvatLuokan 3 kuvatKäsitellään kuvaa %d/%dKäsitellään kuvaa 1/%dProfiiliEdistyminenJulkinen (kuka tahansa voi nähdä tämän)PikavedosRawstudioRawstudio linssieditoriRawstudio linssikirjastoRawstudio ohjattu kuvausRawstudion täytyy autentikoitua pystyäkseen lähettämään kuviaFacebook-tilillesi.Rawstudion täytyy autentikoitua pystyäkseen lähettämään kuviaFlickr-tilillesi.Kuvan lähetys epäonnistui, koska autentikaatio on mitätöity. Ole hyvä ja autentikoi Rawstudio uudelleen lähettääksesi Flickr-palveluun.ValmisVirhe %d kohdattu kaapattaessa kuvaa. Virheteksti: %s Virhe %d kohdattu siirrettäessä kuvaa kamerasta. Virheteksti: %s PunPunaisuuden säätöPunaisen väriaberraation korjausPoistaPoista kaikkiPoistan kuvat työjonostaPalautaNollaa käyräSäilytä EXIF kuvailutietoYritä uudelleen?Kierrä myötäpäiväänKierrä vastapäiväänKierrä kuvaa 90 astetta myötäpäiväänKierrä kuvaa 90 astetta vastapäiväänKolmanneksen sääntöVäriVärikylläisyysTallenna 16bit TIFFTallenna 16bit lineaarinen PNGTallenna käyrä nimellä ...Tallenna pakkaamaton TIFFTallennan %s ...Tauko kuvien välillä (s):Valitse toiminneValitse Kaikki/Ei mitäänValite OK käyttääksesi tätä näyttöä koko ruudun esikatselulleValitse tallennettu käyräValitse näyttö koko ruudun esikatselulleValitse kamera:Aloita koko ruudun esikatselu näytölläValitse kopioitavat asetuksetValitse millä asetuksilla kuva lisätään työjonoonSyyskuuAseta linssiAsetusTeräTerävöitäTerävöitysNäytä tiedostonimet ikoninäkymässäValotusmaski näkyyValotusaikaLopetetaan jo ajossa oleva säie. Suljetaan asynkroninen säie Lopetetaan ajastetun kuvauksen säie. Lopetetaan nykyinen säie kuvankaappauksen mahdollistamiseksi. KokoAloitetaan ajastetun kuvauksen säie. Aloitetaan valvontasäie. AloitaAloita kuvausTila:Vaihe 1:Vaihe 2:Lopeta kuvausOikaise: Vedä linja kuvaan kohtaan jonka tulisi olla vaaka- tai pystysuorassa. Oikea hiiren nappi peruuttaa.Vaihda käyttäjäTCATIFF (Tagged Image File Format)Merkin hakuMerkin haku [%s]MerkkiMerkit uusille kuville:Merkit eroteltuina välilyönnein:Ota kuvaLämpVärilämpötilaTiedosto '%s' on jo olemassa. Haluatko ylikirjoittaa tiedoston?Määrittelemääsi porttia ('%s') ei löydy.Aikaa jäljellä: %dh %dm %dsAikaa jäljellä: ...AikaleimaVäriVärimuutosOtsikkoTyökalutMuunnoksetU (%d)U (-)Vain yksi näyttö tunnistettu. Täyden ruudun esikatselu ei onnistuNäyttöä täyden ruudun esikatseluun ei löydyKummastuttava virhe FacebookistaKäsittelemätön virhe PicasastaLuokittelemattomat kuvatPäivitä lensfun tietokantaLähetä kuva FacebookiinLähetä kuva Flickr-palveluunLähetä kuva PicasaanKäytä järjestelmän teemaaKäyttäjätunnus: VinjVinjetointiVinjetoinnin korjausNäkyy PerheeleNäkyy YstävilleWBAsciiOdotetaan tehtävien valmistumistaOdotetaan seuraavaa kuvaa. Varoitus: Kuvan ottaminen kesti kauemmin kuin asetettu ajastusväli on Kesti %.1f sekuntia siirtää kuva. Harkitse kuvausvälin kasvattamista. Ongelma autentikoitumisessa. Ole hyvä ja yritä uudelleen.Tervetuloa ohjattuun kuvaukseen! Varmista ettei kamerasi ole liitettynä käyttöjärjestelmän hakemistorakenteeseen. ValkotasapainoLeveysLeveys:Haluatko yrittää toimintoa uudelleen?Tiedostosi tullaan tuhoamaan pysyvästi!Järjestelmäsi ei vaikuta tukevan RGBA-näkymiä ja/tai kompositontia. Tutustu järjestelmäsi ohjeistukseen RGBA-tuen käyttöönottamiseksi._1_2_3_Tietoja_Lisää työjonoonLisää työjonoon _näkymä..._Auto_Ryhmitä automaattisestiTyö_jono_KameraKopioi _Leikepöydälle_Kopioi asetukset_Rajaa_Tuhoa merkityt tiedostot_Muokkaa_Vie nimelläVie _GIMPiin_Valotusmaski_Tiedosto_Merkitse kuva tuhottavaksi_Koko ruudun näkymä_Ryhmitä_Apua_Ikoninäkymä_Linssikirjasto_Valot pois_Seuraava_Seuraava kuva_Dokumentaatio verkossa_Avaa hakemisto_Liitä asetuksetK_uva_Asetukset_Edellinen_Edellinen kuva_PikavientiL_opetaL_ue hakemisto uudelleen_Poista työjonosta_Poista luokittelu_Palauta oletusasetukset_Palauta asetukset_Tallenna asetukset kameran oletukseksi_Luokittele_Näytä kuva toisella näytöllä_KuvaJä_rjestä_Jaa näkymä_Aloita_Oikaise_Merkitse kuva..._Ohjattu kuvaus_TyökalutPois_ta rajaus_Pura ryhmitys_Poista oikaisu_Näytä_Valkotasapaino_Sovita näkymäänpikseliäteleobjektiivilaajakulmarawstudio-2.0/po/ca.po0000644000175000017500000013767011546425272011704 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-03-26 03:39+0100\n" "PO-Revision-Date: 2008-08-19 09:35+0100\n" "Last-Translator: Anders Kvist \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Catalan\n" "X-Poedit-Country: ANDORRA\n" "X-Poedit-SourceCharset: utf-8\n" #: librawstudio/rs-lens-db-editor.c:325 #, fuzzy msgid "All lenses" msgstr "Tots els fitxers" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "" #: librawstudio/rs-lens-db-editor.c:565 #, fuzzy msgid "Rawstudio Lens Library" msgstr "Obre un directori" #: librawstudio/rs-lens-db-editor.c:590 #, fuzzy msgid "Lens make" msgstr "Darrera imatge:" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "" #: librawstudio/rs-lens-db-editor.c:606 #, fuzzy msgid "Camera make" msgstr "_Càmera" #: librawstudio/rs-lens-db-editor.c:610 #, fuzzy msgid "Camera model" msgstr "_Càmera" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:734 #, fuzzy msgid "Could not create temporary directory." msgstr "Trieu el directori de sortida" #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:796 #, fuzzy, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Trieu el directori de sortida" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "" #: librawstudio/rs-lens-db-editor.c:939 #, fuzzy msgid "Rawstudio Lens Editor" msgstr "Obre un directori" #: librawstudio/rs-lens-db-editor.c:950 #, fuzzy msgid "Lens Make" msgstr "Darrera imatge:" #: librawstudio/rs-lens-db-editor.c:954 #, fuzzy msgid "Lens Model" msgstr "Darrera imatge:" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "" #: librawstudio/rs-lens-db-editor.c:966 #, fuzzy msgid "Camera Make" msgstr "_Càmera" #: librawstudio/rs-lens-db-editor.c:970 #, fuzzy msgid "Camera Model" msgstr "_Càmera" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "" #: librawstudio/rs-library.c:254 #, fuzzy, c-format msgid "Could not open database %s" msgstr "No s'ha pogut obrir la fotografia" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "" #: librawstudio/rs-library.c:816 #, fuzzy msgid "telephoto" msgstr "Suprimeix les fotografies" #: librawstudio/rs-library.c:832 msgid "January" msgstr "" #: librawstudio/rs-library.c:835 msgid "February" msgstr "" #: librawstudio/rs-library.c:838 msgid "March" msgstr "" #: librawstudio/rs-library.c:841 msgid "April" msgstr "" #: librawstudio/rs-library.c:844 #, fuzzy msgid "May" msgstr "Mamiya" #: librawstudio/rs-library.c:847 msgid "June" msgstr "" #: librawstudio/rs-library.c:850 msgid "July" msgstr "" #: librawstudio/rs-library.c:853 msgid "August" msgstr "" #: librawstudio/rs-library.c:856 msgid "September" msgstr "" #: librawstudio/rs-library.c:859 msgid "October" msgstr "" #: librawstudio/rs-library.c:862 msgid "November" msgstr "" #: librawstudio/rs-library.c:865 msgid "December" msgstr "" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, fuzzy, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "" #: librawstudio/rs-profile-selector.c:242 #, fuzzy msgid "Embedded Profile" msgstr "Seleccioneu el perfil de color" #: librawstudio/rs-profile-selector.c:244 #, fuzzy msgid "(Select Profile)" msgstr "Seleccioneu el perfil de color" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 #, fuzzy msgid "Expos" msgstr "Exposició" #: librawstudio/rs-settings.c:80 #, fuzzy msgid "Exposure Compensation" msgstr "Exporta la mida" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 #, fuzzy msgid "Satur" msgstr "Saturació" #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "Saturació" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "Matís" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 #, fuzzy msgid "Contr" msgstr "Contrast" #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "Contrast" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temp" msgstr "" #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 #, fuzzy msgid "Sharp" msgstr "Augmenta la nitidesa" #: librawstudio/rs-settings.c:133 #, fuzzy msgid "Sharpen Amount" msgstr "Augmenta la nitidesa" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "" #: librawstudio/rs-settings.c:145 #, fuzzy msgid "Colour Denoising" msgstr "Colors" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "" #: librawstudio/rs-settings.c:163 #, fuzzy msgid "Vignetting Correction" msgstr "Seccions àuries" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 #, fuzzy msgid "Red" msgstr "Preparat" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 #, fuzzy msgid "JPEG Quality" msgstr "Qualitat JPEG:" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:329 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "" #: plugins/output-flickr/output-flickr.c:113 #, fuzzy msgid "Title" msgstr "_Fitxer" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "" #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 #, fuzzy msgid "Full export path" msgstr "S'ha exportat el fitxer" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 msgid "Copy EXIF metadata" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "" #: plugins/output-picasa/rs-picasa-client.c:234 #, fuzzy msgid "Username: " msgstr "Nom del fitxer:" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "" #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Desa com a TIFF sense comprimir" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "" #: plugins/output-tifffile/output-tifffile.c:108 #, fuzzy msgid "TIFF (Tagged Image File Format)" msgstr "TIFF (Tagged Image File Format) de 8 bits" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Nom del fitxer original" #: src/filename.c:315 #, fuzzy, c-format msgid "%p - Path of original file" msgstr "%f - Nom del fitxer original" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - Comptador" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s - Identificador del paràmetres (A, B o C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "" #: src/gtk-interface.c:154 #, fuzzy msgid "Width" msgstr "Amplada:" #: src/gtk-interface.c:154 #, fuzzy msgid "Height" msgstr "Alçada:" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "S'està obrint la foto ..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "No s'ha pogut obrir la fotografia" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "S'ha obert la imatge" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "S'ha modificat la prioritat de la foto (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "S'ha modificat la prioritat de la foto (D)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "S'ha modificat la prioritat de la foto (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Directori:" #: src/gtk-interface.c:777 src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Trieu el directori de sortida" #: src/gtk-interface.c:793 src/rs-batch.c:1075 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Plantilla del nom de l'arxiu:" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Exemple del nom del fitxer:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Tipus de fitxer:" #. Add preferences box #: src/gtk-interface.c:879 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Preferències" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Imatge prèvia de color de fons:" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Alçada de l'histograma:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Fés servir els colors del tema del sistema" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Posa la caché al directori inicial" #: src/gtk-interface.c:926 #, fuzzy msgid "Display Colorspace:" msgstr "Mostra el perfil" #: src/gtk-interface.c:938 #, fuzzy msgid "Exposure Mask Colorspace:" msgstr "_Màscara d'exposició" #: src/gtk-interface.c:1011 msgid "General" msgstr "General" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "Exportació ràpida" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "S'està obrint el directori..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Obre les subcarpetes" #: src/gtk-interface.c:1465 #, fuzzy msgid "Directory" msgstr "Directori:" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Eines" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Lot" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Obre" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Preparat" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "Progrés" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Obre un directori" #: src/rs-actions.c:253 src/rs-batch.c:542 #, fuzzy msgid "Could not create output directory." msgstr "Trieu el directori de sortida" #: src/rs-actions.c:257 #, fuzzy msgid "Exporting..." msgstr "S'ha produït un error mentre s'estava exportant" #: src/rs-actions.c:265 msgid "File exported" msgstr "S'ha exportat el fitxer" #: src/rs-actions.c:270 src/rs-actions.c:293 #, fuzzy msgid "Export failed" msgstr "Exporta" #: src/rs-actions.c:300 #, fuzzy msgid "Exporting to GIMP..." msgstr "S'ha produït un error mentre s'estava exportant" #: src/rs-actions.c:305 msgid "Error exporting" msgstr "S'ha produït un error mentre s'estava exportant" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "S'ha produït un error en exportar a gimp." #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "S'estant suprimint les fotografies" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "Els vostres fitxers seran esborrats de forma permanentment!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Suprimeix les fotografies" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "" #. Build GUI #: src/rs-actions.c:463 #, fuzzy msgid "Profile" msgstr "Tots els fitxers" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Exposició" #: src/rs-actions.c:468 msgid "White balance" msgstr "Equilibri de blanc" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Augmenta la nitidesa" #: src/rs-actions.c:470 msgid "Denoise" msgstr "" #: src/rs-actions.c:471 #, fuzzy msgid "Color denoise" msgstr "Colors" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "" #: src/rs-actions.c:473 msgid "TCA" msgstr "" #: src/rs-actions.c:474 #, fuzzy msgid "Vignetting" msgstr "Configuració" #: src/rs-actions.c:475 src/rs-toolbox.c:803 msgid "Curve" msgstr "Corba" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "" #: src/rs-actions.c:498 #, fuzzy msgid "Select settings to copy" msgstr "Seleccioneu els paràmetres que voleu enganxar" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Paràmetres copiats" #: src/rs-actions.c:587 #, fuzzy msgid "Pasting settings to images" msgstr "Paràmetres enganxats" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Paràmetres enganxats" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "No hi ha res per enganxar" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "El buffer està buit" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "S'està ajustant l'equilibri de blanc" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "No hi ha cap patró per l'equilibre del blanc" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "S'està ajustant amb l'equilibri de blanc de la càmera" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "" #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "S'està mostrant la màscara d'exposició" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "S'està amagant la màscara d'exposició" #: src/rs-actions.c:1067 #, fuzzy msgid "Adding images to batch queue" msgstr "Afegeix a la cua del _lot" #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "S'han afegit %d fotos a la cua del lot" #: src/rs-actions.c:1101 src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Trieu els paràmeters que\n" "voleu afegir a la cua del lot" #: src/rs-actions.c:1188 #, fuzzy msgid "Removing images from batch queue" msgstr "S'ha suprimit de la cua del lot" #: src/rs-actions.c:1203 #, fuzzy, c-format msgid "%d photos removed from batch queue" msgstr "S'han afegit %d fotos a la cua del lot" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "" #: src/rs-actions.c:1266 #, fuzzy msgid "All Profiles" msgstr "Tots els fitxers" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "" #: src/rs-actions.c:1282 #, fuzzy msgid "Color Profiles (ICC and ICM)" msgstr "Perfils de color (icc i icm)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Tots els fitxers" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "Un convertidor de imatges raw per a GTK+/GNOME" #: src/rs-actions.c:1412 msgid "_File" msgstr "_Fitxer" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "_Edita" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "F_oto" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "Estableix la _prioritat" #: src/rs-actions.c:1416 msgid "_White Balance" msgstr "Equilibri de _blanc" #: src/rs-actions.c:1417 msgid "_View" msgstr "_Visualitza" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "_Lot" #: src/rs-actions.c:1420 msgid "_Help" msgstr "_Ajuda" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "" #. File menu #: src/rs-actions.c:1425 msgid "_Open Directory" msgstr "_Obre un directori" #: src/rs-actions.c:1426 msgid "_Quick Export" msgstr "_Exportació ràpida" #: src/rs-actions.c:1427 msgid "_Export As" msgstr "Exporta _com a" #: src/rs-actions.c:1428 msgid "_Export to Gimp" msgstr "Exporta a _Gimp" #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "" #: src/rs-actions.c:1430 msgid "_Reload directory" msgstr "_Torna a carregar el directori" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "S_uprimeix les fotografies senyalades" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "_Surt" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "_Torna als paràmetres inicials" #: src/rs-actions.c:1436 msgid "_Copy settings" msgstr "_Copia els paràmetres" #: src/rs-actions.c:1437 msgid "_Paste settings" msgstr "_Enganxa els paràmetres" #: src/rs-actions.c:1438 msgid "_Reset settings" msgstr "_Reinicia els paràmetres" #: src/rs-actions.c:1439 #, fuzzy msgid "_Save camera default settings" msgstr "_Reinicia els paràmetres" #: src/rs-actions.c:1440 msgid "_Preferences" msgstr "_Preferències" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "_Senyala la foto per suprimir-la" #: src/rs-actions.c:1444 msgid "_1" msgstr "_1" #: src/rs-actions.c:1445 msgid "_2" msgstr "_2" #: src/rs-actions.c:1446 msgid "_3" msgstr "_3" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "_Suprimeix la prioritat" #: src/rs-actions.c:1448 msgid "_Auto" msgstr "_Automàtic" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "_Càmera" #: src/rs-actions.c:1450 msgid "_Crop" msgstr "_Escapça" #: src/rs-actions.c:1451 msgid "_Uncrop" msgstr "_Desfés el que s'ha Escapçat" #: src/rs-actions.c:1452 msgid "_Straighten" msgstr "_Redreça" #: src/rs-actions.c:1453 msgid "_Unstraighten" msgstr "Des_fés el que s'ha redreçat" #: src/rs-actions.c:1454 msgid "_Group" msgstr "_Agrupa" #: src/rs-actions.c:1455 msgid "_Ungroup" msgstr "_Desagrupa" #: src/rs-actions.c:1456 msgid "_Auto group" msgstr "Agrupa _automàticament" #: src/rs-actions.c:1457 #, fuzzy msgid "_Tag Photo..." msgstr "F_oto" #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "" #: src/rs-actions.c:1459 #, fuzzy msgid "Rotate Counter Clockwise" msgstr "Gira la imatge 90 graus en sentit horari" #: src/rs-actions.c:1460 msgid "Flip" msgstr "" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "Foto _Anterior" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "Foto _Següent" #: src/rs-actions.c:1466 #, fuzzy msgid "_Lens Library" msgstr "Obre un directori" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "" #. Batch menu #: src/rs-actions.c:1470 msgid "_Add to batch queue" msgstr "Afegeix a la cua del _lot" #: src/rs-actions.c:1471 #, fuzzy msgid "_Add view to queue..." msgstr "Afegeix la _vista actual a la cua" #: src/rs-actions.c:1472 msgid "_Remove from batch queue" msgstr "_Suprimeix de la cua del lot" #: src/rs-actions.c:1473 msgid "_Start" msgstr "_Comença" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "" #: src/rs-actions.c:1477 msgid "_About" msgstr "_Quant a" #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "Ajusta a la _finestra" #: src/rs-actions.c:1487 msgid "_Iconbox" msgstr "_Barra de miniatures" #: src/rs-actions.c:1488 msgid "_Toolbox" msgstr "_Caixa d'eines" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "_Pantalla sencera" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "" #: src/rs-actions.c:1491 #, fuzzy msgid "Show Filenames in Iconbox" msgstr "Mostra els noms de fitxers a la barra de miniatures" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "" #: src/rs-actions.c:1494 msgid "_Exposure mask" msgstr "_Màscara d'exposició" #: src/rs-actions.c:1495 msgid "_Split" msgstr "_Divideix" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "" #: src/rs-actions.c:1503 msgid "Name" msgstr "" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "" #: src/rs-actions.c:1505 #, fuzzy msgid "ISO" msgstr "ISO%d" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "" #. Snapshot labels #: src/rs-actions.c:1513 src/rs-toolbox.c:207 src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1514 src/rs-toolbox.c:208 src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1515 src/rs-toolbox.c:209 src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Cancel·la" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Darrera imatge:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Temps restant: %dh %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Temps restant: ..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "" #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "S'està carregant %s ..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "S'està desant %s ..." #: src/rs-batch.c:635 #, fuzzy msgid "Could not export photo." msgstr "No s'ha pogut obrir la fotografia" #: src/rs-batch.c:695 msgid "Icon" msgstr "Icona" #: src/rs-batch.c:702 msgid "Filename" msgstr "Nom de fitxer" #: src/rs-batch.c:709 msgid "Setting" msgstr "Configuració" #: src/rs-batch.c:802 msgid "Start" msgstr "Comença" #: src/rs-batch.c:805 msgid "Remove" msgstr "Elimina" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Elimina-ho tot" #: src/rs-batch.c:916 src/rs-batch.c:1091 #, fuzzy msgid "Edit output settings" msgstr "_Copia els paràmetres" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Mida de la foto" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "Escala constant" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Amplada constant" #: src/rs-batch.c:962 msgid "Constant height" msgstr "Alçada constant" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Mida màxima" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Amplada de la foto:" #: src/rs-batch.c:978 src/rs-batch.c:987 msgid "pixels" msgstr "píxels" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "Alçada de la imatge:" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "Escala de la imatge" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Amplada constant:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Alçada constant:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "Escala constant:\n" "%d" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Mida màxima:constant:\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Directori de sortida:" #: src/rs-batch.c:1100 msgid "Change" msgstr "Canvia" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "Exporta la mida" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "" #: src/rs-camera-db.c:459 msgid "Model" msgstr "" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "" #: src/rs-preview-widget.c:887 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Mida" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Graella" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Cap" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "Seccions àuries" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "Regla dels terços" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Rectangles daurats #1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Rectangles daurats #2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Triangles harmònics #1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Triangles harmònics #2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Aspecte" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "Corba de forma lliure" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "Paper ISO (A4)" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (XGA ample)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "Rectangle daurat" #: src/rs-preview-widget.c:1180 src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Escapça" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "No ho escapcis" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" #: src/rs-preview-widget.c:1238 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:522 msgid "Export File" msgstr "Exporta" #: src/rs-save-dialog.c:282 #, fuzzy msgid "File not saved!" msgstr "S'ha exportat el fitxer" #: src/rs-save-dialog.c:299 #, fuzzy, c-format msgid "Exporting to %s" msgstr "S'està exportant el fitxer ..." #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Conserva la relació d'aspecte" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Amplada:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Alçada:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Percentatge:" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Totes les fotos (excepte les suprimides)" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Fotografies amb prioritat 1" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Fotografies amb prioritat 2" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Fotos amb prioritat 3" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Fotografies sense prioritat" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Fotografies suprimides" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Prioritats" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "" #: src/rs-store.c:1371 #, fuzzy msgid "* (-)" msgstr "* (%d)" #: src/rs-store.c:1372 #, fuzzy msgid "1 (-)" msgstr "1 (%d)" #: src/rs-store.c:1373 #, fuzzy msgid "2 (-)" msgstr "2 (%d)" #: src/rs-store.c:1374 #, fuzzy msgid "3 (-)" msgstr "3 (%d)" #: src/rs-store.c:1375 #, fuzzy msgid "U (-)" msgstr "U (%d)" #: src/rs-store.c:1376 #, fuzzy msgid "D (-)" msgstr "D (%d)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "" #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "" #: src/rs-tethered-shooting.c:558 #, fuzzy msgid "Could not open image!\n" msgstr "No s'ha pogut obrir la fotografia" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:938 #, fuzzy msgid "Stop Shooting" msgstr "Configuració" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "" #: src/rs-tethered-shooting.c:1003 #, fuzzy msgid "Take Photo" msgstr "F_oto" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "" #. Status window #: src/rs-tethered-shooting.c:1022 #, fuzzy msgid "Status:" msgstr "Saturació" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 #, fuzzy msgid "Filename & Tags" msgstr "Exemple del nom del fitxer:" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Histograma" #: src/rs-toolbox.c:443 #, fuzzy msgid "Reset" msgstr "Reinicia la corba" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr "" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr "" #: src/rs-toolbox.c:566 src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Obre la corba ..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "" #: src/rs-toolbox.c:700 #, fuzzy msgid "Select Action" msgstr "Configuració" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Anomena i desa la corba ..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Reinicia la corba" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "Ajusta automàticament els finals de les corbes" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "" #. Pack everything nice #: src/rs-toolbox.c:800 #, fuzzy msgid "Basic" msgstr "Lot" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "" #: src/rs-toolbox.c:802 #, fuzzy msgid "Lens Correction" msgstr "Seccions àuries" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Gira la foto sobre l'eix X" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Gira la foto sobre l'eix Y" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Gira la imatge 90 graus en sentit horari" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Gira la imatge 90 graus en sentit horari" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Transforma" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "" #: src/rs-toolbox.c:1035 #, fuzzy msgid "Lens Disabled" msgstr "Darrera imatge:" #: src/rs-toolbox.c:1043 #, fuzzy msgid "No Lens Information" msgstr "Seccions àuries" #: src/rs-toolbox.c:1045 #, fuzzy msgid "Camera Unknown" msgstr "_Càmera" #: src/rs-toolbox.c:1050 #, fuzzy msgid "No Photo" msgstr "Torna a carregar les fotografies" #: src/rs-toolbox.c:1259 #, fuzzy msgid "_Previous" msgstr "Foto _Anterior" #: src/rs-toolbox.c:1260 #, fuzzy msgid "_Next" msgstr "Foto _Següent" #~ msgid " %s added to batch queue" #~ msgstr "S'ha afegit %s a la cua del lot" #~ msgid "%s already added to batch queue" #~ msgstr "%s ja és a la cua del lot" #~ msgid "Not in batch queue" #~ msgstr "No és a la cua de lots" #~ msgid "Processing photos" #~ msgstr "S'estant processant les fotografies" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "Carrega les fotos de 8 bits (jpeg, png, etc)" #, fuzzy #~ msgid "Warmth" #~ msgstr "Matís/color" #, fuzzy #~ msgid "CA Red" #~ msgstr "Preparat" #~ msgid "Select color profile" #~ msgstr "Seleccioneu el perfil de color" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Perfils de color (icc i icm)" #~ msgid "Not a valid color profile." #~ msgstr "El nom del perfil de color no és vàlid." #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "" #~ "El fitxer que heu triat sembla que no disposa d'un perfil de color vàlid " #~ "per aquesta versió de Rawstudio." #~ msgid "Enable color management (experimental)" #~ msgstr "Habilita la gestió del color (experimental)" #~ msgid "Input profile" #~ msgstr "Perfil d'entrada" #~ msgid "BuiltInRGBProfile" #~ msgstr "BuiltInRGBProfile" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Exporta el perfil" #~ msgid "Intent" #~ msgstr "Intenta" #~ msgid "Perceptual" #~ msgstr "Perceptual" #~ msgid "Relative colormetric" #~ msgstr "Colorimetria relativa" #~ msgid "Absolute colormetric" #~ msgstr "Colorimetria absoluta" #~ msgid "Colors" #~ msgstr "Colors" #, fuzzy #~ msgid "Change this" #~ msgstr "Canvia" #~ msgid "Background renderer active" #~ msgstr "La visualització del fons està habilitada" #~ msgid "File export canceled" #~ msgstr "S'ha cancel·lat la exportació del fitxer" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "TIFF (Tagged Image File Format) de 16 bits" #~ msgid "Rotate the photo 180 degrees" #~ msgstr "Gira la imatge 180 graus" #~ msgid "Reset this setting" #~ msgstr "Reinicia aquest paràmetre" #~ msgid "_Zoom to 100%" #~ msgstr "Amplia al _100%" #~ msgid "Canon CR2" #~ msgstr "CR2 de Canon" #~ msgid "Canon CIFF" #~ msgstr "CIFF de Canon" #~ msgid "Nikon NEF" #~ msgstr "NEF de Nikon" #~ msgid "Minolta raw" #~ msgstr "Raw de Minolta" #~ msgid "Canon TIFF" #~ msgstr "TIFF de Canon" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Panasonic raw" #~ msgstr "Raw de Panasonic" #~ msgid "Pentax raw" #~ msgstr "Raw de Pentax" #~ msgid "Adobe Digital negative" #~ msgstr "Negatiu Adobe Digital" #~ msgid "Hasselblad" #~ msgstr "Hasselblad" rawstudio-2.0/po/da.po0000644000175000017500000015166011546425272011700 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-03-27 23:20+0200\n" "PO-Revision-Date: 2011-03-27 23:22+0100\n" "Last-Translator: Anders Kvist \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Danish\n" "X-Poedit-Country: DENMARK\n" #: librawstudio/rs-lens-db-editor.c:325 msgid "All lenses" msgstr "Alle linser" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "Fejl ved opdatering af LensFun database" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "LensFun database opdateret" #: librawstudio/rs-lens-db-editor.c:565 msgid "Rawstudio Lens Library" msgstr "Rawstudio linsebibliotek" #: librawstudio/rs-lens-db-editor.c:590 msgid "Lens make" msgstr "Linseproducent" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "Linsemodel" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "Fokallængde" #: librawstudio/rs-lens-db-editor.c:602 #: librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "Blænde" #: librawstudio/rs-lens-db-editor.c:606 msgid "Camera make" msgstr "Kameraproducent" #: librawstudio/rs-lens-db-editor.c:610 msgid "Camera model" msgstr "Kameramodel" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "Slået til" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "Opdatér LensFun database" #: librawstudio/rs-lens-db-editor.c:734 msgid "Could not create temporary directory." msgstr "Kunne ikke oprette midlertidig mappe" #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "Kunne ikke hente listen af filer fra %s." #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "Kunne ikke hente fil fra %s eller skrive den til %s." #: librawstudio/rs-lens-db-editor.c:796 #, c-format msgid "Could not create datadir for lensfun - %s" msgstr "Kunne ikke oprette datafolder til LensFun - %s" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "Kunne ikke kopiere fil fra %s til %s\n" #: librawstudio/rs-lens-db-editor.c:939 msgid "Rawstudio Lens Editor" msgstr "Rawstudio Linseeditor" #: librawstudio/rs-lens-db-editor.c:950 msgid "Lens Make" msgstr "Linseproducent" #: librawstudio/rs-lens-db-editor.c:954 msgid "Lens Model" msgstr "Linsemodel" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "Fokallængde" #: librawstudio/rs-lens-db-editor.c:966 msgid "Camera Make" msgstr "Kameraproducent" #: librawstudio/rs-lens-db-editor.c:970 msgid "Camera Model" msgstr "Kameramodel" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "Korrigér denne linse" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "Vælg linse" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "Linsebibliotek" #: librawstudio/rs-library.c:254 #, c-format msgid "Could not open database %s" msgstr "Kunne ikke åbne database %s" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "vidvinkel" #: librawstudio/rs-library.c:816 msgid "telephoto" msgstr "Telefoto" #: librawstudio/rs-library.c:832 msgid "January" msgstr "Januar" #: librawstudio/rs-library.c:835 msgid "February" msgstr "Februar" #: librawstudio/rs-library.c:838 msgid "March" msgstr "Marts" #: librawstudio/rs-library.c:841 msgid "April" msgstr "April" #: librawstudio/rs-library.c:844 msgid "May" msgstr "Maj" #: librawstudio/rs-library.c:847 msgid "June" msgstr "Juni" #: librawstudio/rs-library.c:850 msgid "July" msgstr "Juli" #: librawstudio/rs-library.c:853 msgid "August" msgstr "August" #: librawstudio/rs-library.c:856 msgid "September" msgstr "September" #: librawstudio/rs-library.c:859 msgid "October" msgstr "Oktober" #: librawstudio/rs-library.c:862 msgid "November" msgstr "November" #: librawstudio/rs-library.c:865 msgid "December" msgstr "December" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "Tilføj profil" #: librawstudio/rs-profile-selector.c:242 msgid "Embedded Profile" msgstr "Indbygget farveprofil" #: librawstudio/rs-profile-selector.c:244 msgid "(Select Profile)" msgstr "(Vælg farveprofil)" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "Ekspo" #: librawstudio/rs-settings.c:80 msgid "Exposure Compensation" msgstr "Eksponeringsjustering" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 msgid "Satur" msgstr "Farve" #: librawstudio/rs-settings.c:86 #: src/rs-actions.c:465 msgid "Saturation" msgstr "Farvemætning" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 #: src/rs-actions.c:466 msgid "Hue" msgstr "Tone" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "Farveforskydning" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "Kontr" #: librawstudio/rs-settings.c:98 #: src/rs-actions.c:467 msgid "Contrast" msgstr "Kontrast" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 #: librawstudio/rs-settings.c:116 msgid "Temp" msgstr "Temp" #: librawstudio/rs-settings.c:104 #: librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "Temperatur" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 #: librawstudio/rs-settings.c:122 msgid "Tint" msgstr "Nuanc" #: librawstudio/rs-settings.c:110 #: librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "Grønstikforskydning" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "WBAscii" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 msgid "Sharp" msgstr "Skarp" #: librawstudio/rs-settings.c:133 msgid "Sharpen Amount" msgstr "Skarphedsjustering" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "Støj" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "Støjreduktion i lys" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "FrvSt" #: librawstudio/rs-settings.c:145 msgid "Colour Denoising" msgstr "Farve støjreduktion" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "KA R" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "Rød korrigering for Kromatisk Abberation" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "KA B" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "Blå korrigering for Kromatisk Abberation" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "Vign" #: librawstudio/rs-settings.c:163 msgid "Vignetting Correction" msgstr "Korrektion af vignettering" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 msgid "Red" msgstr "Rød" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "Justering af rød komponent" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "Grøn" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "Justering af grøn komponent" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "Blå" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "Justering af blå komponent" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "Farverum, beregnet til print, kompatibelt med Adobe RGB (1998)" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "Farverum med stort farvespektrum" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 msgid "JPEG Quality" msgstr "JPEG kvalitet:" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "Overskrift" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "Send billede til Facebook" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "Trin 1:" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "Trin 2:" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "Autentificér Rawstudio" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "Fejl modtaget fra Facebook" #: plugins/output-facebook/output-facebook.c:329 msgid "Rawstudio needs to be authenticated before it will be able to upload photos to your Facebook account." msgstr "Rawstudio skal autentificeres før du vil være i stand til at lægge billeder ind på din Facebook-konto." #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "Albums" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "Opret album" #: plugins/output-flickr/output-flickr.c:113 msgid "Title" msgstr "Titel" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "Beskrivelse" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "Nøgleord" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "Offentlig (alle kan se dette)" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "Synlig for venner" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "Synlig for familie" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "Send billede til Flickr" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "Vi har modtaget en fejl i autentificeringen af dif. Prøv igen." #: plugins/output-flickr/output-flickr.c:306 msgid "Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "Rawstudio kunne ikke lægge billeder op på Flickr, fordi godkendelsen er udløbet. Du skal autentificere Rawstudio igen for at lægge billeder på Flickr" #: plugins/output-flickr/output-flickr.c:309 msgid "It seems like rawstudio lost its authentication to upload to your account, please re-authenticate." msgstr "Rawstudio kunne ikke lægge billeder op på Flickr, fordi godkendelsen er trukket tilbage. Du skal autentificere Rawstudio igen for at lægge billeder på Flickr" #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!" msgstr "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "Fejl ved Flickr" #: plugins/output-flickr/output-flickr.c:374 msgid "Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account." msgstr "Rawstudio skal autentificeres før du vil være i stand til at lægge billeder ind på din Flickr-konto." #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 msgid "Full export path" msgstr "Fuld eksport sti" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 #, fuzzy msgid "Color space used for saving" msgstr "Farverum til gemning" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 msgid "Copy EXIF metadata" msgstr "Kopier Exif metadata" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "Behold Exif metadata" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "Send billede til Picasa" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "Fejl modtaget fra Picasa" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "Aktuel bruger:" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "(Login lykkedes)" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "(Kunne ikke logge ind)" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "(Ingen bruger indtastet)" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "Skift bruger" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "Kunne ikke logge ind" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "Forsøg igen?" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "Der blev retuneret en fejl under kommunikationen med Picasas webservice:" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "Vil du prøve igen?" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "Picasa Webalbum brugergodkendelse" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "Skriv venligst dit brugernavn og password til Picasa Web Albums." #: plugins/output-picasa/rs-picasa-client.c:234 msgid "Username: " msgstr "Brugernavn:" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "Kodeord:" #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "Gem 16 bit linær PNG" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "Kopier Exif metadata til XMP" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Gem TIFF ukomprimeret" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "Gem 16 bit TIFF" #: plugins/output-tifffile/output-tifffile.c:108 msgid "TIFF (Tagged Image File Format)" msgstr "TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Originalt filnavn" #: src/filename.c:315 #, c-format msgid "%p - Path of original file" msgstr "%p - Sti til oprindelig fil" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - Stigende tæller" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "%s - Indstillings (A, B eller C)" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "%d - Dato fra Exif (ÅÅÅÅ-MM-DD)" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "%DY - År fra Exif (ÅÅÅÅ)" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "%Dy - År fra Exif (ÅÅ)" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "%Dm - Måned fra Exif (MM)" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "%DM - Måned fra Exif (Tekst)" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "%Dd - Dato fra Exif (DD)" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "%DD - Navn på dagen fra Exif" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "%t - Tid fra Exif (HH:MM:SS)" #: src/gtk-interface.c:154 msgid "Width" msgstr "Bredde" #: src/gtk-interface.c:154 msgid "Height" msgstr "Højde" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Åbner foto ..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "Kunne ikke åbne foto" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Foto åbnet" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "Fotoprioritet ændret (*)" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "Fotoprioritet ændret (D)" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "Fotoprioritet ændret (%d)" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "Kunne ikke finde skærm til fuldskærmsvisning" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "Tryk F10 for at flytte visningen til dette vindue" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "Kunne ikke finde mere end en skærm. Kan ikke åbne fuldskærmsvisning" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "Vælg hvilken skærm dit fuldskærmsfoto skal vises på" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "Vælg skærm til fuldskærmsvisning" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "Vælg OK for at bruge denne skærm til fuldskærmsvisning" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Bibliotek:" #: src/gtk-interface.c:777 #: src/rs-batch.c:1064 msgid "Choose output directory" msgstr "Vælg output bibliotek" #: src/gtk-interface.c:793 #: src/rs-batch.c:1075 #: src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "Filnavns skabelon:" #: src/gtk-interface.c:806 #: src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Eksempel på filnavn:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Filtype:" #. Add preferences box #: src/gtk-interface.c:879 #: src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Egenskaber" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Baggrundsfarve" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Histogram højde:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Brug systemtema" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Placer cache i hjemme bibliotek" #: src/gtk-interface.c:926 msgid "Display Colorspace:" msgstr "Skærmprofil:" #: src/gtk-interface.c:938 msgid "Exposure Mask Colorspace:" msgstr "Farveprofil for Eksponeringsmaske" #: src/gtk-interface.c:1011 msgid "General" msgstr "Generel" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "Hurtig eksport" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "Åbn bibliotek..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Åbn rekursivt" #: src/gtk-interface.c:1465 msgid "Directory" msgstr "Folder" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "Søg nøgleord" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Værktøjer" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Eksportkø" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Åbn" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Klar" #: src/gtk-progress.c:63 #: src/gtk-progress.c:100 #: src/gtk-progress.c:123 msgid "Progress" msgstr "Fremskridt" #: src/rs-actions.c:173 msgid "Open directory" msgstr "Åbn bibliotek" #: src/rs-actions.c:253 #: src/rs-batch.c:542 msgid "Could not create output directory." msgstr "Vælg output folder" #: src/rs-actions.c:257 msgid "Exporting..." msgstr "Eksporterer..." #: src/rs-actions.c:265 msgid "File exported" msgstr "Fil eksporteret" #: src/rs-actions.c:270 #: src/rs-actions.c:293 msgid "Export failed" msgstr "Fejl under eksportering" #: src/rs-actions.c:300 msgid "Exporting to GIMP..." msgstr "Eksporterer til GIMP..." #: src/rs-actions.c:305 msgid "Error exporting" msgstr "Fejl ved eksportering" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "Fejl ved eksportering til Gimp" #: src/rs-actions.c:331 #: src/rs-actions.c:349 msgid "Deleting photos" msgstr "Sletter fotos" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "Dine filer vil blive slettet permanent!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Slet fotos" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "Venter på at baggrundsjobs bliver færdige" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "Kopierer billede til udklipsholder" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "Billedet er kopieret til udklipsholder" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "FEJL: Kunne ikke kopiere billedet til udklipsholder" #. Build GUI #: src/rs-actions.c:463 msgid "Profile" msgstr "Profil" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Eksponering" #: src/rs-actions.c:468 msgid "White balance" msgstr "Hvidbalance" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Skarphed" #: src/rs-actions.c:470 msgid "Denoise" msgstr "Støjfjernelse" #: src/rs-actions.c:471 msgid "Color denoise" msgstr "Farve støjfjernelse" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "Kanalmixer" #: src/rs-actions.c:473 msgid "TCA" msgstr "TCA" #: src/rs-actions.c:474 msgid "Vignetting" msgstr "Vignettering" #: src/rs-actions.c:475 #: src/rs-toolbox.c:803 msgid "Curve" msgstr "Kurve" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "Vælg Alle/Ingen" #: src/rs-actions.c:498 msgid "Select settings to copy" msgstr "Vælg indstillinger der skal kopieres" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Indstillinger kopieret" #: src/rs-actions.c:587 msgid "Pasting settings to images" msgstr "Indsætter indstillinger på billeder" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "Indstillinger indsat" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Intet at indsætte" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "Bufferen er tom" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Justerer efter auto hvidbalance" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "Ingen hvidbalance at justere fra" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Justerer efter kameraets hvidbalance" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "Tags, separeret af mellemrum:" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "Tilføj tags til valgte billede(r)." #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "Viser eksponeringsmaske" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "Skjuler eksponeringsmaske" #: src/rs-actions.c:1067 msgid "Adding images to batch queue" msgstr "Tilføjer billeder til eksportkøen" #: src/rs-actions.c:1084 #: src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "%d fotos tilføjet til eksportkøen" #: src/rs-actions.c:1101 #: src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 #: src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 #: src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" "Vælg hvilke indstillinger der\n" "skal tilføjes til eksportkøen" #: src/rs-actions.c:1188 msgid "Removing images from batch queue" msgstr "Fjerner billeder fra eksportkø" #: src/rs-actions.c:1203 #, c-format msgid "%d photos removed from batch queue" msgstr "%d fotos fjernet fra eksportkøen" #. Not in any menu (yet) #: src/rs-actions.c:1254 #: src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "Tilføj profil..." #: src/rs-actions.c:1266 msgid "All Profiles" msgstr "Alle profiler" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "Kameraprofiler (DCP)" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "Farveprofiler (icc og icm)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Alle filer" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "En raw fotokonverter til GTK+/GNOME" #: src/rs-actions.c:1412 msgid "_File" msgstr "_Filer" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "_Rediger" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "_Foto" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "_Sæt_prioritet" #: src/rs-actions.c:1416 msgid "_White Balance" msgstr "_Hvidbalance" #: src/rs-actions.c:1417 msgid "_View" msgstr "_Vis" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "_Sorter efter" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "_Eksportkø" #: src/rs-actions.c:1420 msgid "_Help" msgstr "_Hjælp" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "_Snapshot" #. File menu #: src/rs-actions.c:1425 msgid "_Open Directory" msgstr "_Åbn bibliotek" #: src/rs-actions.c:1426 msgid "_Quick Export" msgstr "_Hurtig Eksportering" #: src/rs-actions.c:1427 msgid "_Export As" msgstr "_Eksporter som..." #: src/rs-actions.c:1428 msgid "_Export to Gimp" msgstr "_Eksporter til Gimp " #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "_Kopier billede til udklipsholder" #: src/rs-actions.c:1430 msgid "_Reload directory" msgstr "_Genindlæs bibliotek" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "_Slet markerede fotos" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "_Afslut" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "_Nulstil ændringer" #: src/rs-actions.c:1436 msgid "_Copy settings" msgstr "_Kopier indstillinger" #: src/rs-actions.c:1437 msgid "_Paste settings" msgstr "_Indsæt indstillinger" #: src/rs-actions.c:1438 msgid "_Reset settings" msgstr "_Nulstil denne indstilling" #: src/rs-actions.c:1439 msgid "_Save camera default settings" msgstr "_Gem indstillinger som standard for kamera" #: src/rs-actions.c:1440 msgid "_Preferences" msgstr "_Egenskaber" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "_Markér foto til sletning" #: src/rs-actions.c:1444 msgid "_1" msgstr "_1" #: src/rs-actions.c:1445 msgid "_2" msgstr "_2" #: src/rs-actions.c:1446 msgid "_3" msgstr "_3" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "_Fjern prioritet" #: src/rs-actions.c:1448 msgid "_Auto" msgstr "_Auto" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "_Kamera" #: src/rs-actions.c:1450 msgid "_Crop" msgstr "_Beskær" #: src/rs-actions.c:1451 msgid "_Uncrop" msgstr "_Annuller beskæring" #: src/rs-actions.c:1452 msgid "_Straighten" msgstr "_Ret foto op" #: src/rs-actions.c:1453 msgid "_Unstraighten" msgstr "_Fjern fotoopretning" #: src/rs-actions.c:1454 msgid "_Group" msgstr "_Gruppér" #: src/rs-actions.c:1455 msgid "_Ungroup" msgstr "_Fjern gruppering" #: src/rs-actions.c:1456 msgid "_Auto group" msgstr "_Autogruppering" #: src/rs-actions.c:1457 msgid "_Tag Photo..." msgstr "_Marker foto" #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "Roter med uret" #: src/rs-actions.c:1459 msgid "Rotate Counter Clockwise" msgstr "Roter mod uret" #: src/rs-actions.c:1460 msgid "Flip" msgstr "Vend" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "Spejl" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "_Foregående foto" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "_Næste foto" #: src/rs-actions.c:1466 msgid "_Lens Library" msgstr "_Linsebibliotek" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "_Kablet Optagelse" #. Batch menu #: src/rs-actions.c:1470 msgid "_Add to batch queue" msgstr "_Tilføj til Eksportkøen" #: src/rs-actions.c:1471 msgid "_Add view to queue..." msgstr "_Tilføj nuværende visning til eksportkøen" #: src/rs-actions.c:1472 msgid "_Remove from batch queue" msgstr "_Fjern fra eksportkøen" #: src/rs-actions.c:1473 msgid "_Start" msgstr "_Start" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "Online dokumentation" #: src/rs-actions.c:1477 msgid "_About" msgstr "_Om" #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "_Tilpas zoom til vindue" #: src/rs-actions.c:1487 msgid "_Iconbox" msgstr "_Ikoner" #: src/rs-actions.c:1488 msgid "_Toolbox" msgstr "_Værktøjer" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "_Fuld skærm" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "_Vis billede på sekundær skærm" #: src/rs-actions.c:1491 msgid "Show Filenames in Iconbox" msgstr "Vis filnavne under ikoner" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "Åben ikke-RAW billeder" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "Undlad at åbne valgte billeder" #: src/rs-actions.c:1494 msgid "_Exposure mask" msgstr "_Eksponeringsmaske" #: src/rs-actions.c:1495 msgid "_Split" msgstr "_Delt visning" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "_Sluk lyset" #: src/rs-actions.c:1503 msgid "Name" msgstr "Navn" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "Tidspunkt" #: src/rs-actions.c:1505 msgid "ISO" msgstr "ISO" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "Fokuslængde" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "Lukkerhastighed" #. Snapshot labels #: src/rs-actions.c:1513 #: src/rs-toolbox.c:207 #: src/rs-toolbox.c:1252 msgid " A " msgstr " A" #: src/rs-actions.c:1514 #: src/rs-toolbox.c:208 #: src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1515 #: src/rs-toolbox.c:209 #: src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Afbryd" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Sidste foto:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Tid tilbage: %dt %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "Behandler billede %d/%d" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Tid tilbage: ..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "Behandler billede 1/%d." #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "Åbner %s ..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "Gemmer %s ..." #: src/rs-batch.c:635 msgid "Could not export photo." msgstr "Kunne ikke åbne foto" #: src/rs-batch.c:695 msgid "Icon" msgstr "Ikon" #: src/rs-batch.c:702 msgid "Filename" msgstr "Filnavn" #: src/rs-batch.c:709 msgid "Setting" msgstr "Indstilling" #: src/rs-batch.c:802 msgid "Start" msgstr "Start" #: src/rs-batch.c:805 msgid "Remove" msgstr "Fjern" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Fjern alle" #: src/rs-batch.c:916 #: src/rs-batch.c:1091 msgid "Edit output settings" msgstr "Redigér indstillinger" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Fotostørrelse" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "Fast målestok" #: src/rs-batch.c:961 msgid "Constant width" msgstr "Fast bredde" #: src/rs-batch.c:962 msgid "Constant height" msgstr "Fast højde" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "Maksimal størrelse" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "Fotobredde:" #: src/rs-batch.c:978 #: src/rs-batch.c:987 msgid "pixels" msgstr "pixels" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "Fotohøjde:" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "Fotomålestok:" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" "Fast bredde:\n" "%d" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" "Fast højde:\n" "%d" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" "Fast målestok:\n" "%d" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" "Maksimal størrelse:\n" "%d x %d" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "Output bibliotek:" #: src/rs-batch.c:1100 msgid "Change" msgstr "Skift" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "Eksportdimensioner" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "Rediger kamera standardindstillinger" #: src/rs-camera-db.c:459 msgid "Model" msgstr "Model" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "Skærm navigation" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "Sluk lyset mode ikke tilgængelig" #: src/rs-preview-widget.c:887 msgid "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing." msgstr "Din opsætning understøtter ikke RGBA visuals/compositing. Undersøg sit operativsystem om det er muligt at få dette slået til." #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Størrelse:" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Gitter" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Ingen" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "Gyldne sektioner" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "Trediedelsreglen" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "Gyldne trekanter #1" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "Gyldne trekanter #2" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "Harmoniske trekanter #1" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "Harmoniske trekanter #2" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "Forhold" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "Fri" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "Originalt aspekt" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "ISO papir (A4)" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "16:9 (HDTV)" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "Gylden rektangel" #: src/rs-preview-widget.c:1180 #: src/rs-preview-widget.c:1191 msgid "Crop" msgstr "Beskær" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "Afbryd crop" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel crop" msgstr "Beskær: Træk for at markere område til beskæring. Højre musetast inden for området: Godkend beskæring; Udenfor: Annuller beskæring" #: src/rs-preview-widget.c:1238 msgid "Straighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels." msgstr "Opretning: Træk en linie i billedet der skal være horisontal eller vertikal. Højre musetast afbryder." #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 #: src/rs-toolbox.c:522 msgid "Export File" msgstr "Eksporter fil" #: src/rs-save-dialog.c:282 msgid "File not saved!" msgstr "Fil ikke gemt!" #: src/rs-save-dialog.c:299 #, c-format msgid "Exporting to %s" msgstr "Eksporterer %s" #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" "Kunne ikke gemme filen: %s\n" "\n" "Undersøg om du har skriverettigheder til mappen." #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "Overskriv fil?" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" "Filen '%s' eksisterer allerede.\n" "\n" "Ønsker du at overskrive filen?" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Bevar aspekt" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Bredde:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Højde:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Procent:" #. All #: src/rs-store.c:298 #: src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "Alle fotos (undtaget slettede)" #. 1 #: src/rs-store.c:302 #: src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "Prioritet 1 fotos" #. 2 #: src/rs-store.c:306 #: src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "Prioritet 2 fotos" #. 3 #: src/rs-store.c:310 #: src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "Prioritet 3 fotos" #. Unsorted #: src/rs-store.c:314 #: src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "Uprioriterede fotos" #. Deleted #: src/rs-store.c:318 #: src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Slettede fotos" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Prioriteter" #: src/rs-store.c:500 msgid "NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable." msgstr "BEMÆRK: Opdatering af foto er slået fra. Nye filer vil ikke blive indlæst! Tryk for at slå det til igen." #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" "%s\n" "\n" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "Producent: %s\n" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "Model: %s\n" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "Fokus længde: %dmm\n" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "Lukkerhastighed: %.1fs\n" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "Lukkerhastighed: 1/%.0fs\n" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "Blænde: F/%.01f\n" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "ISO: %u\n" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "Tid: %s" #: src/rs-store.c:1371 msgid "* (-)" msgstr "* (-)" #: src/rs-store.c:1372 msgid "1 (-)" msgstr "1 (-)" #: src/rs-store.c:1373 msgid "2 (-)" msgstr "2 (-)" #: src/rs-store.c:1374 msgid "3 (-)" msgstr "3 (-)" #: src/rs-store.c:1375 msgid "U (-)" msgstr "U (-)" #: src/rs-store.c:1376 msgid "D (-)" msgstr "D (-)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "Nøgleordssøgning [%s]" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "Gphoto2 rapporterede kontekstfejl:\n" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" "FEJL: Gphoto2 returnerede fejlværdien %d\n" "Fejlbeskeden er: %s\n" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "Slår optagelse til på Canon kameraer\n" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "Slår optagelse til på Nikon kameraer\n" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "Optagelse slået til.\n" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "Den angivne port ('%s') kunne ikke findes." #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "Kunne ikke flytte filen til den nuværende mappe!\n" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "Henter og tilføjer billede.\n" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "Kunne ikke åbne midlertidig fil på disken til skrivning." #: src/rs-tethered-shooting.c:558 msgid "Could not open image!\n" msgstr "Kunne ikke åbne foto!\n" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "Optager.\n" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" "Overvågning modtog fejl %d, mens den ventede på kameraet.\n" "Fejlteksten er: %s\n" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" "Modtog fejl %d, imens billedet blev hentet fra kameraet.\n" "Fejlteksten er:%s\n" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "Fil hentet successrigt\n" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "Kameraovervågning lukker ned.\n" #: src/rs-tethered-shooting.c:651 #: src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" "Modtog fejl %d, imens billedet blev optaget af kameraet.\n" "Fejlteksten er:%s\n" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" "Advarsel: Det tog længere tid at hente billedet end det angivne interval\n" "Det tog %.1f sekunder at hente billedet.\n" "Overvej om du skal sætte et længere interval.\n" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "Venter på næste billede.\n" #: src/rs-tethered-shooting.c:692 #: src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "Start Optagelse" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "Intervaloptagelse lukker ned.\n" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "Kobler nuværende kamera fra\n" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "Kunne ikke åbne kameraet %s på port %s\n" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" "FEJL: Initialisering af kamerareturnerede %d.\n" "Fejltekst er:%s\n" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "Lukker asynkron tråd\n" #: src/rs-tethered-shooting.c:784 #: src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "Fandt %d kameraer\n" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "Intet kamera valgt - kan ikke tilslutte!\n" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "Lukker tråd for at åbne fjernoptagelse.\n" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "Lukker kørende tråd.\n" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "Starter overvågningstråd.\n" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "Overvågningstråd kører allerede.\n" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "Lukker tråd til intervaloptagelse.\n" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "Intet kamera valgt.\n" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "Starter tråd til intervaloptagelse.\n" #: src/rs-tethered-shooting.c:938 msgid "Stop Shooting" msgstr "Stop Optagelse" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "Vælg kamera:" #: src/rs-tethered-shooting.c:1003 msgid "Take Photo" msgstr "Tag billede" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "Overvåg kamera" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "Afbryd forbindelsen til kamera" #. Status window #: src/rs-tethered-shooting.c:1022 msgid "Status:" msgstr "Status:" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "Kamerakontrol" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "Tags til nye billeder:" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 msgid "Filename & Tags" msgstr "Filnavn & Tags" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "Sekunder imellem hver skud:" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "Interval skydning" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "Minimer dette vindue efter optagelse" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "Kopier opsætning fra valgt til nyt billede" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "Åben nyt billede efter optagelse" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "Rawstudio Kablet Optagelse" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" "Velkommen til kablet optagelse!\n" "Vær sikker på at dit kamera ikke er aktivt i dit operativsystem.\n" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Histogram" #: src/rs-toolbox.c:443 msgid "Reset" msgstr "Nulstil" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr ". Klik for at nulstille værdi" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr ". Klik for at rette værdi" #: src/rs-toolbox.c:566 #: src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Åbn kurve ..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "Vælg gemt kurve" #: src/rs-toolbox.c:700 msgid "Select Action" msgstr "Vælg Handling" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Gem kurve som ..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "Nulstil kurve" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "Autoindstil kurveender" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "Vælg linse" #. Pack everything nice #: src/rs-toolbox.c:800 msgid "Basic" msgstr "Basis" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "Kanalmixer" #: src/rs-toolbox.c:802 msgid "Lens Correction" msgstr "Linsekorrektion" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Vend foto over x-aksen" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Vend foto over y-aksen" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "Rotér fotoet 90 grader med uret" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "Rotér fotoet 90 grader mod uret" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Transformationer" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "Ukendt linse" #: src/rs-toolbox.c:1035 msgid "Lens Disabled" msgstr "Linse inaktiv" #: src/rs-toolbox.c:1043 msgid "No Lens Information" msgstr "Ingen linse-informationer" #: src/rs-toolbox.c:1045 msgid "Camera Unknown" msgstr "Ukendt kamera" #: src/rs-toolbox.c:1050 msgid "No Photo" msgstr "Intet foto" #: src/rs-toolbox.c:1259 msgid "_Previous" msgstr "_Foregående foto" #: src/rs-toolbox.c:1260 msgid "_Next" msgstr "_Næste foto" #~ msgid " %s added to batch queue" #~ msgstr "%s er tilføjet til eksportkøen" #~ msgid "%s already added to batch queue" #~ msgstr "%s er allerede tilføjet til eksportkøen" #~ msgid "Not in batch queue" #~ msgstr "Findes ikke i eksportkø" #~ msgid "Processing photos" #~ msgstr "Behandler fotos" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "Åbn 8 bit fotos (jpeg, png, osv.)" #, fuzzy #~ msgid "Warmth" #~ msgstr "Varme" #, fuzzy #~ msgid "CA Red" #~ msgstr "KA Rød" #, fuzzy #~ msgid "CA Blue" #~ msgstr "KA Blå" #~ msgid "Select color profile" #~ msgstr "Vælg farveprofil" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Farveprofiler (icc og icm)" #~ msgid "Not a valid color profile." #~ msgstr "Ikke en valid farveprofil" #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "" #~ "Den valgte fil er ikke en godkendt farveprofil til denne version af " #~ "Rawstudio." #~ msgid "Enable color management (experimental)" #~ msgstr "Aktiver farvestyring (eksperimentelt)" #~ msgid "Input profile" #~ msgstr "Input profil" #~ msgid "BuiltInRGBProfile" #~ msgstr "Indbygget RGB profil" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Output profil" #~ msgid "Intent" #~ msgstr "Formål" #~ msgid "Perceptual" #~ msgstr "Opfattelse" #~ msgid "Relative colormetric" #~ msgstr "Relativt farvemetrisk" #~ msgid "Absolute colormetric" #~ msgstr "Absolut farvemetrisk" #~ msgid "Colors" #~ msgstr "Farver" #, fuzzy #~ msgid "Change this" #~ msgstr "Skift" #~ msgid "How much image will be sharpened" #~ msgstr "Hvor meget billedet skal gøres skarpere" #~ msgid "Background renderer active" #~ msgstr "Beregner i baggrunden" #~ msgid "File export canceled" #~ msgstr "Eksportering af fil afbrudt" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "16-bit TIFF (Tagged Image File Format)" #~ msgid "Rotate the photo 180 degrees" #~ msgstr "Roter fotoet 180 grader" #~ msgid "Reset this setting" #~ msgstr "Nulstil denne indstilling" #~ msgid "_Zoom to 100%" #~ msgstr "_Zoom til 100%" #~ msgid "Canon CR2" #~ msgstr "Canon CR2" #~ msgid "Canon CIFF" #~ msgstr "Canon CIFF" #~ msgid "Nikon NEF" #~ msgstr "Nikon NEF" #~ msgid "Minolta raw" #~ msgstr "Minolta raw" #~ msgid "Canon TIFF" #~ msgstr "Canon TIFF" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Panasonic raw" #~ msgstr "Panasonic raw" #~ msgid "Pentax raw" #~ msgstr "Pentax raw" #~ msgid "Adobe Digital negative" #~ msgstr "Adobe Digital negative" #~ msgid "Hasselblad" #~ msgstr "Hasselblad" #~ msgid "Split" #~ msgstr "Delt visning" #~ msgid "Exp. mask" #~ msgstr "Eksp.maske" #~ msgid "Toggle exposure mask" #~ msgstr "Skift eksponeringsmaske-tilstand" #~ msgid "Set zoom" #~ msgstr "Sæt zoom" #~ msgid "Zoom out" #~ msgstr "Zoom ud" #~ msgid "Zoom in" #~ msgstr "Zoom ind" #~ msgid "Zoom to fit" #~ msgstr "Zoom til vindue" #~ msgid "Zoom to 100%" #~ msgstr "Zoom til 100%" #~ msgid "Zoom:" #~ msgstr "Zoom:" #~ msgid "Apply" #~ msgstr "Anvend" rawstudio-2.0/po/de.gmo0000644000175000017500000004035411546436027012045 00000000000000o  8>U8NPf o{  /Lk{$!  :CJaxz   (6NT q% ;IXhn v      *09 A OZcu   %*BZb w b' G T `l      / > M b t     !! 6!A!S!e!w!! ! !c!"""" "" """%"-%#S#b# h#s### #+##### $ $%$+$3$;$?$ _$j$o$t$$ $$$$ $$$$%% %#%5%=H% %%.%%^&a&d&g&n&& &&&&&&& &&&&' '*'1'7' @' L'X'h'x' '' ''''''' (($(+( 2( >(L(U(]( f(t(z( (((******&*-*++<+ ,#(,L,b,d,z, ,, ,,,, ,,,,-/-?-]-}---!--.-( . 3. @.M.k. r.~.(.. ......./ //$&/#K/#o/ / ////// 00 #0 00<0L0R0[0"q0 0000000 0 111#161L1`1x111111 12 2 2 %2/2H2 `2n2%w2 2 2 22222 33303H3$O3 t3333 3333']444 4&4445 5%)5O5(T5}5555555566=6V6 _6j6 }6 626 66 66 7%7 =7 I7j7 y7a7788 88 8889-.94\9 99 99$9"9:7*: b:n: u::::: : :::: ;;;5; L;X;`; f; p;|;;*;;; ;;<N)< x<<3<<====%= ===> > #>0> K>W>m>>>> > >> > >>>?'?-???T?c?l?%~???"?? @@$@ ,@$8@ ]@h@@@@@@ @S9 ([Wa7sgqN^d)z n` xG#/4w]VPQ py  I;?L-28te!.} 0TM&jD\_l*>:$Z{uvmK'Jr cBA35Y|XO@f"hb6o1F=R+%EH~ki<UC , A B C %%.1fs %2c - Incremental counter%d - Date from EXIF (YYYY-MM-DD)%d photos added to batch queue%dmm %f - Original filename%s Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!%s - Setting id (A, B or C)%t - Time from EXIF (HH:MM:SS)* (%d)-1 (%d)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)Aperture: F/%.01f Focal length: %dmm ISO: %u Shutter speed: %.1fs Shutter speed: 1/%.0fs Time: %s%s AA raw image converter for GTK+/GNOMEAdd Profile ...Adjusting to auto white balanceAdjusting to camera white balanceAll ProfilesAll filesAll photos (excluding deleted)ApertureAspectAuthenticate RawstudioAuto adjust curve endsBBasicBatchBlueBuffer emptyCCA BCA RCamera Profiles (DCP)CancelChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Channel MixerChannel mixerChoose output directoryColDnColor Profiles (ICC and ICM)Color denoiseConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrContrastCopied settingsCouldn't open photoCropCurveD (%d)Delete photosDeleted photosDeleting photosDenoiDenoiseDescriptionDirectoryDirectory:Display NavigationDon't cropEdit lensError exportingError exporting photo to gimp.Export FileExport dimensionsExport failedExporting to %sExposExposureF/%.1f File exportedFile type:FilenameFilename example:Filename template:Flickr errorFlipFlip the photo over the x-axisFocallengthFreeformGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2GreenGridHarmonious triangles #1Harmonious triangles #2Height:Hiding exposure maskHistogramHistogram height:HueISOISO paper (A4)IconImage openedIt seems like rawstudio lost its authentication to upload to your account, please re-authenticate.JPEG (Joint Photographic Experts Group)JPEG QualityKeep aspectLast image:Light out mode not availableLoading %s ...Maximum sizeMaximum size: %d x %dMirrorMirror the photo over the y-axisNameNo white balance to set fromNoneNothing to pasteOpenOpen curve ...Open directoryOpen recursiveOpening directory...Opening photo ...Output directory:PNG (Portable Network Graphics)Pasted settingsPercent:Photo height:Photo scale:Photo sizePhoto width:Place cache in home directoryPreferencesPreview background color:PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProgressPublic (everyone can see this)Quick exportRawstudioRawstudio needs to be authenticated before it will be able to upload photos to your Flickr account.Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr.ReadyRedRemoveRemove allResetReset curveRotate ClockwiseRotate Counter ClockwiseRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturSaturationSave 16 bit TIFFSave curve as ...Save uncompressed TIFFSaving %s ...Select which settings to add to batch queueSettingSharpSharpenShowing exposure maskShutterspeedSizeStartStep 1:Step 2:TCATIFF (Tagged Image File Format)Tag searchTagsTempTime left: %dh %dm %dsTime left: ...TimestampTintTitleToolsTransformsU (%d)Unprioritized photosUpload photo to FlickrUse system themeVignVignettingVisible to FamilyVisible to FriendsWe recieved an error during authentication. Please try again.White balanceWidth:Your files will be permanently deleted!Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing._1_2_3_About_Add to batch queue_Auto_Auto group_Batch_Camera_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Lights out_Next Photo_Open Directory_Paste settings_Photo_Preferences_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Set Priority_Sort by_Split_Start_Straighten_Tag Photo..._Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelsProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-03-26 03:39+0100 PO-Revision-Date: 2010-02-28 01:17+0100 Last-Translator: Mario Blättermann Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 1.11.4 Plural-Forms: nplurals=2; plural=(n != 1); X-Poedit-Language: German X-Poedit-Country: GERMANY A B C %%.1fs %2c - Laufnummer%d - Datum aus EXIF-Daten (JJJJ-MM-TT)%d Bilder zur Stapelverarbeitung hinzugefügt%dmm %f - Usprünglicher Dateiname%s Note: Dieser Fehler wurde von Rawstudio nicht erfasst. Bitte berichten Sie darüber und versuchen Sie ihn nachzuvollziehen, so dass wir eine bessere Fehlermeldung dazu angeben können. Danke!%s - Einstellungen (A, B oder C)%t - Zeit aus EXIF-Daten (HH:MM:SS)* (%d)-1 (%d)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)3 (%d)3:2 (35mm)4:38:3 (Dualhead XGA)Blende: F/%.01f Brennweite: %dmm ISO: %u Verschlusszeit: %.1fs Verschlusszeit: 1/%.0fs Uhrzeit: %s%s AEin RAW-Konverter für GTK+/GNOMEProfil hinzufügen …Automatischer Weißabgleich wird durchgeführtVerwendung des Weißabgleichs der KameraAlle ProfileAlle DateienAlle Bilder (ohne gelöschte)BlendeVerhältnisRawstudio legitimierenAutomatische Anpassungen der KurvenendenBGrundlegendStapelverarbeitungBlauPuffer ist leerCCA BCA RKameraprofile (DCP)AbbrechenÄndernPriorität des Bildes geändert (%d)Priorität des Bildes geändert (*)Priorität des Bildes geändert (D)KanalmischerKanalmixerAusgabeordner wählenColDnFarbprofile (ICC und ICM)Farbrauschen entfernenFixer Faktor: %dFixe HöheFixe Höhe: %dFixe GrößeFixe BreiteFixe Breite: %dKontrKontrastEinstellungen kopiertBild konnte nicht geöffnet werdenBeschneidenKurveD (%d)Bilder löschenGelöschte BilderBilder werden gelöschtEntrEntrauschenBeschreibungOrdnerOrdner:AnsichtsnavigationBeschneidung aufhebenObjektiv bearbeitenFehler beim ExportierenFehler beim Exportieren zu GIMPDatei exportierenBildgrösse exportierenExport ist fehlgeschlagenZu %s wird exportiertBelBelichtungF/%.1f Datei gespeichertDateityp:DateinameBeispiel für Dateiname:Vorgabe für Dateiname:Flickr-FehlerUmdrehenSpiegeln des Bildes über die X-AchseBrennweiteFreie AuswahlAllgemeinGoldenes RechteckGoldener SchnittGoldene Dreiecke #1Goldene Dreiecke #2GrünGitterHarmonische Dreiecke #1Harmonische Dreiecke #2Höhe:Keine Anzeige der BelichtungswarnungHistogrammHöhe des Histogramms:FarbtonISODIN/ISO (A4)SymbolBild geöffnetEs hat den Anschein, dass die Legitimierung nicht mehr gültig ist, um Daten zu Ihrem Konto übertragen zu können. Bitte legitimieren Sie sich erneut.JPEG (Joint Photographic Experts Group)JPEG-QualitätVerhältnis beibehaltenLetztes Bild:Lichter-aus-Modus ist nicht verfügbar%s wird geladen …Maximale GrößeMaximale Größe: %d x %dSpiegelnSpiegeln des Bildes über die Y-AchseNameKeine Daten für Weißabgleich vorhandenKeinesNichts einzufügenÖffnenBelichtungskurve öffnen …Ordner öffnenRekursiv öffnenOrdner wird geöffnet …Bild wird geöffnet …Ausgabeordner:PNG (Portable Network Graphics)Einstellungen eingefügtProzent:Bildhöhe:Skalierungsfaktor:BildgrößeBildbreite:Temporäre Daten im persönlichen Ordner speichernEinstellungenHintergrundfarbe:PrioritätenBilder der Priorität 1Bilder der Priorität 2Bilder der Priorität 3FortschrittÖffentlich (für alle sichtbar)SchnellausgabeRawstudioRawstudio muss legitimiert werden, bevor Bilder zu Ihrem Flickr-Konto übertragen werden können.Rawstudio war nicht in der Lage, die Bilder zu Flickr zu übertragen, da die Legitimierung zurückgewiesen wurde. Bitte legitimieren Sie Rawstudio erneut, um die Bilder übertragen zu können.FertigRotEntfernenAlle entfernenZurücksetzenBelichtungskurve zurücksetzenIm Uhrzeigersinn drehenGegen den Uhrzeigersinn drehenDrehen des Bildes um 90 Grad im UhrzeigersinnDrehen des Bildes um 90 Grad gegen den UhrzeigersinnDrittelsregelSättSättigungAls 16-bit TIFF speichernBelichtungskurve speichern unter …Als unkomprimiertes TIFF speichern%s wird gespeichert …Welche Einstellungen zur Stapelverarbeitung hinzufügenEinstellungSchärSchärfenAnzeige der BelichtungswarnungVerschlusszeitGrößeBeginnSchritt 1Schritt 2TCATIFF (Tagged Image File Format)SchlagwortsucheMarkierungenTempVerbleibende Zeit: %dh %dm %dsVerbleibende Zeit: …ZeitstempelFarbtonTitelWerkzeugeAnpassungenU (%d)Bilder ohne PrioritätBilder zum Flickr-Bilderdienst übertragenSystemthema verwendenVignVignettierungFür Familie sichtbarSichtbar für FreundeEin Fehler ist während der Legitimierung aufgetreten. Bitte erneut versuchen.WeißabgleichBreite:Die Dateien werden unwiderruflich gelöscht!Ihre Systemeinstellung scheint weder die RGBA-Darstellung noch Compositing zu unterstützen. Bitte ziehen Sie die Dokumentation Ihres Betriebssystems zu Rate, wie Sie diese Funktionsmerkmale aktivieren können._1_2_3_Info_Zur Stapelverarbeitung hinzugefügen_Automatisch_Automatisch gruppieren_Stapelverarbeitung_Kamera_Einstellungen kopieren_Beschneiden_Markierte Bilder löschen_Bearbeiten_Datei eportieren als_Exportieren zu GIMP_Belichtungsmaske_Datei_Bild zum Löschen markieren_Vollbild_Gruppieren_Hilfe_Bildleiste_Lichter aus_Nächstes Bild_Ordner öffnen_Einstellungen einfügen_Bild_Voreinstellungen_Vorhergehendes Bild_Schnellexport_BeendenO_rdner neu laden_Von der Stapelverarbeitung entfernenPriorität _löschen_Einstellungen zurücksetzen_Einstellungen rückgängig machenPriorität _setzen_Sortieren nach_Teilen_Beginn_BegradigenSchlagwort zum _Bild hinzufügen …_Werkzeuge_Beschneidung aufheben_Gruppierung aufhebenBegradigung a_ufheben_Ansicht_Weißabgleich_Auf Bildschirmgröße zoomenBildpunkterawstudio-2.0/po/rawstudio.pot0000644000175000017500000011630511547421015013506 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2011-04-07 22:43+0200\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: librawstudio/rs-lens-db-editor.c:325 msgid "All lenses" msgstr "" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "" #: librawstudio/rs-lens-db-editor.c:565 msgid "Rawstudio Lens Library" msgstr "" #: librawstudio/rs-lens-db-editor.c:590 msgid "Lens make" msgstr "" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1530 msgid "Aperture" msgstr "" #: librawstudio/rs-lens-db-editor.c:606 msgid "Camera make" msgstr "" #: librawstudio/rs-lens-db-editor.c:610 msgid "Camera model" msgstr "" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:734 msgid "Could not create temporary directory." msgstr "" #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:796 #, c-format msgid "Could not create datadir for lensfun - %s" msgstr "" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "" #: librawstudio/rs-lens-db-editor.c:939 msgid "Rawstudio Lens Editor" msgstr "" #: librawstudio/rs-lens-db-editor.c:950 msgid "Lens Make" msgstr "" #: librawstudio/rs-lens-db-editor.c:954 msgid "Lens Model" msgstr "" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "" #: librawstudio/rs-lens-db-editor.c:966 msgid "Camera Make" msgstr "" #: librawstudio/rs-lens-db-editor.c:970 msgid "Camera Model" msgstr "" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "" #: librawstudio/rs-library.c:254 #, c-format msgid "Could not open database %s" msgstr "" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "" #: librawstudio/rs-library.c:816 msgid "telephoto" msgstr "" #: librawstudio/rs-library.c:832 msgid "January" msgstr "" #: librawstudio/rs-library.c:835 msgid "February" msgstr "" #: librawstudio/rs-library.c:838 msgid "March" msgstr "" #: librawstudio/rs-library.c:841 msgid "April" msgstr "" #: librawstudio/rs-library.c:844 msgid "May" msgstr "" #: librawstudio/rs-library.c:847 msgid "June" msgstr "" #: librawstudio/rs-library.c:850 msgid "July" msgstr "" #: librawstudio/rs-library.c:853 msgid "August" msgstr "" #: librawstudio/rs-library.c:856 msgid "September" msgstr "" #: librawstudio/rs-library.c:859 msgid "October" msgstr "" #: librawstudio/rs-library.c:862 msgid "November" msgstr "" #: librawstudio/rs-library.c:865 msgid "December" msgstr "" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "" #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "" #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "" #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "" #: librawstudio/rs-metadata.c:544 #, c-format msgid "ISO%d" msgstr "" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "" #: librawstudio/rs-profile-selector.c:242 msgid "Embedded Profile" msgstr "" #: librawstudio/rs-profile-selector.c:244 msgid "(Select Profile)" msgstr "" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 msgid "Expos" msgstr "" #: librawstudio/rs-settings.c:80 msgid "Exposure Compensation" msgstr "" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 msgid "Satur" msgstr "" #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 msgid "Contr" msgstr "" #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temp" msgstr "" #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 msgid "Sharp" msgstr "" #: librawstudio/rs-settings.c:133 msgid "Sharpen Amount" msgstr "" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "" #: librawstudio/rs-settings.c:145 msgid "Colour Denoising" msgstr "" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "" #: librawstudio/rs-settings.c:163 msgid "Vignetting Correction" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 msgid "Red" msgstr "" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 msgid "JPEG Quality" msgstr "" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:329 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "" #: plugins/output-flickr/output-flickr.c:113 msgid "Title" msgstr "" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "" #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 msgid "Full export path" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 msgid "Copy EXIF metadata" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "" #: plugins/output-picasa/rs-picasa-client.c:234 msgid "Username: " msgstr "" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "" #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "" #: plugins/output-tifffile/output-tifffile.c:108 msgid "TIFF (Tagged Image File Format)" msgstr "" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "" #: src/filename.c:315 #, c-format msgid "%p - Path of original file" msgstr "" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "" #: src/gtk-interface.c:154 msgid "Width" msgstr "" #: src/gtk-interface.c:154 msgid "Height" msgstr "" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "" #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "" #: src/gtk-interface.c:777 src/rs-batch.c:1068 msgid "Choose output directory" msgstr "" #: src/gtk-interface.c:793 src/rs-batch.c:1079 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "" #: src/gtk-interface.c:817 msgid "File type:" msgstr "" #. Add preferences box #: src/gtk-interface.c:881 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "" #: src/gtk-interface.c:894 msgid "Preview background color:" msgstr "" #: src/gtk-interface.c:909 msgid "Histogram height:" msgstr "" #: src/gtk-interface.c:919 msgid "Use system theme" msgstr "" #: src/gtk-interface.c:924 msgid "Place cache in home directory" msgstr "" #: src/gtk-interface.c:928 msgid "Display Colorspace:" msgstr "" #: src/gtk-interface.c:940 msgid "Exposure Mask Colorspace:" msgstr "" #: src/gtk-interface.c:1013 msgid "General" msgstr "" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1015 msgid "Quick export" msgstr "" #: src/gtk-interface.c:1335 msgid "Opening directory..." msgstr "" #: src/gtk-interface.c:1362 msgid "Rawstudio" msgstr "" #: src/gtk-interface.c:1459 msgid "Open recursive" msgstr "" #: src/gtk-interface.c:1467 msgid "Directory" msgstr "" #: src/gtk-interface.c:1470 msgid "Tag search" msgstr "" #: src/gtk-interface.c:1476 msgid "Tools" msgstr "" #: src/gtk-interface.c:1477 msgid "Batch" msgstr "" #: src/gtk-interface.c:1478 msgid "Open" msgstr "" #: src/gtk-interface.c:1520 msgid "Ready" msgstr "" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "" #: src/rs-actions.c:173 msgid "Open directory" msgstr "" #: src/rs-actions.c:253 src/rs-batch.c:543 msgid "Could not create output directory." msgstr "" #: src/rs-actions.c:257 msgid "Exporting..." msgstr "" #: src/rs-actions.c:265 msgid "File exported" msgstr "" #: src/rs-actions.c:270 src/rs-actions.c:293 msgid "Export failed" msgstr "" #: src/rs-actions.c:300 msgid "Exporting to GIMP..." msgstr "" #: src/rs-actions.c:305 msgid "Error exporting" msgstr "" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "" #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "" #. Build GUI #: src/rs-actions.c:463 msgid "Profile" msgstr "" #: src/rs-actions.c:464 msgid "Exposure" msgstr "" #: src/rs-actions.c:468 msgid "White balance" msgstr "" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "" #: src/rs-actions.c:470 msgid "Denoise" msgstr "" #: src/rs-actions.c:471 msgid "Color denoise" msgstr "" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "" #: src/rs-actions.c:473 msgid "TCA" msgstr "" #: src/rs-actions.c:474 msgid "Vignetting" msgstr "" #: src/rs-actions.c:475 src/rs-toolbox.c:809 msgid "Curve" msgstr "" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "" #: src/rs-actions.c:498 msgid "Select settings to copy" msgstr "" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "" #: src/rs-actions.c:587 msgid "Pasting settings to images" msgstr "" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "" #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "" #: src/rs-actions.c:1067 msgid "Adding images to batch queue" msgstr "" #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "" #: src/rs-actions.c:1101 src/rs-batch.c:210 msgid "A" msgstr "" #: src/rs-actions.c:1102 src/rs-batch.c:213 msgid "B" msgstr "" #: src/rs-actions.c:1103 src/rs-batch.c:216 msgid "C" msgstr "" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" #: src/rs-actions.c:1188 msgid "Removing images from batch queue" msgstr "" #: src/rs-actions.c:1203 #, c-format msgid "%d photos removed from batch queue" msgstr "" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1505 msgid "Add Profile ..." msgstr "" #: src/rs-actions.c:1266 msgid "All Profiles" msgstr "" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "" #: src/rs-actions.c:1282 msgid "Color Profiles (ICC and ICM)" msgstr "" #: src/rs-actions.c:1289 msgid "All files" msgstr "" #: src/rs-actions.c:1399 msgid "A raw image converter for GTK+/GNOME" msgstr "" #: src/rs-actions.c:1436 msgid "_File" msgstr "" #: src/rs-actions.c:1437 msgid "_Edit" msgstr "" #: src/rs-actions.c:1438 msgid "_Photo" msgstr "" #: src/rs-actions.c:1439 msgid "_Set Priority" msgstr "" #: src/rs-actions.c:1440 msgid "_White Balance" msgstr "" #: src/rs-actions.c:1441 msgid "_View" msgstr "" #: src/rs-actions.c:1442 msgid "_Sort by" msgstr "" #: src/rs-actions.c:1443 msgid "_Batch" msgstr "" #: src/rs-actions.c:1444 msgid "_Help" msgstr "" #: src/rs-actions.c:1446 msgid "_Snapshot" msgstr "" #. File menu #: src/rs-actions.c:1449 msgid "_Open Directory" msgstr "" #: src/rs-actions.c:1450 msgid "_Quick Export" msgstr "" #: src/rs-actions.c:1451 msgid "_Export As" msgstr "" #: src/rs-actions.c:1452 msgid "_Export to Gimp" msgstr "" #: src/rs-actions.c:1453 msgid "_Copy Image to Clipboard" msgstr "" #: src/rs-actions.c:1454 msgid "_Reload directory" msgstr "" #: src/rs-actions.c:1455 msgid "_Delete flagged photos" msgstr "" #: src/rs-actions.c:1456 msgid "_Quit" msgstr "" #. Edit menu #: src/rs-actions.c:1459 msgid "_Revert settings" msgstr "" #: src/rs-actions.c:1460 msgid "_Copy settings" msgstr "" #: src/rs-actions.c:1461 msgid "_Paste settings" msgstr "" #: src/rs-actions.c:1462 msgid "_Reset settings" msgstr "" #: src/rs-actions.c:1463 msgid "_Save camera default settings" msgstr "" #: src/rs-actions.c:1464 msgid "_Preferences" msgstr "" #. Photo menu #: src/rs-actions.c:1467 msgid "_Flag photo for deletion" msgstr "" #: src/rs-actions.c:1468 msgid "_1" msgstr "" #: src/rs-actions.c:1469 msgid "_2" msgstr "" #: src/rs-actions.c:1470 msgid "_3" msgstr "" #: src/rs-actions.c:1471 msgid "_Remove priority" msgstr "" #: src/rs-actions.c:1472 msgid "_Auto" msgstr "" #: src/rs-actions.c:1473 msgid "_Camera" msgstr "" #: src/rs-actions.c:1474 msgid "_Crop" msgstr "" #: src/rs-actions.c:1475 msgid "_Uncrop" msgstr "" #: src/rs-actions.c:1476 msgid "_Straighten" msgstr "" #: src/rs-actions.c:1477 msgid "_Unstraighten" msgstr "" #: src/rs-actions.c:1478 msgid "_Group" msgstr "" #: src/rs-actions.c:1479 msgid "_Ungroup" msgstr "" #: src/rs-actions.c:1480 msgid "_Auto group" msgstr "" #: src/rs-actions.c:1481 msgid "_Tag Photo..." msgstr "" #: src/rs-actions.c:1482 msgid "Rotate Clockwise" msgstr "" #: src/rs-actions.c:1483 msgid "Rotate Counter Clockwise" msgstr "" #: src/rs-actions.c:1484 msgid "Flip" msgstr "" #: src/rs-actions.c:1485 msgid "Mirror" msgstr "" #. View menu #: src/rs-actions.c:1488 msgid "_Previous photo" msgstr "" #: src/rs-actions.c:1489 msgid "_Next Photo" msgstr "" #: src/rs-actions.c:1490 msgid "_Lens Library" msgstr "" #: src/rs-actions.c:1491 msgid "_Tethered Shooting" msgstr "" #. Batch menu #: src/rs-actions.c:1494 msgid "_Add to batch queue" msgstr "" #: src/rs-actions.c:1495 msgid "_Add view to queue..." msgstr "" #: src/rs-actions.c:1496 msgid "_Remove from batch queue" msgstr "" #: src/rs-actions.c:1497 msgid "_Start" msgstr "" #. help menu #: src/rs-actions.c:1500 msgid "_Online Documentation" msgstr "" #: src/rs-actions.c:1501 msgid "_About" msgstr "" #: src/rs-actions.c:1510 msgid "_Zoom to fit" msgstr "" #: src/rs-actions.c:1511 msgid "_Iconbox" msgstr "" #: src/rs-actions.c:1512 msgid "_Toolbox" msgstr "" #: src/rs-actions.c:1513 msgid "_Fullscreen" msgstr "" #: src/rs-actions.c:1514 msgid "_Show Photo On Secondary Monitor" msgstr "" #: src/rs-actions.c:1515 msgid "Show Filenames in Iconbox" msgstr "" #: src/rs-actions.c:1516 msgid "Load non-RAW images" msgstr "" #: src/rs-actions.c:1517 msgid "Do not Load Selected Images" msgstr "" #: src/rs-actions.c:1518 msgid "_Exposure mask" msgstr "" #: src/rs-actions.c:1519 msgid "_Split" msgstr "" #: src/rs-actions.c:1521 msgid "_Lights out" msgstr "" #: src/rs-actions.c:1527 msgid "Name" msgstr "" #: src/rs-actions.c:1528 msgid "Timestamp" msgstr "" #: src/rs-actions.c:1529 msgid "ISO" msgstr "" #: src/rs-actions.c:1531 msgid "Focallength" msgstr "" #: src/rs-actions.c:1532 msgid "Shutterspeed" msgstr "" #. Snapshot labels #: src/rs-actions.c:1537 src/rs-toolbox.c:207 src/rs-toolbox.c:1261 msgid " A " msgstr "" #: src/rs-actions.c:1538 src/rs-toolbox.c:208 src/rs-toolbox.c:1262 msgid " B " msgstr "" #: src/rs-actions.c:1539 src/rs-toolbox.c:209 src/rs-toolbox.c:1263 msgid " C " msgstr "" #: src/rs-batch.c:460 msgid "Cancel" msgstr "" #: src/rs-batch.c:465 msgid "Last image:" msgstr "" #: src/rs-batch.c:491 #, c-format msgid "Time left: %dh %dm %ds" msgstr "" #: src/rs-batch.c:492 #, c-format msgid "Processing Image %d/%d" msgstr "" #: src/rs-batch.c:496 msgid "Time left: ..." msgstr "" #: src/rs-batch.c:497 #, c-format msgid "Processing Image 1/%d." msgstr "" #: src/rs-batch.c:511 #, c-format msgid "Loading %s ..." msgstr "" #: src/rs-batch.c:587 #, c-format msgid "Saving %s ..." msgstr "" #: src/rs-batch.c:636 msgid "Could not export photo." msgstr "" #: src/rs-batch.c:696 msgid "Icon" msgstr "" #: src/rs-batch.c:703 msgid "Filename" msgstr "" #: src/rs-batch.c:710 msgid "Setting" msgstr "" #: src/rs-batch.c:803 msgid "Start" msgstr "" #: src/rs-batch.c:806 msgid "Remove" msgstr "" #: src/rs-batch.c:809 msgid "Remove all" msgstr "" #: src/rs-batch.c:919 src/rs-batch.c:1090 msgid "Edit output settings" msgstr "" #: src/rs-batch.c:955 msgid "Photo size" msgstr "" #: src/rs-batch.c:963 msgid "Constant scale" msgstr "" #: src/rs-batch.c:964 msgid "Constant width" msgstr "" #: src/rs-batch.c:965 msgid "Constant height" msgstr "" #: src/rs-batch.c:966 msgid "Maximum size" msgstr "" #: src/rs-batch.c:979 msgid "Photo width:" msgstr "" #: src/rs-batch.c:981 src/rs-batch.c:990 msgid "pixels" msgstr "" #: src/rs-batch.c:988 msgid "Photo height:" msgstr "" #: src/rs-batch.c:997 msgid "Photo scale:" msgstr "" #: src/rs-batch.c:999 msgid "%" msgstr "" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" #: src/rs-batch.c:1041 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" #: src/rs-batch.c:1045 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" #: src/rs-batch.c:1075 msgid "Output directory:" msgstr "" #: src/rs-batch.c:1099 msgid "Change" msgstr "" #: src/rs-batch.c:1104 msgid "Export dimensions" msgstr "" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "" #: src/rs-camera-db.c:459 msgid "Model" msgstr "" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "" #: src/rs-preview-widget.c:889 msgid "Light out mode not available" msgstr "" #: src/rs-preview-widget.c:890 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" #: src/rs-preview-widget.c:1126 msgid "Size" msgstr "" #: src/rs-preview-widget.c:1134 msgid "-" msgstr "" #: src/rs-preview-widget.c:1140 msgid "Grid" msgstr "" #: src/rs-preview-widget.c:1145 msgid "None" msgstr "" #: src/rs-preview-widget.c:1146 msgid "Golden sections" msgstr "" #: src/rs-preview-widget.c:1147 msgid "Rule of thirds" msgstr "" #: src/rs-preview-widget.c:1148 msgid "Golden triangles #1" msgstr "" #: src/rs-preview-widget.c:1149 msgid "Golden triangles #2" msgstr "" #: src/rs-preview-widget.c:1150 msgid "Harmonious triangles #1" msgstr "" #: src/rs-preview-widget.c:1151 msgid "Harmonious triangles #2" msgstr "" #: src/rs-preview-widget.c:1160 msgid "Aspect" msgstr "" #: src/rs-preview-widget.c:1165 msgid "Freeform" msgstr "" #: src/rs-preview-widget.c:1166 msgid "Original Aspect" msgstr "" #: src/rs-preview-widget.c:1167 msgid "ISO paper (A4)" msgstr "" #: src/rs-preview-widget.c:1168 msgid "3:2 (35mm)" msgstr "" #: src/rs-preview-widget.c:1169 msgid "4:3" msgstr "" #: src/rs-preview-widget.c:1170 msgid "10:8 (SXGA)" msgstr "" #: src/rs-preview-widget.c:1171 msgid "16:10 (Wide XGA)" msgstr "" #: src/rs-preview-widget.c:1172 msgid "16:9 (HDTV)" msgstr "" #: src/rs-preview-widget.c:1173 msgid "8:3 (Dualhead XGA)" msgstr "" #: src/rs-preview-widget.c:1174 msgid "1:1" msgstr "" #: src/rs-preview-widget.c:1175 msgid "Golden rectangle" msgstr "" #: src/rs-preview-widget.c:1183 src/rs-preview-widget.c:1194 msgid "Crop" msgstr "" #: src/rs-preview-widget.c:1185 msgid "Don't crop" msgstr "" #. Help text for cropping #: src/rs-preview-widget.c:1208 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" #: src/rs-preview-widget.c:1241 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:528 msgid "Export File" msgstr "" #: src/rs-save-dialog.c:282 msgid "File not saved!" msgstr "" #: src/rs-save-dialog.c:299 #, c-format msgid "Exporting to %s" msgstr "" #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "" #: src/rs-store.c:1371 msgid "* (-)" msgstr "" #: src/rs-store.c:1372 msgid "1 (-)" msgstr "" #: src/rs-store.c:1373 msgid "2 (-)" msgstr "" #: src/rs-store.c:1374 msgid "3 (-)" msgstr "" #: src/rs-store.c:1375 msgid "U (-)" msgstr "" #: src/rs-store.c:1376 msgid "D (-)" msgstr "" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "" #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "" #: src/rs-tethered-shooting.c:558 msgid "Could not open image!\n" msgstr "" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:938 msgid "Stop Shooting" msgstr "" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "" #: src/rs-tethered-shooting.c:1003 msgid "Take Photo" msgstr "" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "" #. Status window #: src/rs-tethered-shooting.c:1022 msgid "Status:" msgstr "" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 msgid "Filename & Tags" msgstr "" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "" #: src/rs-toolbox.c:449 msgid "Reset" msgstr "" #: src/rs-toolbox.c:450 msgid ". Click to reset value" msgstr "" #: src/rs-toolbox.c:456 msgid ". Click to edit value" msgstr "" #: src/rs-toolbox.c:572 src/rs-toolbox.c:711 msgid "Open curve ..." msgstr "" #: src/rs-toolbox.c:676 msgid "Select Saved Curve" msgstr "" #: src/rs-toolbox.c:706 msgid "Select Action" msgstr "" #: src/rs-toolbox.c:717 msgid "Save curve as ..." msgstr "" #: src/rs-toolbox.c:723 msgid "Reset curve" msgstr "" #: src/rs-toolbox.c:728 msgid "Auto adjust curve ends" msgstr "" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:789 msgid "Edit lens" msgstr "" #. Pack everything nice #: src/rs-toolbox.c:806 msgid "Basic" msgstr "" #: src/rs-toolbox.c:807 msgid "Channel Mixer" msgstr "" #: src/rs-toolbox.c:808 msgid "Lens Correction" msgstr "" #: src/rs-toolbox.c:853 msgid "Flip the photo over the x-axis" msgstr "" #: src/rs-toolbox.c:854 msgid "Mirror the photo over the y-axis" msgstr "" #: src/rs-toolbox.c:855 msgid "Rotate the photo 90 degrees clockwise" msgstr "" #: src/rs-toolbox.c:856 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "" #: src/rs-toolbox.c:868 msgid "Transforms" msgstr "" #: src/rs-toolbox.c:1042 msgid "Lens Unknown" msgstr "" #: src/rs-toolbox.c:1044 msgid "Lens Disabled" msgstr "" #: src/rs-toolbox.c:1052 msgid "No Lens Information" msgstr "" #: src/rs-toolbox.c:1054 msgid "Camera Unknown" msgstr "" #: src/rs-toolbox.c:1059 msgid "No Photo" msgstr "" #: src/rs-toolbox.c:1268 msgid "_Previous" msgstr "" #: src/rs-toolbox.c:1269 msgid "_Next" msgstr "" rawstudio-2.0/po/nl.po0000644000175000017500000013231311546425272011717 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # msgid "" msgstr "" "Project-Id-Version: Rawstudio 2.0\n" "Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org\n" "POT-Creation-Date: 2011-03-26 03:39+0100\n" "PO-Revision-Date: 2008-05-05 00:22+0100\n" "Last-Translator: O. Lavell \n" "Language-Team: Rawstudio development \n" "Language: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" #: librawstudio/rs-lens-db-editor.c:325 #, fuzzy msgid "All lenses" msgstr "Alle bestanden" #: librawstudio/rs-lens-db-editor.c:503 msgid "Error updating lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:505 msgid "Lensfun database updated" msgstr "" #: librawstudio/rs-lens-db-editor.c:565 #, fuzzy msgid "Rawstudio Lens Library" msgstr "Rawstudio" #: librawstudio/rs-lens-db-editor.c:590 #, fuzzy msgid "Lens make" msgstr "Laatste afbeelding:" #: librawstudio/rs-lens-db-editor.c:594 msgid "Lens model" msgstr "" #: librawstudio/rs-lens-db-editor.c:598 msgid "Focal" msgstr "" #: librawstudio/rs-lens-db-editor.c:602 librawstudio/rs-lens-db-editor.c:962 #: src/rs-actions.c:1506 msgid "Aperture" msgstr "" #: librawstudio/rs-lens-db-editor.c:606 #, fuzzy msgid "Camera make" msgstr "_Camera" #: librawstudio/rs-lens-db-editor.c:610 #, fuzzy msgid "Camera model" msgstr "_Camera" #: librawstudio/rs-lens-db-editor.c:614 msgid "Enabled" msgstr "" #: librawstudio/rs-lens-db-editor.c:650 msgid "Update lensfun database" msgstr "" #: librawstudio/rs-lens-db-editor.c:734 #, fuzzy msgid "Could not create temporary directory." msgstr "Kan foto niet openen" #: librawstudio/rs-lens-db-editor.c:747 #, c-format msgid "Could not fetch list of files from %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:787 #, c-format msgid "Could not fetch file from %s or write it to %s." msgstr "" #: librawstudio/rs-lens-db-editor.c:796 #, c-format msgid "Could not create datadir for lensfun - %s" msgstr "" #: librawstudio/rs-lens-db-editor.c:812 #, c-format msgid "Error copying file %s to %s\n" msgstr "" #: librawstudio/rs-lens-db-editor.c:939 #, fuzzy msgid "Rawstudio Lens Editor" msgstr "Rawstudio" #: librawstudio/rs-lens-db-editor.c:950 #, fuzzy msgid "Lens Make" msgstr "Laatste afbeelding:" #: librawstudio/rs-lens-db-editor.c:954 #, fuzzy msgid "Lens Model" msgstr "Laatste afbeelding:" #: librawstudio/rs-lens-db-editor.c:958 msgid "Focal Length" msgstr "" #: librawstudio/rs-lens-db-editor.c:966 #, fuzzy msgid "Camera Make" msgstr "_Camera" #: librawstudio/rs-lens-db-editor.c:970 #, fuzzy msgid "Camera Model" msgstr "_Camera" #: librawstudio/rs-lens-db-editor.c:995 msgid "Enable this lens" msgstr "" #: librawstudio/rs-lens-db-editor.c:998 msgid "Set lens" msgstr "" #. FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating #. GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); #. g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); #. gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); #: librawstudio/rs-lens-db-editor.c:1052 msgid "Lens Library" msgstr "" #: librawstudio/rs-library.c:254 #, fuzzy, c-format msgid "Could not open database %s" msgstr "Kan foto niet openen" #: librawstudio/rs-library.c:814 msgid "wideangle" msgstr "" #: librawstudio/rs-library.c:816 #, fuzzy msgid "telephoto" msgstr "Foto's verwijderen" #: librawstudio/rs-library.c:832 msgid "January" msgstr "" #: librawstudio/rs-library.c:835 msgid "February" msgstr "" #: librawstudio/rs-library.c:838 msgid "March" msgstr "" #: librawstudio/rs-library.c:841 msgid "April" msgstr "" #: librawstudio/rs-library.c:844 #, fuzzy msgid "May" msgstr "Mamiya" #: librawstudio/rs-library.c:847 msgid "June" msgstr "" #: librawstudio/rs-library.c:850 msgid "July" msgstr "" #: librawstudio/rs-library.c:853 msgid "August" msgstr "" #: librawstudio/rs-library.c:856 msgid "September" msgstr "" #: librawstudio/rs-library.c:859 msgid "October" msgstr "" #: librawstudio/rs-library.c:862 msgid "November" msgstr "" #: librawstudio/rs-library.c:865 msgid "December" msgstr "" #: librawstudio/rs-metadata.c:536 #, c-format msgid "%dmm " msgstr "%dmm " #: librawstudio/rs-metadata.c:538 #, c-format msgid "%.1fs " msgstr "%.1fs " #: librawstudio/rs-metadata.c:540 #, c-format msgid "1/%.0fs " msgstr "1/%.0fs " #: librawstudio/rs-metadata.c:542 #, c-format msgid "F/%.1f " msgstr "F/%.1f " #: librawstudio/rs-metadata.c:544 #, fuzzy, c-format msgid "ISO%d" msgstr "ISO%d" #: librawstudio/rs-profile-selector.c:238 msgid "Add profile ..." msgstr "" #: librawstudio/rs-profile-selector.c:242 #, fuzzy msgid "Embedded Profile" msgstr "Selecteer kleurprofiel" #: librawstudio/rs-profile-selector.c:244 #, fuzzy msgid "(Select Profile)" msgstr "Selecteer kleurprofiel" #. @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:80 #, fuzzy msgid "Expos" msgstr "Belichting" #: librawstudio/rs-settings.c:80 msgid "Exposure Compensation" msgstr "" #. @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:86 #, fuzzy msgid "Satur" msgstr "Verzadiging" #: librawstudio/rs-settings.c:86 src/rs-actions.c:465 msgid "Saturation" msgstr "Verzadiging" #. @TRANSLATORS: You cannot use more than 5 characters for "Hue" #: librawstudio/rs-settings.c:92 src/rs-actions.c:466 msgid "Hue" msgstr "Tint" #: librawstudio/rs-settings.c:92 msgid "Hue Shift" msgstr "" #. @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:98 #, fuzzy msgid "Contr" msgstr "Contrast" #: librawstudio/rs-settings.c:98 src/rs-actions.c:467 msgid "Contrast" msgstr "Contrast" #. @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temp" msgstr "" #: librawstudio/rs-settings.c:104 librawstudio/rs-settings.c:116 msgid "Temperature" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Tint" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint" msgstr "" #: librawstudio/rs-settings.c:110 librawstudio/rs-settings.c:122 msgid "Tint Shift" msgstr "" #: librawstudio/rs-settings.c:127 msgid "WBAscii" msgstr "" #. @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:133 #, fuzzy msgid "Sharp" msgstr "Verscherpen" #: librawstudio/rs-settings.c:133 #, fuzzy msgid "Sharpen Amount" msgstr "Verscherpen" #. @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:139 msgid "Denoi" msgstr "" #: librawstudio/rs-settings.c:139 msgid "Light Denoising" msgstr "" #. @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:145 msgid "ColDn" msgstr "" #: librawstudio/rs-settings.c:145 #, fuzzy msgid "Colour Denoising" msgstr "Kleuren" #. @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:151 msgid "CA R" msgstr "" #: librawstudio/rs-settings.c:151 msgid "Red Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:157 msgid "CA B" msgstr "" #: librawstudio/rs-settings.c:157 msgid "Blue Chromatic Aberration Correction" msgstr "" #. @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! #: librawstudio/rs-settings.c:163 msgid "Vign" msgstr "" #: librawstudio/rs-settings.c:163 #, fuzzy msgid "Vignetting Correction" msgstr "Instelling" #. @TRANSLATORS: You cannot use more than 5 characters for "Red" #: librawstudio/rs-settings.c:169 #, fuzzy msgid "Red" msgstr "Klaar" #: librawstudio/rs-settings.c:169 msgid "Red Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Green" #: librawstudio/rs-settings.c:175 msgid "Green" msgstr "" #: librawstudio/rs-settings.c:175 msgid "Green Amount Adjustment" msgstr "" #. @TRANSLATORS: You cannot use more than 5 characters for "Blue" #: librawstudio/rs-settings.c:181 msgid "Blue" msgstr "" #: librawstudio/rs-settings.c:181 msgid "Blue Amount Adjustment" msgstr "" #: plugins/colorspace-adobergb/colorspace-adobergb.c:62 msgid "Print friendly color space, compatible with Adobe RGB (1998)" msgstr "" #: plugins/colorspace-prophoto/colorspace-prophoto.c:62 msgid "Large gamut color space" msgstr "" #: plugins/output-facebook/output-facebook.c:106 #: plugins/output-flickr/output-flickr.c:106 #: plugins/output-jpegfile/output-jpegfile.c:95 #: plugins/output-picasa/output-picasa.c:100 #, fuzzy msgid "JPEG Quality" msgstr "JPEG-kwaliteit:" #: plugins/output-facebook/output-facebook.c:113 msgid "Caption" msgstr "" #: plugins/output-facebook/output-facebook.c:132 msgid "Upload photo to Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:257 #: plugins/output-flickr/output-flickr.c:381 msgid "Step 1:" msgstr "" #: plugins/output-facebook/output-facebook.c:258 #: plugins/output-flickr/output-flickr.c:382 msgid "Step 2:" msgstr "" #: plugins/output-facebook/output-facebook.c:260 #: plugins/output-flickr/output-flickr.c:384 msgid "Authenticate Rawstudio" msgstr "" #: plugins/output-facebook/output-facebook.c:303 msgid "Unhandled error from Facebook" msgstr "" #: plugins/output-facebook/output-facebook.c:329 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Facebook account." msgstr "" #: plugins/output-facebook/output-facebook.c:471 #: plugins/output-picasa/output-picasa.c:366 msgid "Albums" msgstr "" #: plugins/output-facebook/output-facebook.c:474 #: plugins/output-picasa/output-picasa.c:369 msgid "Create album" msgstr "" #: plugins/output-flickr/output-flickr.c:113 #, fuzzy msgid "Title" msgstr "_Bestand" #: plugins/output-flickr/output-flickr.c:121 msgid "Description" msgstr "" #: plugins/output-flickr/output-flickr.c:127 msgid "Tags" msgstr "" #: plugins/output-flickr/output-flickr.c:134 msgid "Public (everyone can see this)" msgstr "" #: plugins/output-flickr/output-flickr.c:140 msgid "Visible to Friends" msgstr "" #: plugins/output-flickr/output-flickr.c:146 msgid "Visible to Family" msgstr "" #: plugins/output-flickr/output-flickr.c:157 msgid "Upload photo to Flickr" msgstr "" #: plugins/output-flickr/output-flickr.c:303 msgid "We recieved an error during authentication. Please try again." msgstr "" #: plugins/output-flickr/output-flickr.c:306 msgid "" "Rawstudio were not able to upload the photo cause the authentication has " "been revoked. Please re-authenticate Rawstudio to upload to Flickr." msgstr "" #: plugins/output-flickr/output-flickr.c:309 msgid "" "It seems like rawstudio lost its authentication to upload to your account, " "please re-authenticate." msgstr "" #: plugins/output-flickr/output-flickr.c:313 #, c-format msgid "" "%s\n" "\n" "Note: This error isn't catched by Rawstudio. Please let us know that you " "found it and how to reproduce it so we can make a more useful errormessage. " "Thanks!" msgstr "" #: plugins/output-flickr/output-flickr.c:315 msgid "Flickr error" msgstr "" #: plugins/output-flickr/output-flickr.c:374 msgid "" "Rawstudio needs to be authenticated before it will be able to upload photos " "to your Flickr account." msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:89 #: plugins/output-pngfile/output-pngfile.c:80 #: plugins/output-tifffile/output-tifffile.c:79 #, fuzzy msgid "Full export path" msgstr "Bestand geëxporteerd" #: plugins/output-jpegfile/output-jpegfile.c:101 #: plugins/output-pngfile/output-pngfile.c:85 #: plugins/output-tifffile/output-tifffile.c:102 msgid "Color space used for saving" msgstr "" #: plugins/output-jpegfile/output-jpegfile.c:107 #: plugins/output-tifffile/output-tifffile.c:96 #, fuzzy msgid "Copy EXIF metadata" msgstr "Geen metagegevens" #: plugins/output-jpegfile/output-jpegfile.c:113 msgid "JPEG (Joint Photographic Experts Group)" msgstr "JPEG (Joint Photographic Experts Group)" #: plugins/output-picasa/output-picasa.c:119 msgid "Retain EXIF metadata" msgstr "" #: plugins/output-picasa/output-picasa.c:123 msgid "Upload photo to Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:196 msgid "Unhandled error from Picasa" msgstr "" #: plugins/output-picasa/output-picasa.c:286 #: plugins/output-picasa/output-picasa.c:288 msgid "Current User: " msgstr "" #: plugins/output-picasa/output-picasa.c:286 msgid " (Logged in succesfully)" msgstr "" #: plugins/output-picasa/output-picasa.c:288 msgid " (Cannot log in)" msgstr "" #: plugins/output-picasa/output-picasa.c:293 msgid "(No user entered)" msgstr "" #: plugins/output-picasa/output-picasa.c:382 msgid "Switch User" msgstr "" #. Cancel pressed, or no info entered #: plugins/output-picasa/rs-picasa-client.c:53 #, c-format msgid "Cannot log in" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:165 msgid "Retry Operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:171 msgid "An error was returned when communicating with the Picasa web service:" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:179 msgid "Would you like to Retry the operation?" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:221 msgid "Picasa Webalbum Authentification" msgstr "" #: plugins/output-picasa/rs-picasa-client.c:227 msgid "Please type in your username and password for Picasa Web Albums." msgstr "" #: plugins/output-picasa/rs-picasa-client.c:234 #, fuzzy msgid "Username: " msgstr "Bestandsnaam:" #: plugins/output-picasa/rs-picasa-client.c:235 msgid "Password: " msgstr "" #: plugins/output-pngfile/output-pngfile.c:90 msgid "Save 16 bit linear PNG" msgstr "" #: plugins/output-pngfile/output-pngfile.c:95 msgid "Copy EXIF metadata to XMP" msgstr "" #: plugins/output-pngfile/output-pngfile.c:101 msgid "PNG (Portable Network Graphics)" msgstr "PNG (Portable Network Graphics)" #: plugins/output-tifffile/output-tifffile.c:85 msgid "Save uncompressed TIFF" msgstr "Ongecomprimeerde TIFF opslaan" #: plugins/output-tifffile/output-tifffile.c:91 msgid "Save 16 bit TIFF" msgstr "" #: plugins/output-tifffile/output-tifffile.c:108 #, fuzzy msgid "TIFF (Tagged Image File Format)" msgstr "8-bit TIFF (Tagged Image File Format)" #: src/filename.c:314 #, c-format msgid "%f - Original filename" msgstr "%f - Originele bestandsnaam" #: src/filename.c:315 #, fuzzy, c-format msgid "%p - Path of original file" msgstr "%f - Originele bestandsnaam" #: src/filename.c:316 #, c-format msgid "%2c - Incremental counter" msgstr "%2c - Oplopende teller" #: src/filename.c:317 #, c-format msgid "%s - Setting id (A, B or C)" msgstr "" #: src/filename.c:318 #, c-format msgid "%d - Date from EXIF (YYYY-MM-DD)" msgstr "" #: src/filename.c:319 msgid "%DY - Year from EXIF (YYYY)" msgstr "" #: src/filename.c:320 msgid "%Dy - Year from EXIF (YY)" msgstr "" #: src/filename.c:321 msgid "%Dm - Month from EXIF (MM)" msgstr "" #: src/filename.c:322 msgid "%DM - Month from EXIF (Text)" msgstr "" #: src/filename.c:323 msgid "%Dd - Date from EXIF (DD)" msgstr "" #: src/filename.c:324 msgid "%DD - Day of week from EXIF" msgstr "" #: src/filename.c:325 msgid "%t - Time from EXIF (HH:MM:SS)" msgstr "" #: src/gtk-interface.c:154 #, fuzzy msgid "Width" msgstr "Breedte:" #: src/gtk-interface.c:154 #, fuzzy msgid "Height" msgstr "Hoogte:" #: src/gtk-interface.c:225 msgid "Opening photo ..." msgstr "Foto openen..." #: src/gtk-interface.c:249 msgid "Couldn't open photo" msgstr "Kan foto niet openen" #: src/gtk-interface.c:254 msgid "Image opened" msgstr "Afbeelding geopend" #: src/gtk-interface.c:330 #, c-format msgid "Changed photo priority (*)" msgstr "" #: src/gtk-interface.c:332 #, c-format msgid "Changed photo priority (D)" msgstr "" #: src/gtk-interface.c:334 #, c-format msgid "Changed photo priority (%d)" msgstr "" #: src/gtk-interface.c:424 msgid "Unable to locate screen for fullscreen preview" msgstr "" #. Add something to the preview area #: src/gtk-interface.c:444 msgid "Press F10 to return preview to this window" msgstr "" #: src/gtk-interface.c:577 msgid "Unable to detect more than one monitor. Cannot open fullscreen preview" msgstr "" #: src/gtk-interface.c:593 msgid "Select screen to open fullscreen preview" msgstr "" #: src/gtk-interface.c:609 msgid "Select Screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:618 msgid "Select OK to use this screen for fullscreen preview" msgstr "" #: src/gtk-interface.c:775 msgid "Directory:" msgstr "Map:" #: src/gtk-interface.c:777 src/rs-batch.c:1064 msgid "Choose output directory" msgstr "" #: src/gtk-interface.c:793 src/rs-batch.c:1075 src/rs-tethered-shooting.c:1044 msgid "Filename template:" msgstr "" #: src/gtk-interface.c:806 src/rs-tethered-shooting.c:1057 msgid "Filename example:" msgstr "Bestandsnaam voorbeeld:" #: src/gtk-interface.c:817 msgid "File type:" msgstr "Bestandstype:" #. Add preferences box #: src/gtk-interface.c:879 src/rs-tethered-shooting.c:1130 msgid "Preferences" msgstr "Voorkeuren" #: src/gtk-interface.c:892 msgid "Preview background color:" msgstr "Voorbeeld achtergrondkleur:" #: src/gtk-interface.c:907 msgid "Histogram height:" msgstr "Hoogte histogram:" #: src/gtk-interface.c:917 msgid "Use system theme" msgstr "Gebruik systeemthema" #: src/gtk-interface.c:922 msgid "Place cache in home directory" msgstr "Cache in persoonlijke map plaatsen" #: src/gtk-interface.c:926 #, fuzzy msgid "Display Colorspace:" msgstr "Weergaveprofiel" #: src/gtk-interface.c:938 msgid "Exposure Mask Colorspace:" msgstr "" #: src/gtk-interface.c:1011 msgid "General" msgstr "Algemeen" #. gtk_notebook_append_page(GTK_NOTEBOOK(notebook), batch_page, gtk_label_new(_("Batch"))); #: src/gtk-interface.c:1013 msgid "Quick export" msgstr "Snelle export" #: src/gtk-interface.c:1333 msgid "Opening directory..." msgstr "Map openen..." #: src/gtk-interface.c:1360 msgid "Rawstudio" msgstr "Rawstudio" #: src/gtk-interface.c:1457 msgid "Open recursive" msgstr "Recursief openen" #: src/gtk-interface.c:1465 #, fuzzy msgid "Directory" msgstr "Map:" #: src/gtk-interface.c:1468 msgid "Tag search" msgstr "" #: src/gtk-interface.c:1474 msgid "Tools" msgstr "Gereedschappen" #: src/gtk-interface.c:1475 msgid "Batch" msgstr "Batch" #: src/gtk-interface.c:1476 msgid "Open" msgstr "Openen" #: src/gtk-interface.c:1518 msgid "Ready" msgstr "Klaar" #: src/gtk-progress.c:63 src/gtk-progress.c:100 src/gtk-progress.c:123 msgid "Progress" msgstr "Voortgang" #: src/rs-actions.c:173 msgid "Open directory" msgstr "" #: src/rs-actions.c:253 src/rs-batch.c:542 msgid "Could not create output directory." msgstr "" #: src/rs-actions.c:257 #, fuzzy msgid "Exporting..." msgstr "Bestand exporteren..." #: src/rs-actions.c:265 msgid "File exported" msgstr "Bestand geëxporteerd" #: src/rs-actions.c:270 src/rs-actions.c:293 #, fuzzy msgid "Export failed" msgstr "Bestand exporteren" #: src/rs-actions.c:300 #, fuzzy msgid "Exporting to GIMP..." msgstr "Bestand exporteren..." #: src/rs-actions.c:305 msgid "Error exporting" msgstr "" #: src/rs-actions.c:306 msgid "Error exporting photo to gimp." msgstr "" #: src/rs-actions.c:331 src/rs-actions.c:349 msgid "Deleting photos" msgstr "Foto's verwijderen" #: src/rs-actions.c:332 msgid "Your files will be permanently deleted!" msgstr "Bestanden zullen definitief verwijderd worden!" #: src/rs-actions.c:334 msgid "Delete photos" msgstr "Foto's verwijderen" #: src/rs-actions.c:401 msgid "Waiting for jobs to finish" msgstr "" #: src/rs-actions.c:420 msgid "Copying image to clipboard" msgstr "" #: src/rs-actions.c:425 msgid "Image copied to clipboard" msgstr "" #: src/rs-actions.c:427 msgid "ERROR: Could not copy image to clipboard" msgstr "" #. Build GUI #: src/rs-actions.c:463 #, fuzzy msgid "Profile" msgstr "Alle bestanden" #: src/rs-actions.c:464 msgid "Exposure" msgstr "Belichting" #: src/rs-actions.c:468 msgid "White balance" msgstr "Witbalans" #: src/rs-actions.c:469 msgid "Sharpen" msgstr "Verscherpen" #: src/rs-actions.c:470 msgid "Denoise" msgstr "" #: src/rs-actions.c:471 #, fuzzy msgid "Color denoise" msgstr "Kleuren" #: src/rs-actions.c:472 msgid "Channel mixer" msgstr "" #: src/rs-actions.c:473 msgid "TCA" msgstr "" #: src/rs-actions.c:474 #, fuzzy msgid "Vignetting" msgstr "Instelling" #: src/rs-actions.c:475 src/rs-toolbox.c:803 msgid "Curve" msgstr "Curve" #: src/rs-actions.c:476 msgid "Select All/None" msgstr "" #: src/rs-actions.c:498 #, fuzzy msgid "Select settings to copy" msgstr "Selecteer instellingen om te plakken" #: src/rs-actions.c:577 msgid "Copied settings" msgstr "Gekopieerde instellingen" #: src/rs-actions.c:587 #, fuzzy msgid "Pasting settings to images" msgstr "Instellingen _plakken" #: src/rs-actions.c:657 msgid "Pasted settings" msgstr "" #: src/rs-actions.c:660 msgid "Nothing to paste" msgstr "Niets te plakken" #: src/rs-actions.c:663 msgid "Buffer empty" msgstr "" #: src/rs-actions.c:773 msgid "Adjusting to auto white balance" msgstr "Aanpassen naar automatische witbalans" #: src/rs-actions.c:788 msgid "No white balance to set from" msgstr "" #: src/rs-actions.c:791 msgid "Adjusting to camera white balance" msgstr "Aanpassen naar camera witbalans" #: src/rs-actions.c:926 msgid "Tags, separated by spaces:" msgstr "" #: src/rs-actions.c:931 msgid "Add tags to selected photo(s)." msgstr "" #: src/rs-actions.c:1038 msgid "Showing exposure mask" msgstr "" #: src/rs-actions.c:1040 msgid "Hiding exposure mask" msgstr "" #: src/rs-actions.c:1067 #, fuzzy msgid "Adding images to batch queue" msgstr "_Toevoegen aan batch-rij" #: src/rs-actions.c:1084 src/rs-actions.c:1167 #, c-format msgid "%d photos added to batch queue" msgstr "" #: src/rs-actions.c:1101 src/rs-batch.c:209 msgid "A" msgstr "A" #: src/rs-actions.c:1102 src/rs-batch.c:212 msgid "B" msgstr "B" #: src/rs-actions.c:1103 src/rs-batch.c:215 msgid "C" msgstr "C" #: src/rs-actions.c:1125 msgid "" "Select which settings to\n" "add to batch queue" msgstr "" #: src/rs-actions.c:1188 msgid "Removing images from batch queue" msgstr "" #: src/rs-actions.c:1203 #, fuzzy, c-format msgid "%d photos removed from batch queue" msgstr "_Toevoegen aan batch-rij" #. Not in any menu (yet) #: src/rs-actions.c:1254 src/rs-actions.c:1481 msgid "Add Profile ..." msgstr "" #: src/rs-actions.c:1266 #, fuzzy msgid "All Profiles" msgstr "Alle bestanden" #: src/rs-actions.c:1276 msgid "Camera Profiles (DCP)" msgstr "" #: src/rs-actions.c:1282 #, fuzzy msgid "Color Profiles (ICC and ICM)" msgstr "Kleurprofielen (ICC en ICM)" #: src/rs-actions.c:1289 msgid "All files" msgstr "Alle bestanden" #: src/rs-actions.c:1375 msgid "A raw image converter for GTK+/GNOME" msgstr "" #: src/rs-actions.c:1412 msgid "_File" msgstr "_Bestand" #: src/rs-actions.c:1413 msgid "_Edit" msgstr "Be_werken" #: src/rs-actions.c:1414 msgid "_Photo" msgstr "_Foto" #: src/rs-actions.c:1415 msgid "_Set Priority" msgstr "_Prioriteit instellen" #: src/rs-actions.c:1416 msgid "_White Balance" msgstr "_Witbalans" #: src/rs-actions.c:1417 msgid "_View" msgstr "_Weergave" #: src/rs-actions.c:1418 msgid "_Sort by" msgstr "" #: src/rs-actions.c:1419 msgid "_Batch" msgstr "_Batch" #: src/rs-actions.c:1420 msgid "_Help" msgstr "_Help" #: src/rs-actions.c:1422 msgid "_Snapshot" msgstr "" #. File menu #: src/rs-actions.c:1425 msgid "_Open Directory" msgstr "Map _openen" #: src/rs-actions.c:1426 msgid "_Quick Export" msgstr "_Vlugge export" #: src/rs-actions.c:1427 msgid "_Export As" msgstr "_Exporteer als..." #: src/rs-actions.c:1428 msgid "_Export to Gimp" msgstr "_Exporteer naar Gimp" #: src/rs-actions.c:1429 msgid "_Copy Image to Clipboard" msgstr "" #: src/rs-actions.c:1430 msgid "_Reload directory" msgstr "Map _herladen" #: src/rs-actions.c:1431 msgid "_Delete flagged photos" msgstr "_Verwijder gemarkeerde foto's" #: src/rs-actions.c:1432 msgid "_Quit" msgstr "_Afsluiten" #. Edit menu #: src/rs-actions.c:1435 msgid "_Revert settings" msgstr "Instellingen _herstellen" #: src/rs-actions.c:1436 msgid "_Copy settings" msgstr "Instellingen _kopiëren" #: src/rs-actions.c:1437 msgid "_Paste settings" msgstr "Instellingen _plakken" #: src/rs-actions.c:1438 msgid "_Reset settings" msgstr "Instellingen _ongedaan maken" #: src/rs-actions.c:1439 #, fuzzy msgid "_Save camera default settings" msgstr "Instellingen _ongedaan maken" #: src/rs-actions.c:1440 msgid "_Preferences" msgstr "_Voorkeuren" #. Photo menu #: src/rs-actions.c:1443 msgid "_Flag photo for deletion" msgstr "_Markeer voor verwijderen" #: src/rs-actions.c:1444 msgid "_1" msgstr "_1" #: src/rs-actions.c:1445 msgid "_2" msgstr "_2" #: src/rs-actions.c:1446 msgid "_3" msgstr "_3" #: src/rs-actions.c:1447 msgid "_Remove priority" msgstr "_Verwijder prioriteit" #: src/rs-actions.c:1448 msgid "_Auto" msgstr "_Auto" #: src/rs-actions.c:1449 msgid "_Camera" msgstr "_Camera" #: src/rs-actions.c:1450 msgid "_Crop" msgstr "_Snijden" #: src/rs-actions.c:1451 msgid "_Uncrop" msgstr "Snijden ongedaan maken" #: src/rs-actions.c:1452 msgid "_Straighten" msgstr "_Rechtzetten" #: src/rs-actions.c:1453 msgid "_Unstraighten" msgstr "Rechtzetten ongedaan maken" #: src/rs-actions.c:1454 msgid "_Group" msgstr "_Groeperen" #: src/rs-actions.c:1455 msgid "_Ungroup" msgstr "Groeperen ongedaan maken" #: src/rs-actions.c:1456 #, fuzzy msgid "_Auto group" msgstr "Groeperen ongedaan maken" #: src/rs-actions.c:1457 #, fuzzy msgid "_Tag Photo..." msgstr "_Foto" #: src/rs-actions.c:1458 msgid "Rotate Clockwise" msgstr "" #: src/rs-actions.c:1459 #, fuzzy msgid "Rotate Counter Clockwise" msgstr "90 graden roteren" #: src/rs-actions.c:1460 msgid "Flip" msgstr "" #: src/rs-actions.c:1461 msgid "Mirror" msgstr "" #. View menu #: src/rs-actions.c:1464 msgid "_Previous photo" msgstr "_Vorige foto" #: src/rs-actions.c:1465 msgid "_Next Photo" msgstr "V_olgende foto" #: src/rs-actions.c:1466 msgid "_Lens Library" msgstr "" #: src/rs-actions.c:1467 msgid "_Tethered Shooting" msgstr "" #. Batch menu #: src/rs-actions.c:1470 msgid "_Add to batch queue" msgstr "_Toevoegen aan batch-rij" #: src/rs-actions.c:1471 #, fuzzy msgid "_Add view to queue..." msgstr "_Toevoegen aan batch-rij" #: src/rs-actions.c:1472 msgid "_Remove from batch queue" msgstr "" #: src/rs-actions.c:1473 msgid "_Start" msgstr "_Start" #. help menu #: src/rs-actions.c:1476 msgid "_Online Documentation" msgstr "" #: src/rs-actions.c:1477 msgid "_About" msgstr "_Info..." #: src/rs-actions.c:1486 msgid "_Zoom to fit" msgstr "_Inpassen" #: src/rs-actions.c:1487 msgid "_Iconbox" msgstr "_Miniaturen" #: src/rs-actions.c:1488 msgid "_Toolbox" msgstr "_Gereedschappen" #: src/rs-actions.c:1489 msgid "_Fullscreen" msgstr "_Volledig scherm" #: src/rs-actions.c:1490 msgid "_Show Photo On Secondary Monitor" msgstr "" #: src/rs-actions.c:1491 #, fuzzy msgid "Show Filenames in Iconbox" msgstr "Bestandsnamen in pictogramweergave tonen" #: src/rs-actions.c:1492 msgid "Load non-RAW images" msgstr "" #: src/rs-actions.c:1493 msgid "Do not Load Selected Images" msgstr "" #: src/rs-actions.c:1494 msgid "_Exposure mask" msgstr "" #: src/rs-actions.c:1495 msgid "_Split" msgstr "_Splitsen" #: src/rs-actions.c:1497 msgid "_Lights out" msgstr "" #: src/rs-actions.c:1503 msgid "Name" msgstr "" #: src/rs-actions.c:1504 msgid "Timestamp" msgstr "" #: src/rs-actions.c:1505 #, fuzzy msgid "ISO" msgstr "ISO%d" #: src/rs-actions.c:1507 msgid "Focallength" msgstr "" #: src/rs-actions.c:1508 msgid "Shutterspeed" msgstr "" #. Snapshot labels #: src/rs-actions.c:1513 src/rs-toolbox.c:207 src/rs-toolbox.c:1252 msgid " A " msgstr " A " #: src/rs-actions.c:1514 src/rs-toolbox.c:208 src/rs-toolbox.c:1253 msgid " B " msgstr " B " #: src/rs-actions.c:1515 src/rs-toolbox.c:209 src/rs-toolbox.c:1254 msgid " C " msgstr " C " #: src/rs-batch.c:459 msgid "Cancel" msgstr "Annuleren" #: src/rs-batch.c:464 msgid "Last image:" msgstr "Laatste afbeelding:" #: src/rs-batch.c:490 #, c-format msgid "Time left: %dh %dm %ds" msgstr "Tijd over: %dh %dm %ds" #: src/rs-batch.c:491 #, c-format msgid "Processing Image %d/%d" msgstr "" #: src/rs-batch.c:495 msgid "Time left: ..." msgstr "Tijd over: ..." #: src/rs-batch.c:496 #, c-format msgid "Processing Image 1/%d." msgstr "" #: src/rs-batch.c:510 #, c-format msgid "Loading %s ..." msgstr "Laden %s ..." #: src/rs-batch.c:586 #, c-format msgid "Saving %s ..." msgstr "Bewaren %s ..." #: src/rs-batch.c:635 #, fuzzy msgid "Could not export photo." msgstr "Kan foto niet openen" #: src/rs-batch.c:695 msgid "Icon" msgstr "Pictogram" #: src/rs-batch.c:702 msgid "Filename" msgstr "Bestandsnaam" #: src/rs-batch.c:709 msgid "Setting" msgstr "Instelling" #: src/rs-batch.c:802 msgid "Start" msgstr "Start" #: src/rs-batch.c:805 msgid "Remove" msgstr "Verwijderen" #: src/rs-batch.c:808 msgid "Remove all" msgstr "Alles verwijderen" #: src/rs-batch.c:916 src/rs-batch.c:1091 #, fuzzy msgid "Edit output settings" msgstr "Instellingen _kopiëren" #: src/rs-batch.c:952 msgid "Photo size" msgstr "Afbeeldingsgrootte" #: src/rs-batch.c:960 msgid "Constant scale" msgstr "" #: src/rs-batch.c:961 msgid "Constant width" msgstr "" #: src/rs-batch.c:962 msgid "Constant height" msgstr "" #: src/rs-batch.c:963 msgid "Maximum size" msgstr "" #: src/rs-batch.c:976 msgid "Photo width:" msgstr "" #: src/rs-batch.c:978 src/rs-batch.c:987 msgid "pixels" msgstr "pixels" #: src/rs-batch.c:985 msgid "Photo height:" msgstr "" #: src/rs-batch.c:994 msgid "Photo scale:" msgstr "" #: src/rs-batch.c:996 msgid "%" msgstr "%" #: src/rs-batch.c:1032 #, c-format msgid "" "Constant width:\n" "%d" msgstr "" #: src/rs-batch.c:1035 #, c-format msgid "" "Constant height:\n" "%d" msgstr "" #: src/rs-batch.c:1038 #, c-format msgid "" "Constant Scale:\n" "%d" msgstr "" #: src/rs-batch.c:1042 #, c-format msgid "" "Maximum size:\n" "%d x %d" msgstr "" #: src/rs-batch.c:1071 msgid "Output directory:" msgstr "" #: src/rs-batch.c:1100 msgid "Change" msgstr "" #: src/rs-batch.c:1105 msgid "Export dimensions" msgstr "" #: src/rs-camera-db.c:437 msgid "Camera defaults editor" msgstr "" #: src/rs-camera-db.c:459 msgid "Model" msgstr "" #: src/rs-preview-widget.c:587 msgid "Display Navigation" msgstr "" #: src/rs-preview-widget.c:886 msgid "Light out mode not available" msgstr "" #: src/rs-preview-widget.c:887 msgid "" "Your setup doesn't seem to support RGBA visuals and/or compositing. Consult " "your operating system manual for enabling RGBA visuals and compositing." msgstr "" #: src/rs-preview-widget.c:1123 msgid "Size" msgstr "Grootte" #: src/rs-preview-widget.c:1131 msgid "-" msgstr "-" #: src/rs-preview-widget.c:1137 msgid "Grid" msgstr "Raster" #: src/rs-preview-widget.c:1142 msgid "None" msgstr "Geen" #: src/rs-preview-widget.c:1143 msgid "Golden sections" msgstr "" #: src/rs-preview-widget.c:1144 msgid "Rule of thirds" msgstr "" #: src/rs-preview-widget.c:1145 msgid "Golden triangles #1" msgstr "" #: src/rs-preview-widget.c:1146 msgid "Golden triangles #2" msgstr "" #: src/rs-preview-widget.c:1147 msgid "Harmonious triangles #1" msgstr "" #: src/rs-preview-widget.c:1148 msgid "Harmonious triangles #2" msgstr "" #: src/rs-preview-widget.c:1157 msgid "Aspect" msgstr "" #: src/rs-preview-widget.c:1162 msgid "Freeform" msgstr "" #: src/rs-preview-widget.c:1163 msgid "Original Aspect" msgstr "" #: src/rs-preview-widget.c:1164 msgid "ISO paper (A4)" msgstr "" #: src/rs-preview-widget.c:1165 msgid "3:2 (35mm)" msgstr "3:2 (35mm)" #: src/rs-preview-widget.c:1166 msgid "4:3" msgstr "4:3" #: src/rs-preview-widget.c:1167 msgid "10:8 (SXGA)" msgstr "10:8 (SXGA)" #: src/rs-preview-widget.c:1168 msgid "16:10 (Wide XGA)" msgstr "16:10 (Wide XGA)" #: src/rs-preview-widget.c:1169 msgid "16:9 (HDTV)" msgstr "" #: src/rs-preview-widget.c:1170 msgid "8:3 (Dualhead XGA)" msgstr "8:3 (Dualhead XGA)" #: src/rs-preview-widget.c:1171 msgid "1:1" msgstr "1:1" #: src/rs-preview-widget.c:1172 msgid "Golden rectangle" msgstr "" #: src/rs-preview-widget.c:1180 src/rs-preview-widget.c:1191 msgid "Crop" msgstr "" #: src/rs-preview-widget.c:1182 msgid "Don't crop" msgstr "" #. Help text for cropping #: src/rs-preview-widget.c:1205 msgid "" "Crop: Drag to select cropped area. Right Mouse Button inside cropped area: " "Apply Crop; Outside: Cancel crop" msgstr "" #: src/rs-preview-widget.c:1238 msgid "" "Straighten: Draw a line in the image that should be horizontal or vertical. " "Right Mouse Button cancels." msgstr "" #. FIXME: Calculate some sensible size - maybe even remember user resizes #: src/rs-save-dialog.c:98 src/rs-toolbox.c:522 msgid "Export File" msgstr "Bestand exporteren" #: src/rs-save-dialog.c:282 #, fuzzy msgid "File not saved!" msgstr "Bestand geëxporteerd" #: src/rs-save-dialog.c:299 #, fuzzy, c-format msgid "Exporting to %s" msgstr "Bestand exporteren..." #: src/rs-save-dialog.c:357 #, c-format msgid "" "Could not save file: %s\n" "\n" "Check that you have write permissions to this folder." msgstr "" #: src/rs-save-dialog.c:383 msgid "Overwrite File?" msgstr "" #: src/rs-save-dialog.c:384 #, c-format msgid "" "The file '%s' already exists.\n" "\n" "Do you want to overwrite the file?" msgstr "" #: src/rs-save-dialog.c:497 msgid "Keep aspect" msgstr "Verhoudingen behouden" #: src/rs-save-dialog.c:515 msgid "Width:" msgstr "Breedte:" #: src/rs-save-dialog.c:517 msgid "Height:" msgstr "Hoogte:" #: src/rs-save-dialog.c:519 msgid "Percent:" msgstr "Percentage:" #. All #: src/rs-store.c:298 src/rs-store.c:955 #, c-format msgid "* (%d)" msgstr "* (%d)" #: src/rs-store.c:299 msgid "All photos (excluding deleted)" msgstr "" #. 1 #: src/rs-store.c:302 src/rs-store.c:956 #, c-format msgid "1 (%d)" msgstr "1 (%d)" #: src/rs-store.c:303 msgid "Priority 1 photos" msgstr "" #. 2 #: src/rs-store.c:306 src/rs-store.c:957 #, c-format msgid "2 (%d)" msgstr "2 (%d)" #: src/rs-store.c:307 msgid "Priority 2 photos" msgstr "" #. 3 #: src/rs-store.c:310 src/rs-store.c:958 #, c-format msgid "3 (%d)" msgstr "3 (%d)" #: src/rs-store.c:311 msgid "Priority 3 photos" msgstr "" #. Unsorted #: src/rs-store.c:314 src/rs-store.c:959 #, c-format msgid "U (%d)" msgstr "U (%d)" #: src/rs-store.c:315 msgid "Unprioritized photos" msgstr "" #. Deleted #: src/rs-store.c:318 src/rs-store.c:960 #, c-format msgid "D (%d)" msgstr "D (%d)" #: src/rs-store.c:319 msgid "Deleted photos" msgstr "Verwijderde foto's" #. Due to popular demand, I will now add a very nice GTK+ label to the left #. of the notebook. We hope this will give our users an even better #. understanding of our interface. I was thinking about adding a button instead #. that said "ROCK ON!" to instantly play "AC/DC - Highway to Hell", but I #. believe this will be better for the end user #: src/rs-store.c:354 msgid "Priorities" msgstr "Prioriteiten" #: src/rs-store.c:500 msgid "" "NOTE: Iconview Update Disabled. New files will not be loaded! Press " "to re-enable." msgstr "" #: src/rs-store.c:630 #, c-format msgid "" "%s\n" "\n" msgstr "" #: src/rs-store.c:633 #, c-format msgid "Make: %s\n" msgstr "" #: src/rs-store.c:635 #, c-format msgid "Model: %s\n" msgstr "" #: src/rs-store.c:638 #, c-format msgid "Focal length: %dmm\n" msgstr "" #: src/rs-store.c:641 #, c-format msgid "Shutter speed: %.1fs\n" msgstr "" #: src/rs-store.c:643 #, c-format msgid "Shutter speed: 1/%.0fs\n" msgstr "" #: src/rs-store.c:646 #, c-format msgid "Aperture: F/%.01f\n" msgstr "" #: src/rs-store.c:649 #, c-format msgid "ISO: %u\n" msgstr "" #: src/rs-store.c:652 #, c-format msgid "Time: %s" msgstr "" #: src/rs-store.c:1371 #, fuzzy msgid "* (-)" msgstr "* (%d)" #: src/rs-store.c:1372 #, fuzzy msgid "1 (-)" msgstr "1 (%d)" #: src/rs-store.c:1373 #, fuzzy msgid "2 (-)" msgstr "2 (%d)" #: src/rs-store.c:1374 #, fuzzy msgid "3 (-)" msgstr "3 (%d)" #: src/rs-store.c:1375 #, fuzzy msgid "U (-)" msgstr "U (%d)" #: src/rs-store.c:1376 #, fuzzy msgid "D (-)" msgstr "D (%d)" #: src/rs-tag-gui.c:65 #, c-format msgid "Tag search [%s]" msgstr "" #: src/rs-tethered-shooting.c:122 msgid "Gphoto2 reported Context Error:\n" msgstr "" #: src/rs-tethered-shooting.c:272 #, c-format msgid "" "ERROR: Gphoto2 returned error value %d\n" "Error message is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:326 msgid "Enabling capture mode for Canon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:350 msgid "Enabling capture mode for Nikon cameras.\n" msgstr "" #: src/rs-tethered-shooting.c:357 msgid "Capture Enabled.\n" msgstr "" #: src/rs-tethered-shooting.c:391 #, c-format msgid "The port you specified ('%s') can not be found." msgstr "" #: src/rs-tethered-shooting.c:455 msgid "Moving file to current directory failed!\n" msgstr "" #: src/rs-tethered-shooting.c:480 msgid "Downloading and adding image.\n" msgstr "" #: src/rs-tethered-shooting.c:493 msgid "Could not open temporary file on disk for writing" msgstr "" #: src/rs-tethered-shooting.c:558 #, fuzzy msgid "Could not open image!\n" msgstr "Kan foto niet openen" #: src/rs-tethered-shooting.c:579 msgid "Capturing.\n" msgstr "" #: src/rs-tethered-shooting.c:614 #, c-format msgid "" "Monitor recieved error %d, while waiting for camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:625 #, c-format msgid "" "Recieved error %d, while downloading image from camera.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:629 msgid "File Downloaded Succesfully.\n" msgstr "" #: src/rs-tethered-shooting.c:633 msgid "Camera monitor shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:651 src/rs-tethered-shooting.c:824 #, c-format msgid "" "Recieved error %d, while capturing image.\n" "Error text is: %s\n" msgstr "" #: src/rs-tethered-shooting.c:662 #, c-format msgid "" "Warning: It took longer time to capture the image than the set interval\n" "It took %.1f seconds to download the image.\n" "Consider increasing the interval.\n" msgstr "" #: src/rs-tethered-shooting.c:664 msgid "Waiting for next image.\n" msgstr "" #: src/rs-tethered-shooting.c:692 src/rs-tethered-shooting.c:1099 msgid "Start Shooting" msgstr "" #: src/rs-tethered-shooting.c:693 msgid "Interval shooting shutting down.\n" msgstr "" #: src/rs-tethered-shooting.c:704 msgid "Disconnecting current camera\n" msgstr "" #: src/rs-tethered-shooting.c:728 #, c-format msgid "Camera %s on port %s failed to open\n" msgstr "" #: src/rs-tethered-shooting.c:734 #, c-format msgid "" "ERROR: Init camera returned %d.\n" "Error text is:%s\n" msgstr "" #: src/rs-tethered-shooting.c:771 msgid "Shutting down asynchronous thread\n" msgstr "" #: src/rs-tethered-shooting.c:784 src/rs-tethered-shooting.c:1185 #, c-format msgid "Found %d cameras\n" msgstr "" #: src/rs-tethered-shooting.c:802 msgid "No camera selected - Cannot connect!\n" msgstr "" #: src/rs-tethered-shooting.c:817 msgid "Shutting down running thread to enable remote capture.\n" msgstr "" #: src/rs-tethered-shooting.c:862 msgid "Shutting down already running thread.\n" msgstr "" #: src/rs-tethered-shooting.c:868 msgid "Staring Monitor Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:873 msgid "Monitor Thread already running.\n" msgstr "" #: src/rs-tethered-shooting.c:904 msgid "Shutting down interval capture thread.\n" msgstr "" #: src/rs-tethered-shooting.c:915 msgid "No camera connected.\n" msgstr "" #: src/rs-tethered-shooting.c:935 msgid "Staring Interval Shooting Thread.\n" msgstr "" #: src/rs-tethered-shooting.c:938 #, fuzzy msgid "Stop Shooting" msgstr "Instelling" #: src/rs-tethered-shooting.c:972 msgid "Select camera:" msgstr "" #: src/rs-tethered-shooting.c:1003 #, fuzzy msgid "Take Photo" msgstr "_Foto" #: src/rs-tethered-shooting.c:1008 msgid "Monitor Camera" msgstr "" #: src/rs-tethered-shooting.c:1013 msgid "Disconnect Camera" msgstr "" #. Status window #: src/rs-tethered-shooting.c:1022 #, fuzzy msgid "Status:" msgstr "Verzadiging" #. Add main box #: src/rs-tethered-shooting.c:1037 msgid "Master Control" msgstr "" #: src/rs-tethered-shooting.c:1069 msgid "Tags for new images:" msgstr "" #. Add filename& tags box #: src/rs-tethered-shooting.c:1082 #, fuzzy msgid "Filename & Tags" msgstr "Bestandsnaam voorbeeld:" #: src/rs-tethered-shooting.c:1088 msgid "Seconds between each shot:" msgstr "" #. Add interval shooting box #: src/rs-tethered-shooting.c:1107 msgid "Interval Shooting" msgstr "" #: src/rs-tethered-shooting.c:1114 msgid "Minimize this window after capture" msgstr "" #: src/rs-tethered-shooting.c:1118 msgid "Copy settings from active to new image" msgstr "" #: src/rs-tethered-shooting.c:1124 msgid "Open new images after capture" msgstr "" #: src/rs-tethered-shooting.c:1150 msgid "Rawstudio Tethered Shooting" msgstr "" #: src/rs-tethered-shooting.c:1173 msgid "" "Welcome to Tethered shooting!\n" "Make sure your camera is NOT mounted in your operating system.\n" msgstr "" #. FIXME: Get height from gconf #: src/rs-toolbox.c:229 msgid "Histogram" msgstr "Histogram" #: src/rs-toolbox.c:443 msgid "Reset" msgstr "" #: src/rs-toolbox.c:444 msgid ". Click to reset value" msgstr "" #: src/rs-toolbox.c:450 msgid ". Click to edit value" msgstr "" #: src/rs-toolbox.c:566 src/rs-toolbox.c:705 msgid "Open curve ..." msgstr "Curve openen..." #: src/rs-toolbox.c:670 msgid "Select Saved Curve" msgstr "" #: src/rs-toolbox.c:700 #, fuzzy msgid "Select Action" msgstr "Instelling" #: src/rs-toolbox.c:711 msgid "Save curve as ..." msgstr "Curve bewaren als..." #: src/rs-toolbox.c:717 msgid "Reset curve" msgstr "" #: src/rs-toolbox.c:722 msgid "Auto adjust curve ends" msgstr "" #. ROW HARDCODED TO 0 #: src/rs-toolbox.c:783 msgid "Edit lens" msgstr "" #. Pack everything nice #: src/rs-toolbox.c:800 #, fuzzy msgid "Basic" msgstr "Batch" #: src/rs-toolbox.c:801 msgid "Channel Mixer" msgstr "" #: src/rs-toolbox.c:802 msgid "Lens Correction" msgstr "" #: src/rs-toolbox.c:847 msgid "Flip the photo over the x-axis" msgstr "Spiegelen om X-as" #: src/rs-toolbox.c:848 msgid "Mirror the photo over the y-axis" msgstr "Spiegelen om Y-as" #: src/rs-toolbox.c:849 msgid "Rotate the photo 90 degrees clockwise" msgstr "90 graden roteren" #: src/rs-toolbox.c:850 msgid "Rotate the photo 90 degrees counter clockwise" msgstr "270 graden roteren (90 graden tegen de klok)" #: src/rs-toolbox.c:862 msgid "Transforms" msgstr "Transformaties" #: src/rs-toolbox.c:1033 msgid "Lens Unknown" msgstr "" #: src/rs-toolbox.c:1035 #, fuzzy msgid "Lens Disabled" msgstr "Laatste afbeelding:" #: src/rs-toolbox.c:1043 msgid "No Lens Information" msgstr "" #: src/rs-toolbox.c:1045 #, fuzzy msgid "Camera Unknown" msgstr "_Camera" #: src/rs-toolbox.c:1050 #, fuzzy msgid "No Photo" msgstr "Foto's vooruitladen" #: src/rs-toolbox.c:1259 #, fuzzy msgid "_Previous" msgstr "_Vorige foto" #: src/rs-toolbox.c:1260 #, fuzzy msgid "_Next" msgstr "V_olgende foto" #~ msgid "Processing photos" #~ msgstr "Foto's verwerken" #~ msgid "Load 8 bit photos (jpeg, png, etc)" #~ msgstr "8-bit foto's laden (JPEG, PNG e.d.)" #, fuzzy #~ msgid "Warmth" #~ msgstr "Temperatuur" #, fuzzy #~ msgid "CA Red" #~ msgstr "Klaar" #~ msgid "Select color profile" #~ msgstr "Selecteer kleurprofiel" #~ msgid "Color profiles (icc and icm)" #~ msgstr "Kleurprofielen (ICC en ICM)" #~ msgid "Not a valid color profile." #~ msgstr "Geen geldig kleurprofiel." #~ msgid "" #~ "The file you selected does not appear to be a valid color profile for " #~ "this version of Rawstudio." #~ msgstr "" #~ "Het geselecteerde bestand lijkt geen geldig kleurprofielte bevatten voor " #~ "deze versie van Rawstudio." #~ msgid "Enable color management (experimental)" #~ msgstr "Schakel kleurbeheer in (experimenteel)" #~ msgid "Input profile" #~ msgstr "Invoerprofiel" #~ msgid "BuiltInRGBProfile" #~ msgstr "BuiltInRGBProfile" #~ msgid "sRGB" #~ msgstr "sRGB" #~ msgid "Export profile" #~ msgstr "Exportprofiel" #~ msgid "Intent" #~ msgstr "Intent" #~ msgid "Perceptual" #~ msgstr "Perceptual" #~ msgid "Relative colormetric" #~ msgstr "Relative colormetric" #~ msgid "Absolute colormetric" #~ msgstr "Absolute colormetric" #~ msgid "Colors" #~ msgstr "Kleuren" #~ msgid "Background renderer active" #~ msgstr "Renderer op achtergrond actief" #~ msgid "File export canceled" #~ msgstr "Bestandsexport geannuleerd" #~ msgid "16-bit TIFF (Tagged Image File Format)" #~ msgstr "16-bit TIFF (Tagged Image File Format)" #~ msgid "Rotate the photo 180 degrees" #~ msgstr "180 graden roteren" #~ msgid "_Zoom to 100%" #~ msgstr "_Zoom naar 100%" #~ msgid "Canon CR2" #~ msgstr "Canon CR2" #~ msgid "Canon CIFF" #~ msgstr "Canon CIFF" #~ msgid "Nikon NEF" #~ msgstr "Nikon NEF" #~ msgid "Minolta raw" #~ msgstr "Minolta RAW" #~ msgid "Canon TIFF" #~ msgstr "Canon TIFF" #~ msgid "Sony" #~ msgstr "Sony" #~ msgid "Kodak" #~ msgstr "Kodak" #~ msgid "Sigma" #~ msgstr "Sigma" #~ msgid "Panasonic raw" #~ msgstr "Panasonic raw" #~ msgid "Pentax raw" #~ msgstr "Pentax raw" #~ msgid "Adobe Digital negative" #~ msgstr "Adobe Digital negative" #~ msgid "Hasselblad" #~ msgstr "Hasselblad" rawstudio-2.0/po/en.gmo0000644000175000017500000007520211546436027012057 00000000000000L|((((((((( )&)C)_)y)) ))")**.*I** +,+>+O+e+z+|+++++ ++ +, , ,5,K, `,k,o,,,,,,,-&-6-F-$H-m-}----!- . . . ).4.ES............$/ 3/@/B/G/$L/ q/ }//// / /// 000 -090@0\0w0 0 0000 001$171G1[1j1y111111&11)2"D2%g22/2&2231.3N`33 33k3A4P4V4l44 44444 4 4 4445*5=5 Y5d5(5<515 6%6:6K6\6)d6)66667 $707 B7P7`7 u77777777 77 88"868H8 [8h8m88 8 888888899 (9I9O9g9l99999 999 9999:: ":/:!A:bc:': ::;; ;; 1;=; M; [; h; r; }; ; ;;;;;;<< <*<@<"D<g< n<<< <G<) =Y7=====%== >>">+>3>8>G>V>t>>>>>>> >??2? ;? I? V? a? n??@? ?*?%@<?@ |@@@@@@@@@ A (A2AHA_Ae{AcAEBB<BJC`CdC#zCC C CC CCC DD%3D-YDDD DDDDD DE !E/E3?EsE$EE(EE+E 'F1F:FBFHFPF_FyF F&F"F'F7GFG"KGnGGGGGG GgG *H6H:H ZHeHuHzHH HH HAH/I8IOI ^IhI mIxI~I IIIFI.J0JNJjJJJJJJ JJ J K K2KEKMKhKK=L]VL LLL&L.L%MMMMMMMM MN NN-NjPjbjtjjjjj j jjjke2kckkl<lJlmm#1mUm \m gmm mmmmm%m-n>nMn Sn^nonnn nn nn3n*o$=obo(qoo+o ooooopp0p Fp&Sp"zp'p7pp"q%q>qDqSq[qcq kqgyq qqq rr,r1rFr arlr qrA}r/rrs ss $s/s5s ;sFs\sFqs.sst!t6tNtgt~tt tt tttttuu8u=u] v kvyvv&v.vvpwswvwywwww wwwwwwwx x!x1x@xFx _xkxrxxx x xx xxxxx x xy yy%y7yPyayqyy y y yyyy y y zz&z.z 7zEzKz Zzgz nz xz#m<W^uIO=+$>b7w# )H{7KLJ}>;q]G+O"3En_`dFvRp N1'QShna8\Dc ~lX!"Wi1%p0NM;Pra4Y&9 fC -x[@(Fb9dsC5,4J|h `?tj<U.@kTK\Mki= )usP* Syfj(?T%zrw}2G!6c&[ |U*{ZyHzog6Qtl xm5:-_AXqIe.A/D,VZBv~:E2e'^/$8BgoL YR3V 0] (Cannot log in) (Logged in succesfully) A B C %%.1fs %2c - Incremental counter%DD - Day of week from EXIF%DM - Month from EXIF (Text)%DY - Year from EXIF (YYYY)%Dd - Date from EXIF (DD)%Dm - Month from EXIF (MM)%Dy - Year from EXIF (YY)%d - Date from EXIF (YYYY-MM-DD)%d photos added to batch queue%d photos removed from batch queue%dmm %f - Original filename%p - Path of original file%s Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!%s - Setting id (A, B or C)%t - Time from EXIF (HH:MM:SS)(No user entered)(Select Profile)* (%d)* (-)-. Click to edit value. Click to reset value1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Aperture: F/%.01f Focal length: %dmm ISO: %u Make: %s Model: %s Shutter speed: %.1fs Shutter speed: 1/%.0fs Time: %s%s AA raw image converter for GTK+/GNOMEAdd Profile ...Add profile ...Add tags to selected photo(s).Adding images to batch queueAdjusting to auto white balanceAdjusting to camera white balanceAlbumsAll ProfilesAll filesAll lensesAll photos (excluding deleted)An error was returned when communicating with the Picasa web service:ApertureAprilAspectAugustAuthenticate RawstudioAuto adjust curve endsBBasicBatchBlueBlue Amount AdjustmentBlue Chromatic Aberration CorrectionBuffer emptyCCA BCA RCamera %s on port %s failed to open Camera MakeCamera ModelCamera Profiles (DCP)Camera UnknownCamera defaults editorCamera makeCamera modelCamera monitor shutting down. CancelCannot log inCaptionCapture Enabled. Capturing. ChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Channel MixerChannel mixerChoose output directoryColDnColor Profiles (ICC and ICM)Color denoiseColor space used for savingColour DenoisingConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrContrastCopied settingsCopy EXIF metadataCopy EXIF metadata to XMPCopy settings from active to new imageCopying image to clipboardCould not create datadir for lensfun - %sCould not create output directory.Could not create temporary directory.Could not export photo.Could not fetch file from %s or write it to %s.Could not fetch list of files from %s.Could not open database %sCould not open image! Could not open temporary file on disk for writingCould not save file: %s Check that you have write permissions to this folder.Couldn't open photoCreate albumCropCrop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel cropCurrent User: CurveD (%d)D (-)DecemberDelete photosDeleted photosDeleting photosDenoiDenoiseDescriptionDirectoryDirectory:Disconnect CameraDisconnecting current camera Display Colorspace:Display NavigationDo not Load Selected ImagesDon't cropDownloading and adding image. ERROR: Could not copy image to clipboardERROR: Gphoto2 returned error value %d Error message is: %s ERROR: Init camera returned %d. Error text is:%s Edit lensEdit output settingsEmbedded ProfileEnable this lensEnabledEnabling capture mode for Canon cameras. Enabling capture mode for Nikon cameras. Error copying file %s to %s Error exportingError exporting photo to gimp.Error updating lensfun databaseExport FileExport dimensionsExport failedExporting to %sExporting to GIMP...Exporting...ExposExposureExposure CompensationExposure Mask Colorspace:F/%.1f FebruaryFile Downloaded Succesfully. File exportedFile not saved!File type:FilenameFilename & TagsFilename example:Filename template:Flickr errorFlipFlip the photo over the x-axisFocalFocal LengthFocallengthFound %d cameras FreeformFull export pathGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2Gphoto2 reported Context Error: GreenGreen Amount AdjustmentGridHarmonious triangles #1Harmonious triangles #2HeightHeight:Hiding exposure maskHistogramHistogram height:HueHue ShiftISOISO paper (A4)ISO%dIconImage copied to clipboardImage openedInterval ShootingInterval shooting shutting down. It seems like rawstudio lost its authentication to upload to your account, please re-authenticate.JPEG (Joint Photographic Experts Group)JPEG QualityJanuaryJulyJuneKeep aspectLarge gamut color spaceLast image:Lens CorrectionLens DisabledLens LibraryLens MakeLens ModelLens UnknownLens makeLens modelLensfun database updatedLight DenoisingLight out mode not availableLoad non-RAW imagesLoading %s ...MarchMaster ControlMaximum sizeMaximum size: %d x %dMayMinimize this window after captureMirrorMirror the photo over the y-axisModelMonitor CameraMonitor Thread already running. Monitor recieved error %d, while waiting for camera. Error text is: %s Moving file to current directory failed! NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable.NameNo Lens InformationNo PhotoNo camera connected. No camera selected - Cannot connect! No white balance to set fromNoneNothing to pasteNovemberOctoberOpenOpen curve ...Open directoryOpen new images after captureOpen recursiveOpening directory...Opening photo ...Original AspectOutput directory:Overwrite File?PNG (Portable Network Graphics)Password: Pasted settingsPasting settings to imagesPercent:Photo height:Photo scale:Photo sizePhoto width:Picasa Webalbum AuthentificationPlace cache in home directoryPlease type in your username and password for Picasa Web Albums.PreferencesPress F10 to return preview to this windowPreview background color:Print friendly color space, compatible with Adobe RGB (1998)PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProcessing Image %d/%dProcessing Image 1/%d.ProfileProgressPublic (everyone can see this)Quick exportRawstudioRawstudio Lens EditorRawstudio Lens LibraryRawstudio Tethered ShootingRawstudio needs to be authenticated before it will be able to upload photos to your Facebook account.Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account.Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr.ReadyRecieved error %d, while capturing image. Error text is: %s Recieved error %d, while downloading image from camera. Error text is: %s RedRed Amount AdjustmentRed Chromatic Aberration CorrectionRemoveRemove allRemoving images from batch queueResetReset curveRetain EXIF metadataRetry Operation?Rotate ClockwiseRotate Counter ClockwiseRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturSaturationSave 16 bit TIFFSave 16 bit linear PNGSave curve as ...Save uncompressed TIFFSaving %s ...Seconds between each shot:Select ActionSelect All/NoneSelect OK to use this screen for fullscreen previewSelect Saved CurveSelect Screen for fullscreen previewSelect camera:Select screen to open fullscreen previewSelect settings to copySelect which settings to add to batch queueSeptemberSet lensSettingSharpSharpenSharpen AmountShow Filenames in IconboxShowing exposure maskShutterspeedShutting down already running thread. Shutting down asynchronous thread Shutting down interval capture thread. Shutting down running thread to enable remote capture. SizeStaring Interval Shooting Thread. Staring Monitor Thread. StartStart ShootingStatus:Step 1:Step 2:Stop ShootingStraighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels.Switch UserTCATIFF (Tagged Image File Format)Tag searchTag search [%s]TagsTags for new images:Tags, separated by spaces:Take PhotoTempTemperatureThe file '%s' already exists. Do you want to overwrite the file?The port you specified ('%s') can not be found.Time left: %dh %dm %dsTime left: ...TimestampTintTint ShiftTitleToolsTransformsU (%d)U (-)Unable to detect more than one monitor. Cannot open fullscreen previewUnable to locate screen for fullscreen previewUnhandled error from FacebookUnhandled error from PicasaUnprioritized photosUpdate lensfun databaseUpload photo to FacebookUpload photo to FlickrUpload photo to PicasaUse system themeUsername: VignVignettingVignetting CorrectionVisible to FamilyVisible to FriendsWBAsciiWaiting for jobs to finishWaiting for next image. Warning: It took longer time to capture the image than the set interval It took %.1f seconds to download the image. Consider increasing the interval. We recieved an error during authentication. Please try again.Welcome to Tethered shooting! Make sure your camera is NOT mounted in your operating system. White balanceWidthWidth:Would you like to Retry the operation?Your files will be permanently deleted!Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing._1_2_3_About_Add to batch queue_Add view to queue..._Auto_Auto group_Batch_Camera_Copy Image to Clipboard_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Lens Library_Lights out_Next_Next Photo_Online Documentation_Open Directory_Paste settings_Photo_Preferences_Previous_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Save camera default settings_Set Priority_Show Photo On Secondary Monitor_Snapshot_Sort by_Split_Start_Straighten_Tag Photo..._Tethered Shooting_Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelstelephotowideangleProject-Id-Version: Rawstudio 2.0 Report-Msgid-Bugs-To: rawstudio-dev@rawstudio.org POT-Creation-Date: 2011-03-26 03:39+0100 PO-Revision-Date: 2011-03-26 03:49+0100 Last-Translator: Anders Kvist Language-Team: Rawstudio development Language: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: English (Cannot log in) (Logged in succesfully) A B C %%.1fs %2c - Incremental counter%DD - Day of week from Exif%DM - Month from Exif (Text)%DY - Year from Exif (YYYY)%Dd - Date from Exif (DD)%Dm - Month from Exif (MM)%Dy - Year from Exif (YY)%d - Date from Exif (YYYY-MM-DD)%d photos added to batch queue%d photos removed from batch queue%dmm %f - Original filename%p - Path of original file%s Note: This error isn't catched by Rawstudio. Please let us know that you found it and how to reproduce it so we can make a more useful errormessage. Thanks!%s - Setting id (A, B or C)%t - Time from Exif (HH:MM:SS)(No user entered)(Select Profile)* (%d)* (-)-. Click to edit value. Click to reset value1 (%d)1 (-)1/%.0fs 10:8 (SXGA)16:10 (Wide XGA)16:9 (HDTV)1:12 (%d)2 (-)3 (%d)3 (-)3:2 (35mm)4:38:3 (Dualhead XGA)Aperture: F/%.01f Focal length: %dmm ISO: %u Make: %s Model: %s Shutter speed: %.1fs Shutter speed: 1/%.0fs Time: %s%s AA raw image converter for GTK+/GNOMEAdd Profile ...Add profile ...Add tags to selected photo(s).Adding images to batch queueAdjusting to auto white balanceAdjusting to camera white balanceAlbumsAll ProfilesAll filesAll lensesAll photos (excluding deleted)An error was returned when communicating with the Picasa web service:ApertureAprilAspectAugustAuthenticate RawstudioAuto adjust curve endsBBasicBatchBlueBlue Amount AdjustmentBlue Chromatic Aberration CorrectionBuffer emptyCCA BCA RCamera %s on port %s failed to open Camera MakeCamera ModelCamera Profiles (DCP)Camera UnknownCamera defaults editorCamera makeCamera modelCamera monitor shutting down. CancelCannot log inCaptionCapture Enabled. Capturing. ChangeChanged photo priority (%d)Changed photo priority (*)Changed photo priority (D)Channel MixerChannel mixerChoose output directoryColDnColor Profiles (ICC and ICM)Color denoiseColor space used for savingColour DenoisingConstant Scale: %dConstant heightConstant height: %dConstant scaleConstant widthConstant width: %dContrContrastCopied settingsCopy Exif metadataCopy Exif metadata to XMPCopy settings from active to new imageCopying image to clipboardCould not create datadir for LensFun - %sCould not create output directory.Could not create temporary directory.Could not export photo.Could not fetch file from %s or write it to %s.Could not fetch list of files from %s.Could not open database %sCould not open image! Could not open temporary file on disk for writingCould not save file: %s Check that you have write permissions to this folder.Couldn't open photoCreate albumCropCrop: Drag to select cropped area. Right Mouse Button inside cropped area: Apply Crop; Outside: Cancel cropCurrent User: CurveD (%d)D (-)DecemberDelete photosDeleted photosDeleting photosDenoiDenoiseDescriptionDirectoryDirectory:Disconnect CameraDisconnecting current camera Display Colorspace:Display NavigationDo not Load Selected ImagesDon't cropDownloading and adding image. ERROR: Could not copy image to clipboardERROR: Gphoto2 returned error value %d Error message is: %s ERROR: Init camera returned %d. Error text is:%s Edit lensEdit output settingsEmbedded ProfileEnable this lensEnabledEnabling capture mode for Canon cameras. Enabling capture mode for Nikon cameras. Error copying file %s to %s Error exportingError exporting photo to gimp.Error updating LensFun databaseExport FileExport dimensionsExport failedExporting to %sExporting to GIMP...Exporting...ExposExposureExposure CompensationExposure Mask Colorspace:F/%.1f FebruaryFile Downloaded Succesfully. File exportedFile not saved!File type:FilenameFilename & TagsFilename example:Filename template:Flickr errorFlipFlip the photo over the x-axisFocalFocal LengthFocallengthFound %d cameras FreeformFull export pathGeneralGolden rectangleGolden sectionsGolden triangles #1Golden triangles #2Gphoto2 reported Context Error: GreenGreen Amount AdjustmentGridHarmonious triangles #1Harmonious triangles #2HeightHeight:Hiding exposure maskHistogramHistogram height:HueHue ShiftISOISO paper (A4)ISO%dIconImage copied to clipboardImage openedInterval ShootingInterval shooting shutting down. It seems like rawstudio lost its authentication to upload to your account, please re-authenticate.JPEG (Joint Photographic Experts Group)JPEG QualityJanuaryJulyJuneKeep aspectLarge gamut color spaceLast image:Lens CorrectionLens DisabledLens LibraryLens MakeLens ModelLens UnknownLens makeLens modelLensFun database updatedLight DenoisingLight out mode not availableLoad non-RAW imagesLoading %s ...MarchMaster ControlMaximum sizeMaximum size: %d x %dMayMinimize this window after captureMirrorMirror the photo over the y-axisModelMonitor CameraMonitor Thread already running. Monitor recieved error %d, while waiting for camera. Error text is: %s Moving file to current directory failed! NOTE: Iconview Update Disabled. New files will not be loaded! Press to re-enable.NameNo Lens InformationNo PhotoNo camera connected. No camera selected - Cannot connect! No white balance to set fromNoneNothing to pasteNovemberOctoberOpenOpen curve ...Open directoryOpen new images after captureOpen recursiveOpening directory...Opening photo ...Original AspectOutput directory:Overwrite File?PNG (Portable Network Graphics)Password: Pasted settingsPasting settings to imagesPercent:Photo height:Photo scale:Photo sizePhoto width:Picasa Webalbum AuthentificationPlace cache in home directoryPlease type in your username and password for Picasa Web Albums.PreferencesPress F10 to return preview to this windowPreview background color:Print friendly color space, compatible with Adobe RGB (1998)PrioritiesPriority 1 photosPriority 2 photosPriority 3 photosProcessing Image %d/%dProcessing Image 1/%d.ProfileProgressPublic (everyone can see this)Quick exportRawstudioRawstudio Lens EditorRawstudio Lens LibraryRawstudio Tethered ShootingRawstudio needs to be authenticated before it will be able to upload photos to your Facebook account.Rawstudio needs to be authenticated before it will be able to upload photos to your Flickr account.Rawstudio were not able to upload the photo cause the authentication has been revoked. Please re-authenticate Rawstudio to upload to Flickr.ReadyRecieved error %d, while capturing image. Error text is: %s Recieved error %d, while downloading image from camera. Error text is: %s RedRed Amount AdjustmentRed Chromatic Aberration CorrectionRemoveRemove allRemoving images from batch queueResetReset curveRetain Exif metadataRetry Operation?Rotate ClockwiseRotate Counter ClockwiseRotate the photo 90 degrees clockwiseRotate the photo 90 degrees counter clockwiseRule of thirdsSaturSaturationSave 16 bit TIFFSave 16 bit linear PNGSave curve as ...Save uncompressed TIFFSaving %s ...Seconds between each shot:Select ActionSelect All/NoneSelect OK to use this screen for fullscreen previewSelect Saved CurveSelect Screen for fullscreen previewSelect camera:Select screen to open fullscreen previewSelect settings to copySelect which settings to add to batch queueSeptemberSet lensSettingSharpSharpenSharpen AmountShow Filenames in IconboxShowing exposure maskShutterspeedShutting down already running thread. Shutting down asynchronous thread Shutting down interval capture thread. Shutting down running thread to enable remote capture. SizeStaring Interval Shooting Thread. Staring Monitor Thread. StartStart ShootingStatus:Step 1:Step 2:Stop ShootingStraighten: Draw a line in the image that should be horizontal or vertical. Right Mouse Button cancels.Switch UserTCATIFF (Tagged Image File Format)Tag searchTag search [%s]TagsTags for new images:Tags, separated by spaces:Take PhotoTempTemperatureThe file '%s' already exists. Do you want to overwrite the file?The port you specified ('%s') can not be found.Time left: %dh %dm %dsTime left: ...TimestampTintTint ShiftTitleToolsTransformsU (%d)U (-)Unable to detect more than one monitor. Cannot open fullscreen previewUnable to locate screen for fullscreen previewUnhandled error from FacebookUnhandled error from PicasaUnprioritized photosUpdate LensFun databaseUpload photo to FacebookUpload photo to FlickrUpload photo to PicasaUse system themeUsername: VignVignettingVignetting CorrectionVisible to FamilyVisible to FriendsWBAsciiWaiting for jobs to finishWaiting for next image. Warning: It took longer time to capture the image than the set interval It took %.1f seconds to download the image. Consider increasing the interval. We recieved an error during authentication. Please try again.Welcome to Tethered shooting! Make sure your camera is NOT mounted in your operating system. White balanceWidthWidth:Would you like to Retry the operation?Your files will be permanently deleted!Your setup doesn't seem to support RGBA visuals and/or compositing. Consult your operating system manual for enabling RGBA visuals and compositing._1_2_3_About_Add to batch queue_Add view to queue..._Auto_Auto group_Batch_Camera_Copy Image to Clipboard_Copy settings_Crop_Delete flagged photos_Edit_Export As_Export to Gimp_Exposure mask_File_Flag photo for deletion_Fullscreen_Group_Help_Iconbox_Lens Library_Lights out_Next_Next Photo_Online Documentation_Open Directory_Paste settings_Photo_Preferences_Previous_Previous photo_Quick Export_Quit_Reload directory_Remove from batch queue_Remove priority_Reset settings_Revert settings_Save camera default settings_Set Priority_Show Photo On Secondary Monitor_Snapshot_Sort by_Split_Start_Straighten_Tag Photo..._Tethered Shooting_Toolbox_Uncrop_Ungroup_Unstraighten_View_White Balance_Zoom to fitpixelstelephotowideanglerawstudio-2.0/gettext.h0000644000175000017500000000273211526533646012171 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ #ifdef ENABLE_NLS # include # undef _ # define _(String) dgettext (PACKAGE, String) # define Q_(String) g_strip_context ((String), gettext (String)) # ifdef gettext_noop # define N_(String) gettext_noop (String) # else # define N_(String) (String) # endif #else # define textdomain(String) (String) # define gettext(String) (String) # define dgettext(Domain,Message) (Message) # define dcgettext(Domain,Message,Type) (Message) # define bindtextdomain(Domain,Directory) (Domain) # define _(String) (String) # define Q_(String) g_strip_context ((String), (String)) # define N_(String) (String) #endif rawstudio-2.0/configure0000755000175000017500000223647011547407120012243 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.67. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software # Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac ECHO=${lt_ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF $* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="configure.in" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS SVNINFO CAN_COMPILE_AVX_FALSE CAN_COMPILE_AVX_TRUE CAN_COMPILE_SSE2_FALSE CAN_COMPILE_SSE2_TRUE CAN_COMPILE_SSE4_1_FALSE CAN_COMPILE_SSE4_1_TRUE MKINSTALLDIRS POSUB POFILES PO_IN_DATADIR_FALSE PO_IN_DATADIR_TRUE INTLLIBS INSTOBJEXT GMOFILES DATADIRNAME CATOBJEXT CATALOGS XGETTEXT GMSGFMT MSGFMT_OPTS MSGFMT USE_NLS GETTEXT_PACKAGE PACKAGE_LIBS PACKAGE_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG LIBTIFF LIBJPEG CXXCPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL lt_ECHO RANLIB AR OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode enable_shared enable_static with_pic enable_fast_install enable_dependency_tracking with_gnu_ld enable_libtool_lock enable_experimental ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP CXX CXXFLAGS CCC CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR PACKAGE_CFLAGS PACKAGE_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) --enable-experimental Enable experimental code (default: disabled) Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path PACKAGE_CFLAGS C compiler flags for PACKAGE, overriding pkg-config PACKAGE_LIBS linker flags for PACKAGE, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.67 Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_func # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $as_test_x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval "test \"\${$3+set}\"" = set; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval "test \"\${$3+set}\"" = set; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.67. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5 ; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=rawstudio VERSION=2.0 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then : enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 $as_echo "$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.2.6b' macro_revision='1.3017' ltmain="$ac_aux_dir/ltmain.sh" # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if test "${ac_cv_build+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if test "${ac_cv_host+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5 ; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5 ; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if test "${ac_cv_objext+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5 ; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if test "${ac_cv_path_SED+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if test "${ac_cv_path_GREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if test "${ac_cv_path_EGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if test "${ac_cv_path_FGREP+set}" = set; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if test "${lt_cv_path_NM+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$ac_tool_prefix"; then for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in "dumpbin -symbols" "link -dump -symbols" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if test "${lt_cv_nm_interface+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:4673: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:4676: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:4679: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" fi test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 5885 "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if test "${lt_cv_apple_cc_single_mod+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5 ; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if test "${lt_cv_objdir+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7410: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7414: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 $as_echo "$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7749: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7753: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7854: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7858: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7909: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7913: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) link_all_deplibs=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi link_all_deplibs=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo(void) {} _ACEOF if ac_fn_c_try_link "$LINENO"; then : archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 $as_echo "$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 10293 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line 10389 "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if test "${ac_cv_search_strerror+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if test "${ac_cv_search_strerror+set}" = set; then : break fi done if test "${ac_cv_search_strerror+set}" = set; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5 ; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} _lt_caught_CXX_error=yes; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if test "${lt_cv_path_LD+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec_CXX='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds_CXX="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" if test "$lt_cv_apple_cc_single_mod" != "yes"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi else ld_shlibs_CXX=no fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5]* | *pgcpp\ [1-5]*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then postdeps_CXX='-library=Cstd -library=Crun' fi ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 $as_echo "$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14670: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:14674: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test x"$lt_cv_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14769: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14773: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14821: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14825: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 $as_echo "$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[3-9]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink || test "$inherit_rpath_CXX" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # Check whether --enable-experimental was given. if test "${enable_experimental+set}" = set; then : enableval=$enable_experimental; EXPERIMENTAL=yes fi if test "$EXPERIMENTAL" == "yes"; then $as_echo "#define EXPERIMENTAL 1" >>confdefs.h fi if test -z "$LIBJPEG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_destroy_decompress in -ljpeg" >&5 $as_echo_n "checking for jpeg_destroy_decompress in -ljpeg... " >&6; } if test "${ac_cv_lib_jpeg_jpeg_destroy_decompress+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ljpeg $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char jpeg_destroy_decompress (); int main () { return jpeg_destroy_decompress (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_jpeg_jpeg_destroy_decompress=yes else ac_cv_lib_jpeg_jpeg_destroy_decompress=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_destroy_decompress" >&5 $as_echo "$ac_cv_lib_jpeg_jpeg_destroy_decompress" >&6; } if test "x$ac_cv_lib_jpeg_jpeg_destroy_decompress" = x""yes; then : jpeg_ok=yes else jpeg_ok=no fi if test "$jpeg_ok" = yes; then ac_fn_c_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default" if test "x$ac_cv_header_jpeglib_h" = x""yes; then : jpeg_ok=yes else jpeg_ok=no fi if test "$jpeg_ok" = yes; then LIBJPEG='-ljpeg' else as_fn_error $? "*** JPEG header files not found." "$LINENO" 5 fi else as_fn_error $? "*** Rawstudio requires libjpeg." "$LINENO" 5 fi fi if test -z "$LIBTIFF"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIFFOpen in -ltiff" >&5 $as_echo_n "checking for TIFFOpen in -ltiff... " >&6; } if test "${ac_cv_lib_tiff_TIFFOpen+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltiff $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char TIFFOpen (); int main () { return TIFFOpen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_tiff_TIFFOpen=yes else ac_cv_lib_tiff_TIFFOpen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tiff_TIFFOpen" >&5 $as_echo "$ac_cv_lib_tiff_TIFFOpen" >&6; } if test "x$ac_cv_lib_tiff_TIFFOpen" = x""yes; then : tiff_ok=yes else tiff_ok=no fi if test "$tiff_ok" = yes; then ac_fn_c_check_header_mongrel "$LINENO" "tiffio.h" "ac_cv_header_tiffio_h" "$ac_includes_default" if test "x$ac_cv_header_tiffio_h" = x""yes; then : tiff_ok=yes else tiff_ok=no fi if test "$tiff_ok" = yes; then LIBTIFF='-ltiff' else as_fn_error $? "*** libtiff header files not found." "$LINENO" 5 fi else as_fn_error $? "*** Rawstudio requires libtiff." "$LINENO" 5 fi fi pkg_modules="gtk+-2.0 >= 2.8.0 libxml-2.0 >= 2.4 gconf-2.0 >= 2.0 lcms dbus-1 exiv2 fftw3f lensfun libcurl flickcurl sqlite3 libssl libgphoto2 x11" if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PACKAGE" >&5 $as_echo_n "checking for PACKAGE... " >&6; } if test -n "$PACKAGE_CFLAGS"; then pkg_cv_PACKAGE_CFLAGS="$PACKAGE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PACKAGE_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PACKAGE_LIBS"; then pkg_cv_PACKAGE_LIBS="$PACKAGE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5 ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PACKAGE_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PACKAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$pkg_modules" 2>&1` else PACKAGE_PKG_ERRORS=`$PKG_CONFIG --print-errors "$pkg_modules" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PACKAGE_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ($pkg_modules) were not met: $PACKAGE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables PACKAGE_CFLAGS and PACKAGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables PACKAGE_CFLAGS and PACKAGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5 ; } else PACKAGE_CFLAGS=$pkg_cv_PACKAGE_CFLAGS PACKAGE_LIBS=$pkg_cv_PACKAGE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi GETTEXT_PACKAGE=rawstudio cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF ALL_LINGUAS="cs da de en fr it nb pl ru fi es sv nl pt_BR ca hu ja" for ac_header in locale.h do : ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" if test "x$ac_cv_header_locale_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LOCALE_H 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 $as_echo_n "checking for LC_MESSAGES... " >&6; } if test "${am_cv_val_LC_MESSAGES+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : am_cv_val_LC_MESSAGES=yes else am_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 $as_echo "$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default" if test "x$ac_cv_header_libintl_h" = x""yes; then : gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5 $as_echo_n "checking for ngettext in libc... " >&6; } if test "${gt_cv_func_ngettext_libc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_ngettext_libc=yes else gt_cv_func_ngettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5 $as_echo "$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5 $as_echo_n "checking for dgettext in libc... " >&6; } if test "${gt_cv_func_dgettext_libc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : gt_cv_func_dgettext_libc=yes else gt_cv_func_dgettext_libc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5 $as_echo "$gt_cv_func_dgettext_libc" >&6; } fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5 $as_echo_n "checking for bindtextdomain in -lintl... " >&6; } if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_bindtextdomain=yes else ac_cv_lib_intl_bindtextdomain=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5 $as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; } if test "x$ac_cv_lib_intl_bindtextdomain" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5 $as_echo_n "checking for dgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dgettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dgettext (); int main () { return dgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dgettext=yes else ac_cv_lib_intl_dgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5 $as_echo "$ac_cv_lib_intl_dgettext" >&6; } if test "x$ac_cv_lib_intl_dgettext" = x""yes; then : gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5 $as_echo_n "checking if -liconv is needed to use gettext... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5 $as_echo_n "checking for ngettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_ngettext=yes else ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5 $as_echo "$ac_cv_lib_intl_ngettext" >&6; } if test "x$ac_cv_lib_intl_ngettext" = x""yes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5 $as_echo_n "checking for dcgettext in -lintl... " >&6; } if test "${ac_cv_lib_intl_dcgettext+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dcgettext (); int main () { return dcgettext (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_intl_dcgettext=yes else ac_cv_lib_intl_dcgettext=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5 $as_echo "$ac_cv_lib_intl_dcgettext" >&6; } if test "x$ac_cv_lib_intl_dcgettext" = x""yes; then : gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do : ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BIND_TEXTDOMAIN_CODESET 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 $as_echo "$MSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do : ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" if test "x$ac_cv_func_dcgettext" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DCGETTEXT 1 _ACEOF fi done MSGFMT_OPTS= { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5 $as_echo_n "checking if msgfmt accepts -c... " >&6; } cat >conftest.foo <<_ACEOF msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" _ACEOF if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5 ($MSGFMT -c -o /dev/null conftest.foo) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo "$as_me: failed input was:" >&5 sed 's/^/| /' conftest.foo >&5 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_GMSGFMT+set}" = set; then : $as_echo_n "(cached) " >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 $as_echo "$GMSGFMT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then : $as_echo_n "(cached) " >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 $as_echo "$XGETTEXT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : CATOBJEXT=.gmo DATADIRNAME=share else case $host in *-*-solaris*) ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset" if test "x$ac_cv_func_bind_textdomain_codeset" = x""yes; then : CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then $as_echo "#define ENABLE_NLS 1" >>confdefs.h fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5 $as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-1" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 $as_echo_n "checking for catalogs to be installed... " >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 $as_echo "$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES for ac_func in memmem do : ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" if test "x$ac_cv_func_memmem" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MEMMEM 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts \"-msse2\"" >&5 $as_echo_n "checking whether C compiler accepts \"-msse2\"... " >&6; } ax_save_FLAGS=$CFLAGS CFLAGS=""-msse2"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval `$as_echo "ax_cv_c_flags_"-msse2"" | $as_tr_sh`=yes else eval `$as_echo "ax_cv_c_flags_"-msse2"" | $as_tr_sh`=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_save_FLAGS eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_"-msse2"" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then _CAN_COMPILE_SSE2=yes else _CAN_COMPILE_SSE2=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts \"-msse4.1\"" >&5 $as_echo_n "checking whether C compiler accepts \"-msse4.1\"... " >&6; } ax_save_FLAGS=$CFLAGS CFLAGS=""-msse4.1"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval `$as_echo "ax_cv_c_flags_"-msse4.1"" | $as_tr_sh`=yes else eval `$as_echo "ax_cv_c_flags_"-msse4.1"" | $as_tr_sh`=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_save_FLAGS eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_"-msse4.1"" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then _CAN_COMPILE_SSE4_1=yes else _CAN_COMPILE_SSE4_1=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler accepts \"-mavx\"" >&5 $as_echo_n "checking whether C compiler accepts \"-mavx\"... " >&6; } ax_save_FLAGS=$CFLAGS CFLAGS=""-mavx"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval `$as_echo "ax_cv_c_flags_"-mavx"" | $as_tr_sh`=yes else eval `$as_echo "ax_cv_c_flags_"-mavx"" | $as_tr_sh`=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$ax_save_FLAGS eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_"-mavx"" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_check_compiler_flags" >&5 $as_echo "$ax_check_compiler_flags" >&6; } if test "x$ax_check_compiler_flags" = xyes; then _CAN_COMPILE_AVX=yes else _CAN_COMPILE_AVX=no fi if test "$_CAN_COMPILE_SSE4_1" = yes; then CAN_COMPILE_SSE4_1_TRUE= CAN_COMPILE_SSE4_1_FALSE='#' else CAN_COMPILE_SSE4_1_TRUE='#' CAN_COMPILE_SSE4_1_FALSE= fi if test "$_CAN_COMPILE_SSE2" = yes; then CAN_COMPILE_SSE2_TRUE= CAN_COMPILE_SSE2_FALSE='#' else CAN_COMPILE_SSE2_TRUE='#' CAN_COMPILE_SSE2_FALSE= fi if test "$_CAN_COMPILE_AVX" = yes; then CAN_COMPILE_AVX_TRUE= CAN_COMPILE_AVX_FALSE='#' else CAN_COMPILE_AVX_TRUE='#' CAN_COMPILE_AVX_FALSE= fi branchname() { awk ' /^Repository Root:/ { root=$3; } /^URL:/ { url=$2; } END{ sub(root, "", url); if (index(url, "/branches/") == 1) { branch = substr(url, 11); printf(" (branch %s)", branch); } else if (index(url, "/tags/") == 1) { tag = substr(url, 7); printf(" (tag %s)", tag); } else { printf(" (trunk)"); } } ' } if test -f .version ; then RAWSTUDIO_VERSION=$(cat .version) else RAWSTUDIO_VERSION="${VERSION}" fi if test -d .svn && svn --version>/dev/null 2>&1 ; then RAWSTUDIO_SVNREV=$(LC_ALL=C svn info | awk '/^Revision:/ {printf("-svn%s",$2); }') RAWSTUDIO_BRANCH=$(LC_ALL=C svn info |branchname) elif test -f .svninfo ; then RAWSTUDIO_SVNREV=$(awk '/^Revision:/ {printf("-snapshot%s",$2); }' .svninfo) RAWSTUDIO_BRANCH=$(cat .svninfo|branchname) else RAWSTUDIO_SVNREV="" RAWSTUDIO_BRANCH="" fi RAWSTUDIO_VERSION="${RAWSTUDIO_VERSION}${RAWSTUDIO_SVNREV}${RAWSTUDIO_BRANCH}" cat >>confdefs.h <<_ACEOF #define RAWSTUDIO_VERSION "$RAWSTUDIO_VERSION" _ACEOF if test -f .svninfo; then SVNINFO=".svninfo" else SVNINFO="" fi ac_config_files="$ac_config_files Makefile librawstudio/Makefile librawstudio/rawstudio-2.0.pc plugins/Makefile plugins/cache/Makefile plugins/colorspace-adobergb/Makefile plugins/colorspace-prophoto/Makefile plugins/colorspace-srgb/Makefile plugins/colorspace-transform/Makefile plugins/crop/Makefile plugins/dcp/Makefile plugins/demosaic/Makefile plugins/denoise/Makefile plugins/exposure-mask/Makefile plugins/fuji-rotate/Makefile plugins/input-file/Makefile plugins/input-image16/Makefile plugins/lensfun/Makefile plugins/load-dcraw/Makefile plugins/load-gdk/Makefile plugins/load-rawspeed/Makefile plugins/meta-ciff/Makefile plugins/meta-exiv2/Makefile plugins/meta-mrw/Makefile plugins/meta-raf/Makefile plugins/meta-tiff/Makefile plugins/meta-x3f/Makefile plugins/output-jpegfile/Makefile plugins/output-pngfile/Makefile plugins/output-picasa/Makefile plugins/output-facebook/Makefile plugins/output-flickr/Makefile plugins/output-tifffile/Makefile plugins/resample/Makefile plugins/rotate/Makefile src/Makefile po/Makefile.in pixmaps/Makefile profiles/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CAN_COMPILE_SSE4_1_TRUE}" && test -z "${CAN_COMPILE_SSE4_1_FALSE}"; then as_fn_error $? "conditional \"CAN_COMPILE_SSE4_1\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CAN_COMPILE_SSE2_TRUE}" && test -z "${CAN_COMPILE_SSE2_FALSE}"; then as_fn_error $? "conditional \"CAN_COMPILE_SSE2\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${CAN_COMPILE_AVX_TRUE}" && test -z "${CAN_COMPILE_AVX_FALSE}"; then as_fn_error $? "conditional \"CAN_COMPILE_AVX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in #( -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #(( ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.67. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.67, with options \\"\$ac_cs_config\\" Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ AR \ AR_FLAGS \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ SHELL \ ECHO \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ fix_srcfile_path_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX; do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` ;; esac ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "librawstudio/Makefile") CONFIG_FILES="$CONFIG_FILES librawstudio/Makefile" ;; "librawstudio/rawstudio-2.0.pc") CONFIG_FILES="$CONFIG_FILES librawstudio/rawstudio-2.0.pc" ;; "plugins/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/Makefile" ;; "plugins/cache/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/cache/Makefile" ;; "plugins/colorspace-adobergb/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/colorspace-adobergb/Makefile" ;; "plugins/colorspace-prophoto/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/colorspace-prophoto/Makefile" ;; "plugins/colorspace-srgb/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/colorspace-srgb/Makefile" ;; "plugins/colorspace-transform/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/colorspace-transform/Makefile" ;; "plugins/crop/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/crop/Makefile" ;; "plugins/dcp/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/dcp/Makefile" ;; "plugins/demosaic/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/demosaic/Makefile" ;; "plugins/denoise/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/denoise/Makefile" ;; "plugins/exposure-mask/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/exposure-mask/Makefile" ;; "plugins/fuji-rotate/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/fuji-rotate/Makefile" ;; "plugins/input-file/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/input-file/Makefile" ;; "plugins/input-image16/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/input-image16/Makefile" ;; "plugins/lensfun/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/lensfun/Makefile" ;; "plugins/load-dcraw/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/load-dcraw/Makefile" ;; "plugins/load-gdk/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/load-gdk/Makefile" ;; "plugins/load-rawspeed/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/load-rawspeed/Makefile" ;; "plugins/meta-ciff/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/meta-ciff/Makefile" ;; "plugins/meta-exiv2/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/meta-exiv2/Makefile" ;; "plugins/meta-mrw/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/meta-mrw/Makefile" ;; "plugins/meta-raf/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/meta-raf/Makefile" ;; "plugins/meta-tiff/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/meta-tiff/Makefile" ;; "plugins/meta-x3f/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/meta-x3f/Makefile" ;; "plugins/output-jpegfile/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/output-jpegfile/Makefile" ;; "plugins/output-pngfile/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/output-pngfile/Makefile" ;; "plugins/output-picasa/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/output-picasa/Makefile" ;; "plugins/output-facebook/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/output-facebook/Makefile" ;; "plugins/output-flickr/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/output-flickr/Makefile" ;; "plugins/output-tifffile/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/output-tifffile/Makefile" ;; "plugins/resample/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/resample/Makefile" ;; "plugins/rotate/Makefile") CONFIG_FILES="$CONFIG_FILES plugins/rotate/Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; "pixmaps/Makefile") CONFIG_FILES="$CONFIG_FILES pixmaps/Makefile" ;; "profiles/Makefile") CONFIG_FILES="$CONFIG_FILES profiles/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_t=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_t"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out" && rm -f "$tmp/out";; *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" } >"$tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="CXX " # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == "file_magic". file_magic_cmd=$lt_file_magic_cmd # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name of the directory that contains temporary libtool files. objdir=$objdir # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that does not interpret backslashes. ECHO=$lt_ECHO # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $* )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[^=]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$@"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1+=\$2" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$1=\$$1\$2" } _LT_EOF ;; esac sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into a binary # during linking. This must work even if \$libdir does not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path=$lt_fix_srcfile_path_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi rawstudio-2.0/ChangeLog0000644000175000017500000000000011526533646012070 00000000000000rawstudio-2.0/aclocal.m40000644000175000017500000122601311547407110012162 00000000000000# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],, [m4_warning([this file was generated for autoconf 2.67. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.ac. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_HEADER_STDC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_ac,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 56 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl _LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Fix-up fallback echo if it was mangled by the above quoting rules. case \$lt_ECHO in *'\\\[$]0 --fallback-echo"')dnl " lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` ;; esac _LT_OUTPUT_LIBTOOL_INIT ]) # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) cat >"$CONFIG_LT" <<_LTEOF #! $SHELL # Generated by $as_me. # Run this file to recreate a libtool stub with the current configuration. lt_cl_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2008 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. if test "$no_create" != yes; then lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) fi ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_XSI_SHELLFNS sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES # -------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(whole_archive_flag_spec, $1)='' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=echo _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX # ----------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl AC_LINK_IFELSE(AC_LANG_PROGRAM,[ lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/ p } }' aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. m4_defun([_LT_PROG_ECHO_BACKSLASH], [_LT_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$lt_ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac ECHO=${lt_ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then # Yippee, $ECHO works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat <<_LT_EOF [$]* _LT_EOF exit 0 fi # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH if test -z "$lt_ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if { echo_test_string=`eval $cmd`; } 2>/dev/null && { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null then break fi done fi if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$ECHO" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. ECHO='print -r' elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. ECHO='printf %s\n' if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL ECHO="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then ECHO="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. ECHO=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. lt_ECHO=$ECHO if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(lt_ECHO) ]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that does not interpret backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [AC_CHECK_TOOL(AR, ar, false) test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1]) AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ = "XX$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line __oline__ "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` else lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix[[3-9]]*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method == "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ const struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC*) # IBM XL 8.0 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl*) # IBM XL C 8.0/Fortran 10.1 on PPC _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Sun\ F*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; linux* | k*bsd*-gnu) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag= tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi _LT_TAGVAR(link_all_deplibs, $1)=no else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE(int foo(void) {}, _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' ) LDFLAGS="$save_LDFLAGS" else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then _LT_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], [[If ld is used when linking, flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [fix_srcfile_path], [1], [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_PROG_CXX # ------------ # Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ # compiler, we have our own version here. m4_defun([_LT_PROG_CXX], [ pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) AC_PROG_CXX if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_CXX dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_CXX], []) # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [AC_REQUIRE([_LT_PROG_CXX])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 will use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; xl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=echo else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ]) dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_PROG_F77 # ------------ # Since AC_PROG_F77 is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_F77], [ pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) AC_PROG_F77 if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_F77 dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_F77], []) # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_REQUIRE([_LT_PROG_F77])dnl AC_LANG_PUSH(Fortran 77) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${F77-"f77"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_PROG_FC # ----------- # Since AC_PROG_FC is broken, in that it returns the empty string # if there is no fortran compiler, we have our own version here. m4_defun([_LT_PROG_FC], [ pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) AC_PROG_FC if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi popdef([AC_MSG_ERROR]) ])# _LT_PROG_FC dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([_LT_PROG_FC], []) # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_REQUIRE([_LT_PROG_FC])dnl AC_LANG_PUSH(Fortran) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC CC=${FC-"f95"} compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC="$lt_save_CC" ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC GCC= CC=${RC-"windres"} compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC="$lt_save_CC" ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_XSI_SHELLFNS # --------------------- # Bourne and XSI compatible variants of some useful shell functions. m4_defun([_LT_PROG_XSI_SHELLFNS], [case $xsi_shell in yes) cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac } # func_basename file func_basename () { func_basename_result="${1##*/}" } # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}" } # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). func_stripname () { # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"} } # func_opt_split func_opt_split () { func_opt_split_opt=${1%%=*} func_opt_split_arg=${1#*=} } # func_lo2o object func_lo2o () { case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac } # func_xform libobj-or-source func_xform () { func_xform_result=${1%.*}.lo } # func_arith arithmetic-term... func_arith () { func_arith_result=$(( $[*] )) } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=${#1} } _LT_EOF ;; *) # Bourne compatible functions. cat << \_LT_EOF >> "$cfgfile" # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_basename file func_basename () { func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } dnl func_dirname_and_basename dnl A portable version of this function is already defined in general.m4sh dnl so there is no need for it here. # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "X${3}" \ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; esac } # sed scripts: my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' my_sed_long_arg='1s/^-[[^=]]*=//' # func_opt_split func_opt_split () { func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` } # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` } # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` } # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "$[@]"` } # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` } _LT_EOF esac case $lt_shell_append in yes) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]+=\$[2]" } _LT_EOF ;; *) cat << \_LT_EOF >> "$cfgfile" # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "$[1]=\$$[1]\$[2]" } _LT_EOF ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [0], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # Generated from ltversion.in. # serial 3017 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.2.6b]) m4_define([LT_PACKAGE_REVISION], [1.3017]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6b' macro_revision='1.3017' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 4 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # This was merged into AC_PROG_CC in Autoconf. AU_DEFUN([AM_PROG_CC_STDC], [AC_PROG_CC AC_DIAGNOSE([obsolete], [$0: your code should no longer depend upon `am_cv_prog_cc_stdc', but upon `ac_cv_prog_cc_stdc'. Remove this warning and the assignment when you adjust the code. You can also remove the above call to AC_PROG_CC if you already called it elsewhere.]) am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc ]) AU_DEFUN([fp_PROG_CC_STDC]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering # Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. # Default is to disable them, unless `enable' is passed literally. # For symmetry, `disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), [enable], [m4_define([am_maintainer_other], [disable])], [disable], [m4_define([am_maintainer_other], [enable])], [m4_define([am_maintainer_other], [enable]) m4_warn([syntax], [unexpected argument to AM@&t@_MAINTAINER_MODE: $1])]) AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], [ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful (and sometimes confusing) to the casual installer], [USE_MAINTAINER_MODE=$enableval], [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST([MAINT])dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR rawstudio-2.0/depcomp0000755000175000017500000004426711331674343011714 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2009-04-28.21; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free # Software Foundation, Inc. # 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, 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, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputing dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u="sed s,\\\\\\\\,/,g" depmode=msvisualcpp fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: rawstudio-2.0/librawstudio/0000755000175000017500000000000011547430073013111 500000000000000rawstudio-2.0/librawstudio/rs-filter-request.c0000644000175000017500000001064711526533645016610 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include "rs-filter-request.h" struct _RSFilterRequest { RSFilterParam parent; gboolean roi_set; GdkRectangle roi; gboolean quick; }; G_DEFINE_TYPE(RSFilterRequest, rs_filter_request, RS_TYPE_FILTER_PARAM) static void rs_filter_request_finalize(GObject *object) { G_OBJECT_CLASS (rs_filter_request_parent_class)->finalize (object); } static void rs_filter_request_class_init(RSFilterRequestClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = rs_filter_request_finalize; } static void rs_filter_request_init(RSFilterRequest *filter_request) { filter_request->roi_set = FALSE; filter_request->quick = FALSE; } /** * Instantiate a new RSFilterRequest * @return A new RSFilterRequest with a refcount of 1 */ RSFilterRequest * rs_filter_request_new(void) { return g_object_new(RS_TYPE_FILTER_REQUEST, NULL); } /** * Get a RSFilterRequest singleton with quick set to TRUE * @return A RSFilterRequest, this should not be unreffed */ const RSFilterRequest *rs_filter_request_get_quick_singleton(void) { RSFilterRequest *request = NULL; static GStaticMutex lock = G_STATIC_MUTEX_INIT; g_static_mutex_lock(&lock); if (!request) { request = rs_filter_request_new(); rs_filter_request_set_quick(request, TRUE); } g_static_mutex_unlock(&lock); return request; } /** * Clone a RSFilterRequest * @param filter_request A RSFilterRequest * @return A new RSFilterRequest with a refcount of 1 with the same settings as * filter_request */ RSFilterRequest * rs_filter_request_clone(const RSFilterRequest *filter_request) { RSFilterRequest *new_filter_request = rs_filter_request_new(); if (RS_IS_FILTER_REQUEST(filter_request)) { new_filter_request->roi_set = filter_request->roi_set; new_filter_request->roi = filter_request->roi; new_filter_request->quick = filter_request->quick; rs_filter_param_clone(RS_FILTER_PARAM(new_filter_request), RS_FILTER_PARAM(filter_request)); } return new_filter_request; } /** * Set a region of interest * @param filter_request A RSFilterRequest * @param roi A GdkRectangle describing the ROI or NULL to disable */ void rs_filter_request_set_roi(RSFilterRequest *filter_request, GdkRectangle *roi) { g_assert(RS_IS_FILTER_REQUEST(filter_request)); filter_request->roi_set = FALSE; if (roi) { filter_request->roi_set = TRUE; filter_request->roi = *roi; } } /** * Get the region of interest from a RSFilterRequest * @param filter_request A RSFilterRequest * @return A GdkRectangle describing the ROI or NULL if none is set, the * GdkRectangle belongs to the filter_request and should not be freed */ GdkRectangle * rs_filter_request_get_roi(const RSFilterRequest *filter_request) { GdkRectangle *ret = NULL; if (RS_IS_FILTER_REQUEST(filter_request) && filter_request->roi_set) ret = &RS_FILTER_REQUEST(filter_request)->roi; return ret; } /** * Mark a request as "quick" allowing filters to priotize speed over quality * @param filter_request A RSFilterRequest * @param quick TRUE to mark a request as QUICK, FALSE to set normal (default) */ void rs_filter_request_set_quick(RSFilterRequest *filter_request, gboolean quick) { g_assert(RS_IS_FILTER_REQUEST(filter_request)); filter_request->quick = quick; } /** * Get quick status of a RSFilterRequest * @param filter_request A RSFilterRequest * @return TRUE if quality should be sacrified for speed, FALSE otherwise */ gboolean rs_filter_request_get_quick(const RSFilterRequest *filter_request) { gboolean ret = FALSE; if (RS_IS_FILTER_REQUEST(filter_request)) ret = filter_request->quick; return ret; } rawstudio-2.0/librawstudio/rs-library.h0000644000175000017500000000555111526533645015304 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_LIBRARY_H #define RS_LIBRARY_H #include #include #include #include G_BEGIN_DECLS #define RS_TYPE_LIBRARY rs_library_get_type() #define RS_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_LIBRARY, RSLibrary)) #define RS_LIBRARY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_LIBRARY, RSLibraryClass)) #define RS_IS_LIBRARY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_LIBRARY)) #define RS_IS_LIBRARY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_LIBRARY)) #define RS_LIBRARY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_LIBRARY, RSLibraryClass)) typedef struct _RSLibrary RSLibrary; typedef struct { GObjectClass parent_class; } RSLibraryClass; GType rs_library_get_type(void); gboolean rs_library_has_database_connection(RSLibrary *library); gchar *rs_library_get_init_error_msg(RSLibrary *library); RSLibrary *rs_library_get_singleton(void); gint rs_library_add_photo(RSLibrary *library, const gchar *filename); gint rs_library_add_tag(RSLibrary *library, const gchar *tagname); /* Links an image to a tag */ /* You must have created the tag on beforehand using rs_library_add_tag */ /* Pass the returned value as tag_id */ void rs_library_photo_add_tag(RSLibrary *library, const gchar *filename, gint tag_id, const gboolean autotag); void rs_library_delete_photo(RSLibrary *library, const gchar *photo); gboolean rs_library_delete_tag(RSLibrary *library, const gchar *tag, const gboolean force); GList *rs_library_search(RSLibrary *library, GList *tags); GList *rs_library_photo_tags(RSLibrary *library, const gchar *photo, const gboolean autotag); GList *rs_library_find_tag(RSLibrary *library, const gchar *tag); gboolean rs_library_set_tag_search(gchar *str); void rs_library_add_photo_with_metadata(RSLibrary *library, const gchar *photo, RSMetadata *metadata); void rs_library_restore_tags(const gchar *directory); void rs_library_backup_tags(RSLibrary *library, const gchar *photo_filename); G_END_DECLS #endif /* RS_LIBRARY_H */ rawstudio-2.0/librawstudio/rs-lens-fix.c0000644000175000017500000003416611543674627015371 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include "config.h" static GHashTable *lens_fix_hash_table; static gchar * lens_fix_str_hash(RS_MAKE make, gint id, gdouble min_focal, gdouble max_focal) { return g_strdup_printf("%d %d:%0.1f:%0.1f", (int)make, id, min_focal, max_focal); } static const gchar* lens_fix_find(RS_MAKE make, gint id, gdouble min_focal, gdouble max_focal) { gchar *str_hash = lens_fix_str_hash(make, id, min_focal, max_focal); const gchar* lens_name = g_hash_table_lookup(lens_fix_hash_table, str_hash); g_free(str_hash); return lens_name; } static gboolean lens_fix_insert(RS_MAKE make, gint id, gdouble min_focal, gdouble max_focal, const gchar* name) { gchar *str_hash = lens_fix_str_hash(make, id, min_focal, max_focal); /* May NOT be freed */ if (!lens_fix_find(make, id, min_focal, max_focal)) g_hash_table_insert(lens_fix_hash_table, str_hash, g_strdup(name)); else g_free(str_hash); lens_fix_find(make, id, min_focal, max_focal); return TRUE; } /* These are lenses for Canon, where there is no known 3rd party lenses */ /* This table is mainly used for Canon cameras, where there is no text indication of lenses */ static gchar* get_canon_name_from_lens_id(gint lens_id) { gchar* id = NULL; switch (lens_id) { case 1: id = g_strdup("Canon EF 50mm f/1.8"); break; case 2: id = g_strdup("Canon EF 28mm f/2.8"); break; case 3: id = g_strdup("Canon EF 135mm f/2.8 Soft"); break; case 5: id = g_strdup("Canon EF 35-70mm f/3.5-4.5"); break; case 7: id = g_strdup("Canon EF 100-300mm f/5.6L"); break; case 9: id = g_strdup("Canon EF 70-210mm f/4"); break; case 11: id = g_strdup("Canon EF 35mm f/2"); break; case 13: id = g_strdup("Canon EF 15mm f/2.8 Fisheye"); break; case 14: id = g_strdup("Canon EF 50-200mm f/3.5-4.5L"); break; case 15: id = g_strdup("Canon EF 50-200mm f/3.5-4.5"); break; case 16: id = g_strdup("Canon EF 35-135mm f/3.5-4.5"); break; case 17: id = g_strdup("Canon EF 35-70mm f/3.5-4.5A"); break; case 18: id = g_strdup("Canon EF 28-70mm f/3.5-4.5"); break; case 20: id = g_strdup("Canon EF 100-200mm f/4.5A"); break; case 21: id = g_strdup("Canon EF 80-200mm f/2.8L"); break; case 23: id = g_strdup("Canon EF 35-105mm f/3.5-4.5"); break; case 24: id = g_strdup("Canon EF 35-80mm f/4-5.6 Power Zoom"); break; case 25: id = g_strdup("Canon EF 35-80mm f/4-5.6 Power Zoom"); break; case 27: id = g_strdup("Canon EF 35-80mm f/4-5.6"); break; case 29: id = g_strdup("Canon EF 50mm f/1.8 II"); break; case 30: id = g_strdup("Canon EF 35-105mm f/4.5-5.6"); break; case 33: id = g_strdup("Voigtlander or Zeiss Lens"); break; case 35: id = g_strdup("Canon EF 35-80mm f/4-5.6"); break; case 36: id = g_strdup("Canon EF 38-76mm f/4.5-5.6"); break; case 38: id = g_strdup("Canon EF 80-200mm f/4.5-5.6"); break; case 39: id = g_strdup("Canon EF 75-300mm f/4-5.6"); break; case 40: id = g_strdup("Canon EF 28-80mm f/3.5-5.6"); break; case 41: id = g_strdup("Canon EF 28-90mm f/4-5.6"); break; case 43: id = g_strdup("Canon EF 28-105mm f/4-5.6"); break; case 44: id = g_strdup("Canon EF 90-300mm f/4.5-5.6"); break; case 45: id = g_strdup("Canon EF-S 18-55mm f/3.5-5.6 [II]"); break; case 46: id = g_strdup("Canon EF 28-90mm f/4-5.6"); break; case 48: id = g_strdup("Canon EF-S 18-55mm f/3.5-5.6 IS"); break; case 49: id = g_strdup("Canon EF-S 55-250mm f/4-5.6 IS"); break; case 50: id = g_strdup("Canon EF-S 18-200mm f/3.5-5.6 IS"); break; case 51: id = g_strdup("Canon EF-S 18-135mm f/3.5-5.6 IS"); break; case 52: id = g_strdup("Canon EF-S 18-55mm f/3.5-5.6 IS II"); break; case 94: id = g_strdup("Canon TS-E 17mm f/4L"); break; case 95: id = g_strdup("Canon TS-E 24.0mm f/3.5 L II"); break; case 124: id = g_strdup("Canon MP-E 65mm f/2.8 1-5x Macro Photo"); break; case 125: id = g_strdup("Canon TS-E 24mm f/3.5L"); break; case 126: id = g_strdup("Canon TS-E 45mm f/2.8"); break; case 127: id = g_strdup("Canon TS-E 90mm f/2.8"); break; case 129: id = g_strdup("Canon EF 300mm f/2.8L"); break; case 130: id = g_strdup("Canon EF 50mm f/1.0L"); break; case 132: id = g_strdup("Canon EF 1200mm f/5.6L"); break; case 134: id = g_strdup("Canon EF 600mm f/4L IS"); break; case 135: id = g_strdup("Canon EF 200mm f/1.8L"); break; case 136: id = g_strdup("Canon EF 300mm f/2.8L"); break; case 138: id = g_strdup("Canon EF 28-80mm f/2.8-4L"); break; case 139: id = g_strdup("Canon EF 400mm f/2.8L"); break; case 140: id = g_strdup("Canon EF 500mm f/4.5L"); break; case 141: id = g_strdup("Canon EF 500mm f/4.5L"); break; case 142: id = g_strdup("Canon EF 300mm f/2.8L IS"); break; case 143: id = g_strdup("Canon EF 500mm f/4L IS"); break; case 144: id = g_strdup("Canon EF 35-135mm f/4-5.6 USM"); break; case 145: id = g_strdup("Canon EF 100-300mm f/4.5-5.6 USM"); break; case 146: id = g_strdup("Canon EF 70-210mm f/3.5-4.5 USM"); break; case 147: id = g_strdup("Canon EF 35-135mm f/4-5.6 USM"); break; case 148: id = g_strdup("Canon EF 28-80mm f/3.5-5.6 USM"); break; case 149: id = g_strdup("Canon EF 100mm f/2 USM"); break; case 151: id = g_strdup("Canon EF 200mm f/2.8L"); break; case 154: id = g_strdup("Canon EF 20mm f/2.8 USM"); break; case 155: id = g_strdup("Canon EF 85mm f/1.8 USM"); break; case 162: id = g_strdup("Canon EF 200mm f/2.8L"); break; case 163: id = g_strdup("Canon EF 300mm f/4L"); break; case 164: id = g_strdup("Canon EF 400mm f/5.6L"); break; case 165: id = g_strdup("Canon EF 70-200mm f/2.8 L"); break; case 166: id = g_strdup("Canon EF 70-200mm f/2.8 L + 1.4x"); break; case 167: id = g_strdup("Canon EF 70-200mm f/2.8 L + 2x"); break; case 168: id = g_strdup("Canon EF 28mm f/1.8 USM"); break; case 170: id = g_strdup("Canon EF 200mm f/2.8L II"); break; case 171: id = g_strdup("Canon EF 300mm f/4L"); break; case 172: id = g_strdup("Canon EF 400mm f/5.6L"); break; case 175: id = g_strdup("Canon EF 400mm f/2.8L"); break; case 176: id = g_strdup("Canon EF 24-85mm f/3.5-4.5 USM"); break; case 177: id = g_strdup("Canon EF 300mm f/4L IS"); break; case 178: id = g_strdup("Canon EF 28-135mm f/3.5-5.6 IS"); break; case 179: id = g_strdup("Canon EF 24mm f/1.4L"); break; case 180: id = g_strdup("Canon EF 35mm f/1.4L"); break; case 181: id = g_strdup("Canon EF 100-400mm f/4.5-5.6L IS + 1.4x"); break; case 182: id = g_strdup("Canon EF 100-400mm f/4.5-5.6L IS + 2x"); break; case 183: id = g_strdup("Canon EF 100-400mm f/4.5-5.6L IS"); break; case 184: id = g_strdup("Canon EF 400mm f/2.8L + 2x"); break; case 185: id = g_strdup("Canon EF 600mm f/4L IS"); break; case 186: id = g_strdup("Canon EF 70-200mm f/4L"); break; case 187: id = g_strdup("Canon EF 70-200mm f/4L + 1.4x"); break; case 188: id = g_strdup("Canon EF 70-200mm f/4L + 2x"); break; case 189: id = g_strdup("Canon EF 70-200mm f/4L + 2.8x"); break; case 190: id = g_strdup("Canon EF 100mm f/2.8 Macro"); break; case 191: id = g_strdup("Canon EF 400mm f/4 DO IS"); break; case 193: id = g_strdup("Canon EF 35-80mm f/4-5.6 USM"); break; case 194: id = g_strdup("Canon EF 80-200mm f/4.5-5.6 USM"); break; case 195: id = g_strdup("Canon EF 35-105mm f/4.5-5.6 USM"); break; case 196: id = g_strdup("Canon EF 75-300mm f/4-5.6 USM"); break; case 197: id = g_strdup("Canon EF 75-300mm f/4-5.6 IS USM"); break; case 198: id = g_strdup("Canon EF 50mm f/1.4 USM"); break; case 199: id = g_strdup("Canon EF 28-80mm f/3.5-5.6 USM"); break; case 200: id = g_strdup("Canon EF 75-300mm f/4-5.6 USM"); break; case 201: id = g_strdup("Canon EF 28-80mm f/3.5-5.6 USM"); break; case 202: id = g_strdup("Canon EF 28-80mm f/3.5-5.6 USM IV"); break; case 208: id = g_strdup("Canon EF 22-55mm f/4-5.6 USM"); break; case 209: id = g_strdup("Canon EF 55-200mm f/4.5-5.6"); break; case 210: id = g_strdup("Canon EF 28-90mm f/4-5.6 USM"); break; case 211: id = g_strdup("Canon EF 28-200mm f/3.5-5.6 USM"); break; case 212: id = g_strdup("Canon EF 28-105mm f/4-5.6 USM"); break; case 213: id = g_strdup("Canon EF 90-300mm f/4.5-5.6 USM"); break; case 214: id = g_strdup("Canon EF-S 18-55mm f/3.5-5.6 USM"); break; case 215: id = g_strdup("Canon EF 55-200mm f/4.5-5.6 II USM"); break; case 224: id = g_strdup("Canon EF 70-200mm f/2.8L IS"); break; case 225: id = g_strdup("Canon EF 70-200mm f/2.8L IS + 1.4x"); break; case 226: id = g_strdup("Canon EF 70-200mm f/2.8L IS + 2x"); break; case 227: id = g_strdup("Canon EF 70-200mm f/2.8L IS + 2.8x"); break; case 228: id = g_strdup("Canon EF 28-105mm f/3.5-4.5 USM"); break; case 229: id = g_strdup("Canon EF 16-35mm f/2.8L"); break; case 230: id = g_strdup("Canon EF 24-70mm f/2.8L"); break; case 231: id = g_strdup("Canon EF 17-40mm f/4L"); break; case 232: id = g_strdup("Canon EF 70-300mm f/4.5-5.6 DO IS USM"); break; case 233: id = g_strdup("Canon EF 28-300mm f/3.5-5.6L IS"); break; case 234: id = g_strdup("Canon EF-S 17-85mm f4-5.6 IS USM"); break; case 235: id = g_strdup("Canon EF-S 10-22mm f/3.5-4.5 USM"); break; case 236: id = g_strdup("Canon EF-S 60mm f/2.8 Macro USM"); break; case 237: id = g_strdup("Canon EF 24-105mm f/4L IS"); break; case 238: id = g_strdup("Canon EF 70-300mm f/4-5.6 IS USM"); break; case 239: id = g_strdup("Canon EF 85mm f/1.2L II"); break; case 240: id = g_strdup("Canon EF-S 17-55mm f/2.8 IS USM"); break; case 241: id = g_strdup("Canon EF 50mm f/1.2L"); break; case 242: id = g_strdup("Canon EF 70-200mm f/4L IS"); break; case 243: id = g_strdup("Canon EF 70-200mm f/4L IS + 1.4x"); break; case 244: id = g_strdup("Canon EF 70-200mm f/4L IS + 2x"); break; case 245: id = g_strdup("Canon EF 70-200mm f/4L IS + 2.8x"); break; case 246: id = g_strdup("Canon EF 16-35mm f/2.8L II"); break; case 247: id = g_strdup("Canon EF 14mm f/2.8L II USM"); break; case 248: id = g_strdup("Canon EF 200mm f/2L IS"); break; case 249: id = g_strdup("Canon EF 800mm f/5.6L IS"); break; case 250: id = g_strdup("Canon EF 24 f/1.4L II"); break; case 251: id = g_strdup("Canon EF 70-200mm f/2.8L IS II USM"); break; case 254: id = g_strdup("Canon EF 100mm f/2.8L Macro IS USM"); break; case 488: id = g_strdup("Canon EF-S 15-85mm f/3.5-5.6 IS USM"); break; } return id; } static RS_MAKE translate_maker_name(const gchar *maker) { if (0 == g_strcmp0(maker, "canon")) return MAKE_CANON; if (0 == g_strcmp0(maker, "cikon")) return MAKE_NIKON; if (0 == g_strcmp0(maker, "casio")) return MAKE_CASIO; if (0 == g_strcmp0(maker, "olympus")) return MAKE_OLYMPUS; if (0 == g_strcmp0(maker, "kodak")) return MAKE_KODAK; if (0 == g_strcmp0(maker, "leica")) return MAKE_LEICA; if (0 == g_strcmp0(maker, "minolta")) return MAKE_MINOLTA; if (0 == g_strcmp0(maker, "hasselblad")) return MAKE_HASSELBLAD; if (0 == g_strcmp0(maker, "panasonic")) return MAKE_PANASONIC; if (0 == g_strcmp0(maker, "pentax")) return MAKE_PENTAX; if (0 == g_strcmp0(maker, "fujifilm")) return MAKE_FUJIFILM; if (0 == g_strcmp0(maker, "phase one")) return MAKE_PHASEONE; if (0 == g_strcmp0(maker, "ricoh")) return MAKE_RICOH; if (0 == g_strcmp0(maker, "sony")) return MAKE_SONY; g_debug("Warning: Could not identify camera in lens-fix DB: %s", maker); return MAKE_UNKNOWN; } gboolean rs_lens_fix_init(void) { lens_fix_hash_table = g_hash_table_new(g_str_hash, g_str_equal); xmlDocPtr doc; xmlNodePtr cur; xmlNodePtr entry = NULL; xmlChar *val; gint lens_id; gdouble min_focal = 0.0, max_focal = 0.0; gchar *camera_make = NULL; gchar *lens_name = NULL; gchar *filename = g_build_filename(PACKAGE_DATA_DIR, PACKAGE, "lens_fix.xml", NULL); if (!g_file_test(filename, G_FILE_TEST_IS_REGULAR)) { g_warning("Cannot read lens fix file: %s ", filename); return FALSE; } doc = xmlParseFile(filename); if (!doc) { g_warning("Error parsing lens fix file: %s ", filename); return FALSE; } g_free(filename); cur = xmlDocGetRootElement(doc); if (cur && (xmlStrcmp(cur->name, BAD_CAST "rawstudio-lens-fix") == 0)) { cur = cur->xmlChildrenNode; while(cur) { if ((!xmlStrcmp(cur->name, BAD_CAST "lens"))) { lens_id = atoi((char *) xmlGetProp(cur, BAD_CAST "id")); min_focal = rs_atof((char *) xmlGetProp(cur, BAD_CAST "min-focal")); max_focal = rs_atof((char *) xmlGetProp(cur, BAD_CAST "max-focal")); camera_make = g_ascii_strdown((gchar *) xmlGetProp(cur, BAD_CAST "make"), -1); entry = cur->xmlChildrenNode; while (entry) { if (!xmlStrcmp(entry->name, BAD_CAST "name")) { val = xmlNodeListGetString(doc, entry->xmlChildrenNode, 1); lens_name = g_strdup((gchar *) val); xmlFree(val); } entry = entry->next; } if (lens_name) { RS_MAKE camera_maker_id = translate_maker_name(camera_make); lens_fix_insert(camera_maker_id, lens_id, min_focal, max_focal, lens_name); } } cur = cur->next; } } else g_warning("Did not recognize the format in %s", filename); xmlFreeDoc(doc); return FALSE; } gboolean rs_lens_fix(RSMetadata *meta) { if (!lens_fix_hash_table) { g_warning("rs_lens_fix_init() has not been run - lens \"fixing\" will is disabled."); return FALSE; } if (meta->make == MAKE_CANON && meta->lens_id > 0) { gchar *lens = get_canon_name_from_lens_id(meta->lens_id); if (lens) { meta->lens_identifier = lens; return TRUE; } } const gchar* lens_name = lens_fix_find(meta->make, meta->lens_id, meta->lens_min_focal, meta->lens_max_focal); if (lens_name) { meta->lens_identifier = g_strdup(lens_name); return TRUE; } return TRUE; } rawstudio-2.0/librawstudio/x86-cpu.h0000644000175000017500000000207511534730147014421 00000000000000#ifndef __X86__CPU_H__ #define __X86__CPU_H__ typedef enum { RS_CPU_FLAG_MMX = 1<<0, RS_CPU_FLAG_SSE = 1<<1, RS_CPU_FLAG_CMOV = 1<<2, RS_CPU_FLAG_3DNOW = 1<<3, RS_CPU_FLAG_3DNOW_EXT = 1<<4, RS_CPU_FLAG_AMD_ISSE = 1<<5, RS_CPU_FLAG_SSE2 = 1<<6, RS_CPU_FLAG_SSE3 = 1<<7, RS_CPU_FLAG_SSSE3 = 1<<8, RS_CPU_FLAG_SSE4_1 = 1<<9, RS_CPU_FLAG_SSE4_2 = 1<<10, RS_CPU_FLAG_AVX = 1<<11 } RSCpuFlags; #if defined(__x86_64__) # define REG_a "rax" # define REG_b "rbx" # define REG_c "rcx" # define REG_d "rdx" # define REG_D "rdi" # define REG_S "rsi" # define PTR_SIZE "8" # define REG_SP "rsp" # define REG_BP "rbp" # define REGBP rbp # define REGa rax # define REGb rbx # define REGc rcx # define REGSP rsp #else # define REG_a "eax" # define REG_b "ebx" # define REG_c "ecx" # define REG_d "edx" # define REG_D "edi" # define REG_S "esi" # define PTR_SIZE "4" # define REG_SP "esp" # define REG_BP "ebp" # define REGBP ebp # define REGa eax # define REGb ebx # define REGc ecx # define REGSP esp #endif #endif rawstudio-2.0/librawstudio/rs-debug.c0000644000175000017500000000246011547155610014710 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-debug.h" guint rs_debug_flags = 0; static const GDebugKey rs_debug_keys[] = { { "all", RS_DEBUG_ALL }, { "plugins", RS_DEBUG_PLUGINS }, { "filters", RS_DEBUG_FILTERS }, { "performance", RS_DEBUG_PERFORMANCE }, { "processing", RS_DEBUG_PROCESSING } }; void rs_debug_setup(const gchar *debug_string) { g_return_if_fail(debug_string != NULL); rs_debug_flags = g_parse_debug_string(debug_string, rs_debug_keys, G_N_ELEMENTS(rs_debug_keys)); } rawstudio-2.0/librawstudio/rs-color-space.h0000644000175000017500000001157411526533645016051 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_COLOR_SPACE_H #define RS_COLOR_SPACE_H #include G_BEGIN_DECLS #define RS_DEFINE_COLOR_SPACE(type_name, TypeName) \ static GType type_name##_get_type (GTypeModule *module); \ static void type_name##_class_init(TypeName##Class *klass); \ static void type_name##_init(TypeName *color_space); \ static GType type_name##_type = 0; \ static GType \ type_name##_get_type(GTypeModule *module) \ { \ if (!type_name##_type) \ { \ static const GTypeInfo color_space_info = \ { \ sizeof (TypeName##Class), \ (GBaseInitFunc) NULL, \ (GBaseFinalizeFunc) NULL, \ (GClassInitFunc) type_name##_class_init, \ NULL, \ NULL, \ sizeof (TypeName), \ 0, \ (GInstanceInitFunc) type_name##_init \ }; \ \ type_name##_type = g_type_module_register_type( \ module, \ RS_TYPE_COLOR_SPACE, \ #TypeName, \ &color_space_info, \ 0); \ } \ return type_name##_type; \ } #define RS_TYPE_COLOR_SPACE rs_color_space_get_type() #define RS_COLOR_SPACE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_COLOR_SPACE, RSColorSpace)) #define RS_COLOR_SPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_COLOR_SPACE, RSColorSpaceClass)) #define RS_IS_COLOR_SPACE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_COLOR_SPACE)) #define RS_IS_COLOR_SPACE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_COLOR_SPACE)) #define RS_COLOR_SPACE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_COLOR_SPACE, RSColorSpaceClass)) typedef enum { RS_COLOR_SPACE_FLAG_REQUIRES_CMS = 1 } RSColorSpaceFlag; typedef struct { GObject parent; RSColorSpaceFlag flags; RS_MATRIX3 matrix_to_pcs; RS_MATRIX3 matrix_from_pcs; } RSColorSpace; typedef struct { GObjectClass parent_class; const gchar *name; const gchar *description; const RSIccProfile *(*get_icc_profile)(const RSColorSpace *color_space, gboolean linear_profile); const RS1dFunction *(*get_gamma_function)(const RSColorSpace *color_space); } RSColorSpaceClass; #define RS_COLOR_SPACE_REQUIRES_CMS(color_space) (!!((color_space)->flags & RS_COLOR_SPACE_FLAG_REQUIRES_CMS)) GType rs_color_space_get_type(void); /** * Get a color space definition * @param name The GType name for the colorspace (not the registered name) * @return A colorspace singleton if found, NULL otherwise. This should not be unreffed. */ RSColorSpace * rs_color_space_new_singleton(const gchar *name); /** * Set (RGB) to PCS matrix * @note This is only interesting for color space implementations * @param color_space A RSColorSpace * @param matrix A matrix, xyz2rgb will be the inverse of this */ void rs_color_space_set_matrix_to_pcs(RSColorSpace *color_space, const RS_MATRIX3 * const matrix); /** * Get a matrix that will transform this color space to PCS * @param color_space A RSColorSpace * @return from_pcs matrix */ RS_MATRIX3 rs_color_space_get_matrix_to_pcs(const RSColorSpace *color_space); /** * Get a matrix that will transform PCS to this color space * @param color_space A RSColorSpace * @return to_pcs matrix */ RS_MATRIX3 rs_color_space_get_matrix_from_pcs(const RSColorSpace *color_space); /** * Get the ICC profile for this colorspace if any * @param color_space A RSColorSpace * @return A RSIccProfile (or NULL) that should not be unreffed */ const RSIccProfile * rs_color_space_get_icc_profile(const RSColorSpace *color_space, gboolean linear_profile); /** * Get the gamma transfer function for this color space * @param color_space A RSColorSpace * @return A RS1dFunction that should not be unreffed */ const RS1dFunction * rs_color_space_get_gamma_function(const RSColorSpace *color_space); /** * Get the name of the colorspace * @param color_space A RSColorSpace * @return A string containing the name of the colorspace */ const char * rs_color_space_get_name(const RSColorSpace *color_space); /** * Get a description of the colorspace * @param color_space A RSColorSpace * @return A string containing a description of the colorspace */ const char * rs_color_space_get_description(const RSColorSpace *color_space); G_END_DECLS #endif /* RS_COLOR_SPACE_H */ rawstudio-2.0/librawstudio/rs-curve.h0000644000175000017500000001237311526533645014764 00000000000000/***************************************************************************** * Curve widget * * Copyright (C) 2007 Edouard Gomez * * 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 _RS_CURVE_H_ #define _RS_CURVE_H_ #include /* Declared in rs-curve.c */ typedef struct _RSCurveWidget RSCurveWidget; typedef struct _RSCurveWidgetClass RSCurveWidgetClass; GType rs_curve_widget_get_type (void); /** * Creates a new RSCurveWidget * @return A new RSCurveWidget */ extern GtkWidget * rs_curve_widget_new(void); /** * Sets sample array for a RSCurveWidget, this array will be updates whenever the curve changes * @param curve A RSCurveWidget * @param array An array of gfloats to be updated or NULL to unset * @params array_length: Length of array or 0 to unset */ extern void rs_curve_widget_set_array(RSCurveWidget *curve, gfloat *array, guint array_length); /** * Draw a histogram in the background of the widget * @param curve A RSCurveWidget * @param image A image to sample from * @param setting Settings to use, curve and saturation will be ignored */ extern void rs_curve_draw_histogram(RSCurveWidget *curve); /** * Add a knot to a curve widget * @param widget A RSCurveWidget * @param x X coordinate * @param y Y coordinate */ extern void rs_curve_widget_add_knot(RSCurveWidget *curve, gfloat x, gfloat y); /** * Move a knot of a RSCurveWidget * @param curve A RSCurveWidget * @param knot Knot to move or -1 for last * @param x X coordinate * @param y Y coordinate */ extern void rs_curve_widget_move_knot(RSCurveWidget *curve, gint knot, gfloat x, gfloat y); /** * Get samples from curve * @param widget A RSCurveWidget * @param samples Pointer to output array or NULL * @param nbsamples number of samples * @return An array of floats, should be freed */ gfloat * rs_curve_widget_sample(RSCurveWidget *curve, gfloat *samples, guint nbsamples); /** * Set knots of a RSCurveWidget * @param curve A RSCurveWidget * @param knots An array of knots (two values/knot) * @param nknots Number of knots */ extern void rs_curve_widget_set_knots(RSCurveWidget *curve, const gfloat *knots, const guint nknots); /** * Get knots from a RSCurveWidget * @param curve A RSCurveWidget * @param knots An array of knots (two values/knot) (out) * @param nknots Number of knots written (out) */ extern void rs_curve_widget_get_knots(RSCurveWidget *curve, gfloat **knots, guint *nknots); /** * Resets a RSCurveWidget * @param curve A RSCurveWidget */ extern void rs_curve_widget_reset(RSCurveWidget *curve); /** * Saves a RSCurveWidgets knots to a XML-file. * @param curve A RSCurveWidget * @param filename The filename to save to * @return TRUE if succeded, FALSE otherwise */ extern gboolean rs_curve_widget_save(RSCurveWidget *curve, const gchar *filename); /** * Loads knots to a RSCurveWidgets from a XML-file. * @param curve A RSCurveWidget * @param filename The filename load from * @return TRUE if succeded, FALSE otherwise */ extern gboolean rs_curve_widget_load(RSCurveWidget *curve, const gchar *filename); /** * Set the input to base the histogram drawing from * @param curve A RSCurveWidget * @param image An image * @param display_color_space Colorspace to use to transform the input. */ extern void rs_curve_set_input(RSCurveWidget *curve, RSFilter* input, RSColorSpace *display_color_space); /** * Sets the current RGB data to be marked in histogram view based on currently set colorspace * @param curve A RSCurveWidget * @param rgb_values An array of length 3, that contain the current RGB value. Pass NULL to disable view. */ extern void rs_curve_set_highlight(RSCurveWidget *curve, const guchar* rgb_values); /** * Sets the current histogram data * @param curve A RSCurveWidget * @param input An array of 256 entries containing the current histogram */ extern void rs_curve_set_histogram_data(RSCurveWidget *curve, const gint *input); #define RS_CURVE_TYPE_WIDGET (rs_curve_widget_get_type ()) #define RS_CURVE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_CURVE_TYPE_WIDGET, RSCurveWidget)) #define RS_CURVE_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_CAST ((obj), RS_CURVE_WIDGET, RSCurveWidgetClass)) #define RS_IS_CURVE_WIDGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_CURVE_TYPE_WIDGET)) #define RS_IS_CURVE_WIDGET_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE ((obj), RS_CURVE_TYPE_WIDGET)) #define RS_CURVE_WIDGET_GET_CLASS (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_CURVE_TYPE_WIDGET, RSCurveWidgetClass)) #endif /* _RS_CURVE_H_ */ rawstudio-2.0/librawstudio/rs-stock.c0000644000175000017500000000765111541463245014754 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include static GtkIconFactory *rs_icon_factory = NULL; static GtkStockItem rs_stock_items[] = { { RS_STOCK_CROP, NULL, 0, 0, NULL }, { RS_STOCK_ROTATE, NULL, 0, 0, NULL }, { RS_STOCK_COLOR_PICKER, NULL, 0, 0, NULL }, { RS_STOCK_ROTATE_CLOCKWISE, NULL, 0, 0, NULL }, { RS_STOCK_ROTATE_COUNTER_CLOCKWISE, NULL, 0, 0, NULL }, { RS_STOCK_FLIP, NULL, 0, 0, NULL }, { RS_STOCK_MIRROR, NULL, 0, 0, NULL }, }; typedef struct _RSCursorItem RSCursorItem; struct _RSCursorItem { const gchar *filename; const gint x_hot, y_hot; }; static RSCursorItem rs_cursor_items[] = { { "cursor-crop.png", 8, 8}, { "cursor-rotate.png", 8, 8}, { "cursor-color-picker.png", 8, 8}, }; static void add_stock_icon (const gchar *stock_id, const GdkPixbuf *pixbuf) { GtkIconSource *source; GtkIconSet *set; source = gtk_icon_source_new (); gtk_icon_source_set_size (source, GTK_ICON_SIZE_SMALL_TOOLBAR); gtk_icon_source_set_size_wildcarded (source, TRUE); gtk_icon_source_set_pixbuf (source, GDK_PIXBUF(pixbuf)); g_object_unref (GDK_PIXBUF(pixbuf)); set = gtk_icon_set_new (); gtk_icon_set_add_source (set, source); gtk_icon_source_free (source); gtk_icon_factory_add (rs_icon_factory, stock_id, set); gtk_icon_set_unref (set); } void rs_stock_init(void) { rs_icon_factory = gtk_icon_factory_new (); add_stock_icon (RS_STOCK_CROP, gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "tool-crop.png", NULL)); add_stock_icon (RS_STOCK_ROTATE, gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "tool-rotate.png", NULL)); add_stock_icon (RS_STOCK_COLOR_PICKER, gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "tool-color-picker.png", NULL)); add_stock_icon (RS_STOCK_ROTATE_CLOCKWISE, gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "transform_90.png", NULL)); add_stock_icon (RS_STOCK_ROTATE_COUNTER_CLOCKWISE, gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "transform_270.png", NULL)); add_stock_icon (RS_STOCK_FLIP, gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "transform_flip.png", NULL)); add_stock_icon (RS_STOCK_MIRROR, gdk_pixbuf_new_from_file(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "transform_mirror.png", NULL)); gtk_icon_factory_add_default (rs_icon_factory); gtk_stock_add_static (rs_stock_items, G_N_ELEMENTS (rs_stock_items)); } GdkCursor* rs_cursor_new(GdkDisplay *display, RSCursorType cursor_type) { RSCursorItem *cursor = &rs_cursor_items[cursor_type]; GdkPixbuf *pixbuf = NULL; pixbuf = gdk_pixbuf_new_from_file(g_build_filename (PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE, cursor->filename, NULL), NULL); return gdk_cursor_new_from_pixbuf(display, pixbuf, cursor->x_hot,cursor->y_hot); } rawstudio-2.0/librawstudio/rs-dcp-file.h0000644000175000017500000000546311526533645015325 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_DCP_FILE_H #define RS_DCP_FILE_H #include #include #include #include G_BEGIN_DECLS #define RS_TYPE_DCP_FILE rs_dcp_file_get_type() #define RS_DCP_FILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_DCP_FILE, RSDcpFile)) #define RS_DCP_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_DCP_FILE, RSDcpFileClass)) #define RS_IS_DCP_FILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_DCP_FILE)) #define RS_IS_DCP_FILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_DCP_FILE)) #define RS_DCP_FILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_DCP_FILE, RSDcpFileClass)) typedef struct _RSDcpFile RSDcpFile; typedef struct { RSTiffClass parent_class; } RSDcpFileClass; GType rs_dcp_file_get_type(void); RSDcpFile *rs_dcp_file_new_from_file(const gchar *path); const gchar *rs_dcp_file_get_model(RSDcpFile *dcp_file); gboolean rs_dcp_file_get_color_matrix1(RSDcpFile *dcp_file, RS_MATRIX3 *matrix); gboolean rs_dcp_file_get_color_matrix2(RSDcpFile *dcp_file, RS_MATRIX3 *matrix); gfloat rs_dcp_file_get_illuminant1(RSDcpFile *dcp_file); gfloat rs_dcp_file_get_illuminant2(RSDcpFile *dcp_file); const gchar *rs_dcp_file_get_signature(RSDcpFile *dcp_file); const gchar *rs_dcp_file_get_name(RSDcpFile *dcp_file); RSHuesatMap *rs_dcp_file_get_huesatmap1(RSDcpFile *dcp_file); RSHuesatMap *rs_dcp_file_get_huesatmap2(RSDcpFile *dcp_file); RSSpline *rs_dcp_file_get_tonecurve(RSDcpFile *dcp_file); const gchar *rs_dcp_file_get_copyright(RSDcpFile *dcp_file); gboolean rs_dcp_file_get_forward_matrix1(RSDcpFile *dcp_file, RS_MATRIX3 *matrix); gboolean rs_dcp_file_get_forward_matrix2(RSDcpFile *dcp_file, RS_MATRIX3 *matrix); RSHuesatMap *rs_dcp_file_get_looktable(RSDcpFile *dcp_file); /* Returns a generated (hopefully) unique id, that should make it possible to find this profile again */ const gchar *rs_dcp_get_id(RSDcpFile *dcp_file); G_END_DECLS #endif /* RS_DCP_FILE_H */ rawstudio-2.0/librawstudio/rs-image16.c0000644000175000017500000002005011526533645015053 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ #ifdef WIN32 /* Win32 _aligned_malloc */ #include #include #endif #include #include #include #define _ISOC9X_SOURCE 1 /* lrint() */ #define _ISOC99_SOURCE 1 #define __USE_ISOC9X 1 #define __USE_ISOC99 1 #include /* floor() */ #include "rs-image16.h" #define PITCH(width) ((((width)+15)/16)*16) G_DEFINE_TYPE (RS_IMAGE16, rs_image16, G_TYPE_OBJECT); static GObjectClass *parent_class = NULL; static void rs_image16_dispose (GObject *obj) { RS_IMAGE16 *self = (RS_IMAGE16 *)obj; if (self->dispose_has_run) return; self->dispose_has_run = TRUE; G_OBJECT_CLASS (parent_class)->dispose (obj); } static void rs_image16_finalize (GObject *obj) { RS_IMAGE16 *self = (RS_IMAGE16 *)obj; if (self->pixels && (self->pixels_refcount == 1)) free(self->pixels); self->pixels_refcount--; /* Chain up to the parent class */ G_OBJECT_CLASS (parent_class)->finalize (obj); } static void rs_image16_class_init (RS_IMAGE16Class *klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); gobject_class->dispose = rs_image16_dispose; gobject_class->finalize = rs_image16_finalize; parent_class = g_type_class_peek_parent (klass); } static void rs_image16_init (RS_IMAGE16 *self) { self->filters = 0; self->pixels = NULL; self->pixels_refcount = 0; } void rs_image16_transform_getwh(RS_IMAGE16 *in, RS_RECT *crop, gdouble angle, gint orientation, gint *w, gint *h) { RS_MATRIX3 mat; gdouble minx, miny; gdouble maxx, maxy; matrix3_identity(&mat); /* rotate straighten-angle + orientation-angle */ matrix3_affine_rotate(&mat, angle+(orientation&3)*90.0); /* flip if needed */ if (orientation&4) matrix3_affine_scale(&mat, 1.0, -1.0); /* translate into positive x,y*/ matrix3_affine_get_minmax(&mat, &minx, &miny, &maxx, &maxy, 0.0, 0.0, (gdouble) in->w, (gdouble) in->h); matrix3_affine_translate(&mat, -minx, -miny); /* get width and height used for calculating scale */ *w = lrint(maxx - minx); *h = lrint(maxy - miny); /* apply crop if needed */ if (crop) { /* calculate cropped width and height */ *w = abs(crop->x2 - crop->x1 + 1); *h = abs(crop->y2 - crop->y1 + 1); /* translate non-cropped area into negative x,y*/ matrix3_affine_translate(&mat, ((gdouble) -crop->x1), ((gdouble) -crop->y1)); } return; } RS_IMAGE16 * rs_image16_new(const guint width, const guint height, const guint channels, const guint pixelsize) { gint ret; RS_IMAGE16 *rsi; g_assert(width < 65536); g_assert(height < 65536); g_assert(width > 0); g_assert(height > 0); g_assert(channels > 0); g_assert(pixelsize >= channels); rsi = g_object_new(RS_TYPE_IMAGE16, NULL); rsi->w = width; rsi->h = height; rsi->rowstride = PITCH(width * pixelsize); rsi->pitch = rsi->rowstride / pixelsize; rsi->channels = channels; rsi->pixelsize = pixelsize; rsi->filters = 0; /* Allocate actual pixels */ #ifdef WIN32 rsi->pixels = _aligned_malloc(rsi->h*rsi->rowstride * sizeof(gushort), 16); if (rsi->pixels == NULL) #else ret = posix_memalign((void **) &rsi->pixels, 16, rsi->h*rsi->rowstride * sizeof(gushort)); if (ret > 0) #endif { rsi->pixels = NULL; g_object_unref(rsi); return NULL; } rsi->pixels_refcount = 1; /* Verify alignment */ g_assert((GPOINTER_TO_INT(rsi->pixels) % 16) == 0); g_assert((rsi->rowstride % 16) == 0); return(rsi); } /** * Initializes a new RS_IMAGE16 with pixeldata from @input. * @note Pixeldata is NOT copied to new RS_IMAGE16. * @param input A RS_IMAGE16 * @param rectangle A GdkRectangle describing the area to subframe * @return A new RS_IMAGE16 with a refcount of 1, the image can be bigger * than rectangle to retain 16 byte alignment. */ RS_IMAGE16 * rs_image16_new_subframe(RS_IMAGE16 *input, GdkRectangle *rectangle) { RS_IMAGE16 *output; gint width, height; gint x, y; g_assert(RS_IS_IMAGE16(input)); g_assert(rectangle->x >= 0); g_assert(rectangle->y >= 0); g_assert(rectangle->width > 0); g_assert(rectangle->height > 0); g_assert(rectangle->width <= input->w); g_assert(rectangle->height <= input->h); g_assert((rectangle->width + rectangle->x) <= input->w); g_assert((rectangle->height + rectangle->y) <= input->h); output = g_object_new(RS_TYPE_IMAGE16, NULL); /* Align x to 16 byte boundary on input with pixelsize 4 (8 byte/pixel) */ x = rectangle->x; if (input->pixelsize == 4) { x = x - (x & 0x1); x = CLAMP(x, 0, input->w-1); } y = CLAMP(rectangle->y, 0, input->h-1); width = rectangle->width + (rectangle->x - x) + 1; width = CLAMP(width - (width&1), 1, input->w - x); height = CLAMP(rectangle->height, 1, input->h - y); output->w = width; output->h = height; output->rowstride = input->rowstride; output->pitch = input->pitch; output->channels = input->channels; output->pixelsize = input->pixelsize; output->filters = input->filters; output->pixels = GET_PIXEL(input, x, y); output->pixels_refcount = input->pixels_refcount + 1; /* Some sanity checks */ g_assert(output->w <= input->w); g_assert(output->h <= input->h); g_assert(output->w > 0); g_assert(output->h > 0); g_assert(output->w >= rectangle->width); g_assert(output->h >= rectangle->height); g_assert((output->w - 4) <= rectangle->width); /* Verify alignment */ g_assert((GPOINTER_TO_INT(output->pixels) % 16) == 0); g_assert((output->rowstride % 16) == 0); return output; } /* Bit blitter - works on byte-sized values */ static inline void bit_blt(char* dstp, int dst_pitch, const char* srcp, int src_pitch, int row_size, int height) { if (height == 1 || (dst_pitch == src_pitch && src_pitch == row_size)) { memcpy(dstp, srcp, row_size*height); return; } int y; for (y = height; y > 0; --y) { memcpy(dstp, srcp, row_size); dstp += dst_pitch; srcp += src_pitch; } } RS_IMAGE16 * rs_image16_copy(RS_IMAGE16 *in, gboolean copy_pixels) { RS_IMAGE16 *out; out = rs_image16_new(in->w, in->h, in->channels, in->pixelsize); if (copy_pixels) { bit_blt((char*)GET_PIXEL(out,0,0), out->rowstride * 2, (const char*)GET_PIXEL(in,0,0), in->rowstride * 2, out->rowstride * 2, in->h); } return(out); } /** * Returns a single pixel from a RS_IMAGE16 * @param image A RS_IMAGE16 * @param x X coordinate (column) * @param y Y coordinate (row) * @param extend_edges Tries to extend edges beyond image borders if TRUE */ inline gushort * rs_image16_get_pixel(RS_IMAGE16 *image, gint x, gint y, gboolean extend_edges) { gushort *pixel = NULL; if (image) { if (extend_edges) { if (x >= image->w) x = image->w-1; else if (x < 0) x = 0; if (y >= image->h) y = image->h-1; else if (y < 0) y = 0; } /* Return pixel if inside image */ if ((x>=0) && (y>=0) && (xw) && (yh)) pixel = &image->pixels[y*image->rowstride + x*image->pixelsize]; } return pixel; } gchar * rs_image16_get_checksum(RS_IMAGE16 *image) { gint w = image->w; gint h = image->h; gint c = image->channels; gint x, y, z; gushort *pixels = g_new0(gushort, w*h*c); gushort *pixel = NULL; gushort *pixels_iter = pixels; for (x=0; x, * * Anders Kvist and Klaus Post * * 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 RS_IO_JOB_PREFETCH_H #define RS_IO_JOB_PREFETCH_H #include #include "rs-io-job.h" G_BEGIN_DECLS #define RS_TYPE_IO_JOB_PREFETCH rs_io_job_prefetch_get_type() #define RS_IO_JOB_PREFETCH(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_IO_JOB_PREFETCH, RSIoJobPrefetch)) #define RS_IO_JOB_PREFETCH_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_IO_JOB_PREFETCH, RSIoJobPrefetchClass)) #define RS_IS_IO_JOB_PREFETCH(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_IO_JOB_PREFETCH)) #define RS_IS_IO_JOB_PREFETCH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_IO_JOB_PREFETCH)) #define RS_IO_JOB_PREFETCH_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_IO_JOB_PREFETCH, RSIoJobPrefetchClass)) typedef struct { RSIoJobClass parent_class; } RSIoJobPrefetchClass; GType rs_io_job_prefetch_get_type(void); RSIoJob *rs_io_job_prefetch_new(const gchar *path); G_END_DECLS #endif /* RS_IO_JOB_PREFETCH_H */ rawstudio-2.0/librawstudio/rs-color-space-icc.h0000644000175000017500000000376711526533645016612 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_COLOR_SPACE_ICC_H #define RS_COLOR_SPACE_ICC_H #include #include "rs-color-space.h" G_BEGIN_DECLS #define RS_TYPE_COLOR_SPACE_ICC rs_color_space_icc_get_type() #define RS_COLOR_SPACE_ICC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_COLOR_SPACE_ICC, RSColorSpaceIcc)) #define RS_COLOR_SPACE_ICC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_COLOR_SPACE_ICC, RSColorSpaceIccClass)) #define RS_IS_COLOR_SPACE_ICC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_COLOR_SPACE_ICC)) #define RS_IS_COLOR_SPACE_ICC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_COLOR_SPACE_ICC)) #define RS_COLOR_SPACE_ICC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_COLOR_SPACE_ICC, RSColorSpaceIccClass)) typedef struct { RSColorSpace parent; gboolean dispose_has_run; RSIccProfile *icc_profile; } RSColorSpaceIcc; typedef struct { RSColorSpaceClass parent_class; } RSColorSpaceIccClass; GType rs_color_space_icc_get_type(void); RSColorSpace *rs_color_space_icc_new_from_icc(RSIccProfile *icc_profile); RSColorSpace *rs_color_space_icc_new_from_file(const gchar *path); G_END_DECLS #endif /* RS_COLOR_SPACE_ICC_H */ rawstudio-2.0/librawstudio/rs-io-job-tagging.h0000644000175000017500000000406611526533645016435 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_IO_JOB_TAGGING_H #define RS_IO_JOB_TAGGING_H #include "rs-types.h" #include "rs-io-job.h" #include G_BEGIN_DECLS #define RS_TYPE_IO_JOB_TAGGING rs_io_job_tagging_get_type() #define RS_IO_JOB_TAGGING(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_IO_JOB_TAGGING, RSIoJobTagging)) #define RS_IO_JOB_TAGGING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_IO_JOB_TAGGING, RSIoJobTaggingClass)) #define RS_IS_IO_JOB_TAGGING(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_IO_JOB_TAGGING)) #define RS_IS_IO_JOB_TAGGING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_IO_JOB_TAGGING)) #define RS_IO_JOB_TAGGING_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_IO_JOB_TAGGING, RSIoJobTaggingClass)) typedef struct { RSIoJobClass parent_class; } RSIoJobTaggingClass; GType rs_io_job_tagging_get_type(void); /* Do delayed loading of tags, or add tags to an image */ /* To load tagging data delayed set tag_id to -1 */ /* To backup tagging data delayed set tag_id to -2 */ /* To add a tag to an image, provide the image name as path and set the tag_id */ RSIoJob *rs_io_job_tagging_new(const gchar *path, gint tag_id, gboolean autotag); G_END_DECLS #endif /* RS_IO_JOB_TAGGING_H */ rawstudio-2.0/librawstudio/rs-io-job.h0000644000175000017500000000350011526533645015007 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_IO_JOB_H #define RS_IO_JOB_H #include G_BEGIN_DECLS #define RS_TYPE_IO_JOB rs_io_job_get_type() #define RS_IO_JOB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_IO_JOB, RSIoJob)) #define RS_IO_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_IO_JOB, RSIoJobClass)) #define RS_IS_IO_JOB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_IO_JOB)) #define RS_IS_IO_JOB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_IO_JOB)) #define RS_IO_JOB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_IO_JOB, RSIoJobClass)) typedef struct { GObject parent; gint idle_class; gint priority; gpointer user_data; } RSIoJob; typedef struct { GObjectClass parent_class; void (*execute)(RSIoJob *job); void (*do_callback)(RSIoJob *job); } RSIoJobClass; GType rs_io_job_get_type(void); RSIoJob *rs_io_job_new(void); void rs_io_job_execute(RSIoJob *job); void rs_io_job_do_callback(RSIoJob *job); G_END_DECLS #endif /* RS_IO_JOB_H */ rawstudio-2.0/librawstudio/rs-profile-selector.h0000644000175000017500000000414111526533645017110 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_PROFILE_SELECTOR_H #define RS_PROFILE_SELECTOR_H #include #include #include G_BEGIN_DECLS #define RS_TYPE_PROFILE_SELECTOR rs_profile_selector_get_type() #define RS_PROFILE_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_PROFILE_SELECTOR, RSProfileSelector)) #define RS_PROFILE_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_PROFILE_SELECTOR, RSProfileSelectorClass)) #define RS_IS_PROFILE_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_PROFILE_SELECTOR)) #define RS_IS_PROFILE_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_PROFILE_SELECTOR)) #define RS_PROFILE_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_PROFILE_SELECTOR, RSProfileSelectorClass)) typedef struct { GtkComboBox parent; gpointer selected; } RSProfileSelector; typedef struct { GtkComboBoxClass parent_class; } RSProfileSelectorClass; GType rs_profile_selector_get_type(void); RSProfileSelector * rs_profile_selector_new(void); void rs_profile_selector_select_profile(RSProfileSelector *selector, gpointer profile); void rs_profile_selector_set_model_filter(RSProfileSelector *selector, GtkTreeModelFilter *filter); G_END_DECLS #endif /* RS_PROFILE_SELECTOR_H */ rawstudio-2.0/librawstudio/rs-io-job-metadata.h0000644000175000017500000000363411526533645016575 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_IO_JOB_METADATA_H #define RS_IO_JOB_METADATA_H #include "rs-types.h" #include "rs-io-job.h" #include G_BEGIN_DECLS #define RS_TYPE_IO_JOB_METADATA rs_io_job_metadata_get_type() #define RS_IO_JOB_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_IO_JOB_METADATA, RSIoJobMetadata)) #define RS_IO_JOB_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_IO_JOB_METADATA, RSIoJobMetadataClass)) #define RS_IS_IO_JOB_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_IO_JOB_METADATA)) #define RS_IS_IO_JOB_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_IO_JOB_METADATA)) #define RS_IO_JOB_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_IO_JOB_METADATA, RSIoJobMetadataClass)) typedef void (*RSGotMetadataCB)(RSMetadata *metadata, gpointer user_data); typedef struct { RSIoJobClass parent_class; } RSIoJobMetadataClass; GType rs_io_job_metadata_get_type(void); RSIoJob *rs_io_job_metadata_new(const gchar *path, RSGotMetadataCB callback); G_END_DECLS #endif /* RS_IO_JOB_METADATA_H */ rawstudio-2.0/librawstudio/conf_interface.c0000644000175000017500000002753111526533645016160 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include "conf_interface.h" #ifdef G_OS_WIN32 #define WITH_REGISTRY #undef WITH_GCONF #endif #ifdef WITH_GCONF #include #define GCONF_PATH "/apps/rawstudio/" static GStaticMutex lock = G_STATIC_MUTEX_INIT; #else #ifdef G_OS_WIN32 #include #define WITH_REGISTRY #define REGISTRY_KEY "Software\\Rawstudio" #endif #endif gboolean rs_conf_get_boolean(const gchar *name, gboolean *boolean_value) { gboolean ret = FALSE; #ifdef WITH_GCONF GConfValue *gvalue; g_static_mutex_lock(&lock); GConfClient *client = gconf_client_get_default(); GString *fullname = g_string_new(GCONF_PATH); g_string_append(fullname, name); if (client) { gvalue = gconf_client_get(client, fullname->str, NULL); if (gvalue) { if (gvalue->type == GCONF_VALUE_BOOL) { ret = TRUE; if (boolean_value) *boolean_value = gconf_value_get_bool(gvalue); } gconf_value_free(gvalue); } g_object_unref(client); } g_static_mutex_unlock(&lock); g_string_free(fullname, TRUE); #endif #ifdef WITH_REGISTRY ret = rs_conf_get_integer(name, boolean_value); #endif return(ret); } gboolean rs_conf_get_boolean_with_default(const gchar *name, gboolean *boolean_value, gboolean default_value) { gboolean ret = FALSE; if (boolean_value) *boolean_value = default_value; #ifdef WITH_GCONF GConfValue *gvalue; GConfClient *client = gconf_client_get_default(); GString *fullname = g_string_new(GCONF_PATH); g_string_append(fullname, name); g_static_mutex_lock(&lock); if (client) { gvalue = gconf_client_get(client, fullname->str, NULL); if (gvalue) { if (gvalue->type == GCONF_VALUE_BOOL) { ret = TRUE; if (boolean_value) *boolean_value = gconf_value_get_bool(gvalue); } gconf_value_free(gvalue); } g_object_unref(client); } g_static_mutex_unlock(&lock); g_string_free(fullname, TRUE); #endif #ifdef WITH_REGISTRY ret = rs_conf_get_integer(name, boolean_value); #endif return(ret); } gboolean rs_conf_set_boolean(const gchar *name, gboolean bool_value) { gboolean ret = FALSE; #ifdef WITH_GCONF g_static_mutex_lock(&lock); GConfClient *client = gconf_client_get_default(); GString *fullname = g_string_new(GCONF_PATH); g_string_append(fullname, name); if (client) { ret = gconf_client_set_bool(client, fullname->str, bool_value, NULL); g_object_unref(client); } g_static_mutex_unlock(&lock); g_string_free(fullname, TRUE); #endif #ifdef WITH_REGISTRY ret = rs_conf_set_integer(name, bool_value); #endif return(ret); } gchar * rs_conf_get_string(const gchar *name) { gchar *ret=NULL; #ifdef WITH_GCONF GConfValue *gvalue; g_static_mutex_lock(&lock); GConfClient *client = gconf_client_get_default(); GString *fullname = g_string_new(GCONF_PATH); g_string_append(fullname, name); if (client) { gvalue = gconf_client_get(client, fullname->str, NULL); if (gvalue) { if (gvalue->type == GCONF_VALUE_STRING) ret = g_strdup(gconf_value_get_string(gvalue)); gconf_value_free(gvalue); } g_object_unref(client); } g_static_mutex_unlock(&lock); g_string_free(fullname, TRUE); #endif #ifdef WITH_REGISTRY HKEY hKey; char *szLwd; DWORD dwBufLen; LONG lRet; if (RegOpenKeyEx( HKEY_CURRENT_USER, REGISTRY_KEY, 0, KEY_QUERY_VALUE, &hKey ) == ERROR_SUCCESS) { lRet = RegQueryValueEx( hKey, name, NULL, NULL, NULL, &dwBufLen); if (dwBufLen > 0) { szLwd = g_malloc(dwBufLen); lRet = RegQueryValueEx( hKey, name, NULL, NULL, (LPBYTE) szLwd, &dwBufLen); RegCloseKey( hKey ); if (lRet == ERROR_SUCCESS) ret = szLwd; else g_free(szLwd); } } #endif return(ret); } gboolean rs_conf_set_string(const gchar *name, const gchar *string_value) { gboolean ret = FALSE; #ifdef WITH_GCONF g_static_mutex_lock(&lock); GConfClient *client = gconf_client_get_default(); GString *fullname = g_string_new(GCONF_PATH); g_string_append(fullname, name); if (client) { ret = gconf_client_set_string(client, fullname->str, string_value, NULL); g_static_mutex_unlock(&lock); } g_object_unref(client); g_string_free(fullname, TRUE); #endif #ifdef WITH_REGISTRY HKEY hKey; if (RegCreateKeyEx(HKEY_CURRENT_USER, REGISTRY_KEY, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL) == ERROR_SUCCESS) { if (RegSetValueEx(hKey, name, 0, REG_SZ, (LPBYTE) string_value, (DWORD) (lstrlen(string_value)+1))==ERROR_SUCCESS) ret = TRUE; } RegCloseKey(hKey); #endif return ret; } gboolean rs_conf_get_integer(const gchar *name, gint *integer_value) { gboolean ret=FALSE; #ifdef WITH_GCONF g_static_mutex_lock(&lock); GConfValue *gvalue; GConfClient *client = gconf_client_get_default(); GString *fullname = g_string_new(GCONF_PATH); g_string_append(fullname, name); if (client) { gvalue = gconf_client_get(client, fullname->str, NULL); if (gvalue) { if (gvalue->type == GCONF_VALUE_INT) { ret = TRUE; *integer_value = gconf_value_get_int(gvalue); } gconf_value_free(gvalue); } g_object_unref(client); } g_static_mutex_unlock(&lock); g_string_free(fullname, TRUE); #endif #ifdef WITH_REGISTRY HKEY hKey; DWORD dwBufLen; LONG lRet; if (RegOpenKeyEx( HKEY_CURRENT_USER, REGISTRY_KEY, 0, KEY_QUERY_VALUE, &hKey ) == ERROR_SUCCESS) { lRet = RegQueryValueEx( hKey, name, NULL, NULL, NULL, &dwBufLen); if (dwBufLen > 0) { gint val; DWORD size = sizeof(gint); lRet = RegQueryValueEx( hKey, name, NULL, NULL, (LPBYTE) &val, &size); RegCloseKey( hKey ); if ((lRet == ERROR_SUCCESS) && (size == sizeof(gint))) { ret = TRUE; *integer_value = val; } } } #endif return(ret); } gboolean rs_conf_set_integer(const gchar *name, const gint integer_value) { gboolean ret = FALSE; #ifdef WITH_GCONF g_static_mutex_lock(&lock); GConfClient *client = gconf_client_get_default(); GString *fullname = g_string_new(GCONF_PATH); g_string_append(fullname, name); if (client) { ret = gconf_client_set_int(client, fullname->str, integer_value, NULL); g_object_unref(client); } g_static_mutex_unlock(&lock); g_string_free(fullname, TRUE); #endif #ifdef WITH_REGISTRY HKEY hKey; if (RegCreateKeyEx(HKEY_CURRENT_USER, REGISTRY_KEY, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL) == ERROR_SUCCESS) { if (RegSetValueEx(hKey, name, 0, REG_DWORD, (LPBYTE) &integer_value, sizeof(gint))==ERROR_SUCCESS) ret = TRUE; } RegCloseKey(hKey); #endif return(ret); } gboolean rs_conf_get_color(const gchar *name, GdkColor *color) { gchar *str; gboolean ret = FALSE; str = rs_conf_get_string(name); if (str) { ret = gdk_color_parse(str, color); g_free(str); } return(ret); } gboolean rs_conf_set_color(const gchar *name, GdkColor *color) { gchar *str; gboolean ret = FALSE; str = g_strdup_printf ("#%02x%02x%02x", color->red>>8, color->green>>8, color->blue>>8); if (str) { ret = rs_conf_set_string(name, str); g_free(str); } return(ret); } gboolean rs_conf_get_double(const gchar *name, gdouble *float_value) { gboolean ret=FALSE; #ifdef WITH_GCONF GConfValue *gvalue; g_static_mutex_lock(&lock); GConfClient *client = gconf_client_get_default(); GString *fullname = g_string_new(GCONF_PATH); g_string_append(fullname, name); if (client) { gvalue = gconf_client_get(client, fullname->str, NULL); if (gvalue) { if (gvalue->type == GCONF_VALUE_FLOAT) { ret = TRUE; *float_value = gconf_value_get_float(gvalue); } gconf_value_free(gvalue); } g_object_unref(client); } g_static_mutex_unlock(&lock); g_string_free(fullname, TRUE); #endif #ifdef WITH_REGISTRY HKEY hKey; DWORD dwBufLen; LONG lRet; if (RegOpenKeyEx( HKEY_CURRENT_USER, REGISTRY_KEY, 0, KEY_QUERY_VALUE, &hKey ) == ERROR_SUCCESS) { lRet = RegQueryValueEx( hKey, name, NULL, NULL, NULL, &dwBufLen); if (dwBufLen > 0) { gdouble val; DWORD size = sizeof(gdouble); lRet = RegQueryValueEx( hKey, name, NULL, NULL, (LPBYTE) &val, &size); RegCloseKey( hKey ); if ((lRet == ERROR_SUCCESS) && (size == sizeof(gdouble))) { ret = TRUE; *float_value = val; } } } #endif return(ret); } gboolean rs_conf_set_double(const gchar *name, const gdouble float_value) { gboolean ret = FALSE; #ifdef WITH_GCONF g_static_mutex_lock(&lock); GConfClient *client = gconf_client_get_default(); GString *fullname = g_string_new(GCONF_PATH); g_string_append(fullname, name); if (client) { ret = gconf_client_set_float(client, fullname->str, float_value, NULL); g_object_unref(client); } g_static_mutex_unlock(&lock); g_string_free(fullname, TRUE); #endif #ifdef WITH_REGISTRY HKEY hKey; if (RegCreateKeyEx(HKEY_CURRENT_USER, REGISTRY_KEY, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_WRITE, NULL, &hKey, NULL) == ERROR_SUCCESS) { if (RegSetValueEx(hKey, name, 0, REG_BINARY, (LPBYTE) &float_value, sizeof(gdouble))==ERROR_SUCCESS) ret = TRUE; } RegCloseKey(hKey); #endif return(ret); } GSList * rs_conf_get_list_string(const gchar *name) { GSList *list = NULL; #ifdef WITH_GCONF g_static_mutex_lock(&lock); GConfClient *client = gconf_client_get_default(); GString *fullname = g_string_new(GCONF_PATH); g_string_append(fullname, name); if (client) { list = gconf_client_get_list(client, fullname->str, GCONF_VALUE_STRING, NULL); g_object_unref(client); } g_static_mutex_unlock(&lock); g_string_free(fullname, TRUE); #else /* FIXME: windows stub */ #endif return list; } gboolean rs_conf_set_list_string(const gchar *name, GSList *list) { gboolean ret = FALSE; #ifdef WITH_GCONF g_static_mutex_lock(&lock); GConfClient *client = gconf_client_get_default(); GString *fullname = g_string_new(GCONF_PATH); g_string_append(fullname, name); if (client) { ret = gconf_client_set_list(client, fullname->str, GCONF_VALUE_STRING, list, NULL); g_object_unref(client); } g_static_mutex_unlock(&lock); g_string_free(fullname, TRUE); #else /* FIXME: windows stub */ #endif return(ret); } gboolean rs_conf_add_string_to_list_string(const gchar *name, gchar *value) { gboolean ret = FALSE; GSList *newlist = NULL; GSList *oldlist = rs_conf_get_list_string(name); while (oldlist) { newlist = g_slist_append(newlist, oldlist->data); oldlist = oldlist->next; } newlist = g_slist_append(newlist, value); ret = rs_conf_set_list_string(name, newlist); return(ret); } gchar * rs_conf_get_nth_string_from_list_string(const gchar *name, gint num) { GSList *list = rs_conf_get_list_string(name); gint i; gchar *value = NULL; if (list) { for (i = 0; i < num; i++) list = list->next; if (list) value = (gchar *) list->data; else value = NULL; } return value; } gboolean rs_conf_unset(const gchar *name) { gboolean ret = FALSE; #ifdef WITH_GCONF g_static_mutex_lock(&lock); GConfClient *client = gconf_client_get_default(); GString *fullname = g_string_new(GCONF_PATH); g_string_append(fullname, name); if (client) { ret = gconf_client_unset(client, fullname->str, NULL); g_object_unref(client); } g_static_mutex_unlock(&lock); g_string_free(fullname, TRUE); #endif #ifdef WITH_REGISTRY /* FIXME: windows stub */ #endif return ret; } rawstudio-2.0/librawstudio/rs-dcp-file.c0000644000175000017500000002003411526533645015307 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-dcp-file.h" struct _RSDcpFile { RSTiff parent; gboolean dispose_has_run; gchar *model; gchar *signature; gchar *name; gchar *copyright; gchar *id; }; static gboolean read_file_header(RSTiff *tiff); G_DEFINE_TYPE (RSDcpFile, rs_dcp_file, RS_TYPE_TIFF) static void rs_dcp_file_dispose(GObject *object) { RSDcpFile *dcp_file = RS_DCP_FILE(object); if (!dcp_file->dispose_has_run) { dcp_file->dispose_has_run = TRUE; g_free(dcp_file->model); g_free(dcp_file->signature); g_free(dcp_file->name); g_free(dcp_file->copyright); g_free(dcp_file->id); } G_OBJECT_CLASS(rs_dcp_file_parent_class)->dispose(object); } static void rs_dcp_file_class_init(RSDcpFileClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); RSTiffClass *tiff_class = RS_TIFF_CLASS(klass); tiff_class->read_file_header = read_file_header; object_class->dispose = rs_dcp_file_dispose; } static void rs_dcp_file_init(RSDcpFile *dcp_file) { } static gboolean read_file_header(RSTiff *tiff) { gboolean ret = TRUE; /* Parse TIFF */ if (!RS_TIFF_CLASS(rs_dcp_file_parent_class)->read_file_header(tiff)) return FALSE; /* Read DCP Magic */ if (rs_tiff_get_ushort(tiff, 2) != 0x4352) ret = TRUE; RSDcpFile *dcp_file = RS_DCP_FILE(tiff); /* Load and cache basic DCP information */ (rs_dcp_file_get_name(dcp_file)); (rs_dcp_file_get_model(dcp_file)); (rs_dcp_file_get_signature(dcp_file)); return ret; } static gboolean read_matrix(RSDcpFile *dcp_file, guint ifd, gushort tag, RS_MATRIX3 *matrix) { RSTiff *tiff = RS_TIFF(dcp_file); gboolean ret = FALSE; RSTiffIfdEntry *entry = rs_tiff_get_ifd_entry(tiff, ifd, tag); if (entry && matrix) { matrix->coeff[0][0] = rs_tiff_get_rational(tiff, entry->value_offset); matrix->coeff[0][1] = rs_tiff_get_rational(tiff, entry->value_offset+8); matrix->coeff[0][2] = rs_tiff_get_rational(tiff, entry->value_offset+16); matrix->coeff[1][0] = rs_tiff_get_rational(tiff, entry->value_offset+24); matrix->coeff[1][1] = rs_tiff_get_rational(tiff, entry->value_offset+32); matrix->coeff[1][2] = rs_tiff_get_rational(tiff, entry->value_offset+40); matrix->coeff[2][0] = rs_tiff_get_rational(tiff, entry->value_offset+48); matrix->coeff[2][1] = rs_tiff_get_rational(tiff, entry->value_offset+56); matrix->coeff[2][2] = rs_tiff_get_rational(tiff, entry->value_offset+64); ret = TRUE; } return ret; } static gfloat read_illuminant(RSDcpFile *dcp_file, guint ifd, gushort tag) { RSTiffIfdEntry *entry = rs_tiff_get_ifd_entry(RS_TIFF(dcp_file), ifd, tag); if (!entry) return 5000.0; enum { lsUnknown = 0, lsDaylight = 1, lsFluorescent = 2, lsTungsten = 3, lsFlash = 4, lsFineWeather = 9, lsCloudyWeather = 10, lsShade = 11, lsDaylightFluorescent = 12, // D 5700 - 7100K lsDayWhiteFluorescent = 13, // N 4600 - 5400K lsCoolWhiteFluorescent = 14, // W 3900 - 4500K lsWhiteFluorescent = 15, // WW 3200 - 3700K lsStandardLightA = 17, lsStandardLightB = 18, lsStandardLightC = 19, lsD55 = 20, lsD65 = 21, lsD75 = 22, lsD50 = 23, lsISOStudioTungsten = 24, lsOther = 255 }; switch (entry->value_offset) { case lsStandardLightA: case lsTungsten: return 2850.0; case lsISOStudioTungsten: return 3200.0; case lsD50: return 5000.0; case lsD55: case lsDaylight: case lsFineWeather: case lsFlash: case lsStandardLightB: return 5500.0; case lsD65: case lsStandardLightC: case lsCloudyWeather: return 6500.0; case lsD75: case lsShade: return 7500.0; case lsDaylightFluorescent: return (5700.0 + 7100.0) * 0.5; case lsDayWhiteFluorescent: return (4600.0 + 5400.0) * 0.5; case lsCoolWhiteFluorescent: case lsFluorescent: return (3900.0 + 4500.0) * 0.5; case lsWhiteFluorescent: return (3200.0 + 3700.0) * 0.5; default: return 0.0; } return 5000.0; } const gchar * read_ascii(RSDcpFile *dcp_file, guint ifd, gushort tag, gchar **cache) { static GStaticMutex lock = G_STATIC_MUTEX_INIT; g_static_mutex_lock(&lock); if (!*cache) *cache = rs_tiff_get_ascii(RS_TIFF(dcp_file), ifd, tag); g_static_mutex_unlock(&lock); return *cache; } RSDcpFile * rs_dcp_file_new_from_file(const gchar *path) { return g_object_new(RS_TYPE_DCP_FILE, "filename", path, NULL); } const gchar * rs_dcp_file_get_model(RSDcpFile *dcp_file) { return read_ascii(dcp_file, 0, 0xc614, &dcp_file->model); } gboolean rs_dcp_file_get_color_matrix1(RSDcpFile *dcp_file, RS_MATRIX3 *matrix) { return read_matrix(dcp_file, 0, 0xc621, matrix); } gboolean rs_dcp_file_get_color_matrix2(RSDcpFile *dcp_file, RS_MATRIX3 *matrix) { return read_matrix(dcp_file, 0, 0xc622, matrix); } gfloat rs_dcp_file_get_illuminant1(RSDcpFile *dcp_file) { return read_illuminant(dcp_file, 0, 0xc65a); } gfloat rs_dcp_file_get_illuminant2(RSDcpFile *dcp_file) { return read_illuminant(dcp_file, 0, 0xc65b); } const gchar * rs_dcp_file_get_signature(RSDcpFile *dcp_file) { return read_ascii(dcp_file, 0, 0xc6f4, &dcp_file->signature); } const gchar * rs_dcp_file_get_name(RSDcpFile *dcp_file) { return read_ascii(dcp_file, 0, 0xc6f8, &dcp_file->name); } RSHuesatMap * rs_dcp_file_get_huesatmap1(RSDcpFile *dcp_file) { return rs_huesat_map_new_from_dcp(RS_TIFF(dcp_file), 0, 0xc6f9, 0xc6fa); } RSHuesatMap * rs_dcp_file_get_huesatmap2(RSDcpFile *dcp_file) { return rs_huesat_map_new_from_dcp(RS_TIFF(dcp_file), 0, 0xc6f9, 0xc6fb); } RSSpline * rs_dcp_file_get_tonecurve(RSDcpFile *dcp_file) { RSSpline *ret = NULL; RSTiff *tiff = RS_TIFF(dcp_file); RSTiffIfdEntry *entry = rs_tiff_get_ifd_entry(tiff, 0, 0xc6fc); if (entry) { gint i; gint num_knots = entry->count / 2; gfloat *knots = g_new0(gfloat, entry->count); for(i = 0; i < entry->count; i++) knots[i] = rs_tiff_get_float(tiff, (entry->value_offset+(i*4))); ret = rs_spline_new(knots, num_knots, NATURAL); g_free(knots); } return ret; } const gchar * rs_dcp_file_get_copyright(RSDcpFile *dcp_file) { return read_ascii(dcp_file, 0, 0xc6fe, &dcp_file->copyright); } gboolean rs_dcp_file_get_forward_matrix1(RSDcpFile *dcp_file, RS_MATRIX3 *matrix) { return read_matrix(dcp_file, 0, 0xc714, matrix); } gboolean rs_dcp_file_get_forward_matrix2(RSDcpFile *dcp_file, RS_MATRIX3 *matrix) { return read_matrix(dcp_file, 0, 0xc715, matrix); } RSHuesatMap * rs_dcp_file_get_looktable(RSDcpFile *dcp_file) { return rs_huesat_map_new_from_dcp(RS_TIFF(dcp_file), 0, 0xc725, 0xc726); } const gchar * rs_dcp_get_id(RSDcpFile *dcp_file) { g_assert(RS_IS_DCP_FILE(dcp_file)); if (dcp_file->id) return dcp_file->id; const gchar *dcp_filename = rs_tiff_get_filename_nopath(RS_TIFF(dcp_file)); const gchar *dcp_model = rs_dcp_file_get_model(dcp_file); const gchar *dcp_name = rs_dcp_file_get_name(dcp_file); /* Concat all three elements */ gchar *id = g_strconcat(dcp_filename, dcp_model, dcp_name, NULL); /* Convert to lower case to eliminate case mismatches */ dcp_file->id = g_ascii_strdown(id, -1); g_free(id); return dcp_file->id; } rawstudio-2.0/librawstudio/rs-output.c0000644000175000017500000002642311531305647015167 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include "rs-output.h" #include "conf_interface.h" G_DEFINE_TYPE (RSOutput, rs_output, G_TYPE_OBJECT) static void integer_changed(GtkAdjustment *adjustment, gpointer user_data); static void boolean_changed(GtkToggleButton *togglebutton, gpointer user_data); static void string_changed(GtkEditable *editable, gpointer user_data); static void rs_output_class_init(RSOutputClass *klass) { /* Some sane defaults */ klass->extension = ""; klass->display_name = "N/A"; } static void rs_output_init(RSOutput *self) { } /** * Instantiate a new RSOutput type * @param identifier A string representing a type, for example "RSJpegfile" * @return A new RSOutput or NULL on failure */ RSOutput * rs_output_new(const gchar *identifier) { RSOutput *output = NULL; g_assert(identifier != NULL); GType type = g_type_from_name(identifier); if (g_type_is_a (type, RS_TYPE_OUTPUT)) output = g_object_new(type, NULL); else g_warning("%s is not a RSOutput",identifier); if (!RS_IS_OUTPUT(output)) g_warning("Could not instantiate output of type \"%s\"", identifier); return output; } /** * Get a filename extension as announced by a RSOutput module * @param output A RSOutput * @return A proposed filename extension excluding the ., this should not be freed. */ const gchar * rs_output_get_extension(RSOutput *output) { g_assert(RS_IS_OUTPUT(output)); if (RS_OUTPUT_GET_CLASS(output)->extension) return RS_OUTPUT_GET_CLASS(output)->extension; else return ""; } /** * Actually execute the saver * @param output A RSOutput * @param filter A RSFilter to get image data from * @return TRUE on success, FALSE on error */ gboolean rs_output_execute(RSOutput *output, RSFilter *filter) { g_assert(RS_IS_OUTPUT(output)); g_assert(RS_IS_FILTER(filter)); if (RS_OUTPUT_GET_CLASS(output)->execute) return RS_OUTPUT_GET_CLASS(output)->execute(output, filter); else return FALSE; } static void integer_changed(GtkAdjustment *adjustment, gpointer user_data) { RSOutput *output = RS_OUTPUT(user_data); gint value = (gint) gtk_adjustment_get_value(adjustment); gchar *name = g_object_get_data(G_OBJECT(adjustment), "spec-name"); gchar *confpath = g_object_get_data(G_OBJECT(adjustment), "conf-path"); if (name) g_object_set(output, name, value, NULL); if (confpath) rs_conf_set_integer(confpath, value); } static void boolean_changed(GtkToggleButton *togglebutton, gpointer user_data) { RSOutput *output = RS_OUTPUT(user_data); gboolean value = gtk_toggle_button_get_active(togglebutton); gchar *name = g_object_get_data(G_OBJECT(togglebutton), "spec-name"); gchar *confpath = g_object_get_data(G_OBJECT(togglebutton), "conf-path"); if (name) g_object_set(output, name, value, NULL); if (confpath) rs_conf_set_boolean(confpath, value); } static void string_changed(GtkEditable *editable, gpointer user_data) { RSOutput *output = RS_OUTPUT(user_data); const gchar *value = gtk_entry_get_text(GTK_ENTRY(editable)); gchar *name = g_object_get_data(G_OBJECT(editable), "spec-name"); gchar *confpath = g_object_get_data(G_OBJECT(editable), "conf-path"); if (name) g_object_set(output, name, value, NULL); if (confpath) rs_conf_set_string(confpath, value); } static void colorspace_changed(RSColorSpaceSelector *selector, RSColorSpace *color_space, gpointer user_data) { RSOutput *output = RS_OUTPUT(user_data); const gchar *name = g_object_get_data(G_OBJECT(selector), "spec-name"); const gchar *confpath = g_object_get_data(G_OBJECT(selector), "conf-path"); if (name) g_object_set(output, name, color_space, NULL); if (confpath) rs_conf_set_string(confpath, G_OBJECT_TYPE_NAME(color_space)); } /** * Load parameters from config for a RSOutput * @param output A RSOutput * @param conf_prefix The prefix to prepend on config-keys. */ void rs_output_set_from_conf(RSOutput *output, const gchar *conf_prefix) { GObjectClass *klass = G_OBJECT_GET_CLASS(output); GParamSpec **specs; guint n_specs = 0; gint i; g_assert(RS_IS_OUTPUT(output)); g_assert(conf_prefix != NULL); specs = g_object_class_list_properties(G_OBJECT_CLASS(klass), &n_specs); for(i=0; iname); if (type == RS_TYPE_COLOR_SPACE) { gchar *str; if (confpath && (str = rs_conf_get_string(confpath))) { RSColorSpace *color_space; color_space = rs_color_space_new_singleton(str); if (color_space) g_object_set(output, specs[i]->name, color_space, NULL); } } else switch (type) { case G_TYPE_BOOLEAN: { gboolean boolean = FALSE; if (rs_conf_get_boolean(confpath, &boolean)) g_object_set(output, specs[i]->name, boolean, NULL); break; } case G_TYPE_INT: { gint integer = 0; if (rs_conf_get_integer(confpath, &integer)) g_object_set(output, specs[i]->name, integer, NULL); break; } case G_TYPE_STRING: { gchar *str = rs_conf_get_string(confpath); if (str) { g_object_set(output, specs[i]->name, str, NULL); g_free(str); } break; } default: g_debug("rs_output_set_from_conf: Unknown configuration type encountered"); break; } } } /** * Build a GtkWidget that can edit parameters of a RSOutput * @param output A RSOutput * @param conf_prefix If this is non-NULL, the value will be saved in config, * and reloaded next time. * @return A new GtkWidget representing all parameters of output */ GtkWidget * rs_output_get_parameter_widget(RSOutput *output, const gchar *conf_prefix) { GtkWidget *box = gtk_vbox_new(FALSE, 0); GObjectClass *klass = G_OBJECT_GET_CLASS(output); GParamSpec **specs; guint n_specs = 0; gint i; gchar *str; /* Maintain a reference to the RSOutput */ g_object_ref(output); g_object_set_data_full(G_OBJECT(box), "just-for-refcounting", output, g_object_unref); /* Iterate through all GParamSpec's and build a GtkWidget representing them */ specs = g_object_class_list_properties(G_OBJECT_CLASS(klass), &n_specs); for(i=0; iname, "filename")) continue; /* Iw the caller has supplied ud with a conf prefix, sync everything * with config system */ if (conf_prefix) confpath = g_strdup_printf("%s:%s:%s", conf_prefix, G_OBJECT_TYPE_NAME(output), specs[i]->name); GType type = G_PARAM_SPEC_VALUE_TYPE(specs[i]); if (type == GTK_TYPE_WIDGET) { g_object_get(output, specs[i]->name, &widget, NULL); } else if (type == RS_TYPE_COLOR_SPACE) { GtkWidget *cs_widget = rs_color_space_selector_new(); GtkWidget *label = gtk_label_new(g_param_spec_get_blurb(specs[i])); g_object_set_data(G_OBJECT(cs_widget), "spec-name", specs[i]->name); g_object_set_data_full(G_OBJECT(cs_widget), "conf-path", confpath, g_free); rs_color_space_selector_add_all(RS_COLOR_SPACE_SELECTOR(cs_widget)); rs_color_space_selector_set_selected_by_name(RS_COLOR_SPACE_SELECTOR(cs_widget), "RSSrgb"); if (confpath && (str = rs_conf_get_string(confpath))) { RSColorSpace *color_space; color_space = rs_color_space_selector_set_selected_by_name(RS_COLOR_SPACE_SELECTOR(cs_widget), str); if (color_space) g_object_set(output, specs[i]->name, color_space, NULL); } g_signal_connect(cs_widget, "colorspace-selected", G_CALLBACK(colorspace_changed), output); widget = gtk_hbox_new(FALSE, 2); gtk_box_pack_start(GTK_BOX(widget), label, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(widget), cs_widget, TRUE, TRUE, 0); } else switch (type) { case G_TYPE_BOOLEAN: { gboolean boolean = FALSE; /* Should this be dropped, and then let the user worry about * calling rs_output_set_from_conf()? */ if (confpath && rs_conf_get_boolean(confpath, &boolean)) g_object_set(output, specs[i]->name, boolean, NULL); else g_object_get(output, specs[i]->name, &boolean, NULL); widget = gtk_check_button_new_with_label(g_param_spec_get_blurb(specs[i])); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widget), boolean); g_object_set_data(G_OBJECT(widget), "spec-name", specs[i]->name); g_object_set_data_full(G_OBJECT(widget), "conf-path", confpath, g_free); g_signal_connect(widget, "toggled", G_CALLBACK(boolean_changed), output); break; } case G_TYPE_INT: { GtkObject *adj; GtkWidget *label; GtkWidget *scale; GtkWidget *spin; gint integer = 0; if (confpath && rs_conf_get_integer(confpath, &integer)) g_object_set(output, specs[i]->name, integer, NULL); g_object_get(output, specs[i]->name, &integer, NULL); adj = gtk_adjustment_new((gdouble) integer, (gdouble) (((GParamSpecInt*)specs[i])->minimum), (gdouble) (((GParamSpecInt*)specs[i])->maximum), 1.0, 10.0, 0.0); g_object_set_data(G_OBJECT(adj), "spec-name", specs[i]->name); g_object_set_data_full(G_OBJECT(adj), "conf-path", confpath, g_free); g_signal_connect(adj, "value-changed", G_CALLBACK(integer_changed), output); label = gtk_label_new(g_param_spec_get_blurb(specs[i])); scale = gtk_hscale_new(GTK_ADJUSTMENT(adj)); gtk_scale_set_draw_value(GTK_SCALE(scale), FALSE); spin = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1.0, 0); widget = gtk_hbox_new(FALSE, 2); gtk_box_pack_start(GTK_BOX(widget), label, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(widget), scale, TRUE, TRUE, 0); gtk_box_pack_start(GTK_BOX(widget), spin, FALSE, TRUE, 0); break; } case G_TYPE_STRING: { GtkWidget *label = gtk_label_new(g_param_spec_get_blurb(specs[i])); GtkWidget *entry = gtk_entry_new(); if (confpath && (str = rs_conf_get_string(confpath))) { g_object_set(output, specs[i]->name, str, NULL); g_free(str); } g_object_get(output, specs[i]->name, &str, NULL); if (str) { gtk_entry_set_text(GTK_ENTRY(entry), str); g_free(str); } g_object_set_data(G_OBJECT(entry), "spec-name", specs[i]->name); g_object_set_data_full(G_OBJECT(entry), "conf-path", confpath, g_free); g_signal_connect(entry, "changed", G_CALLBACK(string_changed), output); widget = gtk_hbox_new(FALSE, 2); gtk_box_pack_start(GTK_BOX(widget), label, FALSE, TRUE, 0); gtk_box_pack_start(GTK_BOX(widget), entry, TRUE, TRUE, 0); break; } default: g_assert_not_reached(); break; } gtk_box_pack_start(GTK_BOX(box), widget, FALSE, FALSE, 3); } return box; } rawstudio-2.0/librawstudio/rs-lens-db.h0000644000175000017500000000566611526533645015173 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_LENS_DB_H #define RS_LENS_DB_H #include #include "rs-lens.h" G_BEGIN_DECLS #define RS_TYPE_LENS_DB rs_lens_db_get_type() #define RS_LENS_DB(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_LENS_DB, RSLensDb)) #define RS_LENS_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_LENS_DB, RSLensDbClass)) #define RS_IS_LENS_DB(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_LENS_DB)) #define RS_IS_LENS_DB_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_LENS_DB)) #define RS_LENS_DB_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_LENS_DB, RSLensDbClass)) GType rs_lens_db_get_type(void); typedef struct _RSLensDb RSLensDb; typedef struct { GObjectClass parent_class; } RSLensDbClass; /** * Force save of RSLensDb * @param lens_db the RSLensDb to save */ void rs_lens_db_save(RSLensDb *lens_db); /** * Instantiate a new RSLensDb * @param path An absolute path to a XML-file containing the database * @return A new RSLensDb with a refcount of 1 */ RSLensDb * rs_lens_db_new(const char *path); /** * Get the default RSLensDb as used globally by Rawstudio * @return A new RSLensDb, this should not be unref'ed after use! */ RSLensDb *rs_lens_db_get_default(void); /** * Look up identifer in database * @param lens_db A RSLensDb to search in * @param identifier A lens identifier as generated by metadata subsystem */ RSLens *rs_lens_db_get_from_identifier(RSLensDb *lens_db, const gchar *identifier); /** * Add a lens to the database - will only be added if the lens appear unique * @param lens_db A RSLensDb * @param lens A RSLens to add */ void rs_lens_db_add_lens(RSLensDb *lens_db, RSLens *lens); /** * Lookup a lens in the database based on information in a RSMetadata * @param lens_db A RSLensDb * @param metadata A RSMetadata * @return A RSLens or NULL if unsuccesful */ RSLens *rs_lens_db_lookup_from_metadata(RSLensDb *lens_db, RSMetadata *metdata); /** * Gets the lenses in RSLensDb * @param lens_db A RSLensDb * @return A GList of RSLens'es */ GList *rs_lens_db_get_lenses(RSLensDb *lens_db); G_END_DECLS #endif /* RS_LENS_DB_H */ rawstudio-2.0/librawstudio/rs-macros.h0000644000175000017500000000644711526533645015131 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_MACROS_H #define RS_MACROS_H #include #define ORIENTATION_RESET(orientation) orientation = 0 #define ORIENTATION_90(orientation) orientation = (orientation&4) | ((orientation+1)&3) #define ORIENTATION_180(orientation) orientation = (orientation^2) #define ORIENTATION_270(orientation) orientation = (orientation&4) | ((orientation+3)&3) #define ORIENTATION_FLIP(orientation) orientation = (orientation^4) #define ORIENTATION_MIRROR(orientation) orientation = ((orientation&4)^4) | ((orientation+2)&3) /* The problem with the align GNU extension, is that it doesn't work * reliably with local variables, depending on versions and targets. * So better use a tricky define to ensure alignment even in these * cases. */ #define RS_DECLARE_ALIGNED(type, name, sizex, sizey, alignment) \ type name##_s[(sizex)*(sizey)+(alignment)-1]; \ type * name = (type *)(((uintptr_t)name##_s+(alignment - 1))&~((uintptr_t)(alignment)-1)) #ifdef WIN32 #include #define GUI_CATCHUP() /* We do not have XFlush or GDK_DISPLAY_XDISPLAY in Win32*/ #else #include #define GUI_CATCHUP() do { \ GdkDisplay *__gui_catchup_display = gdk_display_get_default (); \ XFlush (GDK_DISPLAY_XDISPLAY (__gui_catchup_display)); } while (0) #endif #define GTK_CATCHUP() while (gtk_events_pending()) gtk_main_iteration() #if __GNUC__ >= 3 #define likely(x) __builtin_expect (!!(x), 1) #define unlikely(x) __builtin_expect (!!(x), 0) #define align(x) __attribute__ ((aligned (x))) #define __deprecated __attribute__ ((deprecated)) #else #define likely(x) (x) #define unlikely(x) (x) #define align(x) #define __deprecated #endif /* Default gamma */ #define GAMMA (2.2) #define _CLAMP65535(a) do { (a) = CLAMP((a), 0, 65535); } while(0) #define _CLAMP65535_TRIPLET(a, b, c) do {_CLAMP65535(a); _CLAMP65535(b); _CLAMP65535(c); } while (0) #define _CLAMP255(a) do { (a) = CLAMP((a), 0, 255); } while (0) #define COLOR_BLACK(c) do { (c).red=0; (c).green=0; (c).blue=0; } while (0) /* Compatibility with GTK+ <2.14.0 */ #if !GTK_CHECK_VERSION(2,14,0) #define gtk_adjustment_get_lower(adjustment) adjustment->lower #define gtk_adjustment_get_upper(adjustment) adjustment->upper #define gtk_adjustment_get_step_increment(adjustment) adjustment->step_increment #define gtk_adjustment_get_page_increment(adjustment) adjustment->page_increment #define gtk_adjustment_get_page_size(adjustment) adjustment->page_size #endif /* !GTK_CHECK_VERSION(2.14.0) */ #endif /* RS_MACROS_H */ rawstudio-2.0/librawstudio/rs-spline.h0000644000175000017500000000742111526533645015130 00000000000000/***************************************************************************** * Bicubic spline implementation * * Copyright (C) 2007 Edouard Gomez * * 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 RS_SPLINE_H #define RS_SPLINE_H #include #include G_BEGIN_DECLS #define RS_TYPE_SPLINE rs_spline_get_type() #define RS_SPLINE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_SPLINE, RSSpline)) #define RS_SPLINE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_SPLINE, RSSplineClass)) #define RS_IS_SPLINE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_SPLINE)) #define RS_IS_SPLINE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_SPLINE)) #define RS_SPLINE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_SPLINE, RSSplineClass)) typedef struct _RSSpline RSSpline; typedef struct { GObjectClass parent_class; } RSSplineClass; GType rs_spline_get_type (void); /** Spline curve runout type */ typedef enum rs_spline_runout_type_t { NATURAL=1, PARABOLIC, CUBIC, } rs_spline_runout_type_t; /** * Cubic spline constructor. * @param knots Array of knots, can be NULL if no knots yet * @param n Number of knots * @param runout_type Type of the runout * @return Spline */ extern RSSpline * rs_spline_new( const gfloat *const knots, const gint n, const rs_spline_runout_type_t runout_type); /** * Attribute getter * @return Number of knots */ extern guint rs_spline_length(RSSpline *spline); /** * Adds a knot to the curve * @param spline Spline to be used * @param x X coordinate * @param y Y coordinate */ extern void rs_spline_add(RSSpline *spline, gfloat x, gfloat y); /** * Moves a knot in the curve * @param spline Spline to be used * @param n Which knot to move * @param x X coordinate * @param y Y coordinate */ extern void rs_spline_move(RSSpline *spline, gint n, gfloat x, gfloat y); /** * Deletes a knot in the curve * @param spline Spline to be used * @param n Which knot to delete */ extern void rs_spline_delete(RSSpline *spline, gint n); /** * Computes value of the spline at the x abissa * @param spline Spline to be used * @param x Cubic spline parametric (in) * @param y Interpolated value (out) * @return 0 if failed, can happen when the spline is to be calculated again. */ extern gint rs_spline_interpolate(RSSpline *spline, gfloat x, gfloat *y); /** * Gets a copy of the internal sorted knot array (gfloat[2]) * @param spline Spline to be used * @param knots Output knots (out, allocated with g_malloc) * @param n Output number of knots (out) */ extern void rs_spline_get_knots(RSSpline *spline, gfloat **knots, guint *n); /** * Sample the curve * @param spline Spline to be used * @param samples Pointer to output array or NULL * @param nbsamples number of samples * @return Sampled curve or NULL if failed */ gfloat * rs_spline_sample(RSSpline *spline, gfloat *samples, guint nbsamples); /** * Print a spline on the stdout * @param spline Spline curve */ extern void rs_spline_print(RSSpline *spline); G_END_DECLS #endif /* RS_SPLINE_H */ rawstudio-2.0/librawstudio/rs-lens-fix.h0000644000175000017500000000176411543674627015374 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_LENS_FIX_H #define RS_LENS_FIX_H gboolean rs_lens_fix_init(void); gboolean rs_lens_fix(RSMetadata *meta); #endif /* RS_LENS_FIX_H */ rawstudio-2.0/librawstudio/Makefile.am0000644000175000017500000000617011547406775015105 00000000000000AM_CFLAGS = -Wall -fno-strict-aliasing AM_CPPFLAGS = \ -I$(top_srcdir) \ -DWITH_GCONF \ $(GTK_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ library_includedir=$(includedir)/@PACKAGE@-@VERSION@/ library_include_HEADERS = rawstudio.h rs-types.h rs-macros.h \ rs-debug.h \ rs-io-job.h \ rs-io-job-checksum.h \ rs-io-job-metadata.h \ rs-io-job-prefetch.h \ rs-io-job-tagging.h \ rs-io.h \ rs-plugin.h \ rs-rawfile.h \ rs-exif.h \ rs-1d-function.h \ rs-icc-profile.h \ rs-color-space.h \ rs-color-space-icc.h \ rs-color-space-selector.h \ rs-image.h \ rs-image16.h \ rs-lens.h \ rs-lens-db.h \ rs-lens-db-editor.h \ rs-lens-fix.h \ rs-library.h\ rs-metadata.h \ rs-filetypes.h \ rs-filter.h \ rs-filter-param.h \ rs-filter-request.h \ rs-filter-response.h \ rs-output.h \ rs-plugin-manager.h \ rs-job-queue.h \ rs-utils.h \ rs-math.h \ rs-color.h \ rs-settings.h \ rs-spline.h \ rs-curve.h \ rs-stock.h \ rs-tiff.h \ rs-tiff-ifd.h \ rs-tiff-ifd-entry.h \ rs-huesat-map.h \ rs-dcp-file.h \ rs-profile-factory.h \ rs-profile-selector.h \ rs-profile-camera.h \ rs-gui-functions.h \ x86-cpu.h lib_LTLIBRARIES = librawstudio-2.0.la librawstudio_2_0_la_SOURCES = \ rs-debug.c rs-debug.h \ rs-io-job.c rs-io-job.h \ rs-io-job-checksum.c rs-io-job-checksum.h \ rs-io-job-metadata.c rs-io-job-metadata.h \ rs-io-job-prefetch.c rs-io-job-prefetch.h \ rs-io-job-tagging.c rs-io-job-tagging.h \ rs-io.c rs-io.h \ rs-plugin.c rs-plugin.h \ rs-rawfile.c rs-rawfile.h \ rs-exif.cc rs-exif.h \ rs-1d-function.c rs-1d-function.h \ rs-icc-profile.c rs-icc-profile.h \ rs-color-space.c rs-color-space.h \ rs-color-space-icc.c rs-color-space-icc.h \ rs-image.c rs-image.h \ rs-image16.c rs-image16.h \ rs-lens.c rs-lens.h \ rs-lens-db.c rs-lens-db.h \ rs-lens-db-editor.c rs-lens-db-editor.h \ rs-lens-fix.c rs-lens-fix.h \ rs-metadata.c rs-metadata.h \ rs-filetypes.c rs-filetypes.h \ rs-filter.c rs-filter.h \ rs-filter-param.c rs-filter-param.h \ rs-filter-request.c rs-filter-request.h \ rs-filter-response.c rs-filter-response.h \ rs-library.c rs-library.h\ rs-output.c rs-output.h \ rs-plugin-manager.c rs-plugin-manager.h \ rs-job-queue.c rs-job-queue.h \ rs-utils.c rs-utils.h \ rs-math.c rs-math.h \ rs-color.c rs-color.h \ rs-settings.c rs-settings.h \ rs-spline.c rs-spline.h \ rs-curve.c rs-curve.h \ rs-tiff.c rs-tiff.h \ rs-tiff-ifd.c rs-tiff-ifd.h \ rs-tiff-ifd-entry.c rs-tiff-ifd-entry.h \ rs-huesat-map.c rs-huesat-map.h \ rs-dcp-file.c rs-dcp-file.h \ rs-profile-factory.c rs-profile-factory.h rs-profile-factory-model.h \ rs-profile-selector.c rs-profile-selector.h \ rs-profile-camera.c rs-profile-camera.h \ rs-color-space-selector.c rs-color-space-selector.h \ conf_interface.c conf_interface.h \ rs-gui-functions.c rs-gui-functions.h \ rs-stock.c rs-stock.h librawstudio_2_0_la_LIBADD = @PACKAGE_LIBS@ @LIBJPEG@ @LIBTIFF@ $(INTLLIBS) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = rawstudio-2.0.pc sharedir = $(datadir)/rawstudio/ share_DATA = lens_fix.xml EXTRA_DIST = \ $(share_DATA) rawstudio-2.0/librawstudio/rs-color.c0000644000175000017500000001712211526533645014746 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include "rs-color.h" /* We use XYZ with a D50 whitepoint as PCS (as recommended by ICC) */ const RS_XYZ_VECTOR XYZ_WP_D50 = {{0.964296}, {1.0}, {0.825105}}; /* Computed by DNG SDK */ /* Scale factor between distances in uv space to a more user friendly "tint" parameter. */ static const gdouble tint_scale = -3000.0; /* Table from Wyszecki & Stiles, "Color Science", second edition, page 228. */ struct ruvt { gdouble r; gdouble u; gdouble v; gdouble t; } temp_table[] = { { 0, 0.18006, 0.26352, -0.24341 }, { 10, 0.18066, 0.26589, -0.25479 }, { 20, 0.18133, 0.26846, -0.26876 }, { 30, 0.18208, 0.27119, -0.28539 }, { 40, 0.18293, 0.27407, -0.30470 }, { 50, 0.18388, 0.27709, -0.32675 }, { 60, 0.18494, 0.28021, -0.35156 }, { 70, 0.18611, 0.28342, -0.37915 }, { 80, 0.18740, 0.28668, -0.40955 }, { 90, 0.18880, 0.28997, -0.44278 }, { 100, 0.19032, 0.29326, -0.47888 }, { 125, 0.19462, 0.30141, -0.58204 }, { 150, 0.19962, 0.30921, -0.70471 }, { 175, 0.20525, 0.31647, -0.84901 }, { 200, 0.21142, 0.32312, -1.0182 }, { 225, 0.21807, 0.32909, -1.2168 }, { 250, 0.22511, 0.33439, -1.4512 }, { 275, 0.23247, 0.33904, -1.7298 }, { 300, 0.24010, 0.34308, -2.0637 }, { 325, 0.24702, 0.34655, -2.4681 }, { 350, 0.25591, 0.34951, -2.9641 }, { 375, 0.26400, 0.35200, -3.5814 }, { 400, 0.27218, 0.35407, -4.3633 }, { 425, 0.28039, 0.35577, -5.3762 }, { 450, 0.28863, 0.35714, -6.7262 }, { 475, 0.29685, 0.35823, -8.5955 }, { 500, 0.30505, 0.35907, -11.324 }, { 525, 0.31320, 0.35968, -15.628 }, { 550, 0.32129, 0.36011, -23.325 }, { 575, 0.32931, 0.36038, -40.770 }, { 600, 0.33724, 0.36051, -116.45 } }; void rs_color_whitepoint_to_temp(const RS_xy_COORD *xy, gfloat *temp, gfloat *tint) { /* Convert to uv space. */ gdouble u = 2.0 * xy->x / (1.5 - xy->x + 6.0 * xy->y); gdouble v = 3.0 * xy->y / (1.5 - xy->x + 6.0 * xy->y); /* Search for line pair coordinate is between. */ gdouble last_dt = 0.0; gdouble last_dv = 0.0; gdouble last_du = 0.0; guint index; for (index = 1; index <= 30; index++) { /* Convert slope to delta-u and delta-v, with length 1. */ gdouble du = 1.0; gdouble dv = temp_table[index] . t; gdouble len = sqrt (1.0 + dv * dv); du /= len; dv /= len; /* Find delta from black body point to test coordinate. */ gdouble uu = u - temp_table[index] . u; gdouble vv = v - temp_table[index] . v; /* Find distance above or below line. */ gdouble dt = - uu * dv + vv * du; /* If below line, we have found line pair. */ if (dt <= 0.0 || index == 30) { /* Find fractional weight of two lines. */ if (dt > 0.0) dt = 0.0; dt = -dt; gdouble f; if (index == 1) f = 0.0; else f = dt / (last_dt + dt); /* Interpolate the temperature. */ if (temp) *temp = 1.0E6 / (temp_table[index - 1] . r * f + temp_table[index ] . r * (1.0 - f)); /* Find delta from black body point to test coordinate. */ uu = u - (temp_table[index - 1] . u * f + temp_table[index] . u * (1.0 - f)); vv = v - (temp_table[index - 1] . v * f + temp_table[index] . v * (1.0 - f)); /* Interpolate vectors along slope. */ du = du * (1.0 - f) + last_du * f; dv = dv * (1.0 - f) + last_dv * f; len = sqrt (du * du + dv * dv); du /= len; dv /= len; /* Find distance along slope. */ if (tint) *tint = (uu * du + vv * dv) * tint_scale; break; } /* Try next line pair. */ last_dt = dt; last_du = du; last_dv = dv; } } RS_xy_COORD rs_color_temp_to_whitepoint(gfloat temp, gfloat tint) { RS_xy_COORD xy = XYZ_to_xy(&XYZ_WP_D50); /* Find inverse temperature to use as index. */ gdouble r = 1.0E6 / temp; /* Convert tint to offset is uv space. */ gdouble offset = tint * (1.0 / tint_scale); /* Search for line pair containing coordinate. */ guint index; for (index = 0; index <= 29; index++) { if (r < temp_table[index + 1] . r || index == 29) { /* Find relative weight of first line. */ gdouble f = (temp_table[index + 1].r - r) / (temp_table[index + 1].r - temp_table[index].r); /* Interpolate the black body coordinates. */ gdouble u = temp_table[index].u * f + temp_table[index + 1].u * (1.0 - f); gdouble v = temp_table[index].v * f + temp_table[index + 1].v * (1.0 - f); /* Find vectors along slope for each line. */ gdouble uu1 = 1.0; gdouble vv1 = temp_table[index].t; gdouble uu2 = 1.0; gdouble vv2 = temp_table[index + 1].t; gdouble len1 = sqrt (1.0 + vv1 * vv1); gdouble len2 = sqrt (1.0 + vv2 * vv2); uu1 /= len1; vv1 /= len1; uu2 /= len2; vv2 /= len2; // Find vector from black body point. gdouble uu3 = uu1 * f + uu2 * (1.0 - f); gdouble vv3 = vv1 * f + vv2 * (1.0 - f); gdouble len3 = sqrt (uu3 * uu3 + vv3 * vv3); uu3 /= len3; vv3 /= len3; // Adjust coordinate along this vector. u += uu3 * offset; v += vv3 * offset; // Convert to xy coordinates. xy.x = 1.5 * u / (u - 4.0 * v + 2.0); xy.y = v / (u - 4.0 * v + 2.0); break; } } return xy; } RS_XYZ_VECTOR xy_to_XYZ(const RS_xy_COORD *xy) { RS_XYZ_VECTOR XYZ; /* Watch out for division by zero and clipping */ gdouble x = CLAMP(xy->x, 0.000001, 0.999999); gdouble y = CLAMP(xy->y, 0.000001, 0.999999); /* Correct out of range color coordinates */ if ((x + y) > 0.999999) { gdouble scale = 0.999999 / (x + y); x *= scale; y *= scale; } XYZ.X = x / y; XYZ.Y = 1.0; XYZ.Z = (1.0 - x - y) / y; return XYZ; } RS_xy_COORD XYZ_to_xy(const RS_XYZ_VECTOR *XYZ) { RS_xy_COORD xy; gfloat sum = XYZ->X + XYZ->Y + XYZ->Z; if (sum > 0.0) { xy.x = XYZ->X / sum; xy.y = XYZ->Y / sum; } else xy = XYZ_to_xy(&XYZ_WP_D50); return xy; } /** * http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html */ RS_MATRIX3 rs_calculate_map_white_matrix(const RS_xy_COORD *from_xy, const RS_xy_COORD *to_xy) { RS_MATRIX3 adapt; /* Bradford adaption matrix */ RS_MATRIX3 bradford = {{ { 0.8951, 0.2664, -0.1614, }, { -0.7502, 1.7135, 0.0367, }, { 0.0389, -0.0685, 1.0296 } }}; RS_XYZ_VECTOR from_xyz; RS_XYZ_VECTOR to_xyz; RS_VECTOR3 ws, wd; RS_MATRIX3 tmp; from_xyz = xy_to_XYZ(from_xy); to_xyz = xy_to_XYZ(to_xy); ws = vector3_multiply_matrix(&from_xyz, &bradford); wd = vector3_multiply_matrix(&to_xyz, &bradford); ws.x = MAX(ws.x, 0.0); ws.y = MAX(ws.y, 0.0); ws.z = MAX(ws.z, 0.0); wd.x = MAX(wd.x, 0.0); wd.y = MAX(wd.y, 0.0); wd.z = MAX(wd.z, 0.0); matrix3_identity(&tmp); tmp.coeff[0][0] = CLAMP(0.1, ws.x > 0.0 ? wd.x / ws.x : 10.0, 10.0); tmp.coeff[1][1] = CLAMP(0.1, ws.y > 0.0 ? wd.y / ws.y : 10.0, 10.0); tmp.coeff[2][2] = CLAMP(0.1, ws.z > 0.0 ? wd.z / ws.z : 10.0, 10.0); adapt = matrix3_invert(&bradford); matrix3_multiply(&adapt, &tmp, &adapt); matrix3_multiply(&adapt, &bradford, &adapt); return adapt; } rawstudio-2.0/librawstudio/rs-lens-db-editor.c0000644000175000017500000010431511543674627016446 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* * The following functions is more or less grabbed from UFraw: * lens_set(), lens_menu_select(), ptr_array_insert_sorted(), * ptr_array_find_sorted(), ptr_array_insert_index() and lens_menu_fill() */ #include #include #include #include #include #include #include #include #include #include #include #include #include "rs-lens-db-editor.h" static void fill_model(RSLensDb *lens_db, GtkTreeModel *tree_model); static char * rs_lens_db_editor_update_lensfun(void); GtkDialog *rs_lens_db_editor_single_lens(RSLens *lens); typedef struct { GtkWidget *lensfun_make; GtkWidget *lensfun_model; GtkWidget *button; GtkWidget *checkbutton_enabled; RSLens *lens; } SingleLensData; typedef struct { /* The menu used to choose lens - either full or limited by search criteria */ GtkWidget *LensMenu; /* The GtkTreeView */ GtkTreeView *tree_view; SingleLensData *single_lens_data; } lens_data; gint lf_lens_sort_by_model_func(gconstpointer *a, gconstpointer *b) { lfLens *first = (lfLens *) ((GPtrArray *) a)->pdata; lfLens *second = (lfLens *) ((GPtrArray *) b)->pdata; return g_strcmp0(first->Model, second->Model); } const lfLens **lf_lens_sort_by_model(const lfLens *const *array) { if (array == NULL) return NULL; gint x = 0; GPtrArray *temp = g_ptr_array_new(); while (array[x]) g_ptr_array_add(temp, (gpointer *) array[x++]); g_ptr_array_sort(temp, (GCompareFunc) lf_lens_sort_by_model_func); g_ptr_array_add (temp, NULL); return (const lfLens **) g_ptr_array_free (temp, FALSE); } static void lens_set (lens_data *data, const lfLens *lens) { if (data->single_lens_data) { /* Set Maker and Model to the selected RSLens */ rs_lens_set_lensfun_make(data->single_lens_data->lens, lens->Maker); rs_lens_set_lensfun_model(data->single_lens_data->lens, lens->Model); rs_lens_set_lensfun_enabled(data->single_lens_data->lens, TRUE); gtk_label_set_text(GTK_LABEL(data->single_lens_data->lensfun_make), lens->Maker); gtk_label_set_text(GTK_LABEL(data->single_lens_data->lensfun_model), lens->Model); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(data->single_lens_data->checkbutton_enabled), TRUE); gtk_widget_show(data->single_lens_data->lensfun_make); gtk_widget_show(data->single_lens_data->lensfun_model); gtk_widget_hide(data->single_lens_data->button); RSLensDb *lens_db = rs_lens_db_get_default(); /* Force save of RSLensDb */ rs_lens_db_save(lens_db); if (data) g_free(data); return; } GtkTreeSelection *selection = gtk_tree_view_get_selection(data->tree_view); GtkTreeModel *model = NULL; GtkTreeIter iter; gtk_tree_selection_get_selected(selection, &model, &iter); /* Set Maker and Model to the tree view */ gtk_list_store_set (GTK_LIST_STORE(model), &iter, RS_LENS_DB_EDITOR_LENS_MAKE, lens->Maker, RS_LENS_DB_EDITOR_LENS_MODEL, lens->Model, RS_LENS_DB_EDITOR_ENABLED_ACTIVATABLE, TRUE, RS_LENS_DB_EDITOR_ENABLED, TRUE, -1); RSLens *rs_lens = NULL; gtk_tree_model_get (model, &iter, RS_LENS_DB_EDITOR_LENS, &rs_lens, -1); /* Set Maker and Model to the selected RSLens */ rs_lens_set_lensfun_make(rs_lens, lens->Maker); rs_lens_set_lensfun_model(rs_lens, lens->Model); rs_lens_set_lensfun_enabled(rs_lens, TRUE); RSLensDb *lens_db = rs_lens_db_get_default(); /* Force save of RSLensDb */ rs_lens_db_save(lens_db); } static void lens_menu_select ( GtkMenuItem *menuitem, gpointer user_data) { lens_data *data = (lens_data *)user_data; lens_set (data, (lfLens *)g_object_get_data(G_OBJECT(menuitem), "lfLens")); } int ptr_array_insert_sorted ( GPtrArray *array, const void *item, GCompareFunc compare) { int length = array->len; g_ptr_array_set_size (array, length + 1); const void **root = (const void **)array->pdata; int m = 0, l = 0, r = length - 1; // Skip trailing NULL, if any if (l <= r && !root [r]) r--; while (l <= r) { m = (l + r) / 2; int cmp = compare (root [m], item); if (cmp == 0) { ++m; goto done; } else if (cmp < 0) l = m + 1; else r = m - 1; } if (r == m) m++; done: memmove (root + m + 1, root + m, (length - m) * sizeof (void *)); root [m] = item; return m; } int ptr_array_find_sorted ( const GPtrArray *array, const void *item, GCompareFunc compare) { int length = array->len; void **root = array->pdata; int l = 0, r = length - 1; int m = 0, cmp = 0; if (!length) return -1; // Skip trailing NULL, if any if (!root [r]) r--; while (l <= r) { m = (l + r) / 2; cmp = compare (root [m], item); if (cmp == 0) return m; else if (cmp < 0) l = m + 1; else r = m - 1; } return -1; } void ptr_array_insert_index ( GPtrArray *array, const void *item, int index) { const void **root; int length = array->len; g_ptr_array_set_size (array, length + 1); root = (const void **)array->pdata; memmove (root + index + 1, root + index, (length - index) * sizeof (void *)); root [index] = item; } static void lens_menu_fill ( lens_data *data, const lfLens *const *lenslist_temp, const lfLens *const *full_lenslist_temp) { unsigned i; GPtrArray *makers, *submenus, *allmakers, *allsubmenus; /* We want the two lists sorted by model */ const lfLens **lenslist = lf_lens_sort_by_model(lenslist_temp); const lfLens **full_lenslist = lf_lens_sort_by_model(full_lenslist_temp); if (data->LensMenu) { /* This doesn't work, but will we be leaking GtkMenu's */ //gtk_widget_destroy (data->LensMenu); data->LensMenu = NULL; } /* Count all existing lens makers and create a sorted list */ makers = g_ptr_array_new (); submenus = g_ptr_array_new (); if (lenslist) for (i = 0; lenslist [i]; i++) { GtkWidget *submenu, *item; const char *m = lf_mlstr_get (lenslist [i]->Maker); int idx = ptr_array_find_sorted (makers, m, (GCompareFunc)g_utf8_collate); if (idx < 0) { /* No such maker yet, insert it into the array */ idx = ptr_array_insert_sorted (makers, m, (GCompareFunc)g_utf8_collate); /* Create a submenu for lenses by this maker */ submenu = gtk_menu_new (); ptr_array_insert_index (submenus, submenu, idx); } submenu = g_ptr_array_index (submenus, idx); /* Append current lens name to the submenu */ item = gtk_menu_item_new_with_label (lf_mlstr_get (lenslist [i]->Model)); gtk_widget_show (item); g_object_set_data(G_OBJECT(item), "lfLens", (void *)lenslist [i]); g_signal_connect(G_OBJECT(item), "activate", G_CALLBACK(lens_menu_select), data); gtk_menu_shell_append (GTK_MENU_SHELL (submenu), item); } /* Count all existing lens makers and create a sorted list */ allmakers = g_ptr_array_new (); allsubmenus = g_ptr_array_new (); for (i = 0; full_lenslist [i]; i++) { GtkWidget *allsubmenu, *allitem; const char *allm = lf_mlstr_get (full_lenslist [i]->Maker); int allidx = ptr_array_find_sorted (allmakers, allm, (GCompareFunc)g_utf8_collate); if (allidx < 0) { /* No such maker yet, insert it into the array */ allidx = ptr_array_insert_sorted (allmakers, allm, (GCompareFunc)g_utf8_collate); /* Create a submenu for lenses by this maker */ allsubmenu = gtk_menu_new (); ptr_array_insert_index (allsubmenus, allsubmenu, allidx); } allsubmenu = g_ptr_array_index (allsubmenus, allidx); /* Append current lens name to the submenu */ allitem = gtk_menu_item_new_with_label (lf_mlstr_get (full_lenslist [i]->Model)); gtk_widget_show (allitem); g_object_set_data(G_OBJECT(allitem), "lfLens", (void *)full_lenslist [i]); g_signal_connect(G_OBJECT(allitem), "activate", G_CALLBACK(lens_menu_select), data); gtk_menu_shell_append (GTK_MENU_SHELL (allsubmenu), allitem); } data->LensMenu = gtk_menu_new (); for (i = 0; i < makers->len; i++) { GtkWidget *item = gtk_menu_item_new_with_label (g_ptr_array_index (makers, i)); gtk_widget_show (item); gtk_menu_shell_append (GTK_MENU_SHELL (data->LensMenu), item); gtk_menu_item_set_submenu ( GTK_MENU_ITEM (item), (GtkWidget *)g_ptr_array_index (submenus, i)); } GtkWidget *allmenu = gtk_menu_new (); for (i = 0; i < allmakers->len; i++) { GtkWidget *allitem = gtk_menu_item_new_with_label (g_ptr_array_index (allmakers, i)); gtk_widget_show (allitem); gtk_menu_shell_append (GTK_MENU_SHELL (allmenu), allitem); gtk_menu_item_set_submenu ( GTK_MENU_ITEM (allitem), (GtkWidget *)g_ptr_array_index (allsubmenus, i)); } GtkWidget *item = gtk_menu_item_new_with_label (_("All lenses")); gtk_widget_show (item); gtk_menu_shell_append (GTK_MENU_SHELL (data->LensMenu), item); gtk_menu_item_set_submenu ( GTK_MENU_ITEM (item), allmenu); g_ptr_array_free (submenus, TRUE); g_ptr_array_free (makers, TRUE); g_ptr_array_free (allsubmenus, TRUE); g_ptr_array_free (allmakers, TRUE); } void row_clicked (GtkTreeView *tree_view, GtkTreePath *path, GtkTreeViewColumn *column, gpointer user_data) { struct lfDatabase *lensdb = NULL; const lfCamera *camera = NULL; const lfCamera **cameras = NULL; lens_data *data = g_malloc(sizeof(lens_data)); data->tree_view = tree_view; data->single_lens_data = NULL; lensdb = lf_db_new (); lf_db_load (lensdb); GtkTreeSelection *selection = gtk_tree_view_get_selection(data->tree_view); GtkTreeModel *model = NULL; GtkTreeIter iter; gboolean ret = gtk_tree_selection_get_selected(selection, &model, &iter); if (ret == FALSE) return; RSLens *rs_lens = NULL; gtk_tree_model_get (model, &iter, RS_LENS_DB_EDITOR_LENS, &rs_lens, -1); gchar *camera_make; gchar *camera_model; gdouble min_focal; gdouble max_focal; g_assert(RS_IS_LENS(rs_lens)); g_object_get(rs_lens, "camera-make", &camera_make, "camera-model", &camera_model, "min-focal", &min_focal, "max-focal", &max_focal, NULL); gchar *lens_search; if (min_focal == max_focal) lens_search = g_strdup_printf("%.0fmm", min_focal); else lens_search = g_strdup_printf("%.0f-%.0f", min_focal, max_focal); cameras = lf_db_find_cameras(lensdb, camera_make, camera_model); if (cameras) camera = cameras[0]; if (camera) { const lfLens **lenslist = lf_db_find_lenses_hd ( lensdb, camera, NULL, lens_search, 0); const lfLens **full_lenslist = lf_db_find_lenses_hd ( lensdb, camera, NULL, NULL, 0); if (!lenslist && !full_lenslist) return; lens_menu_fill (data, lenslist, full_lenslist); lf_free (lenslist); } else { const lfLens **lenslist = lf_db_find_lenses_hd ( lensdb, NULL, NULL, lens_search, 0); const lfLens *const *full_lenslist = lf_db_get_lenses (lensdb); if (!lenslist) return; lens_menu_fill (data, lenslist, full_lenslist); } g_free(lens_search); gtk_menu_popup (GTK_MENU (data->LensMenu), NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time ()); } gboolean view_on_button_pressed (GtkWidget *treeview, GdkEventButton *event, gpointer userdata) { /* single click with the right mouse button? */ if (event->type == GDK_BUTTON_PRESS && event->button == 3) { GtkTreeSelection *selection; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); /* Note: gtk_tree_selection_count_selected_rows() does not * exist in gtk+-2.0, only in gtk+ >= v2.2 ! */ GtkTreePath *path; /* Get tree path for row that was clicked */ if (gtk_tree_view_get_path_at_pos(GTK_TREE_VIEW(treeview), (gint) event->x, (gint) event->y, &path, NULL, NULL, NULL)) { gtk_tree_selection_unselect_all(selection); gtk_tree_selection_select_path(selection, path); gtk_tree_path_free(path); } row_clicked(GTK_TREE_VIEW(treeview), path, NULL, userdata); return TRUE; /* we handled this */ } return FALSE; /* we did not handle this */ } gboolean view_popupmenu (GtkWidget *treeview, gpointer userdata) { GtkTreeSelection *selection; selection = gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)); GtkTreeModel *tree_model = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); GList* selected = gtk_tree_selection_get_selected_rows (selection, &tree_model); row_clicked(GTK_TREE_VIEW(treeview), selected->data, NULL, userdata); return TRUE; /* we handled this */ } void toggle_clicked (GtkCellRendererToggle *cell_renderer_toggle, const gchar *path, gpointer user_data) { GtkTreeIter iter; gboolean enabled; GtkTreeView *tree_view = GTK_TREE_VIEW(user_data); GtkTreeModel *tree_model = gtk_tree_view_get_model(tree_view); GtkTreePath* tree_path = gtk_tree_path_new_from_string(path); gtk_tree_model_get_iter(GTK_TREE_MODEL (tree_model), &iter, tree_path); gtk_tree_model_get(GTK_TREE_MODEL (tree_model), &iter, RS_LENS_DB_EDITOR_ENABLED, &enabled, -1); if (enabled) gtk_list_store_set(GTK_LIST_STORE (tree_model), &iter, RS_LENS_DB_EDITOR_ENABLED, FALSE, -1); else gtk_list_store_set(GTK_LIST_STORE (tree_model), &iter, RS_LENS_DB_EDITOR_ENABLED, TRUE, -1); RSLens *rs_lens = NULL; gtk_tree_model_get (tree_model, &iter, RS_LENS_DB_EDITOR_LENS, &rs_lens, -1); /* Set enabled/disabled to the selected RSLens */ rs_lens_set_lensfun_enabled(rs_lens, !enabled); RSLensDb *lens_db = rs_lens_db_get_default(); /* Force save of RSLensDb */ rs_lens_db_save(lens_db); } void update_lensfun(GtkButton *button, gpointer user_data) { GtkWidget *window = GTK_WIDGET(user_data); GdkCursor* cursor = gdk_cursor_new(GDK_WATCH); gdk_window_set_cursor(window->window, cursor); GTK_CATCHUP(); gchar *error = rs_lens_db_editor_update_lensfun(); gdk_window_set_cursor(window->window, NULL); GtkWidget *dialog = NULL; if (error) dialog = gui_dialog_make_from_text(GTK_STOCK_DIALOG_ERROR, _("Error updating lensfun database"), error); else dialog = gui_dialog_make_from_text(GTK_STOCK_DIALOG_INFO, _("Lensfun database updated"), error); gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CLOSE, GTK_RESPONSE_ACCEPT); gtk_widget_show_all(dialog); gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy(dialog); g_free(error); rs_lens_db_editor(); } gint rs_lens_db_editor_sort(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data) { gchar *a_lensfun_model; gchar *a_camera_model; gchar *a_identifier; gtk_tree_model_get(model, a, RS_LENS_DB_EDITOR_IDENTIFIER, &a_identifier, RS_LENS_DB_EDITOR_LENS_MODEL, &a_lensfun_model, RS_LENS_DB_EDITOR_CAMERA_MODEL, &a_camera_model, -1); gchar *b_lensfun_model; gchar *b_camera_model; gchar *b_identifier; gtk_tree_model_get(model, b, RS_LENS_DB_EDITOR_IDENTIFIER, &b_identifier, RS_LENS_DB_EDITOR_LENS_MODEL, &b_lensfun_model, RS_LENS_DB_EDITOR_CAMERA_MODEL, &b_camera_model, -1); gint ret = 0; ret = g_strcmp0(a_lensfun_model, b_lensfun_model); if (ret != 0) return ret; ret = g_strcmp0(a_camera_model, b_camera_model); if (ret != 0) return ret; ret = g_strcmp0(a_identifier, b_identifier); if (ret != 0) return ret; return ret; } void rs_lens_db_editor(void) { GtkTreeModel *tree_model = GTK_TREE_MODEL(gtk_list_store_new(10, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_OBJECT)); RSLensDb *lens_db = rs_lens_db_get_default(); fill_model(lens_db, tree_model); GtkWidget *editor = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(editor), _("Rawstudio Lens Library")); gtk_dialog_set_has_separator (GTK_DIALOG(editor), FALSE); g_signal_connect_swapped(editor, "delete_event", G_CALLBACK (gtk_widget_destroy), editor); g_signal_connect_swapped(editor, "response", G_CALLBACK (gtk_widget_destroy), editor); GtkWidget *frame = gtk_frame_new(""); GtkWidget *scroller = gtk_scrolled_window_new (NULL, NULL); gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroller), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC); GtkWidget *view = gtk_tree_view_new_with_model(tree_model); gtk_tree_view_set_reorderable(GTK_TREE_VIEW(view), FALSE); gtk_container_add (GTK_CONTAINER (scroller), view); GtkCellRenderer *renderer_lens_make = gtk_cell_renderer_text_new(); GtkCellRenderer *renderer_lens_model = gtk_cell_renderer_text_new(); GtkCellRenderer *renderer_focal = gtk_cell_renderer_text_new(); GtkCellRenderer *renderer_aperture = gtk_cell_renderer_text_new(); GtkCellRenderer *renderer_camera_make = gtk_cell_renderer_text_new(); GtkCellRenderer *renderer_camera_model = gtk_cell_renderer_text_new(); GtkCellRenderer *renderer_enabled = gtk_cell_renderer_toggle_new(); GtkTreeViewColumn *column_lens_make = gtk_tree_view_column_new_with_attributes (_("Lens make"), renderer_lens_make, "text", RS_LENS_DB_EDITOR_LENS_MAKE, NULL); GtkTreeViewColumn *column_lens_model = gtk_tree_view_column_new_with_attributes (_("Lens model"), renderer_lens_model, "text", RS_LENS_DB_EDITOR_LENS_MODEL, NULL); GtkTreeViewColumn *column_focal = gtk_tree_view_column_new_with_attributes (_("Focal"), renderer_focal, "text", RS_LENS_DB_EDITOR_HUMAN_FOCAL, NULL); GtkTreeViewColumn *column_aperture = gtk_tree_view_column_new_with_attributes (_("Aperture"), renderer_aperture, "text", RS_LENS_DB_EDITOR_HUMAN_APERTURE, NULL); GtkTreeViewColumn *column_camera_make = gtk_tree_view_column_new_with_attributes (_("Camera make"), renderer_camera_make, "text", RS_LENS_DB_EDITOR_CAMERA_MAKE, NULL); GtkTreeViewColumn *column_camera_model = gtk_tree_view_column_new_with_attributes (_("Camera model"), renderer_camera_model, "text", RS_LENS_DB_EDITOR_CAMERA_MODEL, NULL); GtkTreeViewColumn *column_enabled = gtk_tree_view_column_new_with_attributes (_("Enabled"), renderer_enabled, "active", RS_LENS_DB_EDITOR_ENABLED, "activatable", RS_LENS_DB_EDITOR_ENABLED_ACTIVATABLE, NULL); gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(tree_model), RS_LENS_DB_EDITOR_CAMERA_MODEL, GTK_SORT_ASCENDING); gtk_tree_sortable_set_sort_func(GTK_TREE_SORTABLE(tree_model), RS_LENS_DB_EDITOR_CAMERA_MODEL, rs_lens_db_editor_sort, NULL, NULL); g_signal_connect(G_OBJECT(view), "row-activated", G_CALLBACK(row_clicked), NULL); g_signal_connect (renderer_enabled, "toggled", G_CALLBACK (toggle_clicked), view); g_signal_connect(G_OBJECT(view), "button-press-event", G_CALLBACK(view_on_button_pressed), NULL); g_signal_connect(view, "popup-menu", (GCallback) view_popupmenu, NULL); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column_lens_make); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column_lens_model); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column_focal); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column_aperture); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column_camera_make); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column_camera_model); gtk_tree_view_append_column (GTK_TREE_VIEW (view), column_enabled); gtk_tree_view_set_headers_visible(GTK_TREE_VIEW (view), TRUE); gtk_container_add (GTK_CONTAINER (frame), scroller); gtk_window_resize(GTK_WINDOW(editor), 400, 400); gtk_container_set_border_width (GTK_CONTAINER (frame), 6); gtk_container_set_border_width (GTK_CONTAINER (scroller), 6); gtk_box_pack_start (GTK_BOX (GTK_DIALOG(editor)->vbox), frame, TRUE, TRUE, 0); GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), editor); gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); GtkWidget *button_close = gtk_button_new_from_stock(GTK_STOCK_CLOSE); gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_close, GTK_RESPONSE_CLOSE); gtk_widget_show_all(GTK_WIDGET(editor)); } static void fill_model(RSLensDb *lens_db, GtkTreeModel *tree_model) { GList *list = rs_lens_db_get_lenses(lens_db); while (list) { gchar *identifier; gchar *lensfun_make; gchar *lensfun_model; gdouble min_focal, max_focal, min_aperture, max_aperture; gchar *camera_make; gchar *camera_model; gboolean enabled; RSLens *lens = list->data; g_assert(RS_IS_LENS(lens)); g_object_get(lens, "identifier", &identifier, "lensfun-make", &lensfun_make, "lensfun-model", &lensfun_model, "min-focal", &min_focal, "max-focal", &max_focal, "min-aperture", &min_aperture, "max-aperture", &max_aperture, "camera-make", &camera_make, "camera-model", &camera_model, "enabled", &enabled, NULL); const gchar *human_focal = rs_human_focal(min_focal, max_focal); const gchar *human_aperture = rs_human_aperture(max_aperture); GtkTreeIter iter; gboolean enabled_activatable = FALSE; if (lensfun_make && lensfun_model) enabled_activatable = TRUE; gtk_list_store_append (GTK_LIST_STORE(tree_model), &iter); gtk_list_store_set (GTK_LIST_STORE(tree_model), &iter, RS_LENS_DB_EDITOR_IDENTIFIER, identifier, RS_LENS_DB_EDITOR_HUMAN_FOCAL, human_focal, RS_LENS_DB_EDITOR_HUMAN_APERTURE, human_aperture, RS_LENS_DB_EDITOR_LENS_MAKE, lensfun_make, RS_LENS_DB_EDITOR_LENS_MODEL, lensfun_model, RS_LENS_DB_EDITOR_CAMERA_MAKE, camera_make, RS_LENS_DB_EDITOR_CAMERA_MODEL, camera_model, RS_LENS_DB_EDITOR_ENABLED, enabled, RS_LENS_DB_EDITOR_ENABLED_ACTIVATABLE, enabled_activatable, RS_LENS_DB_EDITOR_LENS, lens, -1); list = g_list_next (list); } } static size_t write_callback(void *ptr, size_t size, size_t nmemb, void *userp) { GString *string = (GString *) userp; g_string_append_len(string, (char *) ptr, size * nmemb); return (size * nmemb); } static gchar * rs_lens_db_editor_update_lensfun(void) { const gchar *baseurl = "http://svn.berlios.de/svnroot/repos/lensfun/trunk/data/db/"; const gchar *target = g_strdup_printf("%s/.%u-rawstudio_lensfun/", g_get_tmp_dir(), g_random_int()); g_mkdir(target, 0700); if (!g_file_test(target, G_FILE_TEST_IS_DIR)) return g_strdup(_("Could not create temporary directory.")); CURL *curl = curl_easy_init(); GString *xml = g_string_new(NULL); gchar *filename = NULL, *url = NULL, *file = NULL; FILE *fp = NULL; CURLcode result; curl_easy_setopt(curl, CURLOPT_URL, baseurl); curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, write_callback); curl_easy_setopt(curl, CURLOPT_WRITEDATA, xml); result = curl_easy_perform(curl); if (result != 0) return g_strdup_printf(_("Could not fetch list of files from %s."), baseurl); htmlDocPtr doc = htmlReadMemory(xml->str, xml->len, NULL, NULL, 0); htmlNodePtr cur, child; cur = xmlDocGetRootElement(doc); cur = cur->xmlChildrenNode; cur = cur->next; cur = cur->xmlChildrenNode; cur = cur->next; cur = cur->next; cur = cur->next; cur = cur->xmlChildrenNode; cur = cur->next; cur = cur->next; while (cur) { child = cur->xmlChildrenNode; filename = (gchar *) xmlNodeListGetString(doc, child->xmlChildrenNode, 1); url = g_strdup_printf("%s%s", baseurl, filename); file = g_build_filename(target, filename, NULL); fp = fopen(file, "w"); curl_easy_reset(curl); curl_easy_setopt(curl, CURLOPT_URL, url); curl_easy_setopt(curl, CURLOPT_WRITEDATA, fp); result = curl_easy_perform(curl); fclose(fp); g_free(filename); g_free(url); g_free(file); cur = cur->next; cur = cur->next; if (result != 0) return g_strdup_printf(_("Could not fetch file from %s or write it to %s."), url, file); } const gchar *datadir = g_build_filename(g_get_user_data_dir(), "lensfun", NULL); if (!g_file_test(datadir, G_FILE_TEST_IS_DIR)) { g_mkdir(datadir, 0700); if (!g_file_test(datadir, G_FILE_TEST_IS_DIR)) return g_strdup_printf(_("Could not create datadir for lensfun - %s"), datadir); } GDir *dir = g_dir_open(target, 0, NULL); const gchar *fn = NULL; while ((fn = g_dir_read_name (dir))) { GPatternSpec *ps = g_pattern_spec_new ("*.xml"); if (g_pattern_match (ps, strlen(fn), fn, NULL)) { gchar *ffn = g_build_filename (target, fn, NULL); GFile *source = g_file_new_for_path(ffn); GFile *destination = g_file_new_for_path(g_build_filename(datadir, fn, NULL)); if (!g_file_copy(source, destination, G_FILE_COPY_OVERWRITE, NULL, NULL, NULL, NULL)) return g_strdup_printf(_("Error copying file %s to %s\n"), g_file_get_parse_name(source), g_file_get_parse_name(destination)); g_free(ffn); } g_free(ps); } /* FIXME: remove 'target' */ g_dir_close(dir); return NULL; } void set_lens (GtkButton *button, SingleLensData *single_lens_data) { struct lfDatabase *lensdb = NULL; const lfCamera *camera = NULL; const lfCamera **cameras = NULL; lens_data *data = g_malloc(sizeof(lens_data)); data->single_lens_data = single_lens_data; lensdb = lf_db_new (); lf_db_load (lensdb); RSLens *rs_lens = RS_LENS(single_lens_data->lens); gchar *camera_make; gchar *camera_model; gdouble min_focal; gdouble max_focal; g_assert(RS_IS_LENS(rs_lens)); g_object_get(rs_lens, "camera-make", &camera_make, "camera-model", &camera_model, "min-focal", &min_focal, "max-focal", &max_focal, NULL); gchar *lens_search; if (min_focal == max_focal) lens_search = g_strdup_printf("%.0fmm", min_focal); else lens_search = g_strdup_printf("%.0f-%.0f", min_focal, max_focal); cameras = lf_db_find_cameras(lensdb, camera_make, camera_model); if (cameras) camera = cameras[0]; if (camera) { const lfLens **lenslist = lf_db_find_lenses_hd ( lensdb, camera, NULL, lens_search, 0); const lfLens **full_lenslist = lf_db_find_lenses_hd ( lensdb, camera, NULL, NULL, 0); if (!lenslist && !full_lenslist) return; lens_menu_fill (data, lenslist, full_lenslist); lf_free (lenslist); } else { const lfLens **lenslist = lf_db_find_lenses_hd ( lensdb, NULL, NULL, lens_search, 0); const lfLens *const *full_lenslist = lf_db_get_lenses (lensdb); if (!lenslist) return; lens_menu_fill (data, lenslist, full_lenslist); } g_free(lens_search); gtk_menu_popup (GTK_MENU (data->LensMenu), NULL, NULL, NULL, NULL, 0, gtk_get_current_event_time ()); } void enable_lens(GtkCheckButton *checkbutton, gpointer user_data) { RSLens *lens = user_data; rs_lens_set_lensfun_enabled(lens, gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(checkbutton))); } void open_full_lens_editor(GtkCheckButton *checkbutton, gpointer user_data) { rs_lens_db_editor(); } static gchar* boldify(const gchar* text) { return g_strconcat("", text, "", NULL); } GtkDialog * rs_lens_db_editor_single_lens(RSLens *lens) { gchar *identifier; gchar *lensfun_make; gchar *lensfun_model; gdouble min_focal, max_focal, min_aperture, max_aperture; gchar *camera_make; gchar *camera_model; gboolean enabled; g_assert(RS_IS_LENS(lens)); g_object_get(lens, "identifier", &identifier, "lensfun-make", &lensfun_make, "lensfun-model", &lensfun_model, "min-focal", &min_focal, "max-focal", &max_focal, "min-aperture", &min_aperture, "max-aperture", &max_aperture, "camera-make", &camera_make, "camera-model", &camera_model, "enabled", &enabled, NULL); GtkWidget *editor = gtk_dialog_new(); gtk_window_set_title(GTK_WINDOW(editor), _("Rawstudio Lens Editor")); gtk_dialog_set_has_separator (GTK_DIALOG(editor), FALSE); g_signal_connect_swapped(editor, "delete_event", G_CALLBACK (gtk_widget_destroy), editor); g_signal_connect_swapped(editor, "response", G_CALLBACK (gtk_widget_destroy), editor); GtkWidget *frame = gtk_frame_new(""); GtkWidget *table = gtk_table_new(2, 10, FALSE); GtkWidget *label1 = gtk_label_new(""); gtk_label_set_markup(GTK_LABEL(label1), boldify(_("Lens Make"))); gtk_misc_set_alignment(GTK_MISC(label1), 0, 0); GtkWidget *label2 = gtk_label_new(""); gtk_label_set_markup(GTK_LABEL(label2), boldify(_("Lens Model"))); gtk_misc_set_alignment(GTK_MISC(label2), 0, 0); GtkWidget *label3 = gtk_label_new(""); gtk_label_set_markup(GTK_LABEL(label3), boldify(_("Focal Length"))); gtk_misc_set_alignment(GTK_MISC(label3), 0, 0); GtkWidget *label4 = gtk_label_new(""); gtk_label_set_markup(GTK_LABEL(label4), boldify(_("Aperture"))); gtk_misc_set_alignment(GTK_MISC(label4), 0, 0); GtkWidget *label5 = gtk_label_new(""); gtk_label_set_markup(GTK_LABEL(label5), boldify(_("Camera Make"))); gtk_misc_set_alignment(GTK_MISC(label5), 0, 0); GtkWidget *label6 = gtk_label_new(""); gtk_label_set_markup(GTK_LABEL(label6), boldify(_("Camera Model"))); gtk_misc_set_alignment(GTK_MISC(label6), 0, 0); // GtkWidget *label7 = gtk_label_new(""); // gtk_label_set_markup(GTK_LABEL(label7), "Enabled"); // gtk_misc_set_alignment(GTK_MISC(label7), 0, 0); gtk_table_attach_defaults(GTK_TABLE(table), label5, 0,1,0,1); gtk_table_attach_defaults(GTK_TABLE(table), label6, 0,1,1,2); gtk_table_attach_defaults(GTK_TABLE(table), label3, 0,1,2,3); gtk_table_attach_defaults(GTK_TABLE(table), label4, 0,1,3,4); // gtk_table_attach_defaults(GTK_TABLE(table), label7, 0,1,4,5); gtk_table_attach_defaults(GTK_TABLE(table), label1, 0,1,6,7); gtk_table_attach_defaults(GTK_TABLE(table), label2, 0,1,7,8); GtkWidget *label_lensfun_make = gtk_label_new(lensfun_make); GtkWidget *label_lensfun_model = gtk_label_new(lensfun_model); GtkWidget *label_focal; if (min_focal == max_focal) label_focal = gtk_label_new(g_strdup_printf("%.0fmm", min_focal)); else label_focal = gtk_label_new(g_strdup_printf("%.0f-%.0fmm", min_focal, max_focal)); GtkWidget *label_aperture = gtk_label_new(g_strdup_printf("F/%.1f", max_aperture)); GtkWidget *label_camera_make = gtk_label_new(camera_make); GtkWidget *label_camera_model = gtk_label_new(camera_model); GtkWidget *checkbutton_enabled = gtk_check_button_new_with_label(_("Enable this lens")); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbutton_enabled), rs_lens_get_lensfun_enabled(lens)); GtkWidget *button_set_lens = gtk_button_new_with_label(_("Set lens")); GtkWidget *sep1 = gtk_hseparator_new(); GtkWidget *sep2 = gtk_hseparator_new(); SingleLensData *single_lens_data = g_malloc(sizeof(SingleLensData)); single_lens_data->lensfun_make = label_lensfun_make; single_lens_data->lensfun_model = label_lensfun_model; single_lens_data->lens = lens; single_lens_data->button = button_set_lens; single_lens_data->checkbutton_enabled = checkbutton_enabled; g_signal_connect(button_set_lens, "clicked", G_CALLBACK(set_lens), single_lens_data); gtk_misc_set_alignment(GTK_MISC(label_lensfun_make), 1, 0); gtk_misc_set_alignment(GTK_MISC(label_lensfun_model), 1, 0); gtk_misc_set_alignment(GTK_MISC(label_focal), 1, 0); gtk_misc_set_alignment(GTK_MISC(label_aperture), 1, 0); gtk_misc_set_alignment(GTK_MISC(label_camera_make), 1, 0); gtk_misc_set_alignment(GTK_MISC(label_camera_model), 1, 0); // gtk_button_set_alignment(GTK_BUTTON(checkbutton_enabled), 1, 0); gtk_table_attach_defaults(GTK_TABLE(table), label_camera_make, 1,2,0,1); gtk_table_attach_defaults(GTK_TABLE(table), label_camera_model, 1,2,1,2); gtk_table_attach_defaults(GTK_TABLE(table), label_focal, 1,2,2,3); gtk_table_attach_defaults(GTK_TABLE(table), label_aperture, 1,2,3,4); gtk_table_attach_defaults(GTK_TABLE(table), sep1, 0,2,5,6); gtk_table_attach_defaults(GTK_TABLE(table), label_lensfun_make, 1,2,6,7); gtk_table_attach_defaults(GTK_TABLE(table), label_lensfun_model, 1,2,7,8); gtk_table_attach_defaults(GTK_TABLE(table), button_set_lens, 1,2,6,8); gtk_table_attach_defaults(GTK_TABLE(table), sep2, 0,2,8,9); gtk_table_attach_defaults(GTK_TABLE(table), checkbutton_enabled, 0,2,9,10); /* Set spacing around separator in table */ gtk_table_set_row_spacing(GTK_TABLE(table), 4, 10); gtk_table_set_row_spacing(GTK_TABLE(table), 5, 10); gtk_table_set_row_spacing(GTK_TABLE(table), 7, 10); gtk_table_set_row_spacing(GTK_TABLE(table), 8, 10); gtk_window_resize(GTK_WINDOW(editor), 300, 1); gtk_container_set_border_width (GTK_CONTAINER (frame), 6); gtk_container_set_border_width (GTK_CONTAINER (table), 6); gtk_box_pack_start (GTK_BOX (GTK_DIALOG(editor)->vbox), frame, TRUE, TRUE, 0); gtk_container_add (GTK_CONTAINER (frame), table); g_signal_connect(checkbutton_enabled, "toggled", G_CALLBACK(enable_lens), lens); /* FIXME: Put lensfun update button in editor - for this to work, we cannot close the window when updating */ // GtkWidget *button_update_lensfun = gtk_button_new_with_label(_("Update lensfun database")); // g_signal_connect(button_update_lensfun, "clicked", G_CALLBACK(update_lensfun), NULL); // gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_update_lensfun, GTK_RESPONSE_NONE); GtkWidget *button_lens_library = gtk_button_new_with_label(_("Lens Library")); g_signal_connect(button_lens_library, "clicked", G_CALLBACK(open_full_lens_editor), lens); gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_lens_library, GTK_RESPONSE_CLOSE); GtkWidget *button_close = gtk_button_new_from_stock(GTK_STOCK_CLOSE); gtk_dialog_add_action_widget (GTK_DIALOG (editor), button_close, GTK_RESPONSE_CLOSE); gtk_widget_show_all(GTK_WIDGET(editor)); if (!rs_lens_get_lensfun_model(lens) || !rs_lens_get_lensfun_make(lens)) { gtk_widget_hide(label_lensfun_make); gtk_widget_hide(label_lensfun_model); gtk_widget_show(button_set_lens); } else { gtk_widget_show(label_lensfun_make); gtk_widget_show(label_lensfun_model); gtk_widget_hide(button_set_lens); } return GTK_DIALOG(editor); } rawstudio-2.0/librawstudio/rs-filter.h0000644000175000017500000001531611543674627015132 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_FILTER_H #define RS_FILTER_H #include "rawstudio.h" #include G_BEGIN_DECLS /** * Convenience macro to define generic filter */ #define RS_DEFINE_FILTER(type_name, TypeName) \ static GType type_name##_get_type (GTypeModule *module); \ static void type_name##_class_init(TypeName##Class *klass); \ static void type_name##_init(TypeName *filter); \ static GType type_name##_type = 0; \ static GType \ type_name##_get_type(GTypeModule *module) \ { \ if (!type_name##_type) \ { \ static const GTypeInfo filter_info = \ { \ sizeof (TypeName##Class), \ (GBaseInitFunc) NULL, \ (GBaseFinalizeFunc) NULL, \ (GClassInitFunc) type_name##_class_init, \ NULL, \ NULL, \ sizeof (TypeName), \ 0, \ (GInstanceInitFunc) type_name##_init \ }; \ \ type_name##_type = g_type_module_register_type( \ module, \ RS_TYPE_FILTER, \ #TypeName, \ &filter_info, \ 0); \ } \ return type_name##_type; \ } #define RS_TYPE_FILTER rs_filter_get_type() #define RS_FILTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_FILTER, RSFilter)) #define RS_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_FILTER, RSFilterClass)) #define RS_IS_FILTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_FILTER)) #define RS_IS_FILTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_FILTER)) #define RS_FILTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_FILTER, RSFilterClass)) #define RS_FILTER_NAME(filter) (((filter)) ? g_type_name(G_TYPE_FROM_CLASS(RS_FILTER_GET_CLASS ((filter)))) : "(nil)") typedef enum { RS_FILTER_CHANGED_PIXELDATA = 1<<0, RS_FILTER_CHANGED_DIMENSION = 1<<0 | 1<<1, /* This implies pixeldata changed */ RS_FILTER_CHANGED_ICC_PROFILE = 1<<2 } RSFilterChangedMask; typedef struct _RSFilter RSFilter; typedef struct _RSFilterClass RSFilterClass; typedef RSFilterResponse *(*RSFilterFunc)(RSFilter *filter, const RSFilterRequest *request); struct _RSFilter { GObject parent; gboolean dispose_has_run; const gchar *label; RSFilter *previous; GSList *next_filters; gboolean enabled; }; struct _RSFilterClass { GObjectClass parent_class; const gchar *name; RSFilterFunc get_image; RSFilterFunc get_image8; RSFilterResponse *(*get_size)(RSFilter *filter, const RSFilterRequest *request); void (*previous_changed)(RSFilter *filter, RSFilter *parent, RSFilterChangedMask mask); }; GType rs_filter_get_type(void) G_GNUC_CONST; /** * Return a new instance of a RSFilter * @param name The name of the filter * @param previous The previous filter or NULL * @return The newly instantiated RSFilter or NULL */ extern RSFilter *rs_filter_new(const gchar *name, RSFilter *previous); /** * Set the previous RSFilter in a RSFilter-chain * @param filter A RSFilter * @param previous A previous RSFilter */ extern void rs_filter_set_previous(RSFilter *filter, RSFilter *previous); /** * Signal that a filter has changed, filters depending on this will be invoked * This should only be called from filters * @param filter The changed filter * @param mask A mask indicating what changed */ extern void rs_filter_changed(RSFilter *filter, RSFilterChangedMask mask); /** * Get the output image from a RSFilter * @param filter A RSFilter * @param param A RSFilterRequest defining parameters for a image request * @return A RS_IMAGE16, this must be unref'ed */ extern RSFilterResponse *rs_filter_get_image(RSFilter *filter, const RSFilterRequest *request); /** * Get 8 bit output image from a RSFilter * @param filter A RSFilter * @param param A RSFilterRequest defining parameters for a image request * @return A RS_IMAGE16, this must be unref'ed */ extern RSFilterResponse *rs_filter_get_image8(RSFilter *filter, const RSFilterRequest *request); /** * Get predicted size of a RSFilter * @param filter A RSFilter * @param request A RSFilterRequest defining parameters for the request */ extern RSFilterResponse *rs_filter_get_size(RSFilter *filter, const RSFilterRequest *request); /** * Get predicted size of a RSFilter * @param filter A RSFilter * @param request A RSFilterRequest defining parameters for the request * @param width A pointer to a gint where the width will be written or NULL * @param height A pointer to a gint where the height will be written or NULL * @return TRUE if width/height is known, FALSE otherwise */ extern gboolean rs_filter_get_size_simple(RSFilter *filter, const RSFilterRequest *request, gint *width, gint *height); /** * Set a GObject property on zero or more filters above #filter recursively * @param filter A RSFilter * @param ... Pairs of property names and values followed by NULL */ void rs_filter_set_recursive(RSFilter *filter, ...); /** * Get a GObject property from a RSFilter chain recursively * @param filter A RSFilter * @param ... Pairs of property names and a return pointers followed by NULL */ extern void rs_filter_get_recursive(RSFilter *filter, ...); /** * Set enabled state of a RSFilter * @param filter A RSFilter * @param enabled TRUE to enable filter, FALSE to disable * @return Previous state */ extern gboolean rs_filter_set_enabled(RSFilter *filter, gboolean enabled); /** * Get enabled state of a RSFilter * @param filter A RSFilter * @return TRUE if filter is enabled, FALSE if disabled */ extern gboolean rs_filter_get_enabled(RSFilter *filter); /** * Set a label for a RSFilter - only used for debugging * @param filter A RSFilter * @param label A new label for the RSFilter, this will NOT be copied */ extern void rs_filter_set_label(RSFilter *filter, const gchar *label); /** * Get the label for a RSFilter * @param filter A RSFilter * @return The label for the RSFilter or NULL */ extern const gchar *rs_filter_get_label(RSFilter *filter); /** * Draw a nice graph of the filter chain * note: Requires graphviz * @param filter The top-most filter to graph */ extern void rs_filter_graph(RSFilter *filter); G_END_DECLS #endif /* RS_FILTER_H */ rawstudio-2.0/librawstudio/rs-lens.h0000644000175000017500000000523311526533645014576 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_LENS_H #define RS_LENS_H #include #include G_BEGIN_DECLS #define RS_TYPE_LENS rs_lens_get_type() #define RS_LENS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_LENS, RSLens)) #define RS_LENS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_LENS, RSLensClass)) #define RS_IS_LENS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_LENS)) #define RS_IS_LENS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_LENS)) #define RS_LENS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_LENS, RSLensClass)) GType rs_lens_get_type(void); typedef struct _RSLens RSLens; typedef struct { GObjectClass parent_class; } RSLensClass; /** * Instantiate a new RSLens * @return A new RSLens with a refcount of 1 */ RSLens *rs_lens_new(void); /** * Instantiate a new RSLens from a RSMetadata * @param metadata A RSMetadata type with lens information embedded * @return A new RSLens with a refcount of 1 */ RSLens *rs_lens_new_from_medadata(RSMetadata *metadata); /** * Get the Lensfun make from a RSLens * @param lens A RSLens * @return The make as used by Lensfun or NULL if unknown */ const gchar *rs_lens_get_lensfun_make(RSLens *lens); /** * Get the Lensfun model from a RSLens * @param lens A RSLens * @return The model as used by Lensfun or NULL if unknown */ const gchar *rs_lens_get_lensfun_model(RSLens *lens); /** * Get a human readable description of the lens * @param lens A RSLens * @return A human readble string describing the lens */ const gchar *rs_lens_get_description(RSLens *lens); void rs_lens_set_lensfun_make(RSLens *lens, gchar *make); void rs_lens_set_lensfun_model(RSLens *lens, gchar *model); void rs_lens_set_lensfun_enabled(RSLens *lens, gboolean enabled); gboolean rs_lens_get_lensfun_enabled(RSLens *lens); G_END_DECLS #endif /* RS_LENS_H */ rawstudio-2.0/librawstudio/rs-filetypes.h0000644000175000017500000000630211543674627015644 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_FILETYPES_H #define RS_FILETYPES_H #include "rs-types.h" #include "rs-filter-response.h" typedef enum { RS_LOADER_FLAGS_RAW = (1<<0), RS_LOADER_FLAGS_8BIT = (1<<1), RS_LOADER_FLAGS_ALL = 0xffffff, } RSLoaderFlags; typedef RSFilterResponse *(*RSFileLoaderFunc)(const gchar *filename); typedef gboolean (*RSFileMetaLoaderFunc)(const gchar *service, RAWFILE *rawfile, guint offset, RSMetadata *meta); /** * Initialize the RSFiletype subsystem, this MUST be called before any other * rs_filetype_*-functions */ extern void rs_filetype_init(void); /** * Register a new image loader * @param extension The filename extension including the dot, ie: ".cr2" * @param description A human readable description of the file-format/loader * @param loader The loader function * @param priority A loader priority, lowest is served first. * @param flags Flags describing the loader */ extern void rs_filetype_register_loader(const gchar *extension, const gchar *description, const RSFileLoaderFunc loader, const gint priority, const RSLoaderFlags flags); /** * Register a new metadata loader * @param extension The filename extension including the dot, ie: ".cr2" * @param description A human readable description of the file-format/loader * @param meta_loader The loader function * @param priority A loader priority, lowest is served first. * @param flags Flags describing the loader */ extern void rs_filetype_register_meta_loader(const gchar *service, const gchar *description, const RSFileMetaLoaderFunc meta_loader, const gint priority, const RSLoaderFlags flags); /** * Check if we support loading a given extension * @param filename A filename or extension to look-up */ extern gboolean rs_filetype_can_load(const gchar *filename); /** * Load an image according to registered loaders * @param filename The file to load * @return A new RS_IMAGE16 or NULL if the loading failed */ extern RSFilterResponse *rs_filetype_load(const gchar *filename); /** * Load metadata from a specified file * @param service The file to load metadata from OR a servicename (".exif" for example) * @param meta A RSMetadata structure to load everything into * @param rawfile An open RAWFILE * @param offset An offset in the open RAWFILE */ extern gboolean rs_filetype_meta_load(const gchar *service, RSMetadata *meta, RAWFILE *rawfile, guint offset); #endif /* RS_FILETYPES_H */ rawstudio-2.0/librawstudio/rs-color-space-selector.h0000644000175000017500000000432411526533645017662 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RSCOLOR_SPACE_SELECTOR_H #define RSCOLOR_SPACE_SELECTOR_H #include G_BEGIN_DECLS #define RS_TYPE_COLOR_SPACE_SELECTOR rs_color_space_selector_get_type() #define RS_COLOR_SPACE_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_COLOR_SPACE_SELECTOR, RSColorSpaceSelector)) #define RS_COLOR_SPACE_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_COLOR_SPACE_SELECTOR, RSColorSpaceSelectorClass)) #define RS_IS_COLOR_SPACE_SELECTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_COLOR_SPACE_SELECTOR)) #define RS_IS_COLOR_SPACE_SELECTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_COLOR_SPACE_SELECTOR)) #define RS_COLOR_SPACE_SELECTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_COLOR_SPACE_SELECTOR, RSColorSpaceSelectorClass)) typedef struct _RSColorSpaceSelectorPrivate RSColorSpaceSelectorPrivate; typedef struct { GtkComboBox parent; RSColorSpaceSelectorPrivate *priv; } RSColorSpaceSelector; typedef struct { GtkComboBoxClass parent_class; } RSColorSpaceSelectorClass; GType rs_color_space_selector_get_type(void); GtkWidget * rs_color_space_selector_new(void); void rs_color_space_selector_add_all(RSColorSpaceSelector *selector); RSColorSpace * rs_color_space_selector_set_selected_by_name(RSColorSpaceSelector *selector, const gchar *type_name); G_END_DECLS #endif /* RSCOLOR_SPACE_SELECTOR_H */ rawstudio-2.0/librawstudio/rs-utils.h0000644000175000017500000001376011543674627015006 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_UTILS_H #define RS_UTILS_H #include #include #define GETVAL(adjustment) \ gtk_adjustment_get_value((GtkAdjustment *) adjustment) #define SETVAL(adjustment, value) \ gtk_adjustment_set_value((GtkAdjustment *) adjustment, value) /** * A version of atof() that isn't locale specific * @note This doesn't do any error checking! * @param str A NULL terminated string representing a number * @return The number represented by str or 0.0 if str is NULL */ extern gdouble rs_atof(const gchar *str); /** * A convenience function to convert an EXIF timestamp to a unix timestamp. * @note This will only work until 2038 unless glib fixes its GTime * @param str A NULL terminated string containing a timestamp in the format "YYYY:MM:DD HH:MM:SS" (EXIF 2.2 section 4.6.4) * @return A unix timestamp or -1 on error */ GTime rs_exiftime_to_unixtime(const gchar *str); /** * A convenience function to convert an unix timestamp to an EXIF timestamp. * @note This will only work until 2038 unless glib fixes its GTime * @param timestamp A unix timestamp * @return A string formatted as specified in EXIF 2.2 section 4.6.4 */ gchar * rs_unixtime_to_exiftime(GTime timestamp); /** * Constrains a box to fill a bounding box without changing aspect * @param target_width The width of the bounding box * @param target_height The height of the bounding box * @param width The input and output width * @param height The input and output height */ extern void rs_constrain_to_bounding_box(gint target_width, gint target_height, gint *width, gint *height); /** * Try to count the number of processor cores in a system. * @note This currently only works for systems with /proc/cpuinfo * @return The numver of cores or 1 if the system is unsupported */ extern gint rs_get_number_of_processor_cores(void); /** * Detect cpu features * @return A bitmask of @RSCpuFlags */ guint rs_detect_cpu_features(void); /** * Return a path to the current config directory for Rawstudio - this is the * .rawstudio direcotry in home * @return A path to an existing directory */ extern const gchar * rs_confdir_get(void); /** * Return a cache directory for filename * @param filename A complete path to a photo * @return A directory to hold the cache. This is guarenteed to exist */ extern gchar * rs_dotdir_get(const gchar *filename); /** * Normalize a RS_RECT, ie makes sure that x1 < x2 and y1, * * Anders Kvist and Klaus Post * * 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 RS_PROFILE_FACTORY_H #define RS_PROFILE_FACTORY_H #include #include "rs-dcp-file.h" #include "rs-icc-profile.h" G_BEGIN_DECLS #define RS_TYPE_PROFILE_FACTORY rs_profile_factory_get_type() #define RS_PROFILE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_PROFILE_FACTORY, RSProfileFactory)) #define RS_PROFILE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_PROFILE_FACTORY, RSProfileFactoryClass)) #define RS_IS_PROFILE_FACTORY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_PROFILE_FACTORY)) #define RS_IS_PROFILE_FACTORY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_PROFILE_FACTORY)) #define RS_PROFILE_FACTORY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_PROFILE_FACTORY, RSProfileFactoryClass)) enum { RS_PROFILE_FACTORY_STORE_MODEL, RS_PROFILE_FACTORY_STORE_PROFILE, RS_PROFILE_FACTORY_NUM_FIELDS }; struct _RSProfileFactory { GObject parent; GtkListStore *profiles; }; typedef struct _RSProfileFactory RSProfileFactory; typedef struct { GObjectClass parent_class; } RSProfileFactoryClass; GType rs_profile_factory_get_type(void); void rs_profile_factory_load_profiles(RSProfileFactory *factory, const gchar *path, gboolean load_dcp, gboolean load_icc); RSProfileFactory *rs_profile_factory_new(const gchar *search_path); RSProfileFactory *rs_profile_factory_new_default(void); const gchar *rs_profile_factory_get_user_profile_directory(void); gboolean rs_profile_factory_add_profile(RSProfileFactory *factory, const gchar *path); GtkTreeModelFilter *rs_dcp_factory_get_compatible_as_model(RSProfileFactory *factory, const gchar *unique_id); RSDcpFile *rs_profile_factory_find_from_id(RSProfileFactory *factory, const gchar *path); RSIccProfile *rs_profile_factory_find_icc_from_filename(RSProfileFactory *factory, const gchar *path); GSList *rs_profile_factory_find_from_model(RSProfileFactory *factory, const gchar *id); void rs_profile_factory_set_embedded_profile(RSProfileFactory *factory, const RSIccProfile *profile); G_END_DECLS #endif /* RS_PROFILE_FACTORY_H */ rawstudio-2.0/librawstudio/rs-filter-param.c0000644000175000017500000002362411526533645016217 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-filter-param.h" #define RS_TYPE_FLOAT4 rs_float4_get_type() gpointer float4_copy(const gpointer boxed) { return g_memdup(boxed, sizeof(gfloat)*4); } GType rs_float4_get_type(void) { static GType type = 0; if (!type) type = g_boxed_type_register_static(g_intern_static_string("RSFloat4"), float4_copy, g_free); return type; } G_DEFINE_TYPE(RSFilterParam, rs_filter_param, G_TYPE_OBJECT) static void rs_filter_param_dispose(GObject *object) { RSFilterParam *filter_param = RS_FILTER_PARAM(object); if (!filter_param->dispose_has_run) { filter_param->dispose_has_run = TRUE; g_hash_table_destroy(filter_param->properties); } G_OBJECT_CLASS(rs_filter_param_parent_class)->dispose (object); } static void rs_filter_param_finalize(GObject *object) { G_OBJECT_CLASS(rs_filter_param_parent_class)->finalize (object); } static void rs_filter_param_class_init(RSFilterParamClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = rs_filter_param_dispose; object_class->finalize = rs_filter_param_finalize; } static inline GValue * new_value(GType type) { GValue *value = g_slice_new0(GValue); g_value_init(value, type); return value; } static void free_value(gpointer data) { GValue *value = (GValue *) data; g_value_unset(value); g_slice_free(GValue, value); } static inline GValue * clone_value(const GValue *value) { GType type = G_VALUE_TYPE(value); GValue *ret = new_value(type); g_value_copy(value, ret); return ret; } static void rs_filter_param_init(RSFilterParam *param) { param->properties = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, free_value); } RSFilterParam * rs_filter_param_new(void) { return g_object_new (RS_TYPE_FILTER_PARAM, NULL); } void rs_filter_param_clone(RSFilterParam *destination, const RSFilterParam *source) { g_assert(RS_IS_FILTER_PARAM(destination)); g_assert(RS_IS_FILTER_PARAM(source)); /* Clone the properties table */ GHashTableIter iter; gpointer key, value; g_hash_table_iter_init (&iter, source->properties); while (g_hash_table_iter_next (&iter, &key, &value)) g_hash_table_insert(destination->properties, (gpointer) g_strdup(key), clone_value(value)); } static void rs_filter_param_set_gvalue(RSFilterParam *filter_param, const gchar *name, GValue * value) { g_assert(RS_IS_FILTER_PARAM(filter_param)); g_assert(name != NULL); g_assert(name[0] != '\0'); g_hash_table_insert(filter_param->properties, (gpointer) g_strdup(name), value); } static GValue * rs_filter_param_get_gvalue(const RSFilterParam *filter_param, const gchar *name) { g_assert(RS_IS_FILTER_PARAM(filter_param)); GValue *value = g_hash_table_lookup(filter_param->properties, name); return value; } /** * Delete a property from a RSFilterParam * @param filter_param A RSFilterParam * @param name The name of the property * @return TRUE if the property was found, FALSE otherwise */ gboolean rs_filter_param_delete(RSFilterParam *filter_param, const gchar *name) { g_assert(RS_IS_FILTER_PARAM(filter_param)); return g_hash_table_remove(filter_param->properties, name); } /** * Set a string property * @param filter_param A RSFilterParam * @param name The name of the property * @param str NULL-terminated string to set (will be copied) */ void rs_filter_param_set_string(RSFilterParam *filter_param, const gchar *name, const gchar *str) { GValue *val = new_value(G_TYPE_STRING); g_value_set_string(val, str); rs_filter_param_set_gvalue(filter_param, name, val); } /** * Get a string property * @param filter_param A RSFilterParam * @param name The name of the property * @param str A pointer to a string pointer where the value of the property can be saved. Should not be freed * @return TRUE if the property was found, FALSE otherwise */ gboolean rs_filter_param_get_string(const RSFilterParam *filter_param, const gchar *name, const gchar ** const str) { GValue *val = rs_filter_param_get_gvalue(filter_param, name); if (val && G_VALUE_HOLDS_STRING(val)) *str = g_value_get_string(val); return (val != NULL); } /** * Set a boolean property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A value to store */ void rs_filter_param_set_boolean(RSFilterParam *filter_param, const gchar *name, const gboolean value) { GValue *val = new_value(G_TYPE_BOOLEAN); g_value_set_boolean(val, value); rs_filter_param_set_gvalue(filter_param, name, val); } /** * Get a gboolean property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A pointer to a gboolean where the value will be stored * @return TRUE if the property was found, FALSE otherwise */ gboolean rs_filter_param_get_boolean(const RSFilterParam *filter_param, const gchar *name, gboolean *value) { GValue *val = rs_filter_param_get_gvalue(filter_param, name); if (val && G_VALUE_HOLDS_BOOLEAN(val)) *value = g_value_get_boolean(val); return (val != NULL); } /** * Set a integer property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A value to store */ void rs_filter_param_set_integer(RSFilterParam *filter_param, const gchar *name, const gint value) { GValue *val = new_value(G_TYPE_INT); g_value_set_int(val, value); rs_filter_param_set_gvalue(filter_param, name, val); } /** * Get a integer property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A pointer to a gint where the value will be stored * @return TRUE if the property was found, FALSE otherwise */ gboolean rs_filter_param_get_integer(const RSFilterParam *filter_param, const gchar *name, gint *value) { GValue *val = rs_filter_param_get_gvalue(filter_param, name); if (val && G_VALUE_HOLDS_INT(val)) *value = g_value_get_int(val); return (val != NULL); } /** * Set a float property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A value to store */ void rs_filter_param_set_float(RSFilterParam *filter_param, const gchar *name, const gfloat value) { GValue *val = new_value(G_TYPE_FLOAT); g_value_set_float(val, value); rs_filter_param_set_gvalue(filter_param, name, val); } /** * Get a float property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A pointer to a gfloat where the value will be stored * @return TRUE if the property was found, FALSE otherwise */ gboolean rs_filter_param_get_float(const RSFilterParam *filter_param, const gchar *name, gfloat *value) { GValue *val = rs_filter_param_get_gvalue(filter_param, name); if (val && G_VALUE_HOLDS_FLOAT(val)) *value = g_value_get_float(val); return (val != NULL); } /** * Set a float[4] property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A value to store */ void rs_filter_param_set_float4(RSFilterParam *filter_param, const gchar *name, const gfloat value[4]) { GValue *val = new_value(RS_TYPE_FLOAT4); g_value_set_boxed(val, value); rs_filter_param_set_gvalue(filter_param, name, val); } /** * Get a float property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A pointer to a gfloat [4] where the values will be stored * @return TRUE if the property was found, FALSE otherwise */ gboolean rs_filter_param_get_float4(const RSFilterParam *filter_param, const gchar *name, gfloat value[4]) { typedef gfloat buh[4]; GValue *val = rs_filter_param_get_gvalue(filter_param, name); if (val && G_TYPE_CHECK_VALUE_TYPE(val, RS_TYPE_FLOAT4)) { gfloat *boxed = g_value_get_boxed(val); value[0] = boxed[0]; value[1] = boxed[1]; value[2] = boxed[2]; value[3] = boxed[3]; } return (val != NULL); } /** * Set an object property * @param filter_param A RSFilterParam * @param name The name of the property * @param value An object to store. Refcount will be incremented by one */ void rs_filter_param_set_object(RSFilterParam *filter_param, const gchar *name, gpointer object) { g_return_if_fail(G_IS_OBJECT(object)); GValue *val = new_value(G_OBJECT_TYPE(object)); g_value_set_object(val, object); rs_filter_param_set_gvalue(filter_param, name, val); } /** * Get an object property * @param filter_param A RSFilterParam * @param name The name of the property * @return The object if found, NULL otherwise */ gpointer rs_filter_param_get_object(const RSFilterParam *filter_param, const gchar *name) { gpointer object = NULL; GValue *val = rs_filter_param_get_gvalue(filter_param, name); if (val && G_VALUE_HOLDS_OBJECT(val)) object = g_value_dup_object(val); return object; } /** * Get an object property * @param filter_param A RSFilterParam * @param name The name of the property * @param type A desired GType, if the type doesn't match, the result is treated as non-existent * @return The object if found, NULL otherwise */ gpointer rs_filter_param_get_object_with_type(const RSFilterParam *filter_param, const gchar *name, GType type) { gpointer object = NULL; GValue *val = rs_filter_param_get_gvalue(filter_param, name); if (val && G_TYPE_CHECK_VALUE_TYPE(val, type)) object = g_value_dup_object(val); return object; } rawstudio-2.0/librawstudio/rs-lens-db-editor.h0000644000175000017500000000262111543674627016450 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_LENS_DB_EDITOR_H #define RS_LENS_DB_EDITOR_H enum { RS_LENS_DB_EDITOR_IDENTIFIER = 0, RS_LENS_DB_EDITOR_HUMAN_FOCAL, RS_LENS_DB_EDITOR_HUMAN_APERTURE, RS_LENS_DB_EDITOR_LENS_MAKE, RS_LENS_DB_EDITOR_LENS_MODEL, RS_LENS_DB_EDITOR_CAMERA_MAKE, RS_LENS_DB_EDITOR_CAMERA_MODEL, RS_LENS_DB_EDITOR_ENABLED, RS_LENS_DB_EDITOR_ENABLED_ACTIVATABLE, RS_LENS_DB_EDITOR_LENS }; extern void rs_lens_db_editor(void); extern GtkDialog * rs_lens_db_editor_single_lens(RSLens *lens); #endif /* RS_LENS_DB_EDITOR_H */ rawstudio-2.0/librawstudio/rs-filter.c0000644000175000017500000005200411534730147015106 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 /* system() */ #include #include "rs-filter.h" #if 0 /* Change to 1 to enable performance info */ #define filter_performance printf #define FILTER_SHOW_PERFORMANCE #else #define filter_performance(...) #endif /* How much time should a filter at least have taken to show performance number */ #define FILTER_PERF_ELAPSED_MIN 0.001 #define CHAIN_PERF_ELAPSED_MIN 0.001 G_DEFINE_TYPE (RSFilter, rs_filter, G_TYPE_OBJECT) enum { CHANGED_SIGNAL, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = { 0 }; static void dispose(GObject *obj) { RSFilter *filter = RS_FILTER(obj); if (!filter->dispose_has_run) { filter->dispose_has_run = TRUE; if (filter->previous) { filter->previous->next_filters = g_slist_remove(filter->previous->next_filters, filter); g_object_unref(filter->previous); } } } static void rs_filter_class_init(RSFilterClass *klass) { RS_DEBUG(FILTERS, "rs_filter_class_init(%p)", klass); GObjectClass *object_class = G_OBJECT_CLASS(klass); signals[CHANGED_SIGNAL] = g_signal_new ("changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); klass->get_image = NULL; klass->get_image8 = NULL; klass->get_size = NULL; klass->previous_changed = NULL; object_class->dispose = dispose; } static void rs_filter_init(RSFilter *self) { RS_DEBUG(FILTERS, "rs_filter_init(%p)", self); self->previous = NULL; self->next_filters = NULL; self->enabled = TRUE; } /** * Return a new instance of a RSFilter * @param name The name of the filter * @param previous The previous filter or NULL * @return The newly instantiated RSFilter or NULL */ RSFilter * rs_filter_new(const gchar *name, RSFilter *previous) { RS_DEBUG(FILTERS, "rs_filter_new(%s, %s [%p])", name, RS_FILTER_NAME(previous), previous); g_assert(name != NULL); g_assert((previous == NULL) || RS_IS_FILTER(previous)); GType type = g_type_from_name(name); RSFilter *filter = NULL; if (g_type_is_a (type, RS_TYPE_FILTER)) filter = g_object_new(type, NULL); if (!RS_IS_FILTER(filter)) g_warning("Could not instantiate filter of type \"%s\"", name); if (previous) rs_filter_set_previous(filter, previous); return filter; } /** * Set the previous RSFilter in a RSFilter-chain * @param filter A RSFilter * @param previous A previous RSFilter */ void rs_filter_set_previous(RSFilter *filter, RSFilter *previous) { RS_DEBUG(FILTERS, "rs_filter_set_previous(%p, %p)", filter, previous); g_assert(RS_IS_FILTER(filter)); g_assert(RS_IS_FILTER(previous)); /* We will only set the previous filter if it differs from current previous filter */ if (filter->previous != previous) { if (filter->previous) { /* If we already got a previous filter, clean up */ filter->previous->next_filters = g_slist_remove(filter->previous->next_filters, filter); g_object_unref(filter->previous); } else filter->previous = g_object_ref(previous); previous->next_filters = g_slist_append(previous->next_filters, filter); } } /** * Signal that a filter has changed, filters depending on this will be invoked * This should only be called from filter code * @param filter The changed filter * @param mask A mask indicating what changed */ void rs_filter_changed(RSFilter *filter, RSFilterChangedMask mask) { RS_DEBUG(FILTERS, "rs_filter_changed(%s [%p], %04x)", RS_FILTER_NAME(filter), filter, mask); g_assert(RS_IS_FILTER(filter)); gint i, n_next = g_slist_length(filter->next_filters); for(i=0; inext_filters, i)); g_assert(RS_IS_FILTER(next)); /* Notify "next" filter or try "next next" filter */ if (RS_FILTER_GET_CLASS(next)->previous_changed) RS_FILTER_GET_CLASS(next)->previous_changed(next, filter, mask); else rs_filter_changed(next, mask); } g_signal_emit(G_OBJECT(filter), signals[CHANGED_SIGNAL], 0, mask); } /* Clamps ROI rectangle to image size */ /* Returns a new rectangle, or NULL if ROI was within bounds*/ static GdkRectangle* clamp_roi(const GdkRectangle *roi, RSFilter *filter, const RSFilterRequest *request) { RSFilterResponse *response = rs_filter_get_size(filter, request); gint w = rs_filter_response_get_width(response); gint h = rs_filter_response_get_height(response); g_object_unref(response); if ((roi->x >= 0) && (roi->y >=0) && (roi->x + roi->width <= w) && (roi->y + roi->height <= h)) return NULL; GdkRectangle* new_roi = g_new(GdkRectangle, 1); new_roi->x = MAX(0, roi->x); new_roi->y = MAX(0, roi->y); new_roi->width = MIN(w - new_roi->x, roi->width); new_roi->height = MAX(h - new_roi->y, roi->height); return new_roi; } /** * Get the output image from a RSFilter * @param filter A RSFilter * @param param A RSFilterRequest defining parameters for a image request * @return A RS_IMAGE16, this must be unref'ed */ RSFilterResponse * rs_filter_get_image(RSFilter *filter, const RSFilterRequest *request) { GdkRectangle* roi = NULL; RSFilterRequest *r = NULL; RS_DEBUG(FILTERS, "rs_filter_get_image(%s [%p])", RS_FILTER_NAME(filter), filter); /* This timer-hack will break badly when multithreaded! */ static gfloat last_elapsed = 0.0; static gint count = -1; gfloat elapsed; static GTimer *gt = NULL; RSFilterResponse *response; RS_IMAGE16 *image; g_assert(RS_IS_FILTER(filter)); if (count == -1) gt = g_timer_new(); count++; if (filter->enabled && (roi = rs_filter_request_get_roi(request))) { roi = clamp_roi(roi, filter, request); if (roi) { r = rs_filter_request_clone(request); rs_filter_request_set_roi(r, roi); request = r; } } if (RS_FILTER_GET_CLASS(filter)->get_image && filter->enabled) response = RS_FILTER_GET_CLASS(filter)->get_image(filter, request); else response = rs_filter_get_image(filter->previous, request); g_assert(RS_IS_FILTER_RESPONSE(response)); image = rs_filter_response_get_image(response); elapsed = g_timer_elapsed(gt, NULL) - last_elapsed; if (roi) g_free(roi); if (r) g_object_unref(r); #ifdef FILTER_SHOW_PERFORMANCE if ((elapsed > FILTER_PERF_ELAPSED_MIN) && (image != NULL)) { gint iw = image->w; gint ih = image->h; if (rs_filter_response_get_roi(response)) { roi = rs_filter_response_get_roi(response); iw = roi->width; ih = roi->height; } filter_performance("%s took: \033[32m%.0f\033[0mms", RS_FILTER_NAME(filter), elapsed*1000); if ((elapsed > 0.001) && (image != NULL)) filter_performance(" [\033[33m%.01f\033[0mMpix/s]", ((gfloat)(iw*ih))/elapsed/1000000.0); if (image) filter_performance(" [w: %d, h: %d, roi-w:%d, roi-h:%d, channels: %d, pixelsize: %d, rowstride: %d]", image->w, image->h, iw, ih, image->channels, image->pixelsize, image->rowstride); filter_performance("\n"); } #endif g_assert(RS_IS_IMAGE16(image) || (image == NULL)); last_elapsed += elapsed; count--; if (count == -1) { last_elapsed = 0.0; if (g_timer_elapsed(gt,NULL) > CHAIN_PERF_ELAPSED_MIN) filter_performance("Complete 16 bit chain took: \033[32m%.0f\033[0mms\n\n", g_timer_elapsed(gt, NULL)*1000.0); rs_filter_param_set_float(RS_FILTER_PARAM(response), "16-bit-time", g_timer_elapsed(gt, NULL)); g_timer_destroy(gt); } if (image) g_object_unref(image); return response; } /** * Get 8 bit output image from a RSFilter * @param filter A RSFilter * @param param A RSFilterRequest defining parameters for a image request * @return A RS_IMAGE16, this must be unref'ed */ RSFilterResponse * rs_filter_get_image8(RSFilter *filter, const RSFilterRequest *request) { RS_DEBUG(FILTERS, "rs_filter_get_image8(%s [%p])", RS_FILTER_NAME(filter), filter); /* This timer-hack will break badly when multithreaded! */ static gfloat last_elapsed = 0.0; static gint count = -1; gfloat elapsed, temp; static GTimer *gt = NULL; RSFilterResponse *response = NULL; GdkPixbuf *image = NULL; GdkRectangle* roi = NULL; RSFilterRequest *r = NULL; g_assert(RS_IS_FILTER(filter)); if (count == -1) gt = g_timer_new(); count++; if (filter->enabled && (roi = rs_filter_request_get_roi(request))) { roi = clamp_roi(roi, filter, request); if (roi) { r = rs_filter_request_clone(request); rs_filter_request_set_roi(r, roi); request = r; } } if (RS_FILTER_GET_CLASS(filter)->get_image8 && filter->enabled) response = RS_FILTER_GET_CLASS(filter)->get_image8(filter, request); else if (filter->previous) response = rs_filter_get_image8(filter->previous, request); g_assert(RS_IS_FILTER_RESPONSE(response)); image = rs_filter_response_get_image8(response); elapsed = g_timer_elapsed(gt, NULL) - last_elapsed; /* Subtract 16 bit time */ if (rs_filter_param_get_float(RS_FILTER_PARAM(response), "16-bit-time", &temp)) elapsed -= temp; if (roi) g_free(roi); if (r) g_object_unref(r); #ifdef FILTER_SHOW_PERFORMANCE if ((elapsed > FILTER_PERF_ELAPSED_MIN) && (image != NULL)) { gint iw = gdk_pixbuf_get_width(image); gint ih = gdk_pixbuf_get_height(image); if (rs_filter_response_get_roi(response)) { GdkRectangle *roi = rs_filter_response_get_roi(response); iw = roi->width; ih = roi->height; } filter_performance("%s took: \033[32m%.0f\033[0mms", RS_FILTER_NAME(filter), elapsed * 1000); filter_performance(" [\033[33m%.01f\033[0mMpix/s]", ((gfloat)(iw * ih)) / elapsed / 1000000.0); filter_performance("\n"); } #endif last_elapsed += elapsed; g_assert(GDK_IS_PIXBUF(image) || (image == NULL)); count--; if (count == -1) { last_elapsed = 0.0; rs_filter_param_get_float(RS_FILTER_PARAM(response), "16-bit-time", &last_elapsed); last_elapsed = g_timer_elapsed(gt, NULL)-last_elapsed; if (last_elapsed > CHAIN_PERF_ELAPSED_MIN) filter_performance("Complete 8 bit chain took: \033[32m%.0f\033[0mms\n\n", last_elapsed*1000.0); g_timer_destroy(gt); last_elapsed = 0.0; } if (image) g_object_unref(image); return response; } /** * Get predicted size of a RSFilter * @param filter A RSFilter * @param request A RSFilterRequest defining parameters for the request */ RSFilterResponse * rs_filter_get_size(RSFilter *filter, const RSFilterRequest *request) { RSFilterResponse *response = NULL; g_assert(RS_IS_FILTER(filter)); if (RS_FILTER_GET_CLASS(filter)->get_size && filter->enabled) response = RS_FILTER_GET_CLASS(filter)->get_size(filter, request); else if (filter->previous) response = rs_filter_get_size(filter->previous, request); return response; } /** * Get predicted size of a RSFilter * @param filter A RSFilter * @param request A RSFilterRequest defining parameters for the request * @param width A pointer to a gint where the width will be written or NULL * @param height A pointer to a gint where the height will be written or NULL * @return TRUE if width/height is known, FALSE otherwise */ gboolean rs_filter_get_size_simple(RSFilter *filter, const RSFilterRequest *request, gint *width, gint *height) { gint w, h; RSFilterResponse *response = rs_filter_get_size(filter, request); w = rs_filter_response_get_width(response); h = rs_filter_response_get_height(response); if (width) *width = w; if (height) *height = h; g_object_unref(response); return ((w>0) && (h>0)); } /** * Set a GObject property on zero or more filters above #filter recursively * @param filter A RSFilter * @param ... Pairs of property names and values followed by NULL */ void rs_filter_set_recursive(RSFilter *filter, ...) { va_list ap; gchar *property_name; RSFilter *current_filter; GParamSpec *spec; RSFilter *first_seen_here = NULL; GTypeValueTable *table = NULL; GType type = 0; union CValue { gint v_int; glong v_long; gint64 v_int64; gdouble v_double; gpointer v_pointer; } value; g_assert(RS_IS_FILTER(filter)); va_start(ap, filter); /* Loop through all properties */ while ((property_name = va_arg(ap, gchar *))) { /* We set table to NULL for every property to indicate that we (again) * have an "unknown" type */ table = NULL; current_filter = filter; /* Iterate through all filters previous to filter */ do { if ((spec = g_object_class_find_property(G_OBJECT_GET_CLASS(current_filter), property_name))) if (spec->flags & G_PARAM_WRITABLE) { /* If we got no GTypeValueTable at this point, we aquire * one. We rely on all filters using the same type for all * properties equally named */ if (!table) { first_seen_here = current_filter; type = spec->value_type; table = g_type_value_table_peek(type); /* If we have no valuetable, we're screwed, bail out */ if (!table) g_error("No GTypeValueTable found for '%s'", g_type_name(type)); switch (table->collect_format[0]) { case 'i': value.v_int = va_arg(ap, gint); break; case 'l': value.v_long = va_arg(ap, glong); break; case 'd': value.v_double = va_arg(ap, gdouble); break; case 'p': value.v_pointer = va_arg(ap, gpointer); break; default: g_error("Don't know how to collect for '%s'", g_type_name(type)); break; } } if (table) { /* We try to catch cases where different filters use * the same property name for different types */ if (type != spec->value_type) g_warning("Diverging types found for property '%s' (on filter '%s' and '%s')", property_name, RS_FILTER_NAME(first_seen_here), RS_FILTER_NAME(current_filter)); switch (table->collect_format[0]) { case 'i': g_object_set(current_filter, property_name, value.v_int, NULL); break; case 'l': g_object_set(current_filter, property_name, value.v_long, NULL); break; case 'd': g_object_set(current_filter, property_name, value.v_double, NULL); break; case 'p': g_object_set(current_filter, property_name, value.v_pointer, NULL); break; default: break; } } } } while (RS_IS_FILTER(current_filter = current_filter->previous)); if (!table) { // g_warning("Property: %s could not be found in filter chain. Skipping further properties", property_name); va_end(ap); return; } } va_end(ap); } /** * Get a GObject property from a RSFilter chain recursively * @param filter A RSFilter * @param ... Pairs of property names and a return pointers followed by NULL */ void rs_filter_get_recursive(RSFilter *filter, ...) { va_list ap; gchar *property_name; gpointer property_ret; RSFilter *current_filter; g_assert(RS_IS_FILTER(filter)); va_start(ap, filter); /* Loop through all properties */ while ((property_name = va_arg(ap, gchar *))) { property_ret = va_arg(ap, gpointer); g_assert(property_ret != NULL); current_filter = filter; /* Iterate through all filter previous to filter */ do { if (current_filter->enabled && g_object_class_find_property(G_OBJECT_GET_CLASS(current_filter), property_name)) { g_object_get(current_filter, property_name, property_ret, NULL); break; } } while (RS_IS_FILTER(current_filter = current_filter->previous)); } va_end(ap); } /** * Set enabled state of a RSFilter * @param filter A RSFilter * @param enabled TRUE to enable filter, FALSE to disable * @return Previous state */ gboolean rs_filter_set_enabled(RSFilter *filter, gboolean enabled) { gboolean previous_state; g_assert(RS_IS_FILTER(filter)); previous_state = filter->enabled; if (filter->enabled != enabled) { filter->enabled = enabled; rs_filter_changed(filter, RS_FILTER_CHANGED_PIXELDATA); } return previous_state; } /** * Get enabled state of a RSFilter * @param filter A RSFilter * @return TRUE if filter is enabled, FALSE if disabled */ gboolean rs_filter_get_enabled(RSFilter *filter) { g_assert(RS_IS_FILTER(filter)); return filter->enabled; } /** * Set a label for a RSFilter - only used for debugging * @param filter A RSFilter * @param label A new label for the RSFilter, this will NOT be copied */ extern void rs_filter_set_label(RSFilter *filter, const gchar *label) { g_assert(RS_IS_FILTER(filter)); filter->label = label; } /** * Get the label for a RSFilter * @param filter A RSFilter * @return The label for the RSFilter or NULL */ const gchar * rs_filter_get_label(RSFilter *filter) { g_assert(RS_IS_FILTER(filter)); return filter->label; } static void rs_filter_graph_helper(GString *str, RSFilter *filter) { g_assert(str != NULL); g_assert(RS_IS_FILTER(filter)); g_string_append_printf(str, "\"%p\" [\n\tshape=\"Mrecord\"\n", filter); if (!g_str_equal(RS_FILTER_NAME(filter), "RSCache")) g_string_append_printf(str, "\tcolor=grey\n\tstyle=filled\n"); if (filter->enabled) g_string_append_printf(str, "\tcolor=\"#66ba66\"\n"); else g_string_append_printf(str, "\tcolor=grey\n"); g_string_append_printf(str, "\tlabel=<\n"); GObjectClass *klass = G_OBJECT_GET_CLASS(filter); GParamSpec **specs; gint i; guint n_specs = 0; /* Filter name (and label) */ g_string_append_printf(str, "\t\t\n\t\t\t\n\t\t\n"); /* Parameter and value list */ specs = g_object_class_list_properties(G_OBJECT_CLASS(klass), &n_specs); for(i=0; i\n\t\t\t\n\t\t\t\n\t\t\n"); } g_string_append_printf(str, "\t\t
%s", RS_FILTER_NAME(filter)); if (filter->label) g_string_append_printf(str, " (%s)", filter->label); g_string_append_printf(str, "
%s:", specs[i]->name); /* We have to use if/else here, because RS_TYPE_* does not resolve to a constant */ if (G_PARAM_SPEC_VALUE_TYPE(specs[i]) == RS_TYPE_LENS) { RSLens *lens; gchar *identifier; g_object_get(filter, specs[i]->name, &lens, NULL); if (lens) { g_object_get(lens, "identifier", &identifier, NULL); g_object_unref(lens); g_string_append_printf(str, "%s", identifier); g_free(identifier); } else g_string_append_printf(str, "n/a"); } else if (G_PARAM_SPEC_VALUE_TYPE(specs[i]) == RS_TYPE_ICC_PROFILE) { RSIccProfile *profile; gchar *profile_filename; gchar *profile_basename; g_object_get(filter, specs[i]->name, &profile, NULL); g_object_get(profile, "filename", &profile_filename, NULL); g_object_unref(profile); profile_basename = g_path_get_basename (profile_filename); g_free(profile_filename); g_string_append_printf(str, "%s", profile_basename); g_free(profile_basename); } else switch (G_PARAM_SPEC_VALUE_TYPE(specs[i])) { case G_TYPE_BOOLEAN: g_object_get(filter, specs[i]->name, &boolean, NULL); g_string_append_printf(str, "%s", (boolean) ? "TRUE" : "FALSE"); break; case G_TYPE_INT: g_object_get(filter, specs[i]->name, &integer, NULL); g_string_append_printf(str, "%d", integer); break; case G_TYPE_FLOAT: g_object_get(filter, specs[i]->name, &loat, NULL); g_string_append_printf(str, "%.05f", loat); break; case G_TYPE_STRING: g_object_get(filter, specs[i]->name, &ostr, NULL); g_string_append_printf(str, "%s", ostr); break; default: g_string_append_printf(str, "n/a"); break; } g_string_append_printf(str, "
>\n\t];\n"); gint n_next = g_slist_length(filter->next_filters); for(i=0; inext_filters, i)); RSFilterResponse *response = rs_filter_get_size(filter, RS_FILTER_REQUEST_QUICK); /* Edge - print dimensions along */ g_string_append_printf(str, "\t\"%p\" -> \"%p\" [label=\" %dx%d\"];\n", filter, next, rs_filter_response_get_width(response), rs_filter_response_get_height(response)); g_object_unref(response); /* Recursively call ourself for every "next" filter */ rs_filter_graph_helper(str, next); } } /** * Draw a nice graph of the filter chain * note: Requires graphviz * @param filter The top-most filter to graph */ void rs_filter_graph(RSFilter *filter) { gint ignore; g_assert(RS_IS_FILTER(filter)); GString *str = g_string_new("digraph G {\n"); rs_filter_graph_helper(str, filter); g_string_append_printf(str, "}\n"); g_file_set_contents("/tmp/rs-filter-graph", str->str, str->len, NULL); ignore = system("dot -Tpng >/tmp/rs-filter-graph.png , * * Anders Kvist and Klaus Post * * 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 "rs-io.h" static GStaticMutex init_lock = G_STATIC_MUTEX_INIT; static GAsyncQueue *queue = NULL; static GStaticRecMutex io_lock = G_STATIC_REC_MUTEX_INIT; static gboolean pause_queue = FALSE; static gint queue_active_count = 0; static GStaticMutex count_lock = G_STATIC_MUTEX_INIT; static gint queue_sort(gconstpointer a, gconstpointer b, gpointer user_data) { gint id1 = 0; gint id2 = 0; if (a) id1 = RS_IO_JOB(a)->priority; if (b) id2 = RS_IO_JOB(b)->priority; return (id1 > id2 ? +1 : id1 == id2 ? 0 : -1); } static gpointer queue_worker(gpointer data) { GAsyncQueue *queue = data; RSIoJob *job; while (1) { if (pause_queue) g_usleep(1000); else { g_static_mutex_lock(&count_lock); job = g_async_queue_try_pop(queue); if (job) queue_active_count++; g_static_mutex_unlock(&count_lock); /* If we somehow got NULL, continue. I'm not sure this will ever happen, but this is better than random segfaults :) */ if (job) { rs_io_job_execute(job); rs_io_job_do_callback(job); g_static_mutex_lock(&count_lock); queue_active_count--; g_static_mutex_unlock(&count_lock); } else { /* Sleep 1 ms */ g_usleep(1000); } } } return NULL; } static void init(void) { int i; g_static_mutex_lock(&init_lock); if (!queue) { queue = g_async_queue_new(); for (i = 0; i < rs_get_number_of_processor_cores(); i++) g_thread_create_full(queue_worker, queue, 0, FALSE, FALSE, G_THREAD_PRIORITY_LOW, NULL); } g_static_mutex_unlock(&init_lock); } /** * Add a RSIoJob to be executed later * @param job A RSIoJob. This will be unreffed upon completion * @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads * @param priority Lower value means higher priority * @param user_data A pointer to pass to the callback */ void rs_io_idle_add_job(RSIoJob *job, gint idle_class, gint priority, gpointer user_data) { g_assert(RS_IS_IO_JOB(job)); job->idle_class = idle_class; job->priority = priority; job->user_data = user_data; g_async_queue_push_sorted(queue, job, queue_sort, NULL); } /** * Prefetch a file * @param path Absolute path to a file to prefetch * @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads * @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel() */ const RSIoJob * rs_io_idle_prefetch_file(const gchar *path, gint idle_class) { init(); RSIoJob *job = rs_io_job_prefetch_new(path); rs_io_idle_add_job(job, idle_class, 20, NULL); return job; } /** * Load metadata belonging to a photo * @param path Absolute path to a photo * @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads * @param callback A callback to call when the data is ready or NULL * @param user_data Data to pass to the callback * @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel() */ const RSIoJob * rs_io_idle_read_metadata(const gchar *path, gint idle_class, RSGotMetadataCB callback, gpointer user_data) { init(); RSIoJob *job = rs_io_job_metadata_new(path, callback); rs_io_idle_add_job(job, idle_class, 10, user_data); return job; } /** * Compute a "Rawstudio checksum" of a file * @param path Absolute path to a file * @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads * @param callback A callback to call when the data is ready or NULL * @param user_data Data to pass to the callback * @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel() */ const RSIoJob * rs_io_idle_read_checksum(const gchar *path, gint idle_class, RSGotChecksumCB callback, gpointer user_data) { init(); RSIoJob *job = rs_io_job_checksum_new(path, callback); rs_io_idle_add_job(job, idle_class, 30, user_data); return job; } /** * Restore tags of a new directory or add tags to a photo * @param filename Absolute path to a file to tags to * @param tag_id The id of the tag to add. * @param auto_tag Is the tag an automatically generated tag * @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads * @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel() */ const RSIoJob * rs_io_idle_add_tag(const gchar *filename, gint tag_id, gboolean auto_tag, gint idle_class) { init(); RSIoJob *job = rs_io_job_tagging_new(filename, tag_id, auto_tag); rs_io_idle_add_job(job, idle_class, 50, NULL); return job; } /** * Restore tags of a new directory or add tags to a photo * @param path Absolute path to a directory to restore tags to * @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads * @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel() */ const RSIoJob * rs_io_idle_restore_tags(const gchar *path, gint idle_class) { init(); RSIoJob *job = rs_io_job_tagging_new(path, -1, FALSE); rs_io_idle_add_job(job, idle_class, 50, NULL); return job; } /** * Cancel a complete class of idle requests * @param idle_class The class identifier */ void rs_io_idle_cancel_class(gint idle_class) { /* This behaves like rs_io_idle_cancel_class(), please see comments there */ RSIoJob *current_job; RSIoJob *marker_job = rs_io_job_new(); init(); g_async_queue_lock(queue); /* Put a marker in the queue, we will rotate the complete queue, so we have to know when we're around */ g_async_queue_push_unlocked(queue, marker_job); while((current_job = g_async_queue_pop_unlocked(queue))) { /* If current job matches marker, we're done */ if (current_job == marker_job) break; /* Of the job's idle_class doesn't match the class to cancel, we put the job back in the queue */ if (current_job->idle_class != idle_class) { g_async_queue_push_unlocked(queue, current_job); } } /* Make sure the queue is sorted */ g_async_queue_sort_unlocked(queue, queue_sort, NULL); g_async_queue_unlock(queue); g_object_unref(marker_job); } /** * Cancel an idle request * @param request_id A request_id as returned by rs_io_idle_read_complete_file() */ void rs_io_idle_cancel(RSIoJob *job) { /* This behaves like rs_io_idle_cancel_class(), please see comments there */ RSIoJob *current_job; RSIoJob *marker_job = rs_io_job_new(); init(); g_async_queue_lock(queue); /* Put a marker in the queue, we will rotate the complete queue, so we have to know when we're around */ g_async_queue_push_unlocked(queue, marker_job); while((current_job = g_async_queue_pop_unlocked(queue))) { /* If current job matches marker, we're done */ if (current_job == marker_job) break; if (current_job != job) g_async_queue_push_unlocked(queue, current_job); } /* Make sure the queue is sorted */ g_async_queue_sort_unlocked(queue, queue_sort, NULL); g_async_queue_unlock(queue); g_object_unref(marker_job); } /** * Aquire the IO lock */ void rs_io_lock(void) { g_static_rec_mutex_lock(&io_lock); } /** * Release the IO lock */ void rs_io_unlock(void) { g_static_rec_mutex_unlock(&io_lock); } /** * Pause the worker threads */ void rs_io_idle_pause(void) { pause_queue = TRUE; } /** * Unpause the worker threads */ void rs_io_idle_unpause(void) { pause_queue = FALSE; } /** * Returns the number of jobs left */ gint rs_io_get_jobs_left(void) { g_static_mutex_lock(&count_lock); gint left = g_async_queue_length(queue) + queue_active_count; g_static_mutex_unlock(&count_lock); return left; }rawstudio-2.0/librawstudio/rs-1d-function.h0000644000175000017500000000576511526533645015776 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_1D_FUNCTION_H #define RS_1D_FUNCTION_H #include G_BEGIN_DECLS #define RS_TYPE_1D_FUNCTION rs_1d_function_get_type() #define RS_1D_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_1D_FUNCTION, RS1dFunction)) #define RS_1D_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_1D_FUNCTION, RS1dFunctionClass)) #define RS_IS_1D_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_1D_FUNCTION)) #define RS_IS_1D_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_1D_FUNCTION)) #define RS_1D_FUNCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_1D_FUNCTION, RS1dFunctionClass)) typedef struct { GObject parent; } RS1dFunction; typedef gdouble (RS1dFunctionEvaluate)(const RS1dFunction *func, const gdouble); typedef gboolean (RS1dFunctionIsIdentity)(const RS1dFunction *func); typedef struct { GObjectClass parent_class; RS1dFunctionIsIdentity *is_identity; RS1dFunctionEvaluate *evaluate; RS1dFunctionEvaluate *evaluate_inverse; } RS1dFunctionClass; GType rs_1d_function_get_type(void); /** * Instantiate a new RS1dFunction, it will behave as an identity function (y = x) * @return A new RS1dFunction with arefcount of 1. */ RS1dFunction * rs_1d_function_new(void); /** * Behaves like #rs_1d_function_new but returns a singleton * @return A new RS1dFunction singleton which should not be unreffed */ const RS1dFunction * rs_1d_function_new_singleton(void); /** * Map x to a new y value * @param func A RS1dFunction * @param x An input parameter in the range 0.0-1.0 * @return Mapped value for x */ gdouble rs_1d_function_evaluate(const RS1dFunction *func, gdouble x); /** * Map y to a new x value * @param func A RS1dFunction * @param x An input parameter in the range 0.0-1.0 * @return Inverse value for y */ gdouble rs_1d_function_evaluate_inverse(const RS1dFunction *func, gdouble y); /** * Return TRUE if rs_1d_function_evaluate(#func, x) == x for all x * @param func A RS1dFunction * @return TRUE if rs_1d_function_evaluate(#func, x) == x for all x, FALSE otherwise */ gboolean rs_1d_function_is_identity(const RS1dFunction *func); G_END_DECLS #endif /* RS_1D_FUNCTION_H */ rawstudio-2.0/librawstudio/rs-plugin-manager.h0000644000175000017500000000207711543674627016553 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_PLUGIN_MANAGER_H #define RS_PLUGIN_MANAGER_H G_BEGIN_DECLS /** * Load all installed Rawstudio plugins */ extern gint rs_plugin_manager_load_all_plugins(void); G_END_DECLS #endif /* RS_PLUGIN_MANAGER_H */ rawstudio-2.0/librawstudio/conf_interface.h0000644000175000017500000001445211526533645016163 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ #define CONF_LWD "last_working_directory" #define CONF_PREBGCOLOR "preview_background_color" #define CONF_HISTHEIGHT "histogram_height" #define CONF_PASTE_MASK "paste_mask" #define CONF_DEFAULT_EXPORT_TEMPLATE "default_export_template" #define CONF_CACHEDIR_IS_LOCAL "cache_in_home" #define CONF_LOAD_GDK "open_8bit_images" #define CONF_LOAD_RECURSIVE "load_recursive" #define CONF_PRELOAD "preload_photos" #define CONF_SAVE_FILETYPE "save_filetype" #define CONF_BATCH_DIRECTORY "batch_directory" #define CONF_BATCH_FILENAME "batch_filename" #define CONF_BATCH_FILETYPE "batch_filetype" #define CONF_BATCH_WIDTH "batch_width" #define CONF_BATCH_HEIGHT "batch_height" #define CONF_BATCH_JPEG_QUALITY "batch_jpeg_quality" #define CONF_BATCH_TIFF_UNCOMPRESSED "batch_tiff_uncompressed" #define CONF_BATCH_SIZE_LOCK "batch_size_lock" #define CONF_BATCH_SIZE_WIDTH "batch_size_width" #define CONF_BATCH_SIZE_HEIGHT "batch_size_height" #define CONF_BATCH_SIZE_SCALE "batch_size_scale" #define CONF_ROI_GRID "roi_grid" #define CONF_CROP_ASPECT "crop_aspect" #define CONF_SHOW_FILENAMES "show_filenames_in_iconview" #define CONF_USE_SYSTEM_THEME "use_system_theme" #define CONF_FULLSCREEN "fullscreen" #define CONF_SHOW_TOOLBOX_FULLSCREEN "show_toolbox_fullscreen" #define CONF_SHOW_TOOLBOX "show_toolbox" #define CONF_SHOW_ICONBOX_FULLSCREEN "show_iconbox_fullscreen" #define CONF_SHOW_ICONBOX "show_iconbox" #define CONF_SHOW_TOOLBOX_EXPOSURE "show_toolbox_exposure" #define CONF_SHOW_TOOLBOX_SATURATION "show_toolbox_saturation" #define CONF_SHOW_TOOLBOX_HUE "show_toolbox_hue" #define CONF_SHOW_TOOLBOX_CONTRAST "show_toolbox_contrast" #define CONF_SHOW_TOOLBOX_WARMTH "show_toolbox_warmth" #define CONF_SHOW_TOOLBOX_SHARPEN "show_toolbox_sharpen" #define CONF_SHOW_TOOLBOX_DENOISE_LUMA "show_toolbox_denoise_luma" #define CONF_SHOW_TOOLBOX_DENOISE_CHROMA "show_toolbox_denoise_chroma" #define CONF_SHOW_TOOLBOX_CURVE "show_toolbox_curve" #define CONF_SHOW_TOOLBOX_TRANSFORM "show_toolbox_transform" #define CONF_SHOW_TOOLBOX_HIST "show_toolbox_hist" #define CONF_TOOLBOX_WIDTH "toolbox_width" #define CONF_SPLIT_CONTINUOUS "split_continuous" #define CONF_LAST_PRIORITY_PAGE "last_priority_page" #define CONF_STORE_SORT_METHOD "store_sort_method" #define CONF_LIBRARY_AUTOTAG "library_autotag" #define CONF_LIBRARY_TAG_SEARCH "library_tag_search" #define CONF_EXPORT_AS_FOLDER "export_as_folder" #define CONF_EXPORT_AS_SIZE_PERCENT "export_as_size_percent" #define CONF_MAIN_WINDOW_WIDTH "main_window_width" #define CONF_MAIN_WINDOW_HEIGHT "main_window_height" #define CONF_MAIN_WINDOW_POS_X "main_window_pos_x" #define CONF_MAIN_WINDOW_POS_Y "main_window_pos_y" #define CONF_MAIN_WINDOW_MAXIMIZED "main_window_maximized" #define CONF_PICASA_CLIENT_AUTH_TOKEN "picasa_client_auth_token" #define CONF_PICASA_CLIENT_USERNAME "picasa_client_username" #define CONF_PICASA_CLIENT_ALBUM_ID "picasa_client_album_id" #define DEFAULT_CONF_EXPORT_FILENAME "%f_%2c" #define DEFAULT_CONF_BATCH_DIRECTORY "batch_exports/" #define DEFAULT_CONF_BATCH_FILENAME "%f_%2c" #define DEFAULT_CONF_BATCH_FILETYPE "jpeg" #define DEFAULT_CONF_BATCH_JPEG_QUALITY "100" #define DEFAULT_CONF_FULLSCREEN FALSE #define DEFAULT_CONF_SHOW_TOOLBOX_FULLSCREEN TRUE #define DEFAULT_CONF_SHOW_TOOLBOX TRUE #define DEFAULT_CONF_SHOW_ICONBOX_FULLSCREEN FALSE #define DEFAULT_CONF_SHOW_ICONBOX TRUE #define DEFAULT_CONF_SHOW_TOOLBOX_EXPOSURE TRUE #define DEFAULT_CONF_SHOW_TOOLBOX_SATURATION TRUE #define DEFAULT_CONF_SHOW_TOOLBOX_HUE TRUE #define DEFAULT_CONF_SHOW_TOOLBOX_CONTRAST TRUE #define DEFAULT_CONF_SHOW_TOOLBOX_WARMTH TRUE #define DEFAULT_CONF_SHOW_TOOLBOX_SHARPEN TRUE #define DEFAULT_CONF_SHOW_TOOLBOX_DENOISE_LUMA TRUE #define DEFAULT_CONF_SHOW_TOOLBOX_DENOISE_CHROMA TRUE #define DEFAULT_CONF_SHOW_TOOLBOX_CURVE TRUE #define DEFAULT_CONF_SHOW_TOOLBOX_TRANSFORM TRUE #define DEFAULT_CONF_SHOW_TOOLBOX_HIST TRUE #define DEFAULT_CONF_LOAD_RECURSIVE FALSE #define DEFAULT_CONF_USE_SYSTEM_THEME FALSE #define DEFAULT_CONF_SHOW_FILENAMES FALSE #define DEFAULT_CONF_LIBRARY_AUTOTAG FALSE #define DEFAULT_CONF_MAIN_WINDOW_WIDTH 800 #define DEFAULT_CONF_MAIN_WINDOW_HEIGHT 600 #define DEFAULT_CONF_MAIN_WINDOW_POS_X 50 #define DEFAULT_CONF_MAIN_WINDOW_POS_Y 50 #define DEFAULT_CONF_MAIN_WINDOW_MAXIMIZED FALSE /* get the last working directory from gconf */ void rs_set_last_working_directory(const char *lwd); /* save the current working directory to gconf */ gchar *rs_get_last_working_directory(void); gboolean rs_conf_get_boolean(const gchar *name, gboolean *boolean_value); gboolean rs_conf_get_boolean_with_default(const gchar *name, gboolean *boolean_value, gboolean default_value); gboolean rs_conf_set_boolean(const gchar *name, gboolean bool_value); gchar *rs_conf_get_string(const gchar *path); gboolean rs_conf_set_string(const gchar *path, const gchar *string); gboolean rs_conf_get_integer(const gchar *name, gint *integer_value); gboolean rs_conf_set_integer(const gchar *name, const gint integer_value); gboolean rs_conf_get_color(const gchar *name, GdkColor *color); gboolean rs_conf_set_color(const gchar *name, GdkColor *color); gboolean rs_conf_get_double(const gchar *name, gdouble *float_value); gboolean rs_conf_set_double(const gchar *name, const gdouble float_value); GSList *rs_conf_get_list_string(const gchar *name); gboolean rs_conf_set_list_string(const gchar *name, GSList *list); gboolean rs_conf_add_string_to_list_string(const gchar *name, gchar *value); gchar *rs_conf_get_nth_string_from_list_string(const gchar *name, gint num); gboolean rs_conf_unset(const gchar *name); rawstudio-2.0/librawstudio/rs-metadata.h0000644000175000017500000000700311526533645015412 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_METADATA_H #define RS_METADATA_H #include G_BEGIN_DECLS #define RS_TYPE_METADATA rs_metadata_get_type() #define RS_METADATA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_METADATA, RSMetadata)) #define RS_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_METADATA, RSMetadataClass)) #define RS_IS_METADATA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_METADATA)) #define RS_IS_METADATA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_METADATA)) #define RS_METADATA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_METADATA, RSMetadataClass)) typedef enum { MAKE_UNKNOWN = 0, MAKE_CANON, MAKE_CASIO, MAKE_EPSON, MAKE_FUJIFILM, MAKE_HASSELBLAD, MAKE_KODAK, MAKE_LEICA, MAKE_MAMIYA, MAKE_MINOLTA, MAKE_NIKON, MAKE_OLYMPUS, MAKE_PANASONIC, MAKE_PENTAX, MAKE_PHASEONE, MAKE_POLAROID, MAKE_RICOH, MAKE_SAMSUNG, MAKE_SIGMA, MAKE_SONY, } RS_MAKE; struct _RSMetadata { GObject parent; gboolean dispose_has_run; RS_MAKE make; gchar *make_ascii; gchar *model_ascii; gchar *time_ascii; GTime timestamp; gushort orientation; gfloat aperture; gushort iso; gfloat shutterspeed; guint thumbnail_start; guint thumbnail_length; guint preview_start; guint preview_length; guint16 preview_planar_config; guint preview_width; guint preview_height; guint16 preview_bits [3]; gdouble cam_mul[4]; gdouble contrast; gdouble saturation; gdouble color_tone; gshort focallength; GdkPixbuf *thumbnail; /* Lens info */ gint lens_id; gdouble lens_min_focal; gdouble lens_max_focal; gdouble lens_min_aperture; gdouble lens_max_aperture; gchar *fixed_lens_identifier; gchar *lens_identifier; }; typedef struct { GObjectClass parent_class; } RSMetadataClass; GType rs_metadata_get_type (void); extern RSMetadata *rs_metadata_new (void); extern RSMetadata *rs_metadata_new_from_file(const gchar *filename); extern gboolean rs_metadata_load_from_file(RSMetadata *metadata, const gchar *filename); extern void rs_metadata_normalize_wb(RSMetadata *metadata); extern gchar *rs_metadata_get_short_description(RSMetadata *metadata); extern GdkPixbuf *rs_metadata_get_thumbnail(RSMetadata *metadata); /* Attempts to load cached metadata first, then falls back to reading from file */ extern gboolean rs_metadata_load(RSMetadata *metadata, const gchar *filename); /* Save metadata to cache xml file and sidecar thumbnail*/ extern void rs_metadata_cache_save(RSMetadata *metadata, const gchar *filename); /** * Deletes the on-disk cache (if any) for a photo * @param filename The filename of the PHOTO - not the cache itself */ extern void rs_metadata_delete_cache(const gchar *filename); G_END_DECLS #endif /* RS_METADATA_H */ rawstudio-2.0/librawstudio/rs-huesat-map.h0000644000175000017500000000447711526533645015712 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_HUESAT_MAP_H #define RS_HUESAT_MAP_H #include G_BEGIN_DECLS #define RS_TYPE_HUESAT_MAP rs_huesat_map_get_type() #define RS_HUESAT_MAP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_HUESAT_MAP, RSHuesatMap)) #define RS_HUESAT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_HUESAT_MAP, RSHuesatMapClass)) #define RS_IS_HUESAT_MAP(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_HUESAT_MAP)) #define RS_IS_HUESAT_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_HUESAT_MAP)) #define RS_HUESAT_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_HUESAT_MAP, RSHuesatMapClass)) typedef struct { GObject parent; guint hue_divisions; guint sat_divisions; guint val_divisions; guint hue_step; guint val_step; RS_VECTOR3 *deltas; } RSHuesatMap; typedef struct { GObjectClass parent_class; } RSHuesatMapClass; GType rs_huesat_map_get_type(void); RSHuesatMap *rs_huesat_map_new(guint hue_divisions, guint sat_division, guint val_divisions); RSHuesatMap *rs_huesat_map_new_from_dcp(RSTiff *tiff, const guint ifd, const gushort dims_tag, const gushort table_tag); guint rs_huesat_map_get_deltacount(RSHuesatMap *map); void rs_huesat_map_get_delta(RSHuesatMap *map, const guint hue_div, const guint sat_div, const guint val_div, RS_VECTOR3 *modify); void rs_huesat_map_set_delta(RSHuesatMap *map, const guint hue_div, const guint sat_div, const guint val_div, const RS_VECTOR3 *modify); G_END_DECLS #endif /* RS_HUESAT_MAP_H */ rawstudio-2.0/librawstudio/rs-utils.c0000644000175000017500000005264111543674627015002 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ #define _XOPEN_SOURCE 500 /* strptime() and realpath() */ #include #include #include #include #ifdef WIN32 #include /* MinGW WIN32 gmtime_r() */ #endif #include #include #include #include #include #include #include #include "conf_interface.h" #define DOTDIR ".rawstudio" /** * A version of atof() that isn't locale specific * @note This doesn't do any error checking! * @param str A NULL terminated string representing a number * @return The number represented by str or 0.0 if str is NULL */ gdouble rs_atof(const gchar *str) { gdouble result = 0.0f; gdouble div = 1.0f; gboolean point_passed = FALSE; gchar *ptr = (gchar *) str; while(str && *ptr) { if (g_ascii_isdigit(*ptr)) { result = result * 10.0f + g_ascii_digit_value(*ptr); if (point_passed) div *= 10.0f; } else if (*ptr == '-') div *= -1.0f; else if (g_ascii_ispunct(*ptr)) point_passed = TRUE; ptr++; } return result / div; } /** * A convenience function to convert an EXIF timestamp to a unix timestamp. * @note This will only work until 2038 unless glib fixes its GTime * @param str A NULL terminated string containing a timestamp in the format "YYYY:MM:DD HH:MM:SS" (EXIF 2.2 section 4.6.4) * @return A unix timestamp or -1 on error */ GTime rs_exiftime_to_unixtime(const gchar *str) { struct tm *tm = g_new0(struct tm, 1); GTime timestamp = -1; #ifndef WIN32 /* There is no strptime() in time.h in MinGW */ if (strptime(str, "%Y:%m:%d %H:%M:%S", tm)) timestamp = (GTime) mktime(tm); #endif g_free(tm); return timestamp; } /** * A convenience function to convert an unix timestamp to an EXIF timestamp. * @note This will only work until 2038 unless glib fixes its GTime * @param timestamp A unix timestamp * @return A string formatted as specified in EXIF 2.2 section 4.6.4 */ gchar * rs_unixtime_to_exiftime(GTime timestamp) { struct tm *tm = g_new0(struct tm, 1); time_t tt = (time_t) timestamp; gchar *result = g_new0(gchar, 20); gmtime_r(&tt, tm); if (strftime(result, 20, "%Y:%m:%d %H:%M:%S", tm) != 19) { g_free(result); result = NULL; } g_free(tm); return result; } /** * Constrains a box to fill a bounding box without changing aspect * @param target_width The width of the bounding box * @param target_height The height of the bounding box * @param width The input and output width * @param height The input and output height */ void rs_constrain_to_bounding_box(gint target_width, gint target_height, gint *width, gint *height) { gdouble target_aspect = ((gdouble)target_width) / ((gdouble)target_height); gdouble input_aspect = ((gdouble)*width) / ((gdouble)*height); gdouble scale; if (target_aspect < input_aspect) scale = ((gdouble) *width) / ((gdouble) target_width); else scale = ((gdouble) *height) / ((gdouble) target_height); *width = MIN((gint) ((gdouble)*width) / scale, target_width); *height = MIN((gint) ((gdouble)*height) / scale, target_height); } /** * Try to count the number of processor cores in a system. * @note This currently only works for systems with /proc/cpuinfo * @return The numver of cores or 1 if the system is unsupported */ gint rs_get_number_of_processor_cores(void) { static GStaticMutex lock = G_STATIC_MUTEX_INIT; /* We assume processors will not be added/removed during our lifetime */ static gint num = 0; if (num) return num; g_static_mutex_lock (&lock); if (num == 0) { /* Use a temporary for thread safety */ gint temp_num = 0; #if defined(_SC_NPROCESSORS_ONLN) /* Use the POSIX way of getting the number of processors */ temp_num = sysconf(_SC_NPROCESSORS_ONLN); #elif defined (__linux__) && (defined (__i386__) || defined (__x86_64__)) /* Parse the /proc/cpuinfo exposed by Linux i386/amd64 kernels */ GIOChannel *io; gchar *line; io = g_io_channel_new_file("/proc/cpuinfo", "r", NULL); if (io) { /* Count the "processor"-lines, there should be one for each processor/core */ while (G_IO_STATUS_NORMAL == g_io_channel_read_line(io, &line, NULL, NULL, NULL)) if (line) { if (g_str_has_prefix(line, "processor")) temp_num++; g_free(line); } g_io_channel_shutdown(io, FALSE, NULL); g_io_channel_unref(io); } #elif defined(_WIN32) /* Use pthread on windows */ temp_num = pthread_num_processors_np(); #endif /* Be sure we have at least 1 processor and as sanity check, clamp to no more than 127 */ temp_num = (temp_num <= 0) ? 1 : MIN(temp_num, 127); RS_DEBUG(PERFORMANCE, "Detected %d CPU cores.", temp_num); num = temp_num; } g_static_mutex_unlock (&lock); return num; } #if defined (__i386__) || defined (__x86_64__) #define xgetbv(index,eax,edx) \ __asm__ (".byte 0x0f, 0x01, 0xd0" : "=a"(eax), "=d"(edx) : "c" (index)) /** * Detect cpu features * @return A bitmask of @RSCpuFlags */ guint rs_detect_cpu_features(void) { #define cpuid(cmd, eax, ecx, edx) \ do { \ eax = edx = 0; \ asm ( \ "push %%"REG_b"\n\t"\ "cpuid\n\t" \ "pop %%"REG_b"\n\t" \ : "=a" (eax), "=c" (ecx), "=d" (edx) \ : "0" (cmd) \ ); \ } while(0) guint eax; guint edx; guint ecx; static GStaticMutex lock = G_STATIC_MUTEX_INIT; static guint stored_cpuflags = -1; if (stored_cpuflags != -1) return stored_cpuflags; g_static_mutex_lock(&lock); if (stored_cpuflags == -1) { guint cpuflags = 0; /* Test cpuid presence comparing eflags */ asm ( "push %%"REG_b"\n\t" "pushf\n\t" "pop %%"REG_a"\n\t" "mov %%"REG_a", %%"REG_b"\n\t" "xor $0x00200000, %%"REG_a"\n\t" "push %%"REG_a"\n\t" "popf\n\t" "pushf\n\t" "pop %%"REG_a"\n\t" "cmp %%"REG_a", %%"REG_b"\n\t" "je notfound\n\t" "mov $1, %0\n\t" "notfound:\n\t" "pop %%"REG_b"\n\t" : "=r" (eax) : : REG_a ); if (eax) { guint std_dsc; guint ext_dsc; /* Get the standard level */ cpuid(0x00000000, std_dsc, ecx, edx); if (std_dsc) { /* Request for standard features */ cpuid(0x00000001, std_dsc, ecx, edx); if (edx & 0x00800000) cpuflags |= RS_CPU_FLAG_MMX; if (edx & 0x02000000) cpuflags |= RS_CPU_FLAG_SSE; if (edx & 0x04000000) cpuflags |= RS_CPU_FLAG_SSE2; if (edx & 0x00008000) cpuflags |= RS_CPU_FLAG_CMOV; if (ecx & 0x00000001) cpuflags |= RS_CPU_FLAG_SSE3; if (ecx & 0x00000200) cpuflags |= RS_CPU_FLAG_SSSE3; if (ecx & 0x00080000) cpuflags |= RS_CPU_FLAG_SSE4_1; if (ecx & 0x00100000) cpuflags |= RS_CPU_FLAG_SSE4_2; if ((ecx & 0x18000000) == 0x18000000) { xgetbv(0, eax, edx); if ((eax & 0x6) == 0x6) cpuflags |= RS_CPU_FLAG_AVX; } } /* Is there extensions */ cpuid(0x80000000, ext_dsc, ecx, edx); if (ext_dsc) { /* Request for extensions */ cpuid(0x80000001, eax, ecx, edx); if (edx & 0x80000000) cpuflags |= RS_CPU_FLAG_3DNOW; if (edx & 0x40000000) cpuflags |= RS_CPU_FLAG_3DNOW_EXT; if (edx & 0x00400000) cpuflags |= RS_CPU_FLAG_AMD_ISSE; } /* ISSE is also implied in SSE */ if (cpuflags & RS_CPU_FLAG_SSE) cpuflags |= RS_CPU_FLAG_AMD_ISSE; } stored_cpuflags = cpuflags; } g_static_mutex_unlock(&lock); #define report(a, x) RS_DEBUG(PERFORMANCE, "CPU Feature: "a" = %d", !!(stored_cpuflags&x)); report("MMX",RS_CPU_FLAG_MMX); report("SSE",RS_CPU_FLAG_SSE); report("CMOV",RS_CPU_FLAG_CMOV); report("3DNOW",RS_CPU_FLAG_3DNOW); report("3DNOW_EXT",RS_CPU_FLAG_3DNOW_EXT); report("Integer SSE",RS_CPU_FLAG_AMD_ISSE); report("SSE2",RS_CPU_FLAG_SSE2); report("SSE3",RS_CPU_FLAG_SSE3); report("SSSE3",RS_CPU_FLAG_SSSE3); report("SSE4.1",RS_CPU_FLAG_SSE4_1); report("SSE4.2",RS_CPU_FLAG_SSE4_2); report("AVX",RS_CPU_FLAG_AVX); #undef report return(stored_cpuflags); #undef cpuid } #else guint rs_detect_cpu_features() { return 0; } #endif /* __i386__ || __x86_64__ */ /** * Return a path to the current config directory for Rawstudio - this is the * .rawstudio direcotry in home * @return A path to an existing directory */ const gchar * rs_confdir_get(void) { static gchar *dir = NULL; static GStaticMutex lock = G_STATIC_MUTEX_INIT; g_static_mutex_lock(&lock); if (!dir) { const gchar *home = g_get_home_dir(); dir = g_build_filename(home, ".rawstudio", NULL); } g_mkdir_with_parents(dir, 00755); g_static_mutex_unlock(&lock); return dir; } /** * Return a cache directory for filename * @param filename A complete path to a photo * @return A directory to hold the cache. This is guarenteed to exist */ gchar * rs_dotdir_get(const gchar *filename) { gchar *ret = NULL; gchar *directory; GString *dotdir; gboolean dotdir_is_local = FALSE; rs_conf_get_boolean(CONF_CACHEDIR_IS_LOCAL, &dotdir_is_local); if (g_file_test(filename, G_FILE_TEST_IS_DIR)) directory = g_strdup(filename); else directory = g_path_get_dirname(filename); if (dotdir_is_local) { dotdir = g_string_new(g_get_home_dir()); dotdir = g_string_append(dotdir, G_DIR_SEPARATOR_S); dotdir = g_string_append(dotdir, DOTDIR); dotdir = g_string_append(dotdir, G_DIR_SEPARATOR_S); dotdir = g_string_append(dotdir, directory); } else { dotdir = g_string_new(directory); dotdir = g_string_append(dotdir, G_DIR_SEPARATOR_S); dotdir = g_string_append(dotdir, DOTDIR); } if (!g_file_test(dotdir->str, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) { if (g_mkdir_with_parents(dotdir->str, 0700) != 0) ret = NULL; else ret = dotdir->str; } else if (g_file_test(dotdir->str, G_FILE_TEST_IS_DIR)) ret = dotdir->str; else ret = NULL; /* If we for some reason cannot write to the current directory, */ /* we save it to a new folder named as the md5 of the file content, */ /* not particularly fast, but ensures that the images can be moved */ if (ret == NULL) { g_string_free(dotdir, TRUE); g_free(directory); if (g_file_test(filename, G_FILE_TEST_IS_REGULAR)) { gchar* md5 = rs_file_checksum(filename); ret = g_strdup_printf("%s/read-only-cache/%s", rs_confdir_get(), md5); g_free(md5); if (!g_file_test(ret, (G_FILE_TEST_EXISTS | G_FILE_TEST_IS_DIR))) { if (g_mkdir_with_parents(ret, 0700) != 0) ret = NULL; } } return ret; } g_free(directory); g_string_free(dotdir, FALSE); return (ret); } /** * Normalize a RS_RECT, ie makes sure that x1 < x2 and y1x2; x2 = in->x1; y1 = in->y1; y2 = in->y2; if (x1>x2) { n = x1; x1 = x2; x2 = n; } if (y1>y2) { n = y1; y1 = y2; y2 = n; } out->x1 = x1; out->x2 = x2; out->y1 = y1; out->y2 = y2; } /** * Flip a RS_RECT * @param in A RS_RECT to read values from * @param out A RS_RECT to write the values to (can be the same as in) * @param w The width of the data OUTSIDE the RS_RECT * @param h The height of the data OUTSIDE the RS_RECT */ void rs_rect_flip(RS_RECT *in, RS_RECT *out, gint w, gint h) { gint x1,y1; gint x2,y2; x1 = in->x1; x2 = in->x2; y1 = h - in->y2 - 1; y2 = h - in->y1 - 1; out->x1 = x1; out->x2 = x2; out->y1 = y1; out->y2 = y2; rs_rect_normalize(out, out); } /** * Mirrors a RS_RECT * @param in A RS_RECT to read values from * @param out A RS_RECT to write the values to (can be the same as in) * @param w The width of the data OUTSIDE the RS_RECT * @param h The height of the data OUTSIDE the RS_RECT */ void rs_rect_mirror(RS_RECT *in, RS_RECT *out, gint w, gint h) { gint x1,y1; gint x2,y2; x1 = w - in->x2 - 1; x2 = w - in->x1 - 1; y1 = in->y1; y2 = in->y2; out->x1 = x1; out->x2 = x2; out->y1 = y1; out->y2 = y2; rs_rect_normalize(out, out); } /** * Rotate a RS_RECT in 90 degrees steps * @param in A RS_RECT to read values from * @param out A RS_RECT to write the values to (can be the same as in) * @param w The width of the data OUTSIDE the RS_RECT * @param h The height of the data OUTSIDE the RS_RECT * @param quarterturns How many times to turn the rect clockwise */ void rs_rect_rotate(RS_RECT *in, RS_RECT *out, gint w, gint h, gint quarterturns) { gint x1,y1; gint x2,y2; x1 = in->x2; x2 = in->x1; y1 = in->y1; y2 = in->y2; switch(quarterturns) { case 1: x1 = h - in->y1-1; x2 = h - in->y2-1; y1 = in->x1; y2 = in->x2; break; case 2: x1 = w - in->x1 - 1; x2 = w - in->x2 - 1; y1 = h - in->y1 - 1; y2 = h - in->y2 - 1; break; case 3: x1 = in->y1; x2 = in->y2; y1 = w - in->x1 - 1; y2 = w - in->x2 - 1; break; } out->x1 = x1; out->x2 = x2; out->y1 = y1; out->y2 = y2; rs_rect_normalize(out, out); } /** * Reset a property on a GObject to it's default * @param object A GObject * @param property_name A name of a property installed in object's class */ void rs_object_class_property_reset(GObject *object, const gchar *property_name) { GObjectClass *klass = G_OBJECT_GET_CLASS(object); GParamSpec *spec; GValue value = {0}; spec = g_object_class_find_property(klass, property_name); g_assert(spec != NULL); g_value_init(&value, spec->value_type); g_param_value_set_default(spec, &value); g_object_set_property(object, spec->name, &value); g_value_unset(&value); } /** * Check (and complain if needed) the Rawstudio install */ void check_install(void) { #define TEST_FILE_ACCESS(path) do { if (g_access(path, R_OK)!=0) g_debug("Cannot access %s\n", path);} while (0) TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "icons" G_DIR_SEPARATOR_S PACKAGE ".png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "overlay_priority1.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "overlay_priority2.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "overlay_priority3.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "overlay_deleted.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "overlay_exported.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "transform_flip.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "transform_mirror.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "transform_90.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "transform_180.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "transform_270.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "cursor-color-picker.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "cursor-crop.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "cursor-rotate.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "tool-color-picker.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "tool-crop.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S "pixmaps" G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "tool-rotate.png"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "ui.xml"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "rawstudio.gtkrc"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "profiles" G_DIR_SEPARATOR_S "generic_camera_profile.icc"); TEST_FILE_ACCESS(PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "profiles" G_DIR_SEPARATOR_S "sRGB.icc"); #undef TEST_FILE_ACCESS } /* Rewritten from Exiftools - lib/Image/ExifTool/Canon.pm*/ gfloat CanonEv(gint val) { gfloat sign; gfloat frac; /* temporarily make the number positive */ if (val < 0) { val = -val; sign = -1.0; } else { sign = 1.0; } gint ifrac = val & 0x1f; /* remove fraction */ val -= ifrac; /* Convert 1/3 and 2/3 codes */ if (ifrac == 0x0c) frac = 32.0 / 3.0; /* 0x20 / 3 */ else if (ifrac == 0x14) frac = 64.0 / 3.0; /* 0x40 / 3 */ else frac = (gfloat) ifrac; return sign * (((gfloat)val) + frac) / 32.0; } /** * Split a char * with a given delimiter * @param str The gchar * to be splitted * @param delimiters The gchar * to be used as delimiter (can be more than 1 char) * @return A GList consisting of the different parts of the input string, must be freed using g_free() and g_list_free(). */ GList * rs_split_string(const gchar *str, const gchar *delimiters) { gchar **temp = g_strsplit_set(str, delimiters, 0); int i = 0; GList *glist = NULL; while (temp[i]) { gchar* text = (gchar *) temp[i]; if (text[0] != 0) glist = g_list_append(glist, text); else g_free(text); i++; } g_free(temp); return glist; } gchar * rs_file_checksum(const gchar *filename) { gchar *checksum = NULL; struct stat st; gint fd = open(filename, O_RDONLY); if (fd > 0) { fstat(fd, &st); gint offset = 0; gint length = st.st_size; /* If the file is bigger than 2 KiB, we sample 1 KiB in the middle of the file */ if (st.st_size > 2048) { offset = st.st_size/2; length = 1024; } guchar buffer[length]; lseek(fd, offset, SEEK_SET); gint bytes_read = read(fd, buffer, length); close(fd); if (bytes_read == length) checksum = g_compute_checksum_for_data(G_CHECKSUM_MD5, buffer, length); } return checksum; } const gchar * rs_human_aperture(gdouble aperture) { gchar *ret = NULL; if (aperture < 8) ret = g_strdup_printf("f/%.1f", aperture); else ret = g_strdup_printf("f/%.0f", aperture); return ret; } const gchar * rs_human_focal(gdouble min, gdouble max) { gchar *ret = NULL; if (min == max) ret = g_strdup_printf("%.0fmm", max); else ret = g_strdup_printf("%.0f-%.0fmm", min, max); return ret; } gchar * rs_normalize_path(const gchar *path) { #ifdef PATH_MAX gint path_max = PATH_MAX; #else gint path_max = pathconf(path, _PC_PATH_MAX); if (path_max <= 0) path_max = 4096; #endif gchar *buffer = g_new0(gchar, path_max); gchar *ret = NULL; #ifdef WIN32 int length = GetFullPathName(path, path_max, buffer, NULL); if(length == 0){ g_error("Error normalizing path: %s\n", path); } ret = buffer; #else ret = realpath(path, buffer); #endif if (ret == NULL) g_free(buffer); return ret; } /** * Copy a file from one location to another * @param source An absolute path to a source file * @param deastination An absolute path to a destination file (not folder), will be overwritten if exists * @return TRUE on success, FALSE on failure */ gboolean rs_file_copy(const gchar *source, const gchar *destination) { gboolean ret = FALSE; const gint buffer_size = 1024*1024; gint source_fd, destination_fd; gint bytes_read, bytes_written; struct stat st; mode_t default_mode = 00666; /* We set this relaxed to respect the users umask */ g_return_val_if_fail(source != NULL, FALSE); g_return_val_if_fail(source[0] != '\0', FALSE); g_return_val_if_fail(g_path_is_absolute(source), FALSE); g_return_val_if_fail(destination != NULL, FALSE); g_return_val_if_fail(destination[0] != '\0', FALSE); g_return_val_if_fail(g_path_is_absolute(destination), FALSE); source_fd = open(source, O_RDONLY); if (source_fd > 0) { /* Try to copy permissions too */ if (fstat(source_fd, &st) == 0) default_mode = st.st_mode; destination_fd = creat(destination, default_mode); if (destination_fd > 0) { gpointer buffer = g_malloc(buffer_size); do { bytes_read = read(source_fd, buffer, buffer_size); bytes_written = write(destination_fd, buffer, bytes_read); if (bytes_written != bytes_read) g_warning("%s was truncated", destination); } while(bytes_read > 0); g_free(buffer); ret = TRUE; close(destination_fd); } close(source_fd); } return ret; } /** * Removes tailing spaces from a gchar * * @param str A gchar * to have tailing spaces removed * @param inplace Set to TRUE if string should be edited inplace * @return A gchar * with tailing spaces removed */ gchar * rs_remove_tailing_spaces(gchar *str, gboolean inplace) { gint i; gchar *ret = str; g_return_val_if_fail(str != NULL, NULL); if (!inplace) ret = g_strdup(str); for(i = strlen(ret)-1; i > 0; i--) { if (ret[i] == 0x20) ret[i] = 0x00; else i = 0; } return ret; } rawstudio-2.0/librawstudio/rs-image16.h0000644000175000017500000000656411526533645015076 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_IMAGE16_H #define RS_IMAGE16_H #include #define RS_TYPE_IMAGE16 (rs_image16_get_type ()) #define RS_IMAGE16(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_IMAGE16, RS_IMAGE16)) #define RS_IMAGE16_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_IMAGE16, RS_IMAGE16Class)) #define RS_IS_IMAGE16(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_IMAGE16)) #define RS_IS_IMAGE16_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_IMAGE16)) #define RS_IMAGE16_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_IMAGE16, RS_IMAGE16Class)) struct _rs_image16 { GObject parent; gint w; gint h; gint pitch; gint rowstride; guint channels; guint pixelsize; /* the size of a pixel in SHORTS */ gushort *pixels; gint pixels_refcount; guint filters; gboolean dispose_has_run; }; typedef struct _RS_IMAGE16Class RS_IMAGE16Class; struct _RS_IMAGE16Class { GObjectClass parent; }; GType rs_image16_get_type (void); /** * Convenience macro to get a pixel at specific position * @param image RS_IMAGE8 or RS_IMAGE16 * @param x X coordinate (column) * @param y Y coordinate (row) */ #define GET_PIXEL(image, x, y) ((image)->pixels + (y)*(image)->rowstride + (x)*(image)->pixelsize) #define GET_PIXBUF_PIXEL(pixbuf, x, y) (gdk_pixbuf_get_pixels((pixbuf)) + (y)*gdk_pixbuf_get_rowstride((pixbuf)) + (x)*gdk_pixbuf_get_n_channels((pixbuf))) extern RS_IMAGE16 *rs_image16_new(const guint width, const guint height, const guint channels, const guint pixelsize); /** * Initializes a new RS_IMAGE16 with pixeldata from @input. * @note Pixeldata is NOT copied to new RS_IMAGE16. * @param input A RS_IMAGE16 * @param rectangle A GdkRectangle describing the area to subframe * @return A new RS_IMAGE16 with a refcount of 1, the image can be bigger * than rectangle to retain 16 byte alignment. */ extern RS_IMAGE16 * rs_image16_new_subframe(RS_IMAGE16 *input, GdkRectangle *rectangle); extern void rs_image16_transform_getwh(RS_IMAGE16 *in, RS_RECT *crop, gdouble angle, gint orientation, gint *w, gint *h); extern RS_IMAGE16 *rs_image16_copy(RS_IMAGE16 *rsi, gboolean copy_pixels); /** * Returns a single pixel from a RS_IMAGE16 * @param image A RS_IMAGE16 * @param x X coordinate (column) * @param y Y coordinate (row) * @param extend_edges Tries to extend edges beyond image borders if TRUE */ extern inline gushort *rs_image16_get_pixel(RS_IMAGE16 *image, gint x, gint y, gboolean extend_edges); extern gchar *rs_image16_get_checksum(RS_IMAGE16 *image); #endif /* RS_IMAGE16_H */ rawstudio-2.0/librawstudio/rs-gui-functions.c0000644000175000017500000000623711526533645016427 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include "rs-gui-functions.h" GtkWidget * gui_dialog_make_from_text(const gchar *stock_id, gchar *primary_text, gchar *secondary_text) { GtkWidget *secondary_label; secondary_label = gtk_label_new (NULL); gtk_label_set_line_wrap (GTK_LABEL (secondary_label), TRUE); gtk_label_set_use_markup (GTK_LABEL (secondary_label), TRUE); gtk_misc_set_alignment (GTK_MISC (secondary_label), 0.0, 0.5); gtk_label_set_selectable (GTK_LABEL (secondary_label), TRUE); gtk_label_set_markup (GTK_LABEL (secondary_label), secondary_text); return(gui_dialog_make_from_widget(stock_id, primary_text, secondary_label)); } GtkWidget * gui_dialog_make_from_widget(const gchar *stock_id, gchar *primary_text, GtkWidget *widget) { GtkWidget *dialog, *image, *hhbox, *vvbox; GtkWidget *primary_label; gchar *str; image = gtk_image_new_from_stock(stock_id, GTK_ICON_SIZE_DIALOG); gtk_misc_set_alignment (GTK_MISC (image), 0.5, 0.0); dialog = gtk_dialog_new(); gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); gtk_box_set_spacing (GTK_BOX (GTK_DIALOG (dialog)->vbox), 14); gtk_window_set_resizable (GTK_WINDOW (dialog), FALSE); gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE); gtk_window_set_title (GTK_WINDOW (dialog), ""); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); primary_label = gtk_label_new (NULL); gtk_label_set_line_wrap (GTK_LABEL (primary_label), TRUE); gtk_label_set_use_markup (GTK_LABEL (primary_label), TRUE); gtk_misc_set_alignment (GTK_MISC (primary_label), 0.0, 0.5); gtk_label_set_selectable (GTK_LABEL (primary_label), TRUE); str = g_strconcat("", primary_text, "", NULL); gtk_label_set_markup (GTK_LABEL (primary_label), str); g_free(str); hhbox = gtk_hbox_new (FALSE, 12); gtk_container_set_border_width (GTK_CONTAINER (hhbox), 5); gtk_box_pack_start (GTK_BOX (hhbox), image, FALSE, FALSE, 0); vvbox = gtk_vbox_new (FALSE, 12); gtk_box_pack_start (GTK_BOX (hhbox), vvbox, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vvbox), primary_label, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (vvbox), widget, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->vbox), hhbox, FALSE, FALSE, 0); return(dialog); } rawstudio-2.0/librawstudio/rs-lens.c0000644000175000017500000002243411526533645014573 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 struct _RSLens { GObject parent; gboolean dispose_has_run; gchar *description; gdouble min_focal; gdouble max_focal; gdouble min_aperture; gdouble max_aperture; gchar *identifier; gchar *lensfun_make; gchar *lensfun_model; gchar *camera_make; gchar *camera_model; gboolean enabled; }; G_DEFINE_TYPE (RSLens, rs_lens, G_TYPE_OBJECT) enum { PROP_0, PROP_DESCRIPTION, PROP_MIN_FOCAL, PROP_MAX_FOCAL, PROP_MIN_APERTURE, PROP_MAX_APERTURE, PROP_IDENTIFIER, PROP_LENSFUN_MAKE, PROP_LENSFUN_MODEL, PROP_CAMERA_MAKE, PROP_CAMERA_MODEL, PROP_ENABLED }; static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSLens *lens = RS_LENS(object); switch (property_id) { case PROP_DESCRIPTION: g_value_set_string(value, rs_lens_get_description(lens)); break; case PROP_MIN_FOCAL: g_value_set_double(value, lens->min_focal); break; case PROP_MAX_FOCAL: g_value_set_double(value, lens->max_focal); break; case PROP_MIN_APERTURE: g_value_set_double(value, lens->min_aperture); break; case PROP_MAX_APERTURE: g_value_set_double(value, lens->max_aperture); break; case PROP_IDENTIFIER: g_value_set_string(value, lens->identifier); break; case PROP_LENSFUN_MAKE: g_value_set_string(value, lens->lensfun_make); break; case PROP_LENSFUN_MODEL: g_value_set_string(value, lens->lensfun_model); break; case PROP_CAMERA_MAKE: g_value_set_string(value, lens->camera_make); break; case PROP_CAMERA_MODEL: g_value_set_string(value, lens->camera_model); break; case PROP_ENABLED: g_value_set_boolean(value, lens->enabled); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSLens *lens = RS_LENS(object); switch (property_id) { case PROP_MIN_FOCAL: lens->min_focal = g_value_get_double(value); break; case PROP_MAX_FOCAL: lens->max_focal = g_value_get_double(value); break; case PROP_MIN_APERTURE: lens->min_aperture = g_value_get_double(value); break; case PROP_MAX_APERTURE: lens->max_aperture = g_value_get_double(value); break; case PROP_IDENTIFIER: g_free(lens->identifier); lens->identifier = g_value_dup_string(value); break; case PROP_LENSFUN_MAKE: g_free(lens->lensfun_make); lens->lensfun_make = g_value_dup_string(value); break; case PROP_LENSFUN_MODEL: g_free(lens->lensfun_model); lens->lensfun_model = g_value_dup_string(value); break; case PROP_CAMERA_MAKE: g_free(lens->camera_make); lens->camera_make = g_value_dup_string(value); break; case PROP_CAMERA_MODEL: g_free(lens->camera_model); lens->camera_model = g_value_dup_string(value); break; case PROP_ENABLED: lens->enabled = g_value_get_boolean(value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void dispose(GObject *object) { RSLens *lens = RS_LENS(object); if (!lens->dispose_has_run) { g_free(lens->lensfun_make); g_free(lens->lensfun_model); lens->dispose_has_run = TRUE; } G_OBJECT_CLASS (rs_lens_parent_class)->dispose (object); } static void rs_lens_class_init(RSLensClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->get_property = get_property; object_class->set_property = set_property; object_class->dispose = dispose; g_object_class_install_property(object_class, PROP_IDENTIFIER, g_param_spec_string( "description", "Description", "Human readable description of lens", NULL, G_PARAM_READABLE)); g_object_class_install_property(object_class, PROP_MIN_FOCAL, g_param_spec_double( "min-focal", "min-focal", "Minimum focal", -1.0, 20000.0, -1.0, G_PARAM_READWRITE)); g_object_class_install_property(object_class, PROP_MAX_FOCAL, g_param_spec_double( "max-focal", "max-focal", "Maximum focal", -1.0, 20000.0, -1.0, G_PARAM_READWRITE)); g_object_class_install_property(object_class, PROP_MIN_APERTURE, g_param_spec_double( "min-aperture", "min-aperture", "Minimum aperture", -1.0, 20000.0, -1.0, G_PARAM_READWRITE)); g_object_class_install_property(object_class, PROP_MAX_APERTURE, g_param_spec_double( "max-aperture", "max-aperture", "Maximum aperture", -1.0, 20000.0, -1.0, G_PARAM_READWRITE)); g_object_class_install_property(object_class, PROP_IDENTIFIER, g_param_spec_string( "identifier", "Identifier", "Rawstudio generated lens identifier", NULL, G_PARAM_READWRITE)); g_object_class_install_property(object_class, PROP_LENSFUN_MAKE, g_param_spec_string( "lensfun-make", "lensfun-make", "String helping Lensfun to identify the lens make", "", G_PARAM_READWRITE)); g_object_class_install_property(object_class, PROP_LENSFUN_MODEL, g_param_spec_string( "lensfun-model", "lensfun-model", "String helping Lensfun to identify the lens model", "", G_PARAM_READWRITE)); g_object_class_install_property(object_class, PROP_CAMERA_MAKE, g_param_spec_string( "camera-make", "camera-make", "String helping Lensfun to identify the camera make", "", G_PARAM_READWRITE)); g_object_class_install_property(object_class, PROP_CAMERA_MODEL, g_param_spec_string( "camera-model", "camera-model", "String helping Lensfun to identify the camera model", "", G_PARAM_READWRITE)); g_object_class_install_property(object_class, PROP_ENABLED, g_param_spec_boolean( "enabled", "enabled", "Specify whether the lens should be corrected or not", FALSE, G_PARAM_READWRITE)); } static void rs_lens_init(RSLens *lens) { lens->dispose_has_run = FALSE; lens->description = NULL; lens->min_focal = -1.0; lens->max_focal = -1.0; lens->min_aperture = -1.0; lens->max_aperture = -1.0; lens->lensfun_make = NULL; lens->lensfun_model = NULL; lens->camera_make = NULL; lens->camera_model = NULL; lens->enabled = FALSE; } /** * Instantiate a new RSLens * @return A new RSLens with a refcount of 1 */ RSLens * rs_lens_new(void) { return g_object_new (RS_TYPE_LENS, NULL); } /** * Instantiate a new RSLens from a RSMetadata * @param metadata A RSMetadata type with lens information embedded * @return A new RSLens with a refcount of 1 */ RSLens * rs_lens_new_from_medadata(RSMetadata *metadata) { g_assert(RS_IS_METADATA(metadata)); return g_object_new(RS_TYPE_LENS, "identifier", metadata->lens_identifier, "min-focal", metadata->lens_min_focal, "max-focal", metadata->lens_max_focal, "min-aperture", metadata->lens_min_aperture, "max-aperture", metadata->lens_max_aperture, "camera-make", metadata->make_ascii, "camera-model", metadata->model_ascii, NULL); } /** * Get the Lensfun make from a RSLens * @param lens A RSLens * @return The make as used by Lensfun or NULL if unknown */ const gchar * rs_lens_get_lensfun_make(RSLens *lens) { g_assert(RS_IS_LENS(lens)); return lens->lensfun_make; } /** * Get the Lensfun model from a RSLens * @param lens A RSLens * @return The model as used by Lensfun or NULL if unknown */ const gchar * rs_lens_get_lensfun_model(RSLens *lens) { g_assert(RS_IS_LENS(lens)); return lens->lensfun_model; } /** * Get a human readable description of the lens * @param lens A RSLens * @return A human readble string describing the lens */ const gchar * rs_lens_get_description(RSLens *lens) { GString *ret; if (lens->description) return lens->description; /* We rely on the Lensfun description being human readble */ if (rs_lens_get_lensfun_model(lens)) return rs_lens_get_lensfun_model(lens); ret = g_string_new(""); if (lens->min_focal > -1.0) { g_string_append_printf(ret, "%.0f", lens->min_focal); if ((lens->max_focal > -1.0) && (ABS(lens->max_focal-lens->min_focal) > 0.1)) g_string_append_printf(ret, "-%.0f", lens->max_focal); } else if (lens->max_focal > -1.0) g_string_append_printf(ret, "%.0f", lens->max_focal); if (lens->max_aperture > -1.0) g_string_append_printf(ret, " f/%.1f", lens->max_aperture); lens->description = ret->str; g_string_free(ret, FALSE); return lens->description; } void rs_lens_set_lensfun_make(RSLens *lens, gchar *make) { g_assert(RS_IS_LENS(lens)); lens->lensfun_make = make; } void rs_lens_set_lensfun_model(RSLens *lens, gchar *model) { g_assert(RS_IS_LENS(lens)); lens->lensfun_model = model; } void rs_lens_set_lensfun_enabled(RSLens *lens, gboolean enabled) { g_assert(RS_IS_LENS(lens)); lens->enabled = enabled; } gboolean rs_lens_get_lensfun_enabled(RSLens *lens) { g_assert(RS_IS_LENS(lens)); return lens->enabled; } rawstudio-2.0/librawstudio/rs-filter-response.h0000644000175000017500000001315411526533645016757 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_FILTER_RESPONSE_H #define RS_FILTER_RESPONSE_H #include #include #include #include "rs-filter-param.h" G_BEGIN_DECLS #define RS_TYPE_FILTER_RESPONSE rs_filter_response_get_type() #define RS_FILTER_RESPONSE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_FILTER_RESPONSE, RSFilterResponse)) #define RS_FILTER_RESPONSE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_FILTER_RESPONSE, RSFilterResponseClass)) #define RS_IS_FILTER_RESPONSE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_FILTER_RESPONSE)) #define RS_IS_FILTER_RESPONSE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_FILTER_RESPONSE)) #define RS_FILTER_RESPONSE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_FILTER_RESPONSE, RSFilterResponseClass)) typedef struct _RSFilterResponse RSFilterResponse; typedef struct { RSFilterParamClass parent_class; } RSFilterResponseClass; GType rs_filter_response_get_type(void); /** * Instantiate a new RSFilterResponse object * @return A new RSFilterResponse with a refcount of 1 */ RSFilterResponse *rs_filter_response_new(void); /** * Clone all flags of a RSFilterResponse EXCEPT images * @param filter_response A RSFilterResponse * @return A new RSFilterResponse with a refcount of 1 */ RSFilterResponse *rs_filter_response_clone(RSFilterResponse *filter_response); /** * Set the ROI used in generating the response, if the whole image is * generated, this should NOT be set * @param filter_response A RSFilterResponse * @param roi A GdkRectangle describing the ROI or NULL to indicate complete * image data */ void rs_filter_response_set_roi(RSFilterResponse *filter_response, GdkRectangle *roi); /** * Get the ROI of the response * @param filter_response A RSFilterResponse * @return A GdkRectangle describing the ROI or NULL if the complete image is rendered */ GdkRectangle *rs_filter_response_get_roi(const RSFilterResponse *filter_response); /** * Set quick flag on a response, this should be set if the image has been * rendered by any quick method and a better method is available * @note There is no boolean parameter, it would make no sense to remove a * quick-flag * @param filter_response A RSFilterResponse */ void rs_filter_response_set_quick(RSFilterResponse *filter_response); /** * Get the quick flag * @param filter_response A RSFilterResponse * @return TRUE if the image data was rendered using a "quick" algorithm and a * faster is available, FALSE otherwise */ gboolean rs_filter_response_get_quick(const RSFilterResponse *filter_response); /** * Set 16 bit image data * @param filter_response A RSFilterResponse * @param image A RS_IMAGE16 */ void rs_filter_response_set_image(RSFilterResponse *filter_response, RS_IMAGE16 *image); /** * Is there a 16 bit image attached * @param filter_response A RSFilterResponse * @return A RS_IMAGE16 (must be unreffed after usage) or NULL if none is set */ gboolean rs_filter_response_has_image(const RSFilterResponse *filter_response); /** * Get 16 bit image data * @param filter_response A RSFilterResponse * @return A gboolean TRUE if an image is attached, FALSE otherwise */ RS_IMAGE16 *rs_filter_response_get_image(const RSFilterResponse *filter_response); /** * Set 8 bit image data * @param filter_response A RSFilterResponse * @param pixbuf A GdkPixbuf */ void rs_filter_response_set_image8(RSFilterResponse *filter_response, GdkPixbuf *pixbuf); /** * Does the response have an 8 bit image * @param filter_response A RSFilterResponse * @return A gboolean TRUE if an image8 is attached, FALSE otherwise */ gboolean rs_filter_response_has_image8(const RSFilterResponse *filter_response); /** * Get 8 bit image data * @param filter_response A RSFilterResponse * @return A GdkPixbuf (must be unreffed after usage) or NULL if none is set */ GdkPixbuf *rs_filter_response_get_image8(const RSFilterResponse *filter_response); /** * Set predicted width * @param filter_response A RSFilterResponse * @param width Width in pixels * @note Do not set this if width is unknown */ void rs_filter_response_set_width(RSFilterResponse *filter_response, gint width); /** * Set predicted height * @param filter_response A RSFilterResponse * @param height Height in pixels * @note Do not set this if height is unknown */ void rs_filter_response_set_height(RSFilterResponse *filter_response, gint height); /** * Get width * @param filter_response A RSFilterResponse * @return Width in pixels or -1 if unknown */ gint rs_filter_response_get_width(const RSFilterResponse *filter_response); /** * Get height * @param filter_response A RSFilterResponse * @return Height in pixels or -1 if unknown */ gint rs_filter_response_get_height(const RSFilterResponse *filter_response); G_END_DECLS #endif /* RS_FILTER_RESPONSE_H */ rawstudio-2.0/librawstudio/rs-tiff.c0000644000175000017500000001227711526533645014566 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include "rs-tiff.h" G_DEFINE_TYPE (RSTiff, rs_tiff, G_TYPE_OBJECT) static gboolean read_file_header(RSTiff *tiff); static gboolean read_from_file(RSTiff *tiff); enum { PROP_0, PROP_FILENAME, }; static void rs_tiff_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSTiff *tiff = RS_TIFF(object); switch (property_id) { case PROP_FILENAME: g_value_set_string(value, tiff->filename); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void rs_tiff_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSTiff *tiff = RS_TIFF(object); switch (property_id) { case PROP_FILENAME: tiff->filename = g_value_dup_string(value); read_from_file(tiff); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void rs_tiff_dispose(GObject *object) { RSTiff *tiff = RS_TIFF(object); if (!tiff->dispose_has_run) { tiff->dispose_has_run = TRUE; if (tiff->map) g_free(tiff->map); g_list_foreach(tiff->ifds, (GFunc)g_object_unref, NULL); g_list_free(tiff->ifds); } G_OBJECT_CLASS(rs_tiff_parent_class)->dispose(object); } static void rs_tiff_finalize(GObject *object) { G_OBJECT_CLASS(rs_tiff_parent_class)->finalize(object); } static void rs_tiff_class_init(RSTiffClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = rs_tiff_get_property; object_class->set_property = rs_tiff_set_property; object_class->dispose = rs_tiff_dispose; object_class->finalize = rs_tiff_finalize; g_object_class_install_property(object_class, PROP_FILENAME, g_param_spec_string( "filename", "Filename", "The filename to load", NULL, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); klass->read_file_header = read_file_header; } static void rs_tiff_init(RSTiff *self) { } static gboolean read_file_header(RSTiff *tiff) { gboolean ret = TRUE; guint next_ifd; if (tiff->map_length < 16) return FALSE; /* Read endianness */ if ((tiff->map[0] == 'I') && (tiff->map[1] == 'I')) tiff->byte_order = G_LITTLE_ENDIAN; else if ((tiff->map[0] == 'M') && (tiff->map[1] == 'M')) tiff->byte_order = G_BIG_ENDIAN; else /* Not a TIFF file */ ret = FALSE; /* Read TIFF identifier */ if (rs_tiff_get_ushort(tiff, 2) != 42) ret = FALSE; tiff->first_ifd_offset = rs_tiff_get_uint(tiff, 4); next_ifd = tiff->first_ifd_offset; while(next_ifd) { tiff->num_ifd++; RSTiffIfd *ifd = rs_tiff_ifd_new(tiff, next_ifd); if (ifd) { tiff->ifds = g_list_append(tiff->ifds, ifd); next_ifd = rs_tiff_ifd_get_next(ifd); } else break; } return TRUE; } static gboolean read_from_file(RSTiff *tiff) { gboolean ret = TRUE; GError *error = NULL; g_file_get_contents(tiff->filename, (gchar **)&tiff->map, &tiff->map_length, &error); if (error) { g_warning("GError: '%s'", error->message); g_error_free(error); ret = FALSE; } return RS_TIFF_GET_CLASS(tiff)->read_file_header(tiff); } RSTiff * rs_tiff_new_from_file(const gchar *filename) { return g_object_new(RS_TYPE_TIFF, "filename", filename, NULL); } const gchar * rs_tiff_get_filename(RSTiff *tiff) { g_assert(RS_IS_TIFF(tiff)); return tiff->filename; } const gchar * rs_tiff_get_filename_nopath(RSTiff *tiff) { g_assert(RS_IS_TIFF(tiff)); return strrchr(tiff->filename,'/') + 1; } RSTiffIfdEntry * rs_tiff_get_ifd_entry(RSTiff *tiff, guint ifd_num, gushort tag) { RSTiffIfd *ifd = NULL; RSTiffIfdEntry *ret = NULL; g_assert(RS_IS_TIFF(tiff)); if (tiff->ifds == 0) if (!read_from_file(tiff)) return NULL; if (ifd_num <= tiff->num_ifd) ifd = g_list_nth_data(tiff->ifds, ifd_num); if (ifd) ret = rs_tiff_ifd_get_entry_by_tag(ifd, tag); return ret; } gchar * rs_tiff_get_ascii(RSTiff *tiff, guint ifd_num, gushort tag) { gchar *ret = NULL; RSTiffIfdEntry *entry = NULL; entry = rs_tiff_get_ifd_entry(tiff, ifd_num, tag); if (entry && entry->type && entry->count) { if ((entry->value_offset + entry->count) <= tiff->map_length) ret = g_strndup((gchar *) tiff->map + entry->value_offset , entry->count); } return ret; } void rs_tiff_free_data(RSTiff * tiff) { if (tiff->map) g_free(tiff->map); tiff->map = NULL; g_list_foreach(tiff->ifds, (GFunc)g_object_unref, NULL); g_list_free(tiff->ifds); tiff->ifds = 0; } rawstudio-2.0/librawstudio/rs-color-space-selector.c0000644000175000017500000001151711526533645017657 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include "rawstudio.h" #include "rs-color-space-selector.h" G_DEFINE_TYPE(RSColorSpaceSelector, rs_color_space_selector, GTK_TYPE_COMBO_BOX) enum { COLUMN_TEXT, COLUMN_TYPENAME, COLUMN_COLORSPACE, NUM_COLUMNS }; enum { SELECTED_SIGNAL, SIGNAL_LAST }; static gint signals[SIGNAL_LAST]; #define COLOR_SPACE_SELECTOR_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), RS_TYPE_COLOR_SPACE_SELECTOR, RSColorSpaceSelectorPrivate)) struct _RSColorSpaceSelectorPrivate { GtkTreeModel *model; gboolean dispose_has_run; }; static void rs_color_space_selector_dispose(GObject *object) { RSColorSpaceSelector *selector = RS_COLOR_SPACE_SELECTOR(object); if (!selector->priv->dispose_has_run) { selector->priv->dispose_has_run = TRUE; } G_OBJECT_CLASS(rs_color_space_selector_parent_class)->dispose(object); } static void changed(GtkComboBox *combo_box) { RSColorSpace *colorspace = NULL; GtkTreeIter iter; RSColorSpaceSelector *selector = RS_COLOR_SPACE_SELECTOR(combo_box); if (gtk_combo_box_get_active_iter(combo_box, &iter)) { gtk_tree_model_get(selector->priv->model, &iter, COLUMN_COLORSPACE, &colorspace, -1); if (colorspace) g_signal_emit(selector, signals[SELECTED_SIGNAL], 0, colorspace); } } static void rs_color_space_selector_class_init(RSColorSpaceSelectorClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); GtkComboBoxClass *combo_class = GTK_COMBO_BOX_CLASS(klass); g_type_class_add_private(klass, sizeof(RSColorSpaceSelectorPrivate)); object_class->dispose = rs_color_space_selector_dispose; combo_class->changed = changed; signals[SELECTED_SIGNAL] = g_signal_new("colorspace-selected", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, RS_TYPE_COLOR_SPACE); } static void rs_color_space_selector_init(RSColorSpaceSelector *selector) { GtkComboBox *combo = GTK_COMBO_BOX(selector); selector->priv = COLOR_SPACE_SELECTOR_PRIVATE(selector); selector->priv->model = GTK_TREE_MODEL(gtk_list_store_new(NUM_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, RS_TYPE_COLOR_SPACE)); GtkCellRenderer *cell = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), cell, TRUE ); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo), cell, "markup", COLUMN_TEXT, NULL); gtk_combo_box_set_model(combo, selector->priv->model); } GtkWidget * rs_color_space_selector_new(void) { return g_object_new(RS_TYPE_COLOR_SPACE_SELECTOR, NULL); } void rs_color_space_selector_add_all(RSColorSpaceSelector *selector) { GType *spaces; guint n_spaces, i; GtkTreeIter iter; g_return_if_fail(RS_IS_COLOR_SPACE_SELECTOR(selector)); spaces = g_type_children (RS_TYPE_COLOR_SPACE, &n_spaces); for (i = 0; i < n_spaces; i++) { RSColorSpaceClass *klass; klass = g_type_class_ref(spaces[i]); gtk_list_store_append(GTK_LIST_STORE(selector->priv->model), &iter); gtk_list_store_set(GTK_LIST_STORE(selector->priv->model), &iter, COLUMN_TEXT, klass->name, COLUMN_TYPENAME, g_type_name(spaces[i]), COLUMN_COLORSPACE, rs_color_space_new_singleton(g_type_name(spaces[i])), -1); g_type_class_unref(klass); } } RSColorSpace * rs_color_space_selector_set_selected_by_name(RSColorSpaceSelector *selector, const gchar *type_name) { RSColorSpace *ret = NULL; GtkTreeIter iter; gchar *type_name_haystack; g_return_val_if_fail(RS_IS_COLOR_SPACE_SELECTOR(selector), NULL); g_return_val_if_fail(type_name != NULL, NULL); if (gtk_tree_model_get_iter_first(selector->priv->model, &iter)) { do { gtk_tree_model_get(selector->priv->model, &iter, COLUMN_TYPENAME, &type_name_haystack, COLUMN_COLORSPACE, &ret, -1); if (type_name_haystack) { if (g_strcmp0(type_name_haystack, type_name) == 0) { gtk_combo_box_set_active_iter(GTK_COMBO_BOX(selector), &iter); break; } g_free(type_name_haystack); } } while (gtk_tree_model_iter_next(selector->priv->model, &iter)); } return ret; }rawstudio-2.0/librawstudio/rs-metadata.c0000644000175000017500000004253311532304443015401 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include /* g_unlink() */ #include #include #include #include "gettext.h" G_DEFINE_TYPE (RSMetadata, rs_metadata, G_TYPE_OBJECT) static void rs_metadata_dispose (GObject *object) { RSMetadata *metadata = RS_METADATA(object); if (!metadata->dispose_has_run) { metadata->dispose_has_run = TRUE; if (metadata->make_ascii) g_free(metadata->make_ascii); if (metadata->model_ascii) g_free(metadata->model_ascii); if (metadata->time_ascii) g_free(metadata->time_ascii); if (metadata->thumbnail) g_object_unref(metadata->thumbnail); if (metadata->lens_identifier) g_free(metadata->lens_identifier); } /* Chain up */ if (G_OBJECT_CLASS (rs_metadata_parent_class)->dispose) G_OBJECT_CLASS (rs_metadata_parent_class)->dispose (object); } static void rs_metadata_finalize (GObject *object) { if (G_OBJECT_CLASS (rs_metadata_parent_class)->finalize) G_OBJECT_CLASS (rs_metadata_parent_class)->finalize (object); } static void rs_metadata_class_init (RSMetadataClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = rs_metadata_dispose; object_class->finalize = rs_metadata_finalize; } static void rs_metadata_init (RSMetadata *metadata) { gint i; metadata->dispose_has_run = FALSE; metadata->make = MAKE_UNKNOWN; metadata->make_ascii = NULL; metadata->model_ascii = NULL; metadata->time_ascii = NULL; metadata->timestamp = -1; metadata->orientation = 0; metadata->aperture = -1.0; metadata->iso = 0; metadata->shutterspeed = -1.0; metadata->thumbnail_start = 0; metadata->thumbnail_length = 0; metadata->preview_start = 0; metadata->preview_length = 0; metadata->preview_planar_config = 0; metadata->preview_width = 0; metadata->preview_height = 0; metadata->cam_mul[0] = -1.0; metadata->contrast = -1.0; metadata->saturation = -1.0; metadata->color_tone = -1.0; metadata->focallength = -1; for(i=0;i<4;i++) metadata->cam_mul[i] = 1.0f; metadata->thumbnail = NULL; /* Lens info */ metadata->lens_id = -1; metadata->lens_min_focal = -1.0; metadata->lens_max_focal = -1.0; metadata->lens_min_aperture = -1.0; metadata->lens_max_aperture = -1.0; metadata->lens_identifier = NULL; metadata->fixed_lens_identifier = NULL; } RSMetadata* rs_metadata_new (void) { return g_object_new (RS_TYPE_METADATA, NULL); } #define METACACHEVERSION 7 void rs_metadata_cache_save(RSMetadata *metadata, const gchar *filename) { gchar *basename; gchar *dotdir = rs_dotdir_get(filename); gchar *cache_filename; gchar *thumb_filename; xmlTextWriterPtr writer; static GStaticMutex lock = G_STATIC_MUTEX_INIT; if (!dotdir) return; g_static_mutex_lock(&lock); basename = g_path_get_basename(filename); cache_filename = g_strdup_printf("%s/%s.metacache.xml", dotdir, basename); writer = xmlNewTextWriterFilename(cache_filename, 0); if (writer) { xmlTextWriterSetIndent(writer, 1); xmlTextWriterStartDocument(writer, NULL, "ISO-8859-1", NULL); xmlTextWriterStartElement(writer, BAD_CAST "rawstudio-metadata"); xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "version", "%d", METACACHEVERSION); if (metadata->make != MAKE_UNKNOWN) xmlTextWriterWriteFormatElement(writer, BAD_CAST "make", "%d", metadata->make); if (metadata->make_ascii) xmlTextWriterWriteFormatElement(writer, BAD_CAST "make_ascii","%s", metadata->make_ascii); if (metadata->model_ascii) xmlTextWriterWriteFormatElement(writer, BAD_CAST "model_ascii", "%s", metadata->model_ascii); if (metadata->time_ascii) xmlTextWriterWriteFormatElement(writer, BAD_CAST "time_ascii", "%s", metadata->time_ascii); if (metadata->timestamp > -1) xmlTextWriterWriteFormatElement(writer, BAD_CAST "timestamp", "%d", metadata->timestamp); /* Can we make orientation conditional? */ xmlTextWriterWriteFormatElement(writer, BAD_CAST "orientation", "%u", metadata->orientation); if (metadata->aperture > -1.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "aperture", "%f", metadata->aperture); if (metadata->iso > 0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "iso", "%u", metadata->iso); if (metadata->shutterspeed > -1.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "shutterspeed", "%f", metadata->shutterspeed); if (metadata->cam_mul[0] > 0.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "cam_mul", "%f %f %f %f", metadata->cam_mul[0], metadata->cam_mul[1], metadata->cam_mul[2], metadata->cam_mul[3]); if (metadata->contrast > -1.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "contrast", "%f", metadata->contrast); if (metadata->saturation > -1.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "saturation", "%f", metadata->saturation); if (metadata->color_tone > -1.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "color_tone", "%f", metadata->color_tone); if (metadata->focallength > 0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "focallength", "%d", metadata->focallength); if (metadata->lens_id > -1.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "lens_id", "%d", metadata->lens_id); if (metadata->lens_min_focal > -1) xmlTextWriterWriteFormatElement(writer, BAD_CAST "lens_min_focal", "%f", metadata->lens_min_focal); if (metadata->lens_max_focal > -1.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "lens_max_focal", "%f", metadata->lens_max_focal); if (metadata->lens_min_aperture > -1.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "lens_min_aperture", "%f", metadata->lens_min_aperture); if (metadata->lens_max_aperture > -1.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "lens_max_aperture", "%f", metadata->lens_max_aperture); if (metadata->fixed_lens_identifier) xmlTextWriterWriteFormatElement(writer, BAD_CAST "fixed_lens_identifier", "%s", metadata->fixed_lens_identifier); xmlTextWriterEndDocument(writer); xmlFreeTextWriter(writer); } g_free(cache_filename); g_static_mutex_unlock(&lock); if (metadata->thumbnail) { thumb_filename = g_strdup_printf("%s/%s.thumb.jpg", dotdir, basename); gdk_pixbuf_save(metadata->thumbnail, thumb_filename, "jpeg", NULL, "quality", "90", NULL); g_free(thumb_filename); } g_free(basename); } static gboolean rs_metadata_cache_load(RSMetadata *metadata, const gchar *filename) { gboolean ret = FALSE; gchar *basename; gchar *dotdir = rs_dotdir_get(filename); gchar *cache_filename; gchar *thumb_filename; xmlDocPtr doc; xmlNodePtr cur; xmlChar *val; gint version = 0; if (!dotdir) return FALSE; basename = g_path_get_basename(filename); cache_filename = g_strdup_printf("%s/%s.metacache.xml", dotdir, basename); if (!g_file_test(cache_filename, G_FILE_TEST_IS_REGULAR)) { g_free(basename); g_free(cache_filename); return FALSE; } doc = xmlParseFile(cache_filename); if(!doc) return FALSE; cur = xmlDocGetRootElement(doc); if ((!xmlStrcmp(cur->name, BAD_CAST "rawstudio-metadata"))) { val = xmlGetProp(cur, BAD_CAST "version"); if (val) version = atoi((gchar *) val); } if (version == METACACHEVERSION) { cur = cur->xmlChildrenNode; while(cur) { if ((!xmlStrcmp(cur->name, BAD_CAST "make"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->make = atoi((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "make_ascii"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->make_ascii = g_strdup((gchar *)val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "model_ascii"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->model_ascii = g_strdup((gchar *)val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "time_ascii"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->time_ascii = g_strdup((gchar *)val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "timestamp"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->timestamp = atoi((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "orientation"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->orientation = atoi((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "aperture"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->aperture = rs_atof((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "iso"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->iso = atoi((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "shutterspeed"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->shutterspeed = rs_atof((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "cam_mul"))) { gchar **vals; val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); vals = g_strsplit((gchar *)val, " ", 4); if (vals[0]) { metadata->cam_mul[0] = rs_atof((gchar *) vals[0]); if (vals[1]) { metadata->cam_mul[1] = rs_atof((gchar *) vals[1]); if (vals[2]) { metadata->cam_mul[2] = rs_atof((gchar *) vals[2]); if (vals[3]) metadata->cam_mul[3] = rs_atof((gchar *) vals[3]); } } } g_strfreev(vals); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "contrast"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->contrast = rs_atof((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "saturation"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->saturation = rs_atof((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "color_tone"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->color_tone = rs_atof((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "focallength"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->focallength = atoi((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "lens_id"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->lens_id = atoi((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "lens_min_focal"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->lens_min_focal = atof((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "lens_max_focal"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->lens_max_focal = atof((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "lens_min_aperture"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->lens_min_aperture = atof((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "lens_max_aperture"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->lens_max_aperture = atof((gchar *) val); xmlFree(val); } else if ((!xmlStrcmp(cur->name, BAD_CAST "fixed_lens_identifier"))) { val = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1); metadata->fixed_lens_identifier = g_strdup((gchar *)val); xmlFree(val); } cur = cur->next; } ret = TRUE; } xmlFreeDoc(doc); g_free(cache_filename); /* If the version is less than 4, delete the PNG thunbnail, we're using JPEG now */ if (version < 4) { thumb_filename = g_strdup_printf("%s/%s.thumb.png", dotdir, basename); g_unlink(thumb_filename); g_free(thumb_filename); } if (ret == TRUE) { thumb_filename = g_strdup_printf("%s/%s.thumb.jpg", dotdir, basename); metadata->thumbnail = gdk_pixbuf_new_from_file(thumb_filename, NULL); g_free(thumb_filename); if (!metadata->thumbnail) ret = FALSE; } g_free(basename); return ret; } #undef METACACHEVERSION static void generate_lens_identifier(RSMetadata *meta) { /* Check if we already have an identifier from camera */ if (meta->fixed_lens_identifier) { meta->lens_identifier = meta->fixed_lens_identifier; return; } /* These lenses are identified with varying aperture for lens depending on actual focal length. We fix this by setting the correct aperture values, so the lens only will show up once in the lens db editor */ rs_lens_fix(meta); /* If this generated a lens identifier return that! */ if (meta->lens_identifier) return; /* Build identifier string */ GString *identifier = g_string_new(""); if (meta->lens_id > 0) g_string_append_printf(identifier, "ID:%d ",meta->lens_id); if (meta->lens_max_focal > 0) g_string_append_printf(identifier, "maxF:%.0f ",meta->lens_max_focal); if (meta->lens_min_focal > 0) g_string_append_printf(identifier, "minF:%.0f ",meta->lens_min_focal); if (meta->lens_max_aperture > 0) g_string_append_printf(identifier, "maxF:%.1f ",meta->lens_max_aperture); if (meta->lens_min_aperture > 0) g_string_append_printf(identifier, "minF:%.0f ",meta->lens_min_aperture); if (identifier->len > 0) meta->lens_identifier = g_strdup(identifier->str); else { /* Most likely a hacked compact */ if (meta->make_ascii > 0) g_string_append_printf(identifier, "make:%s ",meta->make_ascii); if (meta->model_ascii > 0) g_string_append_printf(identifier, "model:%s ",meta->model_ascii); if (identifier->len > 0) meta->lens_identifier = g_strdup(identifier->str); } g_string_free(identifier, TRUE); } RSMetadata * rs_metadata_new_from_file(const gchar *filename) { RSMetadata *metadata = rs_metadata_new(); if (!rs_metadata_cache_load(metadata, filename)) { rs_metadata_load_from_file(metadata, filename); rs_metadata_cache_save(metadata, filename); } generate_lens_identifier(metadata); return metadata; } gboolean rs_metadata_load(RSMetadata *metadata, const gchar *filename) { if (!rs_metadata_cache_load(metadata, filename)) { if (rs_metadata_load_from_file(metadata, filename)) { rs_metadata_cache_save(metadata, filename); generate_lens_identifier(metadata); return TRUE; } return FALSE; } generate_lens_identifier(metadata); return TRUE; } gboolean rs_metadata_load_from_file(RSMetadata *metadata, const gchar *filename) { gboolean ret = FALSE; RAWFILE *rawfile; g_assert(filename != NULL); g_assert(RS_IS_METADATA(metadata)); rawfile = raw_open_file(filename); if (rawfile) { ret = rs_filetype_meta_load(filename, metadata, rawfile, 0); raw_close_file(rawfile); } return ret; } void rs_metadata_normalize_wb(RSMetadata *metadata) { gdouble div; g_assert(RS_IS_METADATA(metadata)); if ((metadata->cam_mul[1]+metadata->cam_mul[3])!=0.0) { div = 2/(metadata->cam_mul[1]+metadata->cam_mul[3]); metadata->cam_mul[0] *= div; metadata->cam_mul[1] = 1.0; metadata->cam_mul[2] *= div; metadata->cam_mul[3] = 1.0; } return; } gchar * rs_metadata_get_short_description(RSMetadata *metadata) { GString *label = g_string_new(""); gchar *ret = NULL; g_assert(RS_IS_METADATA(metadata)); if (metadata->focallength>0) g_string_append_printf(label, _("%dmm "), metadata->focallength); if (metadata->shutterspeed > 0.0 && metadata->shutterspeed < 4) g_string_append_printf(label, _("%.1fs "), 1/metadata->shutterspeed); else if (metadata->shutterspeed >= 4) g_string_append_printf(label, _("1/%.0fs "), metadata->shutterspeed); if (metadata->aperture!=0.0) g_string_append_printf(label, _("F/%.1f "), metadata->aperture); if (metadata->iso!=0) g_string_append_printf(label, _("ISO%d"), metadata->iso); ret = label->str; g_string_free(label, FALSE); return ret; } GdkPixbuf * rs_metadata_get_thumbnail(RSMetadata *metadata) { g_assert(RS_IS_METADATA(metadata)); if (metadata->thumbnail) g_object_ref(metadata->thumbnail); return metadata->thumbnail; } /** * Deletes the on-disk cache (if any) for a photo * @param filename The full path to the photo - not the cache itself */ void rs_metadata_delete_cache(const gchar *filename) { gchar *basename; gchar *dotdir = rs_dotdir_get(filename); gchar *cache_filename; gchar *thumb_filename; if (!dotdir) return; g_assert(filename); basename = g_path_get_basename(filename); /* Delete the metadata cache itself */ cache_filename = g_strdup_printf("%s/%s.metacache.xml", dotdir, basename); g_unlink(cache_filename); g_free(cache_filename); /* Delete the thumbnail */ thumb_filename = g_strdup_printf("%s/%s.thumb.jpg", dotdir, basename); g_unlink(thumb_filename); g_free(thumb_filename); /* Clean up please */ g_free(dotdir); g_free(basename); } rawstudio-2.0/librawstudio/rs-job-queue.h0000644000175000017500000000631111526533645015527 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_JOB_QUEUE_H #define RS_JOB_QUEUE_H #include G_BEGIN_DECLS #define RS_TYPE_JOB_QUEUE rs_job_queue_get_type() #define RS_JOB_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_JOB_QUEUE, RSJobQueue)) #define RS_JOB_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_JOB_QUEUE, RSJobQueueClass)) #define RS_IS_JOB_QUEUE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_JOB_QUEUE)) #define RS_IS_JOB_QUEUE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_JOB_QUEUE)) #define RS_JOB_QUEUE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_JOB_QUEUE, RSJobQueueClass)) typedef struct _RSJobQueueSlot RSJobQueueSlot; typedef struct _RSJob RSJob; typedef struct _RSJobQueue RSJobQueue; typedef struct { GObjectClass parent_class; } RSJobQueueClass; typedef gpointer (*RSJobFunc)(RSJobQueueSlot *, gpointer); GType rs_job_queue_get_type(void); /** * Add a new job to the job queue * @note When func is called, it WILL be from another thread, it may be * required to acquire the GDK lock if any GTK+ stuff is done in the * callback! * @param func A function to call for performing the job * @param data Data to pass to func * @param waitable If TRUE, rs_job_queue_wait() will wait until completion */ RSJob * rs_job_queue_add_job(RSJobFunc func, gpointer data, gboolean waitable); /** * Wait (hang) until a job is finished and then free the memory allocated to job * @param job The RSJob to wait for * @return The value returned by the func given to rs_job_queue_add() */ gpointer rs_job_queue_wait(RSJob *job); /** * Update the job description * @note You should NOT have aquired the GDK thread lock when calling this * function. * @param slot A job_slot as recieved in the job callback function * @param description The new description or NULL to show nothing */ void rs_job_update_description(RSJobQueueSlot *slot, const gchar *description); /** * Update the job progress bar * @note You should NOT have aquired the GDK thread lock when calling this * function. * @param slot A job_slot as recieved in the job callback function * @param fraction A value between 0.0 and 1.0 to set the progress bar at * the specific fraction or -1.0 to pulse the progress bar. */ void rs_job_update_progress(RSJobQueueSlot *slot, const gdouble fraction); G_END_DECLS #endif /* RS_JOB_QUEUE_H */ rawstudio-2.0/librawstudio/rs-io-job-prefetch.c0000644000175000017500000000541711526533645016611 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* readahead() on Linux */ #if __gnu_linux__ #define _GNU_SOURCE #endif /* __gnu_linux__ */ #include #include #include #include #include "rs-io.h" #include "rs-io-job-prefetch.h" typedef struct { RSIoJob parent; gboolean dispose_has_run; gchar *path; } RSIoJobPrefetch; G_DEFINE_TYPE(RSIoJobPrefetch, rs_io_job_prefetch, RS_TYPE_IO_JOB) static void execute(RSIoJob *job) { gint fd; struct stat st; RSIoJobPrefetch *prefetch = RS_IO_JOB_PREFETCH(job); stat(prefetch->path, &st); if (st.st_size > 0) { fd = open(prefetch->path, O_RDONLY); if (fd > 0) { gint bytes_read = 0; #if __gnu_linux__ while(bytes_read < st.st_size) { rs_io_lock(); gint length = MIN(st.st_size-bytes_read, 1024*1024); readahead(fd, bytes_read, length); bytes_read += length; rs_io_unlock(); } #else gchar *tmp = g_new(gchar, st.st_size); while(bytes_read < st.st_size) { rs_io_lock(); bytes_read += read(fd, tmp+bytes_read, MIN(st.st_size-bytes_read, 1024*1024)); rs_io_unlock(); } g_free(tmp); #endif /* __gnu_linux__ */ } close(fd); } } static void rs_io_job_prefetch_dispose(GObject *object) { RSIoJobPrefetch *prefetch = RS_IO_JOB_PREFETCH(object); if (!prefetch->dispose_has_run) { prefetch->dispose_has_run = TRUE; g_free(prefetch->path); } G_OBJECT_CLASS(rs_io_job_prefetch_parent_class)->dispose(object); } static void rs_io_job_prefetch_class_init(RSIoJobPrefetchClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); RSIoJobClass *job_class = RS_IO_JOB_CLASS(klass); object_class->dispose = rs_io_job_prefetch_dispose; job_class->execute = execute; } static void rs_io_job_prefetch_init(RSIoJobPrefetch *prefetch) { } RSIoJob * rs_io_job_prefetch_new(const gchar *path) { RSIoJobPrefetch *prefetch = g_object_new(RS_TYPE_IO_JOB_PREFETCH, NULL); prefetch->path = g_strdup(path); return RS_IO_JOB(prefetch); } rawstudio-2.0/librawstudio/rs-math.c0000644000175000017500000004231011526533645014556 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include "rs-math.h" /* luminance weights, notice that these is used for linear data */ #define RLUM (0.3086) #define GLUM (0.6094) #define BLUM (0.0820) static void matrix4_zshear (RS_MATRIX4 *matrix, double dx, double dy); static void matrix4_xrotate(RS_MATRIX4 *matrix, double rs, double rc); static void matrix4_yrotate(RS_MATRIX4 *matrix, double rs, double rc); static void matrix4_zrotate(RS_MATRIX4 *matrix, double rs, double rc); static void matrix4_affine_transform_3dpoint(RS_MATRIX4 *matrix, double x, double y, double z, double *tx, double *ty, double *tz); void printvec(const char *str, const RS_VECTOR3 *vec) { printf("%s: [ %.05f %.05f %.05f ]\n", str, vec->x, vec->y, vec->z); } void printmat3(RS_MATRIX3 *mat) { int y; printf("M: matrix(\n"); for(y=0; y<3; y++) { printf("\t[ %f, ",mat->coeff[y][0]); printf("%f, ",mat->coeff[y][1]); printf("%f ",mat->coeff[y][2]); printf("],\n"); } printf(")\n"); } void printmat(RS_MATRIX4 *mat) { int x, y; for(y=0; y<4; y++) { for(x=0; x<4; x++) printf("%f ",mat->coeff[y][x]); printf("\n"); } printf("\n"); } float vector3_max(const RS_VECTOR3 *vec) { float max = 0.0; max = MAX(max, vec->x); max = MAX(max, vec->y); max = MAX(max, vec->z); return max; } RS_MATRIX3 vector3_as_diagonal(const RS_VECTOR3 *vec) { RS_MATRIX3 result; matrix3_identity(&result); result.coeff[0][0] = vec->x; result.coeff[1][1] = vec->y; result.coeff[2][2] = vec->z; return result; } void matrix4_identity (RS_MATRIX4 *matrix) { static const RS_MATRIX4 identity = { { { 1.0, 0.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0, 0.0 }, { 0.0, 0.0, 1.0, 0.0 }, { 0.0, 0.0, 0.0, 1.0 } } }; *matrix = identity; } void matrix4_multiply(const RS_MATRIX4 *left, RS_MATRIX4 *right, RS_MATRIX4 *result) { int i, j; RS_MATRIX4 tmp; double t1, t2, t3, t4; for (i = 0; i < 4; i++) { t1 = left->coeff[i][0]; t2 = left->coeff[i][1]; t3 = left->coeff[i][2]; t4 = left->coeff[i][3]; for (j = 0; j < 4; j++) { tmp.coeff[i][j] = t1 * right->coeff[0][j]; tmp.coeff[i][j] += t2 * right->coeff[1][j]; tmp.coeff[i][j] += t3 * right->coeff[2][j]; tmp.coeff[i][j] += t4 * right->coeff[3][j]; } } *result = tmp; } /* copied almost verbatim from dcraw.c:pseudoinverse() - but this one doesn't transpose */ void matrix4_color_invert(const RS_MATRIX4 *in, RS_MATRIX4 *out) { RS_MATRIX4 tmp; double work[3][6], num; int i, j, k; matrix4_identity(&tmp); for (i=0; i < 3; i++) { for (j=0; j < 6; j++) work[i][j] = j == i+3; for (j=0; j < 3; j++) for (k=0; k < 3; k++) work[i][j] += in->coeff[k][i] * in->coeff[k][j]; } for (i=0; i < 3; i++) { num = work[i][i]; for (j=0; j < 6; j++) work[i][j] /= num; for (k=0; k < 3; k++) { if (k==i) continue; num = work[k][i]; for (j=0; j < 6; j++) work[k][j] -= work[i][j] * num; } } for (i=0; i < 3; i++) for (j=0; j < 3; j++) for (tmp.coeff[i][j]=k=0; k < 3; k++) tmp.coeff[i][j] += work[j][k+3] * in->coeff[i][k]; for (i=0; i < 4; i++) for (j=0; j < 4; j++) out->coeff[i][j] = tmp.coeff[j][i]; } static void matrix4_zshear (RS_MATRIX4 *matrix, double dx, double dy) { RS_MATRIX4 zshear; zshear.coeff[0][0] = 1.0; zshear.coeff[1][0] = 0.0; zshear.coeff[2][0] = dx; zshear.coeff[3][0] = 0.0; zshear.coeff[0][1] = 0.0; zshear.coeff[1][1] = 1.0; zshear.coeff[2][1] = dy; zshear.coeff[3][1] = 0.0; zshear.coeff[0][2] = 0.0; zshear.coeff[1][2] = 0.0; zshear.coeff[2][2] = 1.0; zshear.coeff[3][2] = 0.0; zshear.coeff[0][3] = 0.0; zshear.coeff[1][3] = 0.0; zshear.coeff[2][3] = 0.0; zshear.coeff[3][3] = 1.0; matrix4_multiply(&zshear, matrix, matrix); } void matrix4_to_matrix4int(RS_MATRIX4 *matrix, RS_MATRIX4Int *matrixi) { int a,b; for(a=0;a<4;a++) for(b=0;b<4;b++) { /* Check that a (unsigned 16 bit) x (matrix coeff shifted up RESOLUTION) fits within signed 32 bit value */ /* Adjust this if MATRIX_RESOLUTION is adjusted */ g_assert((matrix->coeff[a][b] < 16.0) && (matrix->coeff[a][b] > -16.0)); matrixi->coeff[a][b] = (int) (matrix->coeff[a][b] * (double) (1<coeff[row][col]; for(col=0;col<3;col++) mat->coeff[row][col] /= lum; } return; } void matrix4_color_saturate(RS_MATRIX4 *mat, double sat) { RS_MATRIX4 tmp; if (sat == 1.0) return; tmp.coeff[0][0] = (1.0-sat)*RLUM + sat; tmp.coeff[1][0] = (1.0-sat)*RLUM; tmp.coeff[2][0] = (1.0-sat)*RLUM; tmp.coeff[3][0] = 0.0; tmp.coeff[0][1] = (1.0-sat)*GLUM; tmp.coeff[1][1] = (1.0-sat)*GLUM + sat; tmp.coeff[2][1] = (1.0-sat)*GLUM; tmp.coeff[3][1] = 0.0; tmp.coeff[0][2] = (1.0-sat)*BLUM; tmp.coeff[1][2] = (1.0-sat)*BLUM; tmp.coeff[2][2] = (1.0-sat)*BLUM + sat; tmp.coeff[3][2] = 0.0; tmp.coeff[0][3] = 0.0; tmp.coeff[1][3] = 0.0; tmp.coeff[2][3] = 0.0; tmp.coeff[3][3] = 1.0; matrix4_multiply(mat, &tmp, mat); } static void matrix4_affine_transform_3dpoint(RS_MATRIX4 *matrix, double x, double y, double z, double *tx, double *ty, double *tz) { *tx = x*matrix->coeff[0][0] + y*matrix->coeff[0][1] + z*matrix->coeff[0][2] + matrix->coeff[0][3]; *ty = x*matrix->coeff[1][0] + y*matrix->coeff[1][1] + z*matrix->coeff[1][2] + matrix->coeff[1][3]; *tz = x*matrix->coeff[2][0] + y*matrix->coeff[2][1] + z*matrix->coeff[2][2] + matrix->coeff[2][3]; } void matrix4_color_hue(RS_MATRIX4 *mat, double rot) { RS_MATRIX4 tmp; double mag; double lx, ly, lz; double xrs, xrc; double yrs, yrc; double zrs, zrc; double zsx, zsy; if (rot==0.0) return; matrix4_identity(&tmp); /* rotate the grey vector into positive Z */ mag = sqrt(2.0); xrs = 1.0/mag; xrc = 1.0/mag; matrix4_xrotate(&tmp, xrs, xrc); mag = sqrt(3.0); yrs = -1.0/mag; yrc = sqrt(2.0)/mag; matrix4_yrotate(&tmp, yrs ,yrc); /* shear the space to make the luminance plane horizontal */ matrix4_affine_transform_3dpoint(&tmp,RLUM,GLUM,BLUM,&lx,&ly,&lz); zsx = lx/lz; zsy = ly/lz; matrix4_zshear(&tmp, zsx, zsy); /* rotate the hue */ zrs = sin(rot*M_PI/180.0); zrc = cos(rot*M_PI/180.0); matrix4_zrotate(&tmp, zrs, zrc); /* unshear the space to put the luminance plane back */ matrix4_zshear(&tmp, -zsx, -zsy); /* rotate the grey vector back into place */ matrix4_yrotate(&tmp,-yrs,yrc); matrix4_xrotate(&tmp,-xrs,xrc); matrix4_multiply(mat,&tmp,mat); } void matrix4_color_exposure(RS_MATRIX4 *mat, double exp) { double expcom = pow(2.0, exp); mat->coeff[0][0] *= expcom; mat->coeff[0][1] *= expcom; mat->coeff[0][2] *= expcom; mat->coeff[1][0] *= expcom; mat->coeff[1][1] *= expcom; mat->coeff[1][2] *= expcom; mat->coeff[2][0] *= expcom; mat->coeff[2][1] *= expcom; mat->coeff[2][2] *= expcom; return; } void matrix3_identity (RS_MATRIX3 *matrix) { static const RS_MATRIX3 identity = { { { 1.0, 0.0, 0.0 }, { 0.0, 1.0, 0.0 }, { 0.0, 0.0, 1.0 } } }; *matrix = identity; } RS_MATRIX3 matrix3_invert(const RS_MATRIX3 *matrix) { int j,k; double a00 = matrix->coeff[0][0]; double a01 = matrix->coeff[0][1]; double a02 = matrix->coeff[0][2]; double a10 = matrix->coeff[1][0]; double a11 = matrix->coeff[1][1]; double a12 = matrix->coeff[1][2]; double a20 = matrix->coeff[2][0]; double a21 = matrix->coeff[2][1]; double a22 = matrix->coeff[2][2]; double temp[3][3]; temp[0][0] = a11 * a22 - a21 * a12; temp[0][1] = a21 * a02 - a01 * a22; temp[0][2] = a01 * a12 - a11 * a02; temp[1][0] = a20 * a12 - a10 * a22; temp[1][1] = a00 * a22 - a20 * a02; temp[1][2] = a10 * a02 - a00 * a12; temp[2][0] = a10 * a21 - a20 * a11; temp[2][1] = a20 * a01 - a00 * a21; temp[2][2] = a00 * a11 - a10 * a01; double det = (a00 * temp[0][0] + a01 * temp[1][0] + a02 * temp[2][0]); RS_MATRIX3 B; for (j = 0; j < 3; j++) for (k = 0; k < 3; k++) B.coeff[j][k] = temp[j][k] / det; return B; } void matrix3_multiply(const RS_MATRIX3 *left, const RS_MATRIX3 *right, RS_MATRIX3 *result) { int i, j; RS_MATRIX3 tmp; double t1, t2, t3; for (i = 0; i < 3; i++) { t1 = left->coeff[i][0]; t2 = left->coeff[i][1]; t3 = left->coeff[i][2]; for (j = 0; j < 3; j++) { tmp.coeff[i][j] = t1 * right->coeff[0][j]; tmp.coeff[i][j] += t2 * right->coeff[1][j]; tmp.coeff[i][j] += t3 * right->coeff[2][j]; } } *result = tmp; return; } RS_VECTOR3 vector3_multiply_matrix(const RS_VECTOR3 *vec, const RS_MATRIX3 *matrix) { RS_VECTOR3 result; result.x = vec->x * matrix->coeff[0][0] + vec->y * matrix->coeff[0][1] + vec->z * matrix->coeff[0][2]; result.y = vec->x * matrix->coeff[1][0] + vec->y * matrix->coeff[1][1] + vec->z * matrix->coeff[1][2]; result.z = vec->x * matrix->coeff[2][0] + vec->y * matrix->coeff[2][1] + vec->z * matrix->coeff[2][2]; return result; } float matrix3_max(const RS_MATRIX3 *matrix) { gfloat max = 0.0; int i, j; for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) max = MAX(max, matrix->coeff[i][j]); return max; } void matrix3_scale(RS_MATRIX3 *matrix, const float scale, RS_MATRIX3 *result) { int i, j; for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) result->coeff[i][j] = matrix->coeff[i][j] * scale; } void matrix3_interpolate(const RS_MATRIX3 *a, const RS_MATRIX3 *b, const float alpha, RS_MATRIX3 *result) { #define LERP(a,b,g) (((b) - (a)) * (g) + (a)) int i, j; for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) result->coeff[i][j] = LERP(a->coeff[i][j], b->coeff[i][j], alpha); #undef LERP } float matrix3_weight(const RS_MATRIX3 *mat) { float weight = mat->coeff[0][0] + mat->coeff[0][1] + mat->coeff[0][2] + mat->coeff[1][0] + mat->coeff[1][1] + mat->coeff[1][2] + mat->coeff[2][0] + mat->coeff[2][1] + mat->coeff[2][2]; return(weight); } void matrix3_to_matrix3int(RS_MATRIX3 *matrix, RS_MATRIX3Int *matrixi) { int a,b; for(a=0;a<3;a++) for(b=0;b<3;b++) { /* Check that a (unsigned 16 bit) x (matrix coeff shifted up RESOLUTION) fits within signed 32 bit value */ /* Adjust this if MATRIX_RESOLUTION is adjusted */ g_assert((matrix->coeff[a][b] < 16.0) && (matrix->coeff[a][b] > -16.0)); matrixi->coeff[a][b] = (int) (matrix->coeff[a][b] * (double) (1<coeff[0][0]*mat->coeff[1][1] - mat->coeff[0][1]*mat->coeff[1][0]); matrix3_identity(&tmp); tmp.coeff[0][0] = mat->coeff[1][1] * reverse_det; tmp.coeff[0][1] = -mat->coeff[0][1] * reverse_det; tmp.coeff[1][0] = -mat->coeff[1][0] * reverse_det; tmp.coeff[1][1] = mat->coeff[0][0] * reverse_det; tmp.coeff[2][0] = (mat->coeff[1][0]*mat->coeff[2][1] - mat->coeff[1][1]*mat->coeff[2][0])/ (mat->coeff[0][0]*mat->coeff[1][1] - mat->coeff[0][1]*mat->coeff[1][0]); tmp.coeff[2][1] = -(mat->coeff[0][0]*mat->coeff[2][1] - mat->coeff[0][1]*mat->coeff[2][0])/ (mat->coeff[0][0]*mat->coeff[1][1] - mat->coeff[0][1]*mat->coeff[1][0]); *mat = tmp; } void matrix3_affine_scale(RS_MATRIX3 *matrix, double xscale, double yscale) { RS_MATRIX3 tmp; matrix3_identity(&tmp); tmp.coeff[0][0] *= xscale; tmp.coeff[1][1] *= yscale; matrix3_multiply(matrix, &tmp, matrix); return; } void matrix3_affine_translate(RS_MATRIX3 *matrix, double xtrans, double ytrans) { matrix->coeff[2][0] += xtrans; matrix->coeff[2][1] += ytrans; return; } void matrix3_affine_rotate(RS_MATRIX3 *matrix, double degrees) { RS_MATRIX3 tmp; const double s = sin (degrees * M_PI / 180.0); const double c = cos (degrees * M_PI / 180.0); matrix3_identity(&tmp); tmp.coeff[0][0] = c; tmp.coeff[0][1] = s; tmp.coeff[1][0] = -s; tmp.coeff[1][1] = c; matrix3_multiply(matrix, &tmp, matrix); return; } inline void matrix3_affine_transform_point(RS_MATRIX3 *matrix, double x, double y, double *x2, double *y2) { const double x_tmp = x*matrix->coeff[0][0] + y*matrix->coeff[1][0] + matrix->coeff[2][0]; const double y_tmp = x*matrix->coeff[0][1] + y*matrix->coeff[1][1] + matrix->coeff[2][1]; *x2 = x_tmp; *y2 = y_tmp; return; } inline void matrix3_affine_transform_point_int(RS_MATRIX3 *matrix, int x, int y, int *x2, int *y2) { const int x_tmp = (int) (x*matrix->coeff[0][0] + y*matrix->coeff[1][0] + matrix->coeff[2][0]); const int y_tmp = (int) (x*matrix->coeff[0][1] + y*matrix->coeff[1][1] + matrix->coeff[2][1]); *x2 = x_tmp; *y2 = y_tmp; return; } void matrix3_affine_get_minmax(RS_MATRIX3 *matrix, double *minx, double *miny, double *maxx, double *maxy, double x1, double y1, double x2, double y2) { double x,y; *minx = *miny = 100000.0; *maxx = *maxy = 0.0; matrix3_affine_transform_point(matrix, x1, y1, &x, &y); if (x<*minx) *minx=x; if (x>*maxx) *maxx=x; if (y<*miny) *miny=y; if (y>*maxy) *maxy=y; matrix3_affine_transform_point(matrix, x2, y1, &x, &y); if (x<*minx) *minx=x; if (x>*maxx) *maxx=x; if (y<*miny) *miny=y; if (y>*maxy) *maxy=y; matrix3_affine_transform_point(matrix, x1, y2, &x, &y); if (x<*minx) *minx=x; if (x>*maxx) *maxx=x; if (y<*miny) *miny=y; if (y>*maxy) *maxy=y; matrix3_affine_transform_point(matrix, x2, y2, &x, &y); if (x<*minx) *minx=x; if (x>*maxx) *maxx=x; if (y<*miny) *miny=y; if (y>*maxy) *maxy=y; return; } /** * Interpolate an array of unsigned integers * @param input_dataset An array of unsigned integers to be inperpolated * @param input_length The length of the input array * @param output_dataset An array of unsigned integers for output or NULL * @param output_length The length of the output array * @param max A pointer to an unsigned int or NULL * @return the interpolated dataset */ unsigned int * interpolate_dataset_int(unsigned int *input_dataset, unsigned int input_length, unsigned int *output_dataset, unsigned int output_length, unsigned int *max) { const double scale = ((double)input_length) / ((double)output_length); int i, source1, source2; float source; float weight1, weight2; if (output_dataset == NULL) output_dataset = malloc(sizeof(unsigned int)*output_length); for(i=0;i (*max)) *max = output_dataset[i]; } return output_dataset; } rawstudio-2.0/librawstudio/rs-tiff-ifd.c0000644000175000017500000001076011526533645015321 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include "rs-tiff-ifd.h" G_DEFINE_TYPE (RSTiffIfd, rs_tiff_ifd, G_TYPE_OBJECT) static void read_entries(RSTiffIfd *ifd); enum { PROP_0, PROP_TIFF, PROP_OFFSET, PROP_NEXT_IFD, }; static void rs_tiff_ifd_get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSTiffIfd *ifd = RS_TIFF_IFD(object); switch (property_id) { case PROP_NEXT_IFD: g_value_set_uint(value, ifd->next_ifd); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void rs_tiff_ifd_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSTiffIfd *ifd = RS_TIFF_IFD(object); switch (property_id) { case PROP_TIFF: ifd->tiff = g_object_ref(g_value_get_object(value)); if (ifd->tiff && ifd->offset) RS_TIFF_IFD_GET_CLASS(ifd)->read(ifd); break; case PROP_OFFSET: ifd->offset = g_value_get_uint(value); if (ifd->tiff && ifd->offset) RS_TIFF_IFD_GET_CLASS(ifd)->read(ifd); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void rs_tiff_ifd_dispose(GObject *object) { RSTiffIfd *ifd = RS_TIFF_IFD(object); if (!ifd->dispose_has_run) { ifd->dispose_has_run = TRUE; g_object_unref(ifd->tiff); g_list_foreach(ifd->entries, (GFunc)g_object_unref, NULL); g_list_free(ifd->entries); } G_OBJECT_CLASS(rs_tiff_ifd_parent_class)->dispose (object); } static void rs_tiff_ifd_finalize(GObject *object) { G_OBJECT_CLASS(rs_tiff_ifd_parent_class)->finalize (object); } static void rs_tiff_ifd_class_init(RSTiffIfdClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = rs_tiff_ifd_get_property; object_class->set_property = rs_tiff_ifd_set_property; object_class->dispose = rs_tiff_ifd_dispose; object_class->finalize = rs_tiff_ifd_finalize; g_object_class_install_property(object_class, PROP_TIFF, g_param_spec_object( "tiff", "tiff", "The RSTiff associated with the RSTiffIfd", RS_TYPE_TIFF, G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE)); g_object_class_install_property(object_class, PROP_OFFSET, g_param_spec_uint( "offset", "offset", "IFD offset", 0, G_MAXUINT, 0, G_PARAM_CONSTRUCT_ONLY | G_PARAM_WRITABLE)); g_object_class_install_property(object_class, PROP_NEXT_IFD, g_param_spec_uint( "next-ifd", "next-ifd", "Offset for next ifd", 0, G_MAXUINT, 0, G_PARAM_READABLE)); klass->read = read_entries; } static void rs_tiff_ifd_init(RSTiffIfd *self) { } RSTiffIfd * rs_tiff_ifd_new(RSTiff *tiff, guint offset) { g_assert(RS_IS_TIFF(tiff)); return g_object_new(RS_TYPE_TIFF_IFD, "tiff", tiff, "offset", offset, NULL); } guint rs_tiff_ifd_get_next(RSTiffIfd *ifd) { g_assert(RS_IS_TIFF_IFD(ifd)); return ifd->next_ifd; } static void read_entries(RSTiffIfd *ifd) { gint i; ifd->num_entries = rs_tiff_get_ushort(ifd->tiff, ifd->offset); ifd->next_ifd = rs_tiff_get_uint(ifd->tiff, ifd->offset + 2 + ifd->num_entries*12); if (ifd->next_ifd == ifd->offset) ifd->next_ifd = 0; else if (ifd->next_ifd > (ifd->tiff->map_length-12)) ifd->next_ifd = 0; /* Read all entries */ for(i=0;inum_entries;i++) ifd->entries = g_list_append(ifd->entries, rs_tiff_ifd_entry_new(ifd->tiff, ifd->offset + 2 + i * 12)); } static gint _tag_search(RSTiffIfdEntry *entry, gushort tag) { return entry->tag - tag; } RSTiffIfdEntry * rs_tiff_ifd_get_entry_by_tag(RSTiffIfd *ifd, gushort tag) { g_assert(RS_IS_TIFF_IFD(ifd)); GList *found; RSTiffIfdEntry *ret = NULL; found = g_list_find_custom(ifd->entries, GUINT_TO_POINTER((guint) tag), (GCompareFunc) _tag_search); if (found) ret = g_object_ref(found->data); return ret; } rawstudio-2.0/librawstudio/rs-color-space-icc.c0000644000175000017500000000552711526533645016601 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rawstudio.h" G_DEFINE_TYPE(RSColorSpaceIcc, rs_color_space_icc, RS_TYPE_COLOR_SPACE) static const RSIccProfile *get_icc_profile(const RSColorSpace *color_space, gboolean linear_profile); static void rs_color_space_icc_dispose(GObject *object) { RSColorSpaceIcc *color_space_icc = RS_COLOR_SPACE_ICC(object); if (!color_space_icc->dispose_has_run) { color_space_icc->dispose_has_run = TRUE; if (color_space_icc->icc_profile) g_object_unref(color_space_icc->icc_profile); } G_OBJECT_CLASS(rs_color_space_icc_parent_class)->dispose(object); } static void rs_color_space_icc_class_init(RSColorSpaceIccClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->dispose = rs_color_space_icc_dispose; RSColorSpaceClass *colorclass = RS_COLOR_SPACE_CLASS(klass); colorclass->get_icc_profile = get_icc_profile; colorclass->name = "ICC derived color space"; colorclass->description = "ICC derived color space"; } static void rs_color_space_icc_init(RSColorSpaceIcc *color_space_icc) { } RSColorSpace * rs_color_space_icc_new_from_icc(RSIccProfile *icc_profile) { RSColorSpaceIcc *color_space_icc = g_object_new(RS_TYPE_COLOR_SPACE_ICC, NULL); if (RS_IS_ICC_PROFILE(icc_profile)) { color_space_icc->icc_profile = g_object_ref(icc_profile); /* FIXME: Some profiles will be nothing more than a fancy container * for a color spaces definition, we should recognize those cases and * try to convert them to RSColorSpace without the need for a CMS */ RS_COLOR_SPACE(color_space_icc)->flags |= RS_COLOR_SPACE_FLAG_REQUIRES_CMS; } return RS_COLOR_SPACE(color_space_icc); } RSColorSpace * rs_color_space_icc_new_from_file(const gchar *path) { RSIccProfile *icc_profile = rs_icc_profile_new_from_file(path); return rs_color_space_icc_new_from_icc(icc_profile); } static const RSIccProfile *get_icc_profile(const RSColorSpace *color_space, gboolean linear_profile) { RSColorSpaceIcc *color_space_icc = RS_COLOR_SPACE_ICC(color_space); return color_space_icc->icc_profile; } rawstudio-2.0/librawstudio/rs-image.h0000644000175000017500000000351011526533645014713 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_IMAGE_H #define RS_IMAGE_H #include G_BEGIN_DECLS #define RS_TYPE_IMAGE rs_image_get_type() #define RS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_IMAGE, RSImage)) #define RS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_IMAGE, RSImageClass)) #define RS_IS_IMAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_IMAGE)) #define RS_IS_IMAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_IMAGE)) #define RS_IMAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_IMAGE, RSImageClass)) typedef struct { GObjectClass parent_class; } RSImageClass; GType rs_image_get_type(void); extern RSImage * rs_image_new(gint width, gint height, gint number_of_planes); extern gint rs_image_get_width(RSImage *image); extern gint rs_image_get_height(RSImage *image); extern gint rs_image_get_number_of_planes(RSImage *image); extern gfloat * rs_image_get_plane(RSImage *image, gint plane_num); G_END_DECLS #endif /* RS_IMAGE_H */ rawstudio-2.0/librawstudio/rs-types.h0000644000175000017500000000434011526533645014777 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_TYPES_H #define RS_TYPES_H #include /* Defined in rawfile.c */ typedef struct _RAWFILE RAWFILE; /* Defined in rs-image.c */ typedef struct _RSImage RSImage; /* Defined in rs-image16.h */ typedef struct _rs_image16 RS_IMAGE16; /* Defined in rs-metadata.h */ typedef struct _RSMetadata RSMetadata; /* Defined in rs-color-transform.c */ typedef struct _RSColorTransform RSColorTransform; typedef struct { GObject parent; gboolean dispose_has_run; gchar *filename; guchar *map; gsize map_length; gushort byte_order; guchar tiff_version; guint first_ifd_offset; guint num_ifd; GList *ifds; GType ifd_type; GType ifd_entry_type; } RSTiff; typedef struct {double coeff[3][3]; } RS_MATRIX3; typedef struct {int coeff[3][3]; } RS_MATRIX3Int; typedef struct {double coeff[4][4]; } RS_MATRIX4; typedef struct {int coeff[4][4]; } RS_MATRIX4Int; typedef struct { union { gfloat x; gfloat X; gfloat R; gfloat h; gfloat fHueShift; }; union { gfloat y; gfloat Y; gfloat G; gfloat s; gfloat fSatScale; }; union { gfloat z; gfloat Z; gfloat B; gfloat v; gfloat fValScale; }; } RS_VECTOR3; typedef struct { gfloat x; gfloat y; gfloat padding_to_match_RS_VECTOR3; } RS_xy_COORD; typedef RS_VECTOR3 RS_XYZ_VECTOR; typedef struct { gint x1; gint y1; gint x2; gint y2; } RS_RECT; typedef enum { R = 0, G = 1, B = 2, G2 = 3 } RSColor; #endif /* RS_TYPES_H */ rawstudio-2.0/librawstudio/rs-math.h0000644000175000017500000000730711526533645014572 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_MATRIX_H #define RS_MATRIX_H #include "rs-types.h" #define MATRIX_RESOLUTION (11) /* defined in bits! */ #define MATRIX_RESOLUTION_ROUNDER (1024) /* Half of fixed point precision */ extern void printmat3(RS_MATRIX3 *mat); extern void printmat(RS_MATRIX4 *mat); extern void printvec(const char *str, const RS_VECTOR3 *vec); extern float vector3_max(const RS_VECTOR3 *vec); extern RS_MATRIX3 vector3_as_diagonal(const RS_VECTOR3 *vec); extern void matrix4_identity (RS_MATRIX4 *matrix); extern void matrix4_multiply(const RS_MATRIX4 *left, RS_MATRIX4 *right, RS_MATRIX4 *result); void matrix4_color_invert(const RS_MATRIX4 *in, RS_MATRIX4 *out); extern void matrix4_to_matrix4int(RS_MATRIX4 *matrix, RS_MATRIX4Int *matrixi); extern void matrix4_color_normalize(RS_MATRIX4 *mat); extern void matrix4_color_saturate(RS_MATRIX4 *mat, double sat); extern void matrix4_color_hue(RS_MATRIX4 *mat, double rot); extern void matrix4_color_exposure(RS_MATRIX4 *mat, double exp); extern void matrix3_to_matrix3int(RS_MATRIX3 *matrix, RS_MATRIX3Int *matrixi); extern void matrix3_identity (RS_MATRIX3 *matrix); extern RS_MATRIX3 matrix3_invert(const RS_MATRIX3 *matrix); extern void matrix3_multiply(const RS_MATRIX3 *left, const RS_MATRIX3 *right, RS_MATRIX3 *result); extern RS_VECTOR3 vector3_multiply_matrix(const RS_VECTOR3 *vec, const RS_MATRIX3 *matrix); extern void matrix3_scale(RS_MATRIX3 *matrix, const float scale, RS_MATRIX3 *result); extern float matrix3_max(const RS_MATRIX3 *matrix); void matrix3_interpolate(const RS_MATRIX3 *a, const RS_MATRIX3 *b, const float alpha, RS_MATRIX3 *result); extern float matrix3_weight(const RS_MATRIX3 *mat); extern void matrix3_affine_invert(RS_MATRIX3 *mat); extern void matrix3_affine_scale(RS_MATRIX3 *matrix, double xscale, double yscale); extern void matrix3_affine_translate(RS_MATRIX3 *matrix, double xtrans, double ytrans); extern void matrix3_affine_rotate(RS_MATRIX3 *matrix, double degrees); extern void matrix3_affine_transform_point(RS_MATRIX3 *matrix, double x, double y, double *x2, double *y2); extern void matrix3_affine_transform_point_int(RS_MATRIX3 *matrix, int x, int y, int *x2, int *y2); extern void matrix3_affine_get_minmax(RS_MATRIX3 *matrix, double *minx, double *miny, double *maxx, double *maxy, double x1, double y1, double x2, double y2); /** * Interpolate an array of unsigned integers * @param input_dataset An array of unsigned integers to be inperpolated * @param input_length The length of the input array * @param output_dataset An array of unsigned integers for output or NULL * @param output_length The length of the output array * @param max A pointer to an unsigned int or NULL * @return the interpolated dataset */ unsigned int * interpolate_dataset_int(unsigned int *input_dataset, unsigned int input_length, unsigned int *output_dataset, unsigned int output_length, unsigned int *max); #endif /* RS_MATRIX_H */ rawstudio-2.0/librawstudio/rs-gui-functions.h0000644000175000017500000000232011526533645016421 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 GUI_FUNCTIONS_H #define GUI_FUNCTIONS_H #include #include #include extern GtkWidget *gui_dialog_make_from_text(const gchar *stock_id, gchar *primary_text, gchar *secondary_text); extern GtkWidget *gui_dialog_make_from_widget(const gchar *stock_id, gchar *primary_text, GtkWidget *widget); #endif /* GUI_FUNCTIONS_H */ rawstudio-2.0/librawstudio/rs-profile-camera.c0000644000175000017500000000625011545163733016514 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include "config.h" #include #include #include "rs-utils.h" const gchar * rs_profile_camera_find(gchar *make, gchar *model) { static gchar *last_make = NULL; static gchar *last_model = NULL; static gchar *last_id = NULL; if (NULL == make || NULL == model) return NULL; if (last_make && last_model) { if (g_str_equal(make, last_make) && g_str_equal(model, last_model)) return last_id ? g_strdup(last_id) : NULL; g_free(last_make); g_free(last_model); if (last_id) g_free(last_id); last_make = g_strdup(make); last_model = g_strdup(model); last_id = NULL; } static gchar *filename = NULL; xmlDocPtr doc; xmlNodePtr cur; xmlNodePtr camera = NULL; xmlNodePtr exif = NULL; xmlChar *xml_unique_id, *xml_make, *xml_model; if (!filename) filename = g_build_filename(rs_confdir_get(), G_DIR_SEPARATOR_S, "profiles" G_DIR_SEPARATOR_S "rawstudio-cameras.xml", NULL); if (!g_file_test(filename, G_FILE_TEST_IS_REGULAR)) { g_free(filename); filename = NULL; } if (!filename) filename = g_build_filename(PACKAGE_DATA_DIR, PACKAGE, "profiles" G_DIR_SEPARATOR_S "rawstudio-cameras.xml", NULL); if (!g_file_test(filename, G_FILE_TEST_IS_REGULAR)) return NULL; doc = xmlParseFile(filename); if (!doc) return NULL; cur = xmlDocGetRootElement(doc); camera = cur->xmlChildrenNode; while(camera) { if (!xmlStrcmp(camera->name, BAD_CAST "camera")) { xml_unique_id = xmlGetProp(camera, BAD_CAST "unique_id"); exif = camera->xmlChildrenNode; while(exif) { if (!xmlStrcmp(exif->name, BAD_CAST "exif")) { xml_make = xmlGetProp(exif, BAD_CAST "make"); if (g_strcmp0((gchar *) xml_make, make) == 0) { xml_model = xmlGetProp(exif, BAD_CAST "model"); if (g_strcmp0((gchar *) xml_model, model) == 0) { xmlFree(xml_make); xmlFree(xml_model); const gchar *unique_id = g_strdup((gchar *) xml_unique_id); xmlFree(xml_unique_id); xmlFree(doc); last_id = g_strdup(unique_id); return unique_id; } xmlFree(xml_model); } xmlFree(xml_make); } exif = exif->next; } xmlFree(xml_unique_id); } camera = camera->next; } xmlFree(doc); g_warning("Could not find unique camera: Make:'%s'. Model:'%s'", make, model); return NULL; } rawstudio-2.0/librawstudio/rs-1d-function.c0000644000175000017500000000607611526533645015765 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-1d-function.h" G_DEFINE_TYPE(RS1dFunction, rs_1d_function, G_TYPE_OBJECT) static void rs_1d_function_class_init(RS1dFunctionClass *klass) { } static void rs_1d_function_init(RS1dFunction *func) { } /** * Instantiate a new RS1dFunction, it will behave as an identity function (y = x) * @return A new RS1dFunction with arefcount of 1. */ RS1dFunction * rs_1d_function_new(void) { return g_object_new (RS_TYPE_1D_FUNCTION, NULL); } /** * Behaves like #rs_1d_function_new but returns a singleton * @return A new RS1dFunction singleton which should not be unreffed */ const RS1dFunction * rs_1d_function_new_singleton(void) { static GStaticMutex lock = G_STATIC_MUTEX_INIT; static RS1dFunction *func = NULL; g_static_mutex_lock(&lock); if (!func) func = rs_1d_function_new(); g_static_mutex_unlock(&lock); return func; } /** * Map x to a new y value * @param func A RS1dFunction * @param x An input parameter in the range 0.0-1.0 * @return Mapped value for x */ gdouble rs_1d_function_evaluate(const RS1dFunction *func, const gdouble x) { g_assert(RS_IS_1D_FUNCTION(func)); RS1dFunctionEvaluate *evaluate = RS_1D_FUNCTION_GET_CLASS(func)->evaluate; if (evaluate) return evaluate(func, x); else return x; } /** * Map y to a new x value * @param func A RS1dFunction * @param x An input parameter in the range 0.0-1.0 * @return Inverse value for y */ gdouble rs_1d_function_evaluate_inverse(const RS1dFunction *func, const gdouble y) { g_assert(RS_IS_1D_FUNCTION(func)); RS1dFunctionEvaluate *evaluate_inverse = RS_1D_FUNCTION_GET_CLASS(func)->evaluate_inverse; if (evaluate_inverse) return evaluate_inverse(func, y); else return y; } /** * Return TRUE if rs_1d_function_evaluate(#func, x) == x for all x * @param func A RS1dFunction * @return TRUE if rs_1d_function_evaluate(#func, x) == x for all x, FALSE otherwise */ gboolean rs_1d_function_is_identity(const RS1dFunction *func) { g_assert(RS_IS_1D_FUNCTION(func)); RS1dFunctionIsIdentity *is_identity = RS_1D_FUNCTION_GET_CLASS(func)->is_identity; RS1dFunctionEvaluate *evaluate = RS_1D_FUNCTION_GET_CLASS(func)->evaluate; if (!is_identity && !evaluate) return TRUE; else if (is_identity) return is_identity(func); else return FALSE; } rawstudio-2.0/librawstudio/rs-profile-camera.h0000644000175000017500000000213311526533645016517 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_PROFILE_CAMERA_H #define RS_PROFILE_CAMERA_H typedef struct { gchar *make; gchar *model; const gchar *unique_id; } rs_profile_camera; const gchar * rs_profile_camera_find(gchar *make, gchar *model); #endif /* RS_PROFILE_CAMERA_H */ rawstudio-2.0/librawstudio/rs-output.h0000644000175000017500000001000711543674627015175 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_OUTPUT_H #define RS_OUTPUT_H #include "rawstudio.h" #include G_BEGIN_DECLS /** * Convenience macro to define generic output module */ #define RS_DEFINE_OUTPUT(type_name, TypeName) \ static GType type_name##_get_type (GTypeModule *module); \ static void type_name##_class_init(TypeName##Class *klass); \ static void type_name##_init(TypeName *output); \ static GType type_name##_type = 0; \ static GType \ type_name##_get_type(GTypeModule *module) \ { \ if (!type_name##_type) \ { \ static const GTypeInfo output_info = \ { \ sizeof (TypeName##Class), \ (GBaseInitFunc) NULL, \ (GBaseFinalizeFunc) NULL, \ (GClassInitFunc) type_name##_class_init, \ NULL, \ NULL, \ sizeof (TypeName), \ 0, \ (GInstanceInitFunc) type_name##_init \ }; \ \ type_name##_type = g_type_module_register_type( \ module, \ RS_TYPE_OUTPUT, \ #TypeName, \ &output_info, \ 0); \ } \ return type_name##_type; \ } #define RS_TYPE_OUTPUT rs_output_get_type() #define RS_OUTPUT(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_OUTPUT, RSOutput)) #define RS_OUTPUT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_OUTPUT, RSOutputClass)) #define RS_IS_OUTPUT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_OUTPUT)) #define RS_IS_OUTPUT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_OUTPUT)) #define RS_OUTPUT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_OUTPUT, RSOutputClass)) #define RS_OUTPUT_NAME(output) (((output)) ? g_type_name(G_TYPE_FROM_CLASS(RS_OUTPUT_GET_CLASS ((output)))) : "(nil)") typedef struct _RSOutput RSOutput; typedef struct _RSOutputClass RSOutputClass; struct _RSOutput { GObject parent; }; struct _RSOutputClass { GObjectClass parent_class; gchar *extension; gchar *display_name; gboolean (*execute)(RSOutput *output, RSFilter *filter); }; GType rs_output_get_type(void) G_GNUC_CONST; /** * Instantiate a new RSOutput type * @param identifier A string representing a type, for example "RSJpegfile" * @return A new RSOutput or NULL on failure */ extern RSOutput * rs_output_new(const gchar *identifier); /** * Get a filename extension as announced by a RSOutput module * @param output A RSOutput * @return A proposed filename extension excluding the ., this should not be freed. */ const gchar * rs_output_get_extension(RSOutput *output); /** * Actually execute the saver * @param output A RSOutput * @param filter A RSFilter to get image data from * @return TRUE on success, FALSE on error */ extern gboolean rs_output_execute(RSOutput *output, RSFilter *filter); /** * Load parameters from config for a RSOutput * @param output A RSOutput * @param conf_prefix The prefix to prepend on config-keys. */ void rs_output_set_from_conf(RSOutput *output, const gchar *conf_prefix); /** * Build a GtkWidget that can edit parameters of a RSOutput * @param output A RSOutput * @param conf_prefix If this is non-NULL, the value will be saved in config, * and reloaded next time. * @return A new GtkWidget representing all parameters of output */ extern GtkWidget * rs_output_get_parameter_widget(RSOutput *output, const gchar *conf_prefix); G_END_DECLS #endif /* RS_OUTPUT_H */ rawstudio-2.0/librawstudio/rs-spline.c0000644000175000017500000005265611526533645015135 00000000000000/***************************************************************************** * Cubic spline implementation * * Copyright (C) 2007 Edouard Gomez * * 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 "rs-spline.h" #include #include #include /** Spline curve - Real definition */ struct _RSSpline { GObject parent; gboolean dispose_has_run; /** Number of knots */ guint n; /** Runout type */ rs_spline_runout_type_t type; /** Knots as an array of gfloat[2]. * x is [0] and y is [1] */ gfloat *knots; /** Cubic curves as an array of gfloat[4]. * The cubic a*x^3 + b*x^2 + c*x + d is stored as follows: * a is [0], b is [1], c is [2], d is [3]*/ gfloat *cubics; /** Tells if the curve needs internal update before using the cubics * attribute */ gint dirty; /** Knots (gfloat[2]) added and not yet merged in the ordered knots * array attribute */ GSList *added; }; G_DEFINE_TYPE(RSSpline, rs_spline, G_TYPE_OBJECT) static void knot_free(gpointer knot, gpointer userdata); static void rs_spline_dispose(GObject *object) { RSSpline *spline = RS_SPLINE(object); if (!spline->dispose_has_run) { spline->dispose_has_run = TRUE; g_free(spline->knots); g_free(spline->cubics); g_slist_foreach(spline->added, (GFunc)knot_free, NULL); g_slist_free(spline->added); } G_OBJECT_CLASS(rs_spline_parent_class)->dispose(object); } static void rs_spline_class_init(RSSplineClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = rs_spline_dispose; } static void rs_spline_init(RSSpline *spline) { } #define MERGE_KNOTS (1<<0) #define SORT_KNOTS (1<<1) #define COMPUTE_CUBICS (1<<2) #define DIRTY(a, b) do { (a) |= (b); } while (0) #define UNDIRTY(a, b) do { (a) &= ~(b); } while (0) #define ISDIRTY(a, b) (!!((a)&(b))) /* * Tridiagonal matrix solver. * * Solving a tridiagonal NxN matrix can be explained as followed: * * [b0 c0 0 0 0 0 0 0 0 0 ] [ d0] [ r0] * [a1 b1 c1 0 0 ] [ d1] [ r1] * [ 0 a2 b2 c2 0 0 ] [ d2] [ . ] * [ 0 0 a3 b3 c3 0 0 ] [ . ] [ . ] * [ 0 0 . . . 0 0 ]x[ . ] = [ . ] (1) * [ 0 0 . . . 0 0 ] [dN-4] [rN-4] * [ 0 0 0 . . 0 ] [dN-3] [rN-3] * [ 0 0 aN-2 bN-2 cN-2] [dN-2] [rN-2] * [ 0 0 0 0 0 0 0 aN-1 bN-1] [dN-1] [rN-1] * * Let's call a(n) the sub diagonal coefficients suite, b(n) the diagonal * suite, c(n) the super diagonal suite, and r(n) the result vector (right * member of the matrix equation (1) * * We will prove we can solve this recursively: * For n=0, we have: * b0*d0 + c0*d1 = r0 <=> d0 = r0/b0 - c0/b0*d1 * d0 = f0 - g0*d1 * * With: * f0 = r0/b0 (2) * g0 = c0/b0 (3) * * Let's suppose this for 0 rn = an*(fn-1 - gn-1*dn) + bn*dn + cn*dn+1 * <=> rn = an*fn-1 + (bn - an*gn-1)*dn + cn*dn+1 * <=> dn = [(rn - an*fn-1) - cn*dn+1]/(bn - an*gn-1) * <=> dn = fn - gn*dn+1 * * Where fn = (rn - an*fn-1)/(bn - an*gn-1) (5) * and gn = cn/(bn - an*gn-1) (6) * * Proved :-) * * Let's see the final line of the matrix: * aN-1*dN-2 + bN-1*dN-1 = rN-1 * <=> aN-1(fN-2 - gN-2*dN-1) + bN-1*dN-1 = rN-1 * <=> dN-1 = (rN-1 - aN-1*fN-2)/(bN-1 - aN-1*gN-2) (7) * * So we can extend the recursive proof by one with just fixing g[n-1] = 0. * and keeping in mind that dN-1 = fN-1 * * In the end to solve the tridiagonal matrix we must determine the f(n) suite * and g(n) suite using (5), (6) and the initial values in (2), (3). Then we * will be able to cascade the result bottom-top using (4) * * Make just sure that bn-an*gn is never 0 :-) which just doesn't happen if * |bn| > |an| + |cn| */ /** * Tridiagonal matrix solver. * @param d Solution vector (out) * @param r Result vector (in) * @param a a(n) suite of sub diagonal coefficients (a[0] is not used) (in) * @param b b(n) suite of diagonal coefficients (in) * @param c c(n) suite of sub diagonal coefficients (c[n-1] is not used) (in) * @param n Vector size (in) * @return 0 if failed, 1 if succeeded */ static gint matrix_tridiagonal_solve( gfloat *d, gint n, const gfloat *const r, const gfloat *const a, const gfloat *const b, const gfloat *const c) { /* Iterator */ gint i; /* Temporary that will hold the (bn - an*gn) value */ gfloat bet; /* 1st pass: contains g(n) */ gfloat *g; /* Alloc space */ g = g_malloc(n*sizeof(gfloat)); /* 1st pass: Decomposition and forward substitution */ /* First element is special - see (2), (3) */ bet = b[0]; d[0] = r[0]/bet; g[0] = c[0]/bet; /* Treat all rows it appears we can treat them all the same way for * i>=1, see (5), (6) and (7) */ for (i=1; i=0; i--) { d[i] -= g[i]*d[i+1]; } #ifdef RSSplineEST #define EPSILON (0.01f) g[0] = b[0]*d[0] + c[0]*d[1]; for (i=1; i= (r[i]-EPSILON) && g[i] <= (r[i]+EPSILON)); } #endif g_free(g); return 1; } /* A cubic spline is a function defined as follows: * * { s0(x) for x0<=x sn(xn) = yn * <=> dn = yn * 2) The function is continuous so: * sn+1(xn+1) = sn(xn+1) * <=> dn+1 = an*(xn+1-xn)^3 + bn*(xn+1-xn)^2 + cn*(xn+1-xn) +dn * <=> dn+1 = an*hn^3 + bn*hn^2 + cn*hn + dn * with hn = xn+1 - xn, for 0<=n cn+1 = 3*an*hn^2 + 2*bn*hn + cn * 4) The second derivative is continuous so: * s''n+1(xn+1) = s''n(xn+1) * <=> 2*bn+1 = 6*an*hn + 2*bn * 5) With all this in mind, we will simplify the writings of the 4 previous * equations introducing Mn as the value of the second derivative of f(x) * at the sampling points positions: * s''n(xn) = 2*bn = Mn * <=> bn = Mn/2 * * Rewriting 4) * Mn+1 = 6*an*hn + Mn <=> an = (Mn+1-Mn)/(6*hn) * * Rewriting 2) * dn+1 = an*hn^3 + bn*hn^2 + cn*hn + dn * <=> yn+1 = hn^3*(Mn+1-Mn)/(6*hn) + Mn/2*hn^2 + cn*hn + yn * <=> cn*hn = (Mn+1+2*Mn)/6*hn^2 + (yn+1-yn) * <=> cn = hn*(Mn+1+2*Mn)/6 + (yn+1-yn)/hn * * So we end up having * an = (Mn+1-Mn)/(6*hn) * bn = Mn/2 * cn = hn*(Mn+1+2*Mn)/6 + (yn+1-yn)/hn * dn = yn * * Replacing all these coefficients definition in 3) gives us this nice * equation: * hn*Mn + 2*(hn+hn+1)*Mn+1 + hn+1*Mn+2 = 6*[(yn+2-yn+1)/hn+1 - (yn+1-yn)/hn] * * Which can be represented as a linear equation set like this: * [h0 2*(h0+h1) h1 0 0 0 0 0 0 0 0 0 ] [ M0] [6*(dy1/h1 - dy0/h0)] * [ 0 h1 2*(h1+h2) h2 0 0 ] [ M1] [6*(dy2/h2 - dy1/h1)] * [ 0 0 h2 2*(h2+h3) h3 0 0 ] [ M2] [6*(dy3/h3 - dy2/h2)] * [ 0 0 h3 2*(h3+h4) h4 0 0 ] [ . ] [ . ] * [ 0 0 . . . 0 0 ]x[ . ] = [ . ] (1) * [ 0 0 . . . 0 0 ] [MN-4] [ . ] * [ 0 0 0 . . 0 0 ] [MN-3] [6*( ... )] * [ 0 0 hN-3 2*(hN-3+hN-2) hN-2 0 ] [MN-2] [6*( ... )] * [ 0 0 0 0 0 0 0 hN-2 2*(hN-2+hN-1) hN-1] [MN-1] [6*( ... )] * N columns x (N-2) rows matrix x N length vector = N-2 length vector * * So it's still necessary to fix 2 more conditions to have a solvable system. * It's usual to fix these conditions on the two ends of the spline to control * its behavior... that's the runout type, natural, parabolic, cubic etc... * * Natural runout: M0 = 0 and Mn-1 = 0 * Parabolic runout: M0 = M1 and Mn-1 = Mn-2 * Cubic runout: M0 = 2*M1-M2 and Mn-1 = 2*Mn-2 - Mn-3 */ /* Some macros we'll use when dealing with the cubics or the knots */ #define _a(w) (spline->cubics[4*(w)]) #define _b(w) (spline->cubics[4*(w)+1]) #define _c(w) (spline->cubics[4*(w)+2]) #define _d(w) (spline->cubics[4*(w)+3]) #define _x(w) (spline->knots[2*(w)]) #define _y(w) (spline->knots[2*(w)+1]) /** * Compare x coordinate of a knot, for sorting purposes * @param arg1 First knot * @param arg2 Second knot * @return
    *
  • -1 when arg1<arg2
  • *
  • 0 when equal
  • *
  • 1 when arg1>arg2
  • *
*/ static int compare_knot(const void *arg1, const void *arg2) { gfloat *knot1 = (gfloat*)arg1; gfloat *knot2 = (gfloat*)arg2; if (knot1[0] == knot2[0]) { return 0; } if (knot1[0] > knot2[0]) { return 1; } return -1; } /** * Copy a knot at last position in the knots array attribute and updates the n * attribute accordingly. The knots array is supposed to have enough space for * the copy. * @param data knot to be copied * @param useradata Expected to be a RSSpline */ static void knot_copy(gpointer data, gpointer userdata) { RSSpline *spline = (RSSpline *)userdata; gfloat *knot = (gfloat*)data; spline->knots[2*spline->n] = knot[0]; spline->knots[2*spline->n+1] = knot[1]; spline->n++; } /** * Free the space allocated for a knot * @param knot Knot to be freed * @param userdata Nothing */ static void knot_free(gpointer knot, gpointer userdata) { g_free(knot); } /** * Prepare the knots list. It merges the new knots inserted since last time * this method has been called and sort the knot array * @param spline Spline */ static void knots_prepare(RSSpline *spline) { if (ISDIRTY(spline->dirty, MERGE_KNOTS)) { guint nbadded = g_slist_length(spline->added); /* Merge the new points into the knots array */ spline->knots = g_realloc(spline->knots, (spline->n + nbadded)*sizeof(gfloat)*2); g_slist_foreach(spline->added, (GFunc)knot_copy, (gpointer)spline); g_slist_foreach(spline->added, (GFunc)knot_free, NULL); g_slist_free(spline->added); spline->added = NULL; UNDIRTY(spline->dirty, MERGE_KNOTS); DIRTY(spline->dirty, SORT_KNOTS); } if (ISDIRTY(spline->dirty, SORT_KNOTS) && spline->knots != NULL) { /* Order the knots */ qsort(spline->knots, spline->n, sizeof(gfloat)*2, &compare_knot); UNDIRTY(spline->dirty, SORT_KNOTS); DIRTY(spline->dirty, COMPUTE_CUBICS); } } /** * Cubic Spline solver * @param spline Spline structure to be updated. The knots, n, and type * attributes must be initialized correctly. * @return 0 if failed */ static gint spline_compute_cubics(RSSpline *spline) { /* Sub diagonal */ gfloat *a = NULL; /* Diagonal */ gfloat *b = NULL; /* Super diagonal */ gfloat *c = NULL; /* Solution */ gfloat *m = NULL; /* Result */ gfloat *r = NULL; /* Iterator */ gint i; /* Deal with stupid cases */ if (spline->n <= 1) { return 0; } /* Prepare the knots array */ knots_prepare(spline); /* Let(s see if we have work to do */ if (!ISDIRTY(spline->dirty, COMPUTE_CUBICS)) { return 1; } /* The case spline->n == 2 is special - Use linear interpolation */ if (spline->n == 2) { /* Prepare the cubic coefficients directly */ if (spline->cubics != NULL) { /* Free old cubics */ g_free(spline->cubics); spline->cubics = NULL; } spline->cubics = g_malloc(sizeof(gfloat)*4); _a(0) = 0; _b(0) = 0; _c(0) = (_y(1) - _y(0))/(_x(1) -_x(0)); _d(0) = _y(0); return 1; } /* Prepare the tridiagonal matrix resolution */ r = g_malloc(sizeof(gfloat)*(spline->n-2)); a = g_malloc(sizeof(gfloat)*(spline->n-2)); b = g_malloc(sizeof(gfloat)*(spline->n-2)); c = g_malloc(sizeof(gfloat)*(spline->n-2)); m = g_malloc(sizeof(gfloat)*spline->n); for (i=0; i<(spline->n-2); i++) { gfloat dx1 = _x(i+1) - _x(i); gfloat dy1 = _y(i+1) - _y(i); gfloat dx2 = _x(i+2) - _x(i+1); gfloat dy2 = _y(i+2) - _y(i+1); r[i] = 6.0f*(dy2/dx2 - dy1/dx1); a[i] = dx1; b[i] = 2.0f*(dx1+dx2); c[i] = dx2; } /* Adapt matrix coefficients according to runout type */ switch (spline->type) { case PARABOLIC: /* TODO */ break; case CUBIC: /* TODO */ break; case NATURAL: default: /* Nothing to do :-) */ break; } /* Solve the tridiagonal matrix */ i = matrix_tridiagonal_solve(&m[1], spline->n-2, r, a, b, c); g_free(r); g_free(a); g_free(b); g_free(c); if (!i) { g_free(m); return 0; } /* According to runout type, fill in the 0 and n element of m array */ switch (spline->type) { case PARABOLIC: m[0] = m[1]; m[spline->n-1] = m[spline->n-2]; break; case CUBIC: m[0] = 2*m[1] - m[2]; m[spline->n-1] = 2*m[spline->n-2] - m[spline->n-3]; break; case NATURAL: default: m[0] = 0.0f; m[spline->n-1] = 0.0f; break; } /* Prepare the cubic coefficients */ if (spline->cubics != NULL) { /* Free old cubics */ g_free(spline->cubics); spline->cubics = NULL; } spline->cubics = g_malloc(sizeof(gfloat)*(spline->n-1)*4); for (i=0; i<(spline->n-1); i++) { gfloat h = _x(i+1) - _x(i); _a(i) = (m[i+1] - m[i])/(6.0f*h); _b(i) = m[i]/2.0f; _c(i) = (_y(i+1) - _y(i))/h - h*(m[i+1] + 2.0f*m[i])/6.0f; _d(i) = _y(i); } /* We're done with m */ g_free(m); /* UnMark the cubics bit */ UNDIRTY(spline->dirty, COMPUTE_CUBICS); return 1; } /** * Attribute getter * @return Number of knots */ guint rs_spline_length(RSSpline *spline) { return spline->n + g_slist_length(spline->added); } /** * Adds a knot to the curve * @param spline Spline to be used * @param x X coordinate * @param y Y coordinate */ void rs_spline_add(RSSpline *spline, gfloat x, gfloat y) { gfloat *knot = g_malloc(sizeof(gfloat)*2); knot[0] = x; knot[1] = y; spline->added = g_slist_prepend(spline->added, knot); DIRTY(spline->dirty, MERGE_KNOTS); } /** * Moves a knot in the curve * @param spline Spline to be used * @param n Which knot to move * @param x X coordinate * @param y Y coordinate */ void rs_spline_move(RSSpline *spline, gint n, gfloat x, gfloat y) { spline->knots[n*2+0] = x; spline->knots[n*2+1] = y; DIRTY(spline->dirty, SORT_KNOTS); DIRTY(spline->dirty, COMPUTE_CUBICS); } /** * Deletes a knot in the curve * @param spline Spline to be used * @param n Which knot to delete */ extern void rs_spline_delete(RSSpline *spline, gint n) { gfloat *old_knots = spline->knots; gint i, target = 0; /* Allocate new array */ spline->knots = g_new(gfloat, (spline->n-1)*2); /* Simply copy the old values, no fancy stuff */ for(i=0;in;i++) { if (i != n) /* copy everything but n */ { spline->knots[target*2+0] = old_knots[i*2+0]; spline->knots[target*2+1] = old_knots[i*2+1]; target++; } } spline->n--; /* Free the old array */ g_free(old_knots); /* There should be no need to force resort */ DIRTY(spline->dirty, COMPUTE_CUBICS); } /** * Computes value of the spline at the x abissa * @param spline Spline to be used * @param x Cubic spline parametric (in) * @param y Interpolated value (out) * @return 0 if failed, can happen when the spline is to be calculated again. */ gint rs_spline_interpolate(RSSpline *spline, gfloat x, gfloat *y) { /* Iterator */ gint j; /* Compute the spline */ if (!spline_compute_cubics(spline)) { return 0; } /* Find the right cubics to interpolate from */ for (j=0; j<(spline->n-1); j++) { if (x >= _x(j) && x < _x(j+1)) { break; } } /* Don't forget to compute x-xn */ x -= _x(j); /* Fill in the out value */ *y = x*(x*(x*_a(j) + _b(j)) + _c(j)) + _d(j); /* Success */ return 1; } /** * Gets a copy of the internal sorted knot array (gfloat[2]) * @param spline Spline to be used * @param knots Output knots (out) * @param n Output number of knots (out) */ void rs_spline_get_knots(RSSpline *spline, gfloat **knots, guint *n) { knots_prepare(spline); *n = rs_spline_length(spline); *knots = g_malloc(*n*sizeof(gfloat)*2); memcpy(*knots, spline->knots, *n*sizeof(gfloat)*2); } /** * Sample the curve * @param spline Spline to be used * @param samples Pointer to output array or NULL * @param nbsamples number of samples * @return Sampled curve or NULL if failed */ gfloat * rs_spline_sample(RSSpline *spline, gfloat *samples, guint nbsamples) { /* Iterator */ guint i; /* Output array */ if (!samples) samples = g_malloc(sizeof(gfloat)*nbsamples); /* Compute everything required */ if (!spline_compute_cubics(spline)) { return NULL; } if ((spline->n>1) && spline->knots) { /* Find the sample number for first and last knot */ const gint start = spline->knots[0*2+0]*((gfloat)nbsamples); const gint stop = spline->knots[(spline->n-1)*2+0]*((gfloat)nbsamples); /* Allocate space for output, if not given */ if (!samples) samples = g_new(gfloat, nbsamples); /* Sample between knots */ for (i=0; i<(stop-start); i++) { gfloat x = ((gfloat)i)*(_x(spline->n-1) - _x(0))/(gfloat)(stop-start) + _x(0); /* We can safely ignore the return value because the call to * compute_spline has successfully returned a few lines * upper */ rs_spline_interpolate(spline, x, &(samples+start)[i]); } /* Sample flat curve before first knot */ for(i=0;iknots[0*2+1]; /* Sample flat curve after last knot */ for(i=stop;iknots[(spline->n-1)*2+1]; } return samples; } /** * Cubic spline constructor. * @param knots Array of knots * @param n Number of knots * @param runout_type Type of the runout * @return Spline */ RSSpline * rs_spline_new( const gfloat *const knots, const gint n, const rs_spline_runout_type_t runout_type) { /* Ordered knots */ gfloat *k = NULL; /* Copy the knots */ if (knots != NULL) { k = g_malloc(sizeof(gfloat)*2*n); memcpy(k, knots, sizeof(gfloat)*2*n); } /* Prepare the result */ RSSpline *new = g_object_new(RS_TYPE_SPLINE, NULL); new->knots = k; new->cubics = NULL; new->n = (k!=NULL) ? n: 0; new->type = runout_type; new->added = NULL; new->dirty = 0; DIRTY(new->dirty, SORT_KNOTS); DIRTY(new->dirty, COMPUTE_CUBICS); return new; } /** * Print a spline on the stdout * @param spline Spline curve */ void rs_spline_print(RSSpline *spline) { /* Iterator */ guint i; /* Samples */ gfloat *samples = rs_spline_sample(spline, NULL, 512); /* Print the spline */ printf("\n\n# Spline\n"); for (i=0; i<(spline->n-1); i++) { printf("# [(%.2f,%.2f) (%.2f,%.2f)] an=%.2f bn=%.2f cn=%.2f dn=%.2f\n", _x(i), _y(i), _x(i+1), _y(i+1), _a(i), _b(i), _c(i), _d(i)); } for (i=0; i<512; i++) { printf("%f\n", samples[i]); } g_free(samples); } #undef _a #undef _b #undef _c #undef _d #undef _x #undef _y #ifdef RSSplineTEST typedef struct test_t { gint size; const gfloat *knots; } test_t; typedef const test_t *const test_t_ptr; int main(int argc, char **argv) { /* A simple S-curve */ const gfloat scurve_knots[] = { 0.625f, 0.75f, 0.125f, 0.25f, 0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 1.0f }; const test_t scurve = { sizeof(scurve_knots)/(sizeof(scurve_knots[0])*2), scurve_knots }; /* A simple line */ const gfloat line_knots[] = { 0.0f, 0.0f, 0.25f, 0.25f, 0.5f, 0.5f, 0.75f, 0.75f, 1.0f, 1.0f }; const test_t line = { sizeof(line_knots)/(sizeof(line_knots[0])*2), line_knots }; /* Tests */ test_t_ptr tests[] = { &line, &scurve }; /* All types */ const rs_spline_runout_type_t runouts[] = { NATURAL, PARABOLIC, CUBIC, }; /* Spline result */ RSSpline *spline; /* Iterators */ gint i; gint j; for (i=0; isize; /* Create the spline */ spline = rs_spline_new(tests[i]->knots, size-1, j); /* Make sure everything is ok */ if (spline == NULL) { g_warning("The spline could not be computed\n"); continue; } /* Add the last point */ rs_spline_add(spline, tests[i]->knots[(size-1)*2], tests[i]->knots[(size-1)*2 + 1]); /* Print it to stdio */ rs_spline_print(spline); /* Destory it */ g_object_unref(spline); } } return 0; } #endif /* RSSplineTEST */ rawstudio-2.0/librawstudio/rs-filter-param.h0000644000175000017500000001403011526533645016213 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_FILTER_PARAM_H #define RS_FILTER_PARAM_H #include G_BEGIN_DECLS #define RS_TYPE_FILTER_PARAM rs_filter_param_get_type() #define RS_FILTER_PARAM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_FILTER_PARAM, RSFilterParam)) #define RS_FILTER_PARAM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_FILTER_PARAM, RSFilterParamClass)) #define RS_IS_FILTER_PARAM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_FILTER_PARAM)) #define RS_IS_FILTER_PARAM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_FILTER_PARAM)) #define RS_FILTER_PARAM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_FILTER_PARAM, RSFilterParamClass)) typedef struct { GObject parent; gboolean dispose_has_run; GHashTable *properties; } RSFilterParam; typedef struct { GObjectClass parent_class; } RSFilterParamClass; GType rs_filter_param_get_type(void); RSFilterParam *rs_filter_param_new(void); void rs_filter_param_clone(RSFilterParam *destination, const RSFilterParam *source); /** * Delete a property from a RSFilterParam * @param filter_param A RSFilterParam * @param name The name of the property * @return TRUE if the property was found, FALSE otherwise */ gboolean rs_filter_param_delete(RSFilterParam *filter_param, const gchar *name); /** * Set a string property * @param filter_param A RSFilterParam * @param name The name of the property * @param str NULL-terminated string to set (will be copied) */ void rs_filter_param_set_string(RSFilterParam *filter_param, const gchar *name, const gchar *str); /** * Get a string property * @param filter_param A RSFilterParam * @param name The name of the property * @param str A pointer to a string pointer where the value of the property can be saved. Should not be freed * @return TRUE if the property was found, FALSE otherwise */ gboolean rs_filter_param_get_string(const RSFilterParam *filter_param, const gchar *name, const gchar ** const str); /** * Set a boolean property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A value to store */ void rs_filter_param_set_boolean(RSFilterParam *filter_param, const gchar *name, const gboolean value); /** * Get a gboolean property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A pointer to a gboolean where the value will be stored * @return TRUE if the property was found, FALSE otherwise */ gboolean rs_filter_param_get_boolean(const RSFilterParam *filter_param, const gchar *name, gboolean *value); /** * Set a integer property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A value to store */ void rs_filter_param_set_integer(RSFilterParam *filter_param, const gchar *name, const gint value); /** * Get a integer property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A pointer to a gint where the value will be stored * @return TRUE if the property was found, FALSE otherwise */ gboolean rs_filter_param_get_integer(const RSFilterParam *filter_param, const gchar *name, gint *value); /** * Set a float property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A value to store */ void rs_filter_param_set_float(RSFilterParam *filter_param, const gchar *name, const gfloat value); /** * Get a float property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A pointer to a gfloat where the value will be stored * @return TRUE if the property was found, FALSE otherwise */ gboolean rs_filter_param_get_float(const RSFilterParam *filter_param, const gchar *name, gfloat *value); /** * Set a float[4] property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A value to store */ void rs_filter_param_set_float4(RSFilterParam *filter_param, const gchar *name, const gfloat value[4]); /** * Get a float property * @param filter_param A RSFilterParam * @param name The name of the property * @param value A pointer to a gfloat [4] where the values will be stored * @return TRUE if the property was found, FALSE otherwise */ gboolean rs_filter_param_get_float4(const RSFilterParam *filter_param, const gchar *name, gfloat value[4]); /** * Set an object property * @param filter_param A RSFilterParam * @param name The name of the property * @param object An object to store. Refcount will be incremented by one */ void rs_filter_param_set_object(RSFilterParam *filter_param, const gchar *name, gpointer object); /** * Get an object property * @param filter_param A RSFilterParam * @param name The name of the property * @return The object if found, NULL otherwise */ gpointer rs_filter_param_get_object(const RSFilterParam *filter_param, const gchar *name); /** * Get an object property * @param filter_param A RSFilterParam * @param name The name of the property * @param type A desired GType, if the type doesn't match, the result is treated as non-existent * @return The object if found, NULL otherwise */ gpointer rs_filter_param_get_object_with_type(const RSFilterParam *filter_param, const gchar *name, GType type); G_END_DECLS #endif /* RS_FILTER_PARAM_H */ rawstudio-2.0/librawstudio/rs-exif.h0000644000175000017500000000304311526533645014565 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_EXIF_H #define RS_EXIF_H #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include #include typedef enum { RS_EXIF_FILE_TYPE_UNKNOWN, RS_EXIF_FILE_TYPE_JPEG, RS_EXIF_FILE_TYPE_PNG, RS_EXIF_FILE_TYPE_TIFF } RSExifFileType; typedef void RS_EXIF_DATA; typedef void RS_IPTC_DATA; extern RS_EXIF_DATA *rs_exif_load_from_file(const gchar *); extern RS_EXIF_DATA *rs_exif_load_from_rawfile(RAWFILE *rawfile); extern void rs_exif_free(RS_EXIF_DATA *d); extern gboolean rs_exif_copy(const gchar *input_filename, const gchar *output_filename, const gchar *color_space, RSExifFileType type); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* RS_EXIF_H */ rawstudio-2.0/librawstudio/rs-library.c0000644000175000017500000007530211531305647015273 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ /* Documentation: * http://www.sqlite.org/capi3ref.html */ /* Database layout: * * library * id * filename * identifier * * tags * id * tagname * * phototags * photo * tag * autotag * * version * version */ /* #include #include #include #include #include #include "rawstudio.h" #include "rs-metadata.h" #include "rs-library.h" #include "application.h" */ #include "rs-library.h" #include "conf_interface.h" #include "config.h" #include "gettext.h" #include #include #include #define LIBRARY_VERSION 2 #define TAGS_XML_FILE "tags.xml" #define MAX_SEARCH_RESULTS 1000 #include "rs-types.h" struct _RSLibrary { GObject parent; gboolean dispose_has_run; sqlite3 *db; gchar *error_init; /* This mutex must be used when inserting data in a table with an autocrementing column - which is ALWAYS for sqlite */ GMutex *id_lock; }; G_DEFINE_TYPE(RSLibrary, rs_library, G_TYPE_OBJECT) static gint library_execute_sql(sqlite3 *db, const gchar *sql); static void library_sqlite_error(sqlite3 *db, const gint result); static gint library_create_tables(sqlite3 *db); static gint library_find_tag_id(RSLibrary *library, const gchar *tagname); static gint library_find_photo_id(RSLibrary *library, const gchar *photo); static void library_photo_add_tag(RSLibrary *library, const gint photo_id, const gint tag_id, const gboolean autotag); static gboolean library_is_photo_tagged(RSLibrary *library, const gint photo_id, const gint tag_id); static gint library_add_photo(RSLibrary *library, const gchar *filename); static gint library_add_tag(RSLibrary *library, const gchar *tagname); static void library_delete_photo(RSLibrary *library, const gint photo_id); static void library_delete_tag(RSLibrary *library, const gint tag_id); static void library_photo_delete_tags(RSLibrary *library, const gint photo_id); static void library_tag_delete_photos(RSLibrary *library, const gint tag_id); static gboolean library_tag_is_used(RSLibrary *library, const gint tag_id); static void library_photo_default_tags(RSLibrary *library, const gint photo_id, RSMetadata *metadata); static GtkWidget *tag_search_entry = NULL; static void rs_library_dispose(GObject *object) { RSLibrary *library = RS_LIBRARY(object); if (!library->dispose_has_run) { library->dispose_has_run = TRUE; sqlite3_close(library->db); g_mutex_free(library->id_lock); } G_OBJECT_CLASS(rs_library_parent_class)->dispose (object); } static void rs_library_finalize(GObject *object) { G_OBJECT_CLASS(rs_library_parent_class)->finalize (object); } static void rs_library_class_init(RSLibraryClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); sqlite3_config(SQLITE_CONFIG_SERIALIZED); object_class->dispose = rs_library_dispose; object_class->finalize = rs_library_finalize; } gboolean rs_library_has_database_connection(RSLibrary *library) { if (library_execute_sql(library->db, "PRAGMA user_version;") == 0) return TRUE; else return FALSE; } gchar * rs_library_get_init_error_msg(RSLibrary *library) { return g_strdup(library->error_init); } static gint library_set_version(sqlite3 *db, gint version) { sqlite3_stmt *stmt; gint rc; rc = sqlite3_prepare_v2(db, "update version set version = ?1;", -1, &stmt, NULL); rc = sqlite3_bind_int(stmt, 1, version); rc = sqlite3_step(stmt); library_sqlite_error(db, rc); sqlite3_finalize(stmt); return SQLITE_OK; } static void library_check_version(sqlite3 *db) { sqlite3_stmt *stmt, *stmt_update; gint rc, version = 0, id; gchar *filename; rc = sqlite3_prepare_v2(db, "SELECT version FROM version", -1, &stmt, NULL); rc = sqlite3_step(stmt); if (rc == SQLITE_ROW) version = sqlite3_column_int(stmt, 0); rc = sqlite3_finalize(stmt); while (version < LIBRARY_VERSION) { switch (version) { case 0: /* Alter table library - add identifier column */ sqlite3_prepare_v2(db, "alter table library add column identifier varchar(32)", -1, &stmt, NULL); rc = sqlite3_step(stmt); library_sqlite_error(db, rc); sqlite3_finalize(stmt); /* Run through all photos in library and insert unique identifier in library */ gchar *identifier; sqlite3_prepare_v2(db, "select filename from library", -1, &stmt, NULL); while (sqlite3_step(stmt) == SQLITE_ROW) { filename = (gchar *) sqlite3_column_text(stmt, 0); if (g_file_test(filename, G_FILE_TEST_EXISTS)) { identifier = rs_file_checksum(filename); rc = sqlite3_prepare_v2(db, "update library set identifier = ?1 WHERE filename = ?2;", -1, &stmt_update, NULL); rc = sqlite3_bind_text(stmt_update, 1, identifier, -1, SQLITE_TRANSIENT); rc = sqlite3_bind_text(stmt_update, 2, filename, -1, SQLITE_TRANSIENT); rc = sqlite3_step(stmt_update); library_sqlite_error(db, rc); sqlite3_finalize(stmt_update); g_free(identifier); } } sqlite3_finalize(stmt); library_set_version(db, version+1); break; case 1: library_execute_sql(db, "BEGIN TRANSACTION;"); sqlite3_prepare_v2(db, "select id,filename from library", -1, &stmt, NULL); while (sqlite3_step(stmt) == SQLITE_ROW) { id = (gint) sqlite3_column_int(stmt, 0); filename = rs_normalize_path((gchar *) sqlite3_column_text(stmt, 1)); if (filename) /* FIXME: This will only work for paths that exists */ { rc = sqlite3_prepare_v2(db, "update library set filename = ?1 WHERE id = ?2;", -1, &stmt_update, NULL); rc = sqlite3_bind_text(stmt_update, 1, filename, -1, SQLITE_TRANSIENT); rc = sqlite3_bind_int(stmt_update, 2, id); rc = sqlite3_step(stmt_update); library_sqlite_error(db, rc); sqlite3_finalize(stmt_update); g_free(filename); } } sqlite3_finalize(stmt); library_set_version(db, version+1); library_execute_sql(db, "COMMIT;"); break; default: /* We should never hit this */ g_debug("Some error occured in library_check_version() - please notify developers"); break; } version++; g_debug("Updated library database to version %d", version); } } static void rs_library_init(RSLibrary *library) { int rc; gchar *database = g_strdup_printf("%s/.rawstudio/library.db", g_get_home_dir()); /* If unable to create database we exit */ if(sqlite3_open(database, &(library->db))) { gchar *msg = g_strdup_printf(_("Could not open database %s"), database); g_debug("sqlite3 debug: %s\n", msg); if (library->error_init) g_free(library->error_init); library->error_init = g_strdup(msg); sqlite3_close(library->db); } g_free(database); if (rs_library_has_database_connection(library)) { /* This is not FULL synchronous mode as default, since all data is re-creatable by local xml files. From the sqlite3 manual: With synchronous OFF (0), SQLite continues without syncing as soon as it has handed data off to the operating system. If the application running SQLite crashes, the data will be safe, but the database might become corrupted if the operating system crashes or the computer loses power before that data has been written to the disk surface. On the other hand, some operations are as much as 50 or more times faster with synchronous OFF. " */ library_execute_sql(library->db, "PRAGMA synchronous = OFF;"); /* Move our journal to memory, we're not doing banking for the Mafia */ library_execute_sql(library->db, "PRAGMA journal_mode = memory;"); /* Place temp tables in memory */ library_execute_sql(library->db, "PRAGMA temp_store = memory;"); rc = library_create_tables(library->db); library_sqlite_error(library->db, rc); library_check_version(library->db); library->id_lock = g_mutex_new(); } } RSLibrary * rs_library_get_singleton(void) { static GStaticMutex singleton_lock = G_STATIC_MUTEX_INIT; static RSLibrary *singleton = NULL; g_static_mutex_lock(&singleton_lock); if (!singleton) singleton = g_object_new(RS_TYPE_LIBRARY, NULL); g_static_mutex_unlock(&singleton_lock); return singleton; } static gint library_execute_sql(sqlite3 *db, const gchar *sql) { sqlite3_stmt *statement; if(SQLITE_OK != sqlite3_prepare(db, sql, -1, &statement, 0)) return sqlite3_errcode(db); while (SQLITE_ROW == sqlite3_step(statement)); return sqlite3_finalize(statement); } static void library_sqlite_error(sqlite3 *db, gint result) { if (result != SQLITE_OK && result != SQLITE_DONE) { g_warning("sqlite3 warning: %s\n", sqlite3_errmsg(db)); } } static gint library_create_tables(sqlite3 *db) { sqlite3_stmt *stmt; gint rc; /* Create table (library) to hold all known photos */ sqlite3_prepare_v2(db, "create table library (id integer primary key, filename varchar(1024), identifier varchar(32))", -1, &stmt, NULL); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); /* Create table (tags) with all known tags */ sqlite3_prepare_v2(db, "create table tags (id integer primary key, tagname varchar(128))", -1, &stmt, NULL); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); /* Create table (phototags) to bind tags and photos together */ sqlite3_prepare_v2(db, "create table phototags (photo integer, tag integer, autotag integer)", -1, &stmt, NULL); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); /* Create table (version) to help keeping track of database version */ sqlite3_prepare_v2(db, "create table version (version integer)", -1, &stmt, NULL); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); rc = sqlite3_prepare_v2(db, "select * from version", -1, &stmt, NULL); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); if (rc != SQLITE_ROW) { /* Set current version */ rc = sqlite3_prepare_v2(db, "insert into version (version) values (?1);", -1, &stmt, NULL); rc = sqlite3_bind_int(stmt, 1, LIBRARY_VERSION); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); rc = sqlite3_prepare_v2(db, "select identifier from library", -1, &stmt, NULL); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); /* Check if library.identifier exists */ if (rc == SQLITE_MISUSE) { library_set_version(db, 0); } } return SQLITE_OK; } static gint library_find_tag_id(RSLibrary *library, const gchar *tagname) { sqlite3 *db = library->db; sqlite3_stmt *stmt; gint rc, tag_id = -1; rc = sqlite3_prepare_v2(db, "SELECT id FROM tags WHERE tagname = ?1;", -1, &stmt, NULL); rc = sqlite3_bind_text(stmt, 1, tagname, -1, SQLITE_TRANSIENT); rc = sqlite3_step(stmt); if (rc == SQLITE_ROW) tag_id = sqlite3_column_int(stmt, 0); rc = sqlite3_finalize(stmt); return tag_id; } static gint library_find_photo_id(RSLibrary *library, const gchar *photo) { sqlite3 *db = library->db; sqlite3_stmt *stmt; gint rc, photo_id = -1; rc = sqlite3_prepare_v2(db, "SELECT id FROM library WHERE filename = ?1;", -1, &stmt, NULL); rc = sqlite3_bind_text(stmt, 1, photo, -1, SQLITE_TRANSIENT); library_sqlite_error(db, rc); rc = sqlite3_step(stmt); if (rc == SQLITE_ROW) photo_id = sqlite3_column_int(stmt, 0); rc = sqlite3_finalize(stmt); return photo_id; } static void library_photo_add_tag(RSLibrary *library, const gint photo_id, const gint tag_id, const gboolean autotag) { sqlite3 *db = library->db; gint rc; sqlite3_stmt *stmt; gint autotag_tag = 0; if (autotag) autotag_tag = 1; g_mutex_lock(library->id_lock); rc = sqlite3_prepare_v2(db, "INSERT INTO phototags (photo, tag, autotag) VALUES (?1, ?2, ?3);", -1, &stmt, NULL); rc = sqlite3_bind_int (stmt, 1, photo_id); rc = sqlite3_bind_int (stmt, 2, tag_id); rc = sqlite3_bind_int (stmt, 3, autotag_tag); rc = sqlite3_step(stmt); g_mutex_unlock(library->id_lock); if (rc != SQLITE_DONE) library_sqlite_error(db, rc); sqlite3_finalize(stmt); } static gboolean library_is_photo_tagged(RSLibrary *library, gint photo_id, gint tag_id) { sqlite3 *db = library->db; gint rc; sqlite3_stmt *stmt; rc = sqlite3_prepare_v2(db, "SELECT * FROM phototags WHERE photo = ?1 AND tag = ?2;", -1, &stmt, NULL); rc = sqlite3_bind_int (stmt, 1, photo_id); rc = sqlite3_bind_int (stmt, 2, tag_id); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); if (rc == SQLITE_ROW) return TRUE; else return FALSE; } static void got_checksum(const gchar *checksum, gpointer user_data) { RSLibrary *library = rs_library_get_singleton(); sqlite3 *db = library->db; sqlite3_stmt *stmt; sqlite3_prepare_v2(db, "UPDATE LIBRARY SET identifier=?1 WHERE id=?2;", -1, &stmt, NULL); sqlite3_bind_text(stmt, 1, checksum, -1, SQLITE_TRANSIENT); sqlite3_bind_int(stmt, 2, GPOINTER_TO_INT(user_data)); sqlite3_step(stmt); sqlite3_finalize(stmt); } static gint library_add_photo(RSLibrary *library, const gchar *filename) { gint id; sqlite3 *db = library->db; gint rc; sqlite3_stmt *stmt; g_mutex_lock(library->id_lock); sqlite3_prepare_v2(db, "INSERT INTO library (filename) VALUES (?1);", -1, &stmt, NULL); rc = sqlite3_bind_text(stmt, 1, filename, -1, SQLITE_TRANSIENT); rc = sqlite3_step(stmt); id = sqlite3_last_insert_rowid(db); g_mutex_unlock(library->id_lock); if (rc != SQLITE_DONE) library_sqlite_error(db, rc); sqlite3_finalize(stmt); rs_io_idle_read_checksum(filename, -1, got_checksum, GINT_TO_POINTER(id)); return id; } static gint library_add_tag(RSLibrary *library, const gchar *tagname) { gint id; sqlite3 *db = library->db; gint rc; sqlite3_stmt *stmt; g_mutex_lock(library->id_lock); sqlite3_prepare_v2(db, "INSERT INTO tags (tagname) VALUES (?1);", -1, &stmt, NULL); rc = sqlite3_bind_text(stmt, 1, tagname, -1, SQLITE_TRANSIENT); rc = sqlite3_step(stmt); id = sqlite3_last_insert_rowid(db); g_mutex_unlock(library->id_lock); if (rc != SQLITE_DONE) library_sqlite_error(db, rc); sqlite3_finalize(stmt); return id; } static void library_delete_photo(RSLibrary *library, gint photo_id) { sqlite3 *db = library->db; sqlite3_stmt *stmt; gint rc; rc = sqlite3_prepare_v2(db, "DELETE FROM library WHERE id = ?1;", -1, &stmt, NULL); rc = sqlite3_bind_int(stmt, 1, photo_id); library_sqlite_error(db, rc); rc = sqlite3_step(stmt); if (rc != SQLITE_DONE) library_sqlite_error(db, rc); rc = sqlite3_finalize(stmt); } static void library_delete_tag(RSLibrary *library, gint tag_id) { sqlite3 *db = library->db; sqlite3_stmt *stmt; gint rc; rc = sqlite3_prepare_v2(db, "DELETE FROM library WHERE filename = ?1;", -1, &stmt, NULL); rc = sqlite3_bind_int(stmt, 1, tag_id); library_sqlite_error(db, rc); rc = sqlite3_step(stmt); if (rc != SQLITE_DONE) library_sqlite_error(db, rc); rc = sqlite3_finalize(stmt); } static void library_photo_delete_tags(RSLibrary *library, gint photo_id) { sqlite3 *db = library->db; sqlite3_stmt *stmt; gint rc; rc = sqlite3_prepare_v2(db, "DELETE FROM phototags WHERE photo = ?1;", -1, &stmt, NULL); rc = sqlite3_bind_int(stmt, 1, photo_id); library_sqlite_error(db, rc); rc = sqlite3_step(stmt); if (rc != SQLITE_DONE) library_sqlite_error(db, rc); rc = sqlite3_finalize(stmt); } static void library_tag_delete_photos(RSLibrary *library, gint tag_id) { sqlite3 *db = library->db; sqlite3_stmt *stmt; gint rc; rc = sqlite3_prepare_v2(db, "DELETE FROM phototags WHERE tag = ?1;", -1, &stmt, NULL); rc = sqlite3_bind_int(stmt, 1, tag_id); library_sqlite_error(db, rc); rc = sqlite3_step(stmt); if (rc != SQLITE_DONE) library_sqlite_error(db, rc); rc = sqlite3_finalize(stmt); } static gboolean library_tag_is_used(RSLibrary *library, gint tag_id) { sqlite3 *db = library->db; gint rc; sqlite3_stmt *stmt; rc = sqlite3_prepare_v2(db, "SELECT * FROM phototags WHERE tag = ?1;", -1, &stmt, NULL); rc = sqlite3_bind_int (stmt, 1, tag_id); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); if (rc == SQLITE_ROW) return TRUE; else return FALSE; } gint rs_library_add_photo(RSLibrary *library, const gchar *filename) { gint photo_id; g_assert(RS_IS_LIBRARY(library)); if (!rs_library_has_database_connection(library)) return 0; /* FIXME */ photo_id = library_find_photo_id(library, filename); if (photo_id == -1) { g_debug("Adding photo to library: %s",filename); photo_id = library_add_photo(library, filename); } return photo_id; } gint rs_library_add_tag(RSLibrary *library, const gchar *tagname) { gint tag_id; g_assert(RS_IS_LIBRARY(library)); if (!rs_library_has_database_connection(library)) return 0; /* FIXME */ tag_id = library_find_tag_id(library, tagname); if (tag_id == -1) { g_debug("Adding tag to tags: %s",tagname); tag_id = library_add_tag(library, tagname); } return tag_id; } void rs_library_photo_add_tag(RSLibrary *library, const gchar *filename, gint tag_id, const gboolean autotag) { g_assert(RS_IS_LIBRARY(library)); if (!rs_library_has_database_connection(library)) return; gint photo_id; if (tag_id == -1) { g_warning("Tag not known..."); return; } photo_id = library_find_photo_id(library, filename); if (photo_id == -1) { g_warning("Photo not known..."); return; } if (!library_is_photo_tagged(library, photo_id, tag_id)) library_photo_add_tag(library, photo_id, tag_id, autotag); return; } void rs_library_delete_photo(RSLibrary *library, const gchar *photo) { g_assert(RS_IS_LIBRARY(library)); if (!rs_library_has_database_connection(library)) return; gint photo_id = -1; photo_id = library_find_photo_id(library, photo); if (photo_id == -1) { g_warning("Photo not known..."); return; } library_photo_delete_tags(library, photo_id); library_delete_photo(library, photo_id); rs_library_backup_tags(library, photo); } gboolean rs_library_delete_tag(RSLibrary *library, const gchar *tag, const gboolean force) { g_assert(RS_IS_LIBRARY(library)); if (!rs_library_has_database_connection(library)) return FALSE; gint tag_id = -1; tag_id = library_find_tag_id(library, tag); if (tag_id == -1) { g_warning("Tag not known..."); return FALSE; } if (library_tag_is_used(library, tag_id)) if (force) { library_tag_delete_photos(library, tag_id); library_delete_tag(library, tag_id); } else { g_warning("Tag is in use..."); return FALSE; } else library_delete_tag(library, tag_id); return TRUE; } GList * rs_library_search(RSLibrary *library, GList *tags) { g_assert(RS_IS_LIBRARY(library)); if (!rs_library_has_database_connection(library)) return NULL; sqlite3_stmt *stmt; gint rc; sqlite3 *db = library->db; gchar *tag; gint n, num_tags = g_list_length(tags); GList *photos = NULL; GTimer *gt = g_timer_new(); gchar *filename; sqlite3_prepare_v2(db, "create temp table filter (photo integer)", -1, &stmt, NULL); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); library_sqlite_error(db, rc); for (n = 0; n < num_tags; n++) { tag = (gchar *) g_list_nth_data(tags, n); g_mutex_lock(library->id_lock); sqlite3_prepare_v2(db, "insert into filter select phototags.photo from phototags, tags where phototags.tag = tags.id and lower(tags.tagname) = lower(?1) ;", -1, &stmt, NULL); rc = sqlite3_bind_text(stmt, 1, tag, -1, SQLITE_TRANSIENT); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); g_mutex_unlock(library->id_lock); } sqlite3_prepare_v2(db, "create temp table result (photo integer, count integer)", -1, &stmt, NULL); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); library_sqlite_error(db, rc); g_mutex_lock(library->id_lock); sqlite3_prepare_v2(db, "insert into result select photo, count(photo) from filter group by photo;", -1, &stmt, NULL); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); g_mutex_unlock(library->id_lock); library_sqlite_error(db, rc); sqlite3_prepare_v2(db, "select library.filename from library,result where library.id = result.photo and result.count = ?1 order by library.filename;", -1, &stmt, NULL); rc = sqlite3_bind_int(stmt, 1, num_tags); gint count = 0; while (sqlite3_step(stmt) == SQLITE_ROW && count < MAX_SEARCH_RESULTS) { filename = g_strdup((gchar *) sqlite3_column_text(stmt, 0)); if (g_file_test(filename, G_FILE_TEST_EXISTS)) { photos = g_list_append(photos, filename); count++; } } sqlite3_finalize(stmt); library_sqlite_error(db, rc); /* Empty filter */ sqlite3_prepare_v2(db, "delete from filter;", -1, &stmt, NULL); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); library_sqlite_error(db, rc); /* Empty result */ sqlite3_prepare_v2(db, "delete from result;", -1, &stmt, NULL); rc = sqlite3_step(stmt); sqlite3_finalize(stmt); library_sqlite_error(db, rc); g_debug("Search in library took %.03f seconds", g_timer_elapsed(gt, NULL)); g_timer_destroy(gt); return photos; } static void library_photo_default_tags(RSLibrary *library, const gint photo_id, RSMetadata *metadata) { g_assert(RS_IS_LIBRARY(library)); GList *tags = NULL; if (metadata->make_ascii) { GList *temp = rs_split_string(metadata->make_ascii, " "); tags = g_list_concat(tags, temp); } if (metadata->model_ascii) { GList *temp = rs_split_string(metadata->model_ascii, " "); tags = g_list_concat(tags, temp); } if (metadata->lens_min_focal != -1 && metadata->lens_max_focal != -1) { gchar *lens = NULL; if (metadata->lens_min_focal == metadata->lens_max_focal) lens = g_strdup_printf("%dmm",(gint) metadata->lens_min_focal); else lens = g_strdup_printf("%d-%dmm",(gint) metadata->lens_min_focal, (gint) metadata->lens_max_focal); tags = g_list_append(tags, g_strdup(lens)); g_free(lens); } if (metadata->focallength > 0) { gchar *text = NULL; if (metadata->focallength < 50) text = g_strdup(_("wideangle")); else text = g_strdup(_("telephoto")); tags = g_list_append(tags, g_strdup(text)); g_free(text); } if (metadata->timestamp != -1) { gchar *year = NULL; gchar *month = NULL; GDate *date = g_date_new(); g_date_set_time_t(date, metadata->timestamp); year = g_strdup_printf("%d", g_date_get_year(date)); gint m = g_date_get_month(date); switch (m) { case 1: month = g_strdup(_("January")); /* FIXME: There may be a better way to do this */ break; case 2: month = g_strdup(_("February")); break; case 3: month = g_strdup(_("March")); break; case 4: month = g_strdup(_("April")); break; case 5: month = g_strdup(_("May")); break; case 6: month = g_strdup(_("June")); break; case 7: month = g_strdup(_("July")); break; case 8: month = g_strdup(_("August")); break; case 9: month = g_strdup(_("September")); break; case 10: month = g_strdup(_("October")); break; case 11: month = g_strdup(_("November")); break; case 12: month = g_strdup(_("December")); break; } tags = g_list_append(tags, g_strdup(year)); tags = g_list_append(tags, g_strdup(month)); g_date_free(date); g_free(year); g_free(month); } gint i, j; library_execute_sql(library->db, "BEGIN TRANSACTION;"); gint *used_tags = g_malloc(g_list_length(tags) * sizeof(gint)); for(i = 0; i < g_list_length(tags); i++) { gchar *tag = (gchar *) g_list_nth_data(tags, i); gint tag_id = rs_library_add_tag(library, tag); /* Check if tag has already been added */ gboolean used = FALSE; for (j = 0; j < i; j++) if (tag_id == used_tags[j]) used = TRUE; if (!used) library_photo_add_tag(library, photo_id, tag_id, TRUE); used_tags[i] = tag_id; g_free(tag); } g_free(used_tags); library_execute_sql(library->db, "COMMIT;"); g_list_free(tags); } GList * rs_library_photo_tags(RSLibrary *library, const gchar *photo, const gboolean autotag) { g_assert(RS_IS_LIBRARY(library)); if (!rs_library_has_database_connection(library)) return NULL; sqlite3_stmt *stmt; gint rc; sqlite3 *db = library->db; GList *tags = NULL; if (autotag) { sqlite3_prepare_v2(db, "select tags.tagname from library,phototags,tags WHERE library.id=phototags.photo and phototags.tag=tags.id and library.filename = ?1;", -1, &stmt, NULL); rc = sqlite3_bind_text(stmt, 1, photo, -1, NULL); } else { sqlite3_prepare_v2(db, "select tags.tagname from library,phototags,tags WHERE library.id=phototags.photo and phototags.tag=tags.id and library.filename = ?1 and phototags.autotag = 0;", -1, &stmt, NULL); rc = sqlite3_bind_text(stmt, 1, photo, -1, NULL); } while (sqlite3_step(stmt) == SQLITE_ROW) tags = g_list_append(tags, g_strdup((gchar *) sqlite3_column_text(stmt, 0))); sqlite3_finalize(stmt); library_sqlite_error(db, rc); return tags; } GList * rs_library_find_tag(RSLibrary *library, const gchar *tag) { g_assert(RS_IS_LIBRARY(library)); if (!rs_library_has_database_connection(library)) return NULL; sqlite3_stmt *stmt; gint rc; sqlite3 *db = library->db; GList *tags = NULL; rc = sqlite3_prepare_v2(db, "select tags.tagname from tags WHERE tags.tagname like ?1 order by tags.tagname;", -1, &stmt, NULL); gchar *like = g_strdup_printf("%%%s%%", tag); rc = sqlite3_bind_text(stmt, 1, like, -1, NULL); library_sqlite_error(db, rc); while (sqlite3_step(stmt) == SQLITE_ROW) tags = g_list_append(tags, g_strdup((gchar *) sqlite3_column_text(stmt, 0))); sqlite3_finalize(stmt); library_sqlite_error(db, rc); g_free(like); return tags; } gboolean rs_library_set_tag_search(gchar *str) { if (!str) return FALSE; gtk_entry_set_text(GTK_ENTRY(tag_search_entry), str); return TRUE; } void rs_library_add_photo_with_metadata(RSLibrary *library, const gchar *photo, RSMetadata *metadata) { if (!rs_library_has_database_connection(library)) return; /* Bail out if we already know the photo */ if (library_find_photo_id(library, photo) > -1) return; gint photo_id = library_add_photo(library, photo); library_photo_default_tags(library, photo_id, metadata); } static GStaticMutex backup_lock = G_STATIC_MUTEX_INIT; void rs_library_backup_tags(RSLibrary *library, const gchar *photo_filename) { if (!rs_library_has_database_connection(library)) return; sqlite3 *db = library->db; sqlite3_stmt *stmt; gint rc; gchar *filename = NULL, *checksum, *tag, *t_filename; gint autotag; gchar *directory = g_path_get_dirname(photo_filename); gchar *dotdir = rs_dotdir_get(photo_filename); g_static_mutex_lock (&backup_lock); if (!dotdir) return; GString *gs = g_string_new(dotdir); g_string_append(gs, G_DIR_SEPARATOR_S); g_string_append(gs, TAGS_XML_FILE); gchar *xmlfile = gs->str; g_string_free(gs, FALSE); xmlTextWriterPtr writer; writer = xmlNewTextWriterFilename(xmlfile, 0); if (!writer) { g_free(directory); g_free(dotdir); g_free(xmlfile); g_static_mutex_unlock (&backup_lock); return; } xmlTextWriterSetIndent(writer, 1); xmlTextWriterStartDocument(writer, NULL, "UTF-8", NULL); xmlTextWriterStartElement(writer, BAD_CAST "rawstudio-tags"); xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "version", "%d", LIBRARY_VERSION); const gchar *temp = g_strdup_printf("%s/%%", directory); rc = sqlite3_prepare_v2(db, "select library.filename,library.identifier,tags.tagname,phototags.autotag from library,phototags,tags where library.filename like ?1 and phototags.photo = library.id and tags.id = phototags.tag order by library.filename;", -1, &stmt, NULL); rc = sqlite3_bind_text(stmt, 1, temp, -1, SQLITE_TRANSIENT); library_sqlite_error(db, rc); while (sqlite3_step(stmt) == SQLITE_ROW) { t_filename = g_path_get_basename((gchar *) sqlite3_column_text(stmt, 0)); if (g_strcmp0(t_filename, filename) != 0 || filename == NULL) { if (filename != NULL) xmlTextWriterEndElement(writer); filename = t_filename; xmlTextWriterStartElement(writer, BAD_CAST "file"); xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "name", "%s", filename); checksum = (gchar *) sqlite3_column_text(stmt, 1); xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "checksum", "%s", checksum); } tag = (gchar *) sqlite3_column_text(stmt, 2); autotag = (gint) sqlite3_column_int(stmt, 3); xmlTextWriterStartElement(writer, BAD_CAST "tag"); xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "name", "%s", tag); xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "auto", "%d", autotag); xmlTextWriterEndElement(writer); } xmlTextWriterEndElement(writer); rc = sqlite3_finalize(stmt); xmlTextWriterEndDocument(writer); xmlFreeTextWriter(writer); g_free(directory); g_free(dotdir); g_free(xmlfile); g_static_mutex_unlock (&backup_lock); return; } void rs_library_restore_tags(const gchar *directory) { RSLibrary *library = rs_library_get_singleton(); if (!rs_library_has_database_connection(library)) return; gchar *dotdir = rs_dotdir_get(directory); if (!dotdir) return; GString *gs = g_string_new(dotdir); g_string_append(gs, G_DIR_SEPARATOR_S); g_string_append(gs, TAGS_XML_FILE); gchar *xmlfile = gs->str; g_string_free(gs, FALSE); if (!g_file_test(xmlfile, G_FILE_TEST_EXISTS)) { g_free(dotdir); g_free(xmlfile); return; } xmlDocPtr doc; xmlNodePtr cur, cur2; xmlChar *val; gint version = 0; gchar *filename, *identifier, *tagname; gint autotag, photoid, tagid; doc = xmlParseFile(xmlfile); if (!doc) return; cur = xmlDocGetRootElement(doc); if ((!xmlStrcmp(cur->name, BAD_CAST "rawstudio-tags"))) { val = xmlGetProp(cur, BAD_CAST "version"); if (val) version = atoi((gchar *) val); if (version > LIBRARY_VERSION) { xmlFree(val); g_free(dotdir); g_free(xmlfile); xmlFreeDoc(doc); return; } } cur = cur->xmlChildrenNode; while(cur) { if ((!xmlStrcmp(cur->name, BAD_CAST "file"))) { val = xmlGetProp(cur, BAD_CAST "name"); filename = g_build_filename(directory, val, NULL); xmlFree(val); photoid = library_find_photo_id(library, filename); if ( photoid == -1 && g_file_test(filename, G_FILE_TEST_EXISTS)) { photoid = rs_library_add_photo(library, filename); val = xmlGetProp(cur, BAD_CAST "checksum"); identifier = (gchar *) val; cur2 = cur->xmlChildrenNode; while(cur2) { if ((!xmlStrcmp(cur2->name, BAD_CAST "tag"))) { val = xmlGetProp(cur2, BAD_CAST "name"); tagname =(gchar*) val; tagid = library_find_tag_id(library, tagname); if ( tagid == -1) tagid = rs_library_add_tag(library, tagname); val = xmlGetProp(cur2, BAD_CAST "auto"); autotag = atoi((gchar *) val); xmlFree(val); library_photo_add_tag(library, photoid, tagid, (autotag == 1)); xmlFree(tagname); } cur2 = cur2->next; } xmlFree(identifier); } g_free(filename); } cur = cur->next; } g_free(dotdir); g_free(xmlfile); xmlFreeDoc(doc); return; } rawstudio-2.0/librawstudio/rs-icc-profile.h0000644000175000017500000001014711526533645016031 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_ICC_PROFILE_H #define RS_ICC_PROFILE_H #include G_BEGIN_DECLS #define RS_TYPE_ICC_PROFILE rs_icc_profile_get_type() #define RS_ICC_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_ICC_PROFILE, RSIccProfile)) #define RS_ICC_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_ICC_PROFILE, RSIccProfileClass)) #define RS_IS_ICC_PROFILE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_ICC_PROFILE)) #define RS_IS_ICC_PROFILE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_ICC_PROFILE)) #define RS_ICC_PROFILE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_ICC_PROFILE, RSIccProfileClass)) typedef struct _RSIccProfile RSIccProfile; typedef struct { GObjectClass parent_class; } RSIccProfileClass; GType rs_icc_profile_get_type(void); typedef enum { RS_ICC_COLORSPACE_UNDEFINED = 0x0, RS_ICC_COLORSPACE_XYZ = 0x58595A20, RS_ICC_COLORSPACE_LAB = 0x4C616220, RS_ICC_COLORSPACE_LUV = 0x4C757620, RS_ICC_COLORSPACE_YCBCR = 0x59436272, RS_ICC_COLORSPACE_YXY = 0x59787920, RS_ICC_COLORSPACE_RGB = 0x52474220, RS_ICC_COLORSPACE_GREY = 0x47524159, RS_ICC_COLORSPACE_HSV = 0x48535620, RS_ICC_COLORSPACE_HLS = 0x484C5320, RS_ICC_COLORSPACE_CMYK = 0x434D594B, RS_ICC_COLORSPACE_CMY = 0x434D5920 } RSIccProfile_ColorSpace; #define RS_TYPE_ICC_COLORSPACE rs_icc_colorspace_get_type() GType rs_icc_colorspace_get_type(void); typedef enum { RS_ICC_PROFILE_UNDEFINED = 0x0, RS_ICC_PROFILE_INPUT = 0x73636E72, RS_ICC_PROFILE_DISPLAY = 0x6D6E7472, RS_ICC_PROFILE_OUTPUT = 0x70727472, RS_ICC_PROFILE_DEVICELINK = 0x6C696E6B, RS_ICC_PROFILE_COLORSPACE_CONVERSION = 0x73706163, RS_ICC_PROFILE_ACSTRACT = 0x61627374, RS_ICC_PROFILE_NAMED_COLOR = 0x6E6D636C } RSIccProfile_Class; #define RS_TYPE_ICC_PROFILE_CLASS rs_icc_profile_class_get_type() GType rs_icc_profile_class_get_type(void); typedef enum { RS_ICC_INTENT_PERCEPTUAL = 0, RS_ICC_INTENT_RELATIVE_COLORIMETRIC = 1, RS_ICC_INTENT_SATURATION = 2, RS_ICC_INTENT_ABSOLUTE_COLORIMETRIC = 3 } RSIccIntent; #define RS_TYPE_ICC_INTENT rs_icc_intent_get_type() GType rs_icc_intent_get_type(void); /** * Construct new RSIccProfile from an ICC profile on disk * @param path An absolute path to an ICC profile * @return A new RSIccProfile object or NULL on error */ RSIccProfile * rs_icc_profile_new_from_file(const gchar *path); /** * Construct new RSIccProfile from an in-memory ICC profile * @param map A pointer to a complete ICC profile * @param map_length The length of the profile in bytes * @param copy TRUE if the data should be copied, FALSE otherwise * @return A new RSIccProfile object or NULL on error */ RSIccProfile * rs_icc_profile_new_from_memory(gchar *map, gsize map_length, gboolean copy); /** * Get binary profile data * @param profile A RSIccProfile * @param map A pointer to a gchar pointer * @param map_length A pointer to a gsize, the length of the profile will be written here */ gboolean rs_icc_profile_get_data(const RSIccProfile *icc, gchar **data, gsize *length); const gchar * rs_icc_profile_get_description(const RSIccProfile *profile); G_END_DECLS #endif /* RS_ICC_PROFILE_H */ rawstudio-2.0/librawstudio/rs-tiff.h0000644000175000017500000000674211526533645014573 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_TIFF_H #define RS_TIFF_H #include "rs-types.h" #include "rs-tiff-ifd-entry.h" #include G_BEGIN_DECLS #define RS_TYPE_TIFF rs_tiff_get_type() #define RS_TIFF(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_TIFF, RSTiff)) #define RS_TIFF_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_TIFF, RSTiffClass)) #define RS_IS_TIFF(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_TIFF)) #define RS_IS_TIFF_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_TIFF)) #define RS_TIFF_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_TIFF, RSTiffClass)) /* Macros to read from TIFF files */ #define __rs_cast(x, type) (*((type*)(&(x)))) #define rs_tiff_get_generic(tiff, pos, TYPE, type) ( \ ((tiff)->map_length >= ((pos)+sizeof(type))) \ ? \ ( \ ((tiff)->byte_order == G_LITTLE_ENDIAN) \ ? (TYPE##_FROM_LE(__rs_cast((tiff)->map[(pos)], type))) \ : (TYPE##_FROM_BE(__rs_cast((tiff)->map[(pos)], type))) \ ) \ : 0 \ ) #define rs_tiff_get_simple(tiff, pos, type) ( \ ((pos) <= ((tiff)->map_length-sizeof(type))) \ ? __rs_cast((tiff)->map[(pos)], type) \ : 0 \ ) #define rs_tiff_get_uchar(tiff, pos) rs_tiff_get_simple(tiff, pos, guchar) #define rs_tiff_get_ushort(tiff, pos) rs_tiff_get_generic(tiff, pos, GUINT16, guint16) #define rs_tiff_get_uint(tiff, pos) rs_tiff_get_generic(tiff, pos, GUINT32, guint32) #define rs_tiff_get_urational(tiff, pos) ((gfloat) rs_tiff_get_uint(tiff, pos)) / ((gfloat) rs_tiff_get_uint(tiff, pos+sizeof(guint))) #define rs_tiff_get_char(tiff, pos) rs_tiff_get_simple(tiff, pos, gchar) #define rs_tiff_get_short(tiff, pos) rs_tiff_get_generic(tiff, pos, GINT16, gshort) #define rs_tiff_get_int(tiff, pos) rs_tiff_get_generic(tiff, pos, GINT32, gint) #define rs_tiff_get_rational(tiff, pos) ((gfloat) rs_tiff_get_int(tiff, pos)) / ((gfloat) ((rs_tiff_get_int(tiff, pos+sizeof(gint)) == 0) ? 1 : rs_tiff_get_int(tiff, pos+sizeof(gint)))) #define rs_tiff_get_float(tiff, pos) rs_tiff_get_simple(tiff, pos, gfloat) #define rs_tiff_get_double(tiff, pos) rs_tiff_get_simple(tiff, pos, gdouble) typedef struct { GObjectClass parent_class; gboolean (*read_file_header)(RSTiff *tiff); } RSTiffClass; GType rs_tiff_get_type(void); RSTiff *rs_tiff_new_from_file(const gchar *filename); const gchar * rs_tiff_get_filename(RSTiff *tiff); const gchar * rs_tiff_get_filename_nopath(RSTiff *tiff); RSTiffIfdEntry * rs_tiff_get_ifd_entry(RSTiff *tiff, guint ifd_num, gushort tag); gchar * rs_tiff_get_ascii(RSTiff *tiff, guint ifd_num, gushort tag); /* Free allocated data. This will cause the file to be reloaded on next access */ void rs_tiff_free_data(RSTiff *tiff); G_END_DECLS #endif /* RS_TIFF_H */ rawstudio-2.0/librawstudio/rs-io-job-checksum.c0000644000175000017500000000463311526533645016612 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-io-job-checksum.h" #include "rawstudio.h" typedef struct { RSIoJob parent; gboolean dispose_has_run; gchar *path; gchar *checksum; RSGotChecksumCB callback; } RSIoJobChecksum; G_DEFINE_TYPE(RSIoJobChecksum, rs_io_job_checksum, RS_TYPE_IO_JOB) static void execute(RSIoJob *job) { RSIoJobChecksum *checksum = RS_IO_JOB_CHECKSUM(job); rs_io_lock(); checksum->checksum = rs_file_checksum(checksum->path); rs_io_unlock(); } static void do_callback(RSIoJob *job) { RSIoJobChecksum *checksum = RS_IO_JOB_CHECKSUM(job); if (checksum->callback && checksum->checksum) checksum->callback(checksum->checksum, job->user_data); } static void rs_io_job_checksum_dispose(GObject *object) { RSIoJobChecksum *checksum = RS_IO_JOB_CHECKSUM(object); if (!checksum->dispose_has_run) { checksum->dispose_has_run = TRUE; g_free(checksum->path); g_free(checksum->checksum); } G_OBJECT_CLASS (rs_io_job_checksum_parent_class)->dispose(object); } static void rs_io_job_checksum_class_init(RSIoJobChecksumClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); RSIoJobClass *job_class = RS_IO_JOB_CLASS(klass); object_class->dispose = rs_io_job_checksum_dispose; job_class->execute = execute; job_class->do_callback = do_callback; } static void rs_io_job_checksum_init(RSIoJobChecksum *checksum) { } RSIoJob * rs_io_job_checksum_new(const gchar *path, RSGotChecksumCB callback) { RSIoJobChecksum *checksum = g_object_new(RS_TYPE_IO_JOB_CHECKSUM, NULL); checksum->path = g_strdup(path); checksum->callback = callback; return RS_IO_JOB(checksum); } rawstudio-2.0/librawstudio/rs-plugin.c0000644000175000017500000001120011526533645015115 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include "rs-plugin.h" struct _RSPlugin { GTypeModule parent_instance; gchar *filename; GModule *library; void (*load)(RSPlugin *plugin); void (*unload)(RSPlugin *plugin); }; struct _RSPluginClass { GTypeModuleClass parent_class; }; enum { PROP_0, PROP_FILENAME }; static void rs_plugin_finalize (GObject *object); static void rs_plugin_get_property (GObject *object, guint param_id, GValue *value, GParamSpec *pspec); static void rs_plugin_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec); static gboolean rs_plugin_load_module (GTypeModule *gmodule); static void rs_plugin_unload_module (GTypeModule *gmodule); G_DEFINE_TYPE(RSPlugin, rs_plugin, G_TYPE_TYPE_MODULE); static void rs_plugin_class_init(RSPluginClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); GTypeModuleClass *type_module_class = G_TYPE_MODULE_CLASS(klass); object_class->finalize = rs_plugin_finalize; object_class->get_property = rs_plugin_get_property; object_class->set_property = rs_plugin_set_property; type_module_class->load = rs_plugin_load_module; type_module_class->unload = rs_plugin_unload_module; g_object_class_install_property(object_class, PROP_FILENAME, g_param_spec_string ( "filename", "Filename", "The filaname of the plugin", NULL, G_PARAM_READWRITE |G_PARAM_CONSTRUCT_ONLY) ); } static void rs_plugin_init(RSPlugin *plugin) { plugin->filename = NULL; plugin->library = NULL; plugin->load = NULL; plugin->unload = NULL; } static void rs_plugin_finalize(GObject *object) { RSPlugin *plugin = RS_PLUGIN(object); g_free(plugin->filename); G_OBJECT_CLASS(rs_plugin_parent_class)->finalize(object); } static void rs_plugin_get_property(GObject *object, guint param_id, GValue *value, GParamSpec *pspec) { RSPlugin *plugin = RS_PLUGIN(object); switch (param_id) { case PROP_FILENAME: g_value_set_string(value, plugin->filename); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; } } static void rs_plugin_set_property (GObject *object, guint param_id, const GValue *value, GParamSpec *pspec) { RSPlugin *plugin = RS_PLUGIN(object); switch (param_id) { case PROP_FILENAME: g_free (plugin->filename); plugin->filename = g_value_dup_string (value); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, param_id, pspec); break; } } static gboolean rs_plugin_load_module(GTypeModule *gmodule) { RSPlugin *plugin = RS_PLUGIN(gmodule); g_assert(G_IS_TYPE_MODULE(gmodule)); g_assert(RS_IS_PLUGIN(plugin)); g_assert(plugin->filename != NULL); plugin->library = g_module_open(plugin->filename, 0); if (!plugin->library) { g_printerr ("%s\n", g_module_error ()); return FALSE; } if (!g_module_symbol(plugin->library, "rs_plugin_load", (gpointer *) &plugin->load)) { g_printerr ("%s\n", g_module_error ()); g_module_close (plugin->library); return FALSE; } /* This is not required from plugins - YET! */ if (!g_module_symbol(plugin->library, "rs_plugin_unload", (gpointer *) &plugin->unload)) plugin->unload = NULL; /* Execute plugin load method */ plugin->load (plugin); /* We don't support unloading of modules - FOR NOW - make sure it never happens */ g_module_make_resident(plugin->library); return TRUE; } static void rs_plugin_unload_module (GTypeModule *gmodule) { RSPlugin *plugin = RS_PLUGIN(gmodule); g_assert(G_IS_TYPE_MODULE(gmodule)); g_assert(RS_IS_PLUGIN(plugin)); if (plugin->unload) plugin->unload (plugin); g_module_close (plugin->library); plugin->library = NULL; plugin->load = NULL; plugin->unload = NULL; } RSPlugin * rs_plugin_new (const gchar *filename) { RSPlugin *plugin; g_assert(filename != NULL); plugin = g_object_new(RS_TYPE_PLUGIN, "filename", filename, NULL); return plugin; } rawstudio-2.0/librawstudio/rs-plugin.h0000644000175000017500000000325711526533645015137 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_PLUGIN_H #define RS_PLUGIN_H #include G_BEGIN_DECLS #define RS_TYPE_PLUGIN (rs_plugin_get_type ()) #define RS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), RS_TYPE_PLUGIN, RSPlugin)) #define RS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), RS_TYPE_PLUGIN, RSPluginClass)) #define RS_IS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), RS_TYPE_PLUGIN)) #define RS_IS_PLUGIN_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), RS_TYPE_PLUGIN)) #define RS_PLUGIN_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), RS_TYPE_PLUGIN, RSPluginClass)) typedef struct _RSPlugin RSPlugin; typedef struct _RSPluginClass RSPluginClass; GType rs_plugin_get_type(void) G_GNUC_CONST; RSPlugin *rs_plugin_new(const gchar *filename); void rs_plugin_load(RSPlugin *plugin); void rs_plugin_unload(RSPlugin *plugin); G_END_DECLS #endif /* RS_PLUGIN_H */ rawstudio-2.0/librawstudio/rawstudio.h0000644000175000017500000000441511547410760015230 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RAWSTUDIO_H #define RAWSTUDIO_H #ifdef __cplusplus extern "C" { #endif #include #include "rs-types.h" #include "rs-macros.h" #include "rs-debug.h" #include "rs-io-job.h" #include "rs-io-job-checksum.h" #include "rs-io-job-metadata.h" #include "rs-io-job-prefetch.h" #include "rs-io-job-tagging.h" #include "rs-io.h" #include "rs-rawfile.h" #include "rs-settings.h" #include "rs-exif.h" #include "rs-1d-function.h" #include "rs-icc-profile.h" #include "rs-color-space.h" #include "rs-color-space-icc.h" #include "rs-gui-functions.h" #include "rs-image.h" #include "rs-image16.h" #include "rs-metadata.h" #include "rs-lens.h" #include "rs-lens-db.h" #include "rs-lens-fix.h" #include "rs-library.h" #include "rs-filetypes.h" #include "rs-plugin.h" #include "rs-filter-param.h" #include "rs-filter-request.h" #include "rs-filter-response.h" #include "rs-filter.h" #include "rs-output.h" #include "rs-plugin-manager.h" #include "rs-job-queue.h" #include "rs-utils.h" #include "rs-math.h" #include "rs-color.h" #include "rs-settings.h" #include "rs-spline.h" #include "rs-curve.h" #include "rs-stock.h" #include "rs-tiff-ifd-entry.h" #include "rs-tiff-ifd.h" #include "rs-tiff.h" #include "rs-huesat-map.h" #include "rs-dcp-file.h" #include "rs-profile-factory.h" #include "rs-profile-selector.h" #include "rs-color-space-selector.h" #include "x86-cpu.h" #ifdef __cplusplus } /* extern "c" */ #endif #endif /* RAWSTUDIO_H */ rawstudio-2.0/librawstudio/rs-io.h0000644000175000017500000001041011543674627014242 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #ifndef RS_IO_H #define RS_IO_H /** * Add a RSIoJob to be executed later * @param job A RSIoJob. This will be unreffed upon completion * @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads * @param priority Lower value means higher priority * @param user_data A pointer to pass to the callback */ void rs_io_idle_add_job(RSIoJob *job, gint idle_class, gint priority, gpointer user_data); /** * Prefetch a file * @param path Absolute path to a file to prefetch * @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads * @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel() */ const RSIoJob * rs_io_idle_prefetch_file(const gchar *path, gint idle_class); /** * Load metadata belonging to a photo * @param path Absolute path to a photo * @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads * @param callback A callback to call when the data is ready or NULL * @param user_data Data to pass to the callback * @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel() */ const RSIoJob * rs_io_idle_read_metadata(const gchar *path, gint idle_class, RSGotMetadataCB callback, gpointer user_data); /** * Compute a "Rawstudio checksum" of a file * @param path Absolute path to a file * @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads * @param callback A callback to call when the data is ready or NULL * @param user_data Data to pass to the callback * @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel() */ const RSIoJob * rs_io_idle_read_checksum(const gchar *path, gint idle_class, RSGotChecksumCB callback, gpointer user_data); /** * Restore tags of a new directory or add tags to a photo * @param filename Absolute path to a file to tags to * @param tag_id The id of the tag to add. * @param auto_tag Is the tag an automatically generated tag * @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads * @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel() */ const RSIoJob * rs_io_idle_add_tag(const gchar *filename, gint tag_id, gboolean auto_tag, gint idle_class); /** * Restore tags of a new directory * @param path Absolute path to a directory to restore tags to * @param idle_class A user defined variable, this can be used with rs_io_idle_cancel_class() to cancel a batch of queued reads * @return A pointer to a RSIoJob, this can be used with rs_io_idle_cancel() */ const RSIoJob * rs_io_idle_restore_tags(const gchar *path, gint idle_class); /** * Cancel a complete class of idle requests * @param idle_class The class identifier */ void rs_io_idle_cancel_class(gint idle_class); /** * Cancel a idle request * @param request_id A request_id as returned by rs_io_idle_read_complete_file() */ void rs_io_idle_cancel(RSIoJob *job); /** * Pause the worker threads */ void rs_io_idle_pause(void); /** * Unpause the worker threads */ void rs_io_idle_unpause(void); /** * Aquire the IO lock */ void rs_io_lock(void); /** * Release the IO lock */ void rs_io_unlock(void); /** * Returns the number of jobs left */ gint rs_io_get_jobs_left(void); #endif /* RS_IO_H */ rawstudio-2.0/librawstudio/Makefile.in0000644000175000017500000007164211547430034015105 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = librawstudio DIST_COMMON = $(library_include_HEADERS) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/rawstudio-2.0.pc.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = rawstudio-2.0.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(sharedir)" "$(DESTDIR)$(library_includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = librawstudio_2_0_la_DEPENDENCIES = $(am__DEPENDENCIES_1) am_librawstudio_2_0_la_OBJECTS = rs-debug.lo rs-io-job.lo \ rs-io-job-checksum.lo rs-io-job-metadata.lo \ rs-io-job-prefetch.lo rs-io-job-tagging.lo rs-io.lo \ rs-plugin.lo rs-rawfile.lo rs-exif.lo rs-1d-function.lo \ rs-icc-profile.lo rs-color-space.lo rs-color-space-icc.lo \ rs-image.lo rs-image16.lo rs-lens.lo rs-lens-db.lo \ rs-lens-db-editor.lo rs-lens-fix.lo rs-metadata.lo \ rs-filetypes.lo rs-filter.lo rs-filter-param.lo \ rs-filter-request.lo rs-filter-response.lo rs-library.lo \ rs-output.lo rs-plugin-manager.lo rs-job-queue.lo rs-utils.lo \ rs-math.lo rs-color.lo rs-settings.lo rs-spline.lo rs-curve.lo \ rs-tiff.lo rs-tiff-ifd.lo rs-tiff-ifd-entry.lo \ rs-huesat-map.lo rs-dcp-file.lo rs-profile-factory.lo \ rs-profile-selector.lo rs-profile-camera.lo \ rs-color-space-selector.lo conf_interface.lo \ rs-gui-functions.lo rs-stock.lo librawstudio_2_0_la_OBJECTS = $(am_librawstudio_2_0_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = $(librawstudio_2_0_la_SOURCES) DIST_SOURCES = $(librawstudio_2_0_la_SOURCES) DATA = $(pkgconfig_DATA) $(share_DATA) HEADERS = $(library_include_HEADERS) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ AM_CFLAGS = -Wall -fno-strict-aliasing AM_CPPFLAGS = \ -I$(top_srcdir) \ -DWITH_GCONF \ $(GTK_CFLAGS) INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ library_includedir = $(includedir)/@PACKAGE@-@VERSION@/ library_include_HEADERS = rawstudio.h rs-types.h rs-macros.h \ rs-debug.h \ rs-io-job.h \ rs-io-job-checksum.h \ rs-io-job-metadata.h \ rs-io-job-prefetch.h \ rs-io-job-tagging.h \ rs-io.h \ rs-plugin.h \ rs-rawfile.h \ rs-exif.h \ rs-1d-function.h \ rs-icc-profile.h \ rs-color-space.h \ rs-color-space-icc.h \ rs-color-space-selector.h \ rs-image.h \ rs-image16.h \ rs-lens.h \ rs-lens-db.h \ rs-lens-db-editor.h \ rs-lens-fix.h \ rs-library.h\ rs-metadata.h \ rs-filetypes.h \ rs-filter.h \ rs-filter-param.h \ rs-filter-request.h \ rs-filter-response.h \ rs-output.h \ rs-plugin-manager.h \ rs-job-queue.h \ rs-utils.h \ rs-math.h \ rs-color.h \ rs-settings.h \ rs-spline.h \ rs-curve.h \ rs-stock.h \ rs-tiff.h \ rs-tiff-ifd.h \ rs-tiff-ifd-entry.h \ rs-huesat-map.h \ rs-dcp-file.h \ rs-profile-factory.h \ rs-profile-selector.h \ rs-profile-camera.h \ rs-gui-functions.h \ x86-cpu.h lib_LTLIBRARIES = librawstudio-2.0.la librawstudio_2_0_la_SOURCES = \ rs-debug.c rs-debug.h \ rs-io-job.c rs-io-job.h \ rs-io-job-checksum.c rs-io-job-checksum.h \ rs-io-job-metadata.c rs-io-job-metadata.h \ rs-io-job-prefetch.c rs-io-job-prefetch.h \ rs-io-job-tagging.c rs-io-job-tagging.h \ rs-io.c rs-io.h \ rs-plugin.c rs-plugin.h \ rs-rawfile.c rs-rawfile.h \ rs-exif.cc rs-exif.h \ rs-1d-function.c rs-1d-function.h \ rs-icc-profile.c rs-icc-profile.h \ rs-color-space.c rs-color-space.h \ rs-color-space-icc.c rs-color-space-icc.h \ rs-image.c rs-image.h \ rs-image16.c rs-image16.h \ rs-lens.c rs-lens.h \ rs-lens-db.c rs-lens-db.h \ rs-lens-db-editor.c rs-lens-db-editor.h \ rs-lens-fix.c rs-lens-fix.h \ rs-metadata.c rs-metadata.h \ rs-filetypes.c rs-filetypes.h \ rs-filter.c rs-filter.h \ rs-filter-param.c rs-filter-param.h \ rs-filter-request.c rs-filter-request.h \ rs-filter-response.c rs-filter-response.h \ rs-library.c rs-library.h\ rs-output.c rs-output.h \ rs-plugin-manager.c rs-plugin-manager.h \ rs-job-queue.c rs-job-queue.h \ rs-utils.c rs-utils.h \ rs-math.c rs-math.h \ rs-color.c rs-color.h \ rs-settings.c rs-settings.h \ rs-spline.c rs-spline.h \ rs-curve.c rs-curve.h \ rs-tiff.c rs-tiff.h \ rs-tiff-ifd.c rs-tiff-ifd.h \ rs-tiff-ifd-entry.c rs-tiff-ifd-entry.h \ rs-huesat-map.c rs-huesat-map.h \ rs-dcp-file.c rs-dcp-file.h \ rs-profile-factory.c rs-profile-factory.h rs-profile-factory-model.h \ rs-profile-selector.c rs-profile-selector.h \ rs-profile-camera.c rs-profile-camera.h \ rs-color-space-selector.c rs-color-space-selector.h \ conf_interface.c conf_interface.h \ rs-gui-functions.c rs-gui-functions.h \ rs-stock.c rs-stock.h librawstudio_2_0_la_LIBADD = @PACKAGE_LIBS@ @LIBJPEG@ @LIBTIFF@ $(INTLLIBS) pkgconfigdir = $(libdir)/pkgconfig pkgconfig_DATA = rawstudio-2.0.pc sharedir = $(datadir)/rawstudio/ share_DATA = lens_fix.xml EXTRA_DIST = \ $(share_DATA) all: all-am .SUFFIXES: .SUFFIXES: .c .cc .lo .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu librawstudio/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu librawstudio/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): rawstudio-2.0.pc: $(top_builddir)/config.status $(srcdir)/rawstudio-2.0.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ test "$$dir" != "$$p" || dir=.; \ echo "rm -f \"$${dir}/so_locations\""; \ rm -f "$${dir}/so_locations"; \ done librawstudio-2.0.la: $(librawstudio_2_0_la_OBJECTS) $(librawstudio_2_0_la_DEPENDENCIES) $(CXXLINK) -rpath $(libdir) $(librawstudio_2_0_la_OBJECTS) $(librawstudio_2_0_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conf_interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-1d-function.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-color-space-icc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-color-space-selector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-color-space.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-color.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-curve.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-dcp-file.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-exif.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-filetypes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-filter-param.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-filter-request.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-filter-response.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-filter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-gui-functions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-huesat-map.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-icc-profile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-image.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-image16.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-io-job-checksum.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-io-job-metadata.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-io-job-prefetch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-io-job-tagging.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-io-job.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-io.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-job-queue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-lens-db-editor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-lens-db.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-lens-fix.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-lens.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-library.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-math.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-metadata.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-output.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-plugin-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-plugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-profile-camera.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-profile-factory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-profile-selector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-rawfile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-settings.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-spline.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-stock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-tiff-ifd-entry.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-tiff-ifd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-tiff.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rs-utils.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgconfigdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgconfigdir)" && rm -f $$files install-shareDATA: $(share_DATA) @$(NORMAL_INSTALL) test -z "$(sharedir)" || $(MKDIR_P) "$(DESTDIR)$(sharedir)" @list='$(share_DATA)'; test -n "$(sharedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(sharedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(sharedir)" || exit $$?; \ done uninstall-shareDATA: @$(NORMAL_UNINSTALL) @list='$(share_DATA)'; test -n "$(sharedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(sharedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sharedir)" && rm -f $$files install-library_includeHEADERS: $(library_include_HEADERS) @$(NORMAL_INSTALL) test -z "$(library_includedir)" || $(MKDIR_P) "$(DESTDIR)$(library_includedir)" @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(library_includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(library_includedir)" || exit $$?; \ done uninstall-library_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(library_include_HEADERS)'; test -n "$(library_includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(library_includedir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(library_includedir)" && rm -f $$files ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(sharedir)" "$(DESTDIR)$(library_includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-library_includeHEADERS install-pkgconfigDATA \ install-shareDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS uninstall-pkgconfigDATA \ uninstall-shareDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool ctags distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am \ install-libLTLIBRARIES install-library_includeHEADERS \ install-man install-pdf install-pdf-am install-pkgconfigDATA \ install-ps install-ps-am install-shareDATA install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags uninstall uninstall-am uninstall-libLTLIBRARIES \ uninstall-library_includeHEADERS uninstall-pkgconfigDATA \ uninstall-shareDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/librawstudio/rs-profile-factory-model.h0000644000175000017500000000224111526533645020034 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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. */ enum { FACTORY_MODEL_COLUMN_TYPE, FACTORY_MODEL_COLUMN_PROFILE, FACTORY_MODEL_COLUMN_MODEL, FACTORY_MODEL_COLUMN_ID, FACTORY_MODEL_NUM_COLUMNS }; /* We use these for sorting */ enum { FACTORY_MODEL_TYPE_INFO, FACTORY_MODEL_TYPE_DCP, FACTORY_MODEL_TYPE_ICC, FACTORY_MODEL_TYPE_SEP, FACTORY_MODEL_TYPE_ADD, }; rawstudio-2.0/librawstudio/rs-tiff-ifd-entry.h0000644000175000017500000000362011526533645016462 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_TIFF_IFD_ENTRY_H #define RS_TIFF_IFD_ENTRY_H #include #include G_BEGIN_DECLS #define RS_TYPE_TIFF_IFD_ENTRY rs_tiff_ifd_entry_get_type() #define RS_TIFF_IFD_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_TIFF_IFD_ENTRY, RSTiffIfdEntry)) #define RS_TIFF_IFD_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_TIFF_IFD_ENTRY, RSTiffIfdEntryClass)) #define RS_IS_TIFF_IFD_ENTRY(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_TIFF_IFD_ENTRY)) #define RS_IS_TIFF_IFD_ENTRY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_TIFF_IFD_ENTRY)) #define RS_TIFF_IFD_ENTRY_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_TIFF_IFD_ENTRY, RSTiffIfdEntryClass)) typedef struct { GObject parent; gushort tag; gushort type; guint count; guint value_offset; } RSTiffIfdEntry; typedef struct { GObjectClass parent_class; } RSTiffIfdEntryClass; GType rs_tiff_ifd_entry_get_type(void); RSTiffIfdEntry *rs_tiff_ifd_entry_new(RSTiff *tiff, guint offset); G_END_DECLS #endif /* RS_TIFF_IFD_ENTRY_H */ rawstudio-2.0/librawstudio/rs-color-space.c0000644000175000017500000001176311526533645016044 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rawstudio.h" G_DEFINE_TYPE (RSColorSpace, rs_color_space, G_TYPE_OBJECT) static void rs_color_space_class_init(RSColorSpaceClass *klass) { } static void rs_color_space_init(RSColorSpace *color_space) { matrix3_identity(&color_space->matrix_to_pcs); matrix3_identity(&color_space->matrix_from_pcs); } /** * Get a color space definition * @param name The GType name for the colorspace (not the registered name) * @return A colorspace singleton if found, NULL otherwise. This should not be unreffed. */ RSColorSpace * rs_color_space_new_singleton(const gchar *name) { RSColorSpace *color_space = NULL; static GHashTable *singletons = NULL; static GStaticMutex lock = G_STATIC_MUTEX_INIT; g_assert(name != NULL); g_static_mutex_lock(&lock); if (!singletons) singletons = g_hash_table_new(g_str_hash, g_str_equal); color_space = g_hash_table_lookup(singletons, name); if (!color_space) { GType type = g_type_from_name(name); if (g_type_is_a (type, RS_TYPE_COLOR_SPACE)) color_space = g_object_new(type, NULL); if (!RS_IS_COLOR_SPACE(color_space)) g_warning("Could not instantiate color space of type \"%s\"", name); else g_hash_table_insert(singletons, (gpointer) name, color_space); } g_static_mutex_unlock(&lock); return color_space; } /** * Set (RGB) to PCS matrix * @note This is only interesting for color space implementations * @param color_space A RSColorSpace * @param matrix A matrix, xyz2rgb will be the inverse of this */ void rs_color_space_set_matrix_to_pcs(RSColorSpace *color_space, const RS_MATRIX3 * const matrix) { g_assert(RS_IS_COLOR_SPACE(color_space)); /* Could this be replaced by bradford? */ const RS_VECTOR3 identity = {{1.0}, {1.0}, {1.0}}; const RS_VECTOR3 w1 = vector3_multiply_matrix(&identity, matrix); const RS_VECTOR3 w2 = XYZ_WP_D50; const RS_VECTOR3 scale_vector = { {w2.x/w1.x}, {w2.y/w1.y}, {w2.z/w2.z} }; const RS_MATRIX3 scale = vector3_as_diagonal(&scale_vector); matrix3_multiply(&scale, matrix, &color_space->matrix_to_pcs); color_space->matrix_from_pcs = matrix3_invert(&color_space->matrix_to_pcs); } /** * Get a matrix that will transform this color space to PCS * @param color_space A RSColorSpace * @return from_pcs matrix */ RS_MATRIX3 rs_color_space_get_matrix_to_pcs(const RSColorSpace *color_space) { g_assert(RS_IS_COLOR_SPACE(color_space)); return color_space->matrix_from_pcs; } /** * Get a matrix that will transform PCS to this color space * @param color_space A RSColorSpace * @return to_pcs matrix */ RS_MATRIX3 rs_color_space_get_matrix_from_pcs(const RSColorSpace *color_space) { g_assert(RS_IS_COLOR_SPACE(color_space)); return color_space->matrix_to_pcs; } /** * Get the ICC profile for this colorspace if any * @param color_space A RSColorSpace * @return A RSIccProfile (or NULL) that should not be unreffed */ const RSIccProfile * rs_color_space_get_icc_profile(const RSColorSpace *color_space, gboolean linear_profile) { RSColorSpaceClass *klass = RS_COLOR_SPACE_GET_CLASS(color_space); if (klass->get_icc_profile) return klass->get_icc_profile(color_space, linear_profile); else return NULL; } /** * Get the gamma transfer function for this color space * @param color_space A RSColorSpace * @return A RS1dFunction that should not be unreffed */ const RS1dFunction * rs_color_space_get_gamma_function(const RSColorSpace *color_space) { RSColorSpaceClass *klass = RS_COLOR_SPACE_GET_CLASS(color_space); if (klass->get_gamma_function) return klass->get_gamma_function(color_space); else return rs_1d_function_new_singleton(); } /** * Get the name of the colorspace * @param color_space A RSColorSpace * @return A string containing the name of the colorspace */ const char * rs_color_space_get_name(const RSColorSpace *color_space) { RSColorSpaceClass *klass = RS_COLOR_SPACE_GET_CLASS(color_space); return klass->name; } /** * Get a description of the colorspace * @param color_space A RSColorSpace * @return A string containing a description of the colorspace */ const char * rs_color_space_get_description(const RSColorSpace *color_space) { RSColorSpaceClass *klass = RS_COLOR_SPACE_GET_CLASS(color_space); return klass->description; } G_END_DECLSrawstudio-2.0/librawstudio/rs-icc-profile.c0000644000175000017500000002515211526533645016026 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #ifdef WIN32 #include /* ntohl() */ #else #include /* ntohl() */ #endif #include #include #include "rs-icc-profile.h" struct _RSIccProfile { GObject parent; gboolean dispose_has_run; gchar *filename; gchar *map; gsize map_length; RSIccProfile_ColorSpace colorspace; RSIccProfile_Class profile_class; gchar *description; }; G_DEFINE_TYPE (RSIccProfile, rs_icc_profile, G_TYPE_OBJECT) static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static gboolean read_from_file(RSIccProfile *profile, const gchar *path); static gboolean read_from_memory(RSIccProfile *profile, gchar *map, gsize map_length, gboolean copy); GType rs_icc_colorspace_get_type(void) { static GType icc_colorspace_type = 0; static const GEnumValue icc_colorspace[] = { {RS_ICC_COLORSPACE_UNDEFINED, "Colorspace not available", "n/a"}, {RS_ICC_COLORSPACE_XYZ, "XYZ", "xyz"}, {RS_ICC_COLORSPACE_LAB, "Lab", "lab"}, {RS_ICC_COLORSPACE_LUV, "Luv", "luv"}, {RS_ICC_COLORSPACE_YCBCR, "YCbCr", "ycbcr"}, {RS_ICC_COLORSPACE_YXY, "Yxy", "YXY"}, {RS_ICC_COLORSPACE_RGB, "RGB", "rgb"}, {RS_ICC_COLORSPACE_GREY, "Grey", "grey"}, {RS_ICC_COLORSPACE_HSV, "HSV", "hsv"}, {RS_ICC_COLORSPACE_HLS, "HLS", "hls"}, {RS_ICC_COLORSPACE_CMYK, "CMYK", "cmyk"}, {RS_ICC_COLORSPACE_CMY, "CMY", "cmy"}, {0, NULL, NULL} }; if (!icc_colorspace_type) icc_colorspace_type = g_enum_register_static("RSIccColorSpace", icc_colorspace); return icc_colorspace_type; } GType rs_icc_profile_class_get_type(void) { static GType icc_profile_class_type = 0; static const GEnumValue icc_profile_class[] = { {RS_ICC_PROFILE_UNDEFINED, "Profile class undefined", "n/a"}, {RS_ICC_PROFILE_INPUT, "Input Device profile", "input"}, {RS_ICC_PROFILE_DISPLAY, "Display Device profile", "display"}, {RS_ICC_PROFILE_OUTPUT, "Output Device profile", "output"}, {RS_ICC_PROFILE_DEVICELINK, "DeviceLinkprofile", "devicelink"}, {RS_ICC_PROFILE_COLORSPACE_CONVERSION, "ColorSpace Conversion profile", "colorspace-conversion"}, {RS_ICC_PROFILE_ACSTRACT, "Abstract profile", "abstract"}, {RS_ICC_PROFILE_NAMED_COLOR, "Named colour profile", "named-color"}, {0, NULL, NULL} }; if (!icc_profile_class_type) icc_profile_class_type = g_enum_register_static("RSIccProfileClass", icc_profile_class); return icc_profile_class_type; } GType rs_icc_intent_get_type(void) { static GType rs_icc_intent_type = 0; static const GEnumValue rs_icc_intents[] = { {RS_ICC_INTENT_PERCEPTUAL, "Perceptual intent", "perceptual"}, {RS_ICC_INTENT_RELATIVE_COLORIMETRIC, "Relative colorimetric", "relative"}, {RS_ICC_INTENT_SATURATION, "Saturation", "saturation"}, {RS_ICC_INTENT_ABSOLUTE_COLORIMETRIC, "Absolute colorimetric", "absolute"}, {0, NULL, NULL}, }; if (!rs_icc_intent_type) rs_icc_intent_type = g_enum_register_static("RSIccIntent", rs_icc_intents); return rs_icc_intent_type; } enum { PROP_0, PROP_FILENAME, PROP_COLORSPACE, PROP_CLASS, PROP_DESCRIPTION, }; static void dispose(GObject *object) { RSIccProfile *profile = RS_ICC_PROFILE(object); if (!profile->dispose_has_run) { g_free(profile->filename); g_free(profile->map); g_free(profile->description); profile->dispose_has_run = TRUE; } /* Chain up */ G_OBJECT_CLASS(rs_icc_profile_parent_class)->dispose(object); } static void finalize(GObject *object) { G_OBJECT_CLASS(rs_icc_profile_parent_class)->finalize(object); } static void rs_icc_profile_class_init(RSIccProfileClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_FILENAME, g_param_spec_string( "filename", "Filename", "The filename of the loaded profile", NULL, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); g_object_class_install_property(object_class, PROP_COLORSPACE, g_param_spec_enum( "colorspace", "colorspace", "Profile colorspace", RS_TYPE_ICC_COLORSPACE, RS_ICC_COLORSPACE_UNDEFINED, G_PARAM_READABLE)); g_object_class_install_property(object_class, PROP_CLASS, g_param_spec_enum( "profile-class", "profile-class", "Profile class", RS_TYPE_ICC_PROFILE_CLASS, RS_ICC_PROFILE_UNDEFINED, G_PARAM_READABLE)); g_object_class_install_property(object_class, PROP_DESCRIPTION, g_param_spec_string( "description", "Description", "Profile description", "", G_PARAM_READABLE)); object_class->dispose = dispose; object_class->finalize = finalize; } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSIccProfile *profile = RS_ICC_PROFILE(object); switch (property_id) { case PROP_FILENAME: g_value_set_string(value, profile->filename); break; case PROP_COLORSPACE: g_value_set_enum(value, profile->colorspace); break; case PROP_CLASS: g_value_set_enum(value, profile->profile_class); break; case PROP_DESCRIPTION: g_value_set_string(value, profile->description); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSIccProfile *profile = RS_ICC_PROFILE(object); switch (property_id) { case PROP_FILENAME: g_free(profile->filename); profile->filename = g_value_dup_string(value); read_from_file(profile, profile->filename); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void rs_icc_profile_init(RSIccProfile *profile) { profile->dispose_has_run = FALSE; profile->filename = NULL; profile->map = NULL; profile->map_length = 0; profile->colorspace = RS_ICC_COLORSPACE_UNDEFINED; profile->profile_class = 0; } static gboolean read_from_file(RSIccProfile *profile, const gchar *path) { gboolean ret = FALSE; struct stat st; GError *error; g_stat(path, &st); /* We only accept files below 10MiB */ if (st.st_size > (10*1024*1024)) return ret; /* Or more than the ICC header... */ if (st.st_size < 128) return ret; if (profile->map) g_free(profile->map); error = NULL; if(g_file_get_contents(path, &profile->map, &profile->map_length, &error)) ret = read_from_memory(profile, profile->map, profile->map_length, FALSE); else if (error) g_warning("GError: '%s'", error->message); return ret; } /* Macro for reading unsigned integers from ICC profiles */ #define _GUINT(map, offset) (ntohl(*((guint *)(&map[offset])))) static gchar * read_desc(RSIccProfile *profile, guint offset) { gchar *ret = NULL; gchar type[5]; type[4] = '\0'; if (offset > (profile->map_length-14)) return ret; g_memmove(type, profile->map+offset, 4); if (!g_str_equal(type, "desc")) return ret; guint count = _GUINT(profile->map, offset + 8); if ((count < 1000) && (offset+12+count) <= profile->map_length) { ret = g_new0(gchar, count + 1); g_memmove(ret, profile->map + offset + 12, count); } return ret; } static gboolean read_from_memory(RSIccProfile *profile, gchar *map, gsize map_length, gboolean copy) { /* For now, we don't fail :) */ gboolean ret = TRUE; if (copy) profile->map = g_memdup(map, map_length); else profile->map = map; profile->map_length = map_length; profile->colorspace = _GUINT(profile->map, 16); profile->profile_class = _GUINT(profile->map, 12); guint i, n_tags = _GUINT(profile->map, 128); /* We don't believe this */ if (n_tags > 100) n_tags = 0; guint offset = 132; gchar tag[5]; gchar tag_type[5]; guint tag_offset; guint tag_size; tag[4] = '\0'; tag_type[4] = '\0'; for(i=0;i map_length-12) break; g_memmove(tag, profile->map+offset, 4); tag_offset = _GUINT(profile->map, offset+4); tag_size = _GUINT(profile->map, offset+8); g_memmove(tag_type, profile->map+tag_offset, 4); if (g_str_equal("desc", tag)) profile->description = read_desc(profile, tag_offset); } return ret; } #undef _GUINT /** * Construct new RSIccProfile from an ICC profile on disk * @param path An absolute path to an ICC profile * @return A new RSIccProfile object or NULL on error */ RSIccProfile * rs_icc_profile_new_from_file(const gchar *path) { g_assert(path != NULL); g_assert(g_path_is_absolute(path)); RSIccProfile *profile = g_object_new (RS_TYPE_ICC_PROFILE, "filename", path, NULL); return profile; } /** * Construct new RSIccProfile from an in-memory ICC profile * @param map A pointer to a complete ICC profile * @param map_length The length of the profile in bytes * @param copy TRUE if the data should be copied, FALSE otherwise * @return A new RSIccProfile object or NULL on error */ RSIccProfile * rs_icc_profile_new_from_memory(gchar *map, gsize map_length, gboolean copy) { g_assert(map != NULL); g_assert(map_length >= 0); RSIccProfile *profile = g_object_new (RS_TYPE_ICC_PROFILE, NULL); if (!read_from_memory(profile, map, map_length, copy)) { g_object_unref(profile); profile = NULL; } return profile; } /** * Get binary profile data * @param profile A RSIccProfile * @param map A pointer to a gchar pointer * @param map_length A pointer to a gsize, the length of the profile will be written here */ gboolean rs_icc_profile_get_data(const RSIccProfile *profile, gchar **map, gsize *map_length) { gboolean ret = FALSE; g_assert(RS_IS_ICC_PROFILE(profile)); g_assert(map != NULL); g_assert(map_length != NULL); if (profile->map) { *map = g_memdup(profile->map, profile->map_length); *map_length = profile->map_length; ret = TRUE; } return ret; } const gchar * rs_icc_profile_get_description(const RSIccProfile *profile) { g_assert(RS_IS_ICC_PROFILE(profile)); return profile->description; }rawstudio-2.0/librawstudio/rs-settings.h0000644000175000017500000001277211534730147015476 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_SETTINGS_H #define RS_SETTINGS_H #include G_BEGIN_DECLS #define RS_TYPE_SETTINGS rs_settings_get_type() #define RS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_SETTINGS, RSSettings)) #define RS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_SETTINGS, RSSettingsClass)) #define RS_IS_SETTINGS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_SETTINGS)) #define RS_IS_SETTINGS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_SETTINGS)) #define RS_SETTINGS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_SETTINGS, RSSettingsClass)) /* Presets for WB */ #define PRESET_WB_AUTO "wb_auto" #define PRESET_WB_CAMERA "wb_camera" typedef enum { MASK_EXPOSURE = (1<<0), MASK_SATURATION = (1<<1), MASK_HUE = (1<<2), MASK_CONTRAST = (1<<3), MASK_WARMTH = (1<<4), MASK_TINT = (1<<5), MASK_DCP_TEMP = (1<<4), MASK_DCP_TINT = (1<<5), MASK_WB = MASK_WARMTH | MASK_TINT | MASK_DCP_TEMP | MASK_DCP_TINT, MASK_CURVE = (1<<6), MASK_SHARPEN = (1<<7), MASK_DENOISE_LUMA = (1<<8), MASK_DENOISE_CHROMA = (1<<9), MASK_TCA_KR = (1<<10), MASK_TCA_KB = (1<<11), MASK_TCA = MASK_TCA_KR | MASK_TCA_KB, MASK_CHANNELMIXER_RED = (1<<12), MASK_CHANNELMIXER_GREEN = (1<<13), MASK_CHANNELMIXER_BLUE = (1<<14), MASK_CHANNELMIXER = MASK_CHANNELMIXER_RED | MASK_CHANNELMIXER_GREEN | MASK_CHANNELMIXER_BLUE, MASK_VIGNETTING = (1<<15), MASK_PROFILE = (1<<16), MASK_ALL = 0x00ffffff, } RSSettingsMask; typedef struct _RSsettings { GObject parent; gint commit; RSSettingsMask commit_todo; gfloat exposure; gfloat saturation; gfloat hue; gfloat contrast; gfloat warmth; gfloat tint; gfloat dcp_temp; gfloat dcp_tint; gchar *wb_ascii; gfloat sharpen; gfloat denoise_luma; gfloat denoise_chroma; gfloat tca_kr; gfloat tca_kb; gfloat vignetting; gfloat channelmixer_red; gfloat channelmixer_green; gfloat channelmixer_blue; gint curve_nknots; gfloat *curve_knots; gboolean recalc_temp; } RSSettings; typedef struct { GObjectClass parent_class; } RSSettingsClass; GType rs_settings_get_type (void); RSSettings *rs_settings_new (void); /** * Reset a RSSettings * @param settings A RSSettings * @param mask A mask for only resetting some values */ extern void rs_settings_reset(RSSettings *settings, const RSSettingsMask mask); /** * Stop signal emission from a RSSettings and queue up signals * @param settings A RSSettings */ extern void rs_settings_commit_start(RSSettings *settings); /** * Restart signal emission and process signal queue if any * @param settings A RSSettings * @return The mask of changes since rs_settings_commit_start() */ extern RSSettingsMask rs_settings_commit_stop(RSSettings *settings); /** * Copy settings from one RSSettins to another * @param source The source RSSettings * @param mask A RSSettingsMask to do selective copying * @param target The target RSSettings */ extern RSSettingsMask rs_settings_copy(RSSettings *source, const RSSettingsMask mask, RSSettings *target); /** * Set curve knots * @param settings A RSSettings * @param knots Knots for curve * @param nknots Number of knots */ extern void rs_settings_set_curve_knots(RSSettings *settings, const gfloat *knots, const gint nknots); /** * Set the warmth and tint values of a RSSettings * @param settings A RSSettings * @param exposure New value */ extern void rs_settings_set_wb(RSSettings *settings, const gfloat warmth, const gfloat tint, const gchar *ascii); /** * Get the knots from the curve * @param settings A RSSettings * @return All knots as a newly allocated array */ extern gfloat * rs_settings_get_curve_knots(RSSettings *settings); /** * Get number of knots in curve in a RSSettings * @param settings A RSSettings * @return Number of knots */ extern gint rs_settings_get_curve_nknots(RSSettings *settings); /** * Use like g_signal_connect(source, "settings-changed", G_CALLBACK(rs_settings_changed), target); */ extern void rs_settings_changed(RSSettings *source, const RSSettingsMask mask, RSSettings *target); /** * Link two RSSettings together, if source gets updated, it will propagate to target * @param source A RSSettings * @param target A RSSettings */ extern void rs_settings_link(RSSettings *source, RSSettings *target); /** * Unlink two RSSettings - this will be done automaticly if target from a previous rs_settings_link() is finalized * @param source A RSSettings * @param target A RSSettings - can be destroyed, doesn't matter, we just need the pointer */ extern void rs_settings_unlink(RSSettings *source, RSSettings *target); G_END_DECLS #endif /* RS_SETTINGS_H */ rawstudio-2.0/librawstudio/rs-io-job-metadata.c0000644000175000017500000000477111526533645016573 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-io-job-metadata.h" #include "rawstudio.h" typedef struct { RSIoJob parent; gboolean dispose_has_run; gchar *path; RSMetadata *metadata; RSGotMetadataCB callback; } RSIoJobMetadata; G_DEFINE_TYPE(RSIoJobMetadata, rs_io_job_metadata, RS_TYPE_IO_JOB) static void execute(RSIoJob *job) { RSIoJobMetadata *metadata = RS_IO_JOB_METADATA(job); /* Don't lock IO, while reading metadata - filesizes too small for it to have any practical impact. */ metadata->metadata = rs_metadata_new_from_file(metadata->path); } static void do_callback(RSIoJob *job) { RSIoJobMetadata *metadata = RS_IO_JOB_METADATA(job); if (metadata->callback && metadata->metadata) metadata->callback(metadata->metadata, job->user_data); } static void rs_io_job_metadata_dispose(GObject *object) { RSIoJobMetadata *metadata = RS_IO_JOB_METADATA(object); if (!metadata->dispose_has_run) { metadata->dispose_has_run = TRUE; g_free(metadata->path); g_object_unref(metadata->metadata); } G_OBJECT_CLASS(rs_io_job_metadata_parent_class)->dispose(object); } static void rs_io_job_metadata_class_init(RSIoJobMetadataClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); RSIoJobClass *job_class = RS_IO_JOB_CLASS(klass); object_class->dispose = rs_io_job_metadata_dispose; job_class->execute = execute; job_class->do_callback = do_callback; } static void rs_io_job_metadata_init(RSIoJobMetadata *metadata) { } RSIoJob * rs_io_job_metadata_new(const gchar *path, RSGotMetadataCB callback) { RSIoJobMetadata *metadata = g_object_new (RS_TYPE_IO_JOB_METADATA, NULL); metadata->path = g_strdup(path); metadata->callback = callback; return RS_IO_JOB(metadata); } rawstudio-2.0/librawstudio/rs-filter-response.c0000644000175000017500000002153511526533645016754 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-filter-response.h" #include "rs-image16.h" struct _RSFilterResponse { RSFilterParam parent; gboolean dispose_has_run; gboolean roi_set; GdkRectangle roi; gboolean quick; RS_IMAGE16 *image; GdkPixbuf *image8; gint width; gint height; }; G_DEFINE_TYPE(RSFilterResponse, rs_filter_response, RS_TYPE_FILTER_PARAM) static void rs_filter_response_dispose(GObject *object) { RSFilterResponse *filter_response = RS_FILTER_RESPONSE(object); if (!filter_response->dispose_has_run) { filter_response->dispose_has_run = TRUE; if (filter_response->image) g_object_unref(filter_response->image); if (filter_response->image8) g_object_unref(filter_response->image8); } G_OBJECT_CLASS (rs_filter_response_parent_class)->dispose (object); } static void rs_filter_response_finalize(GObject *object) { G_OBJECT_CLASS (rs_filter_response_parent_class)->finalize (object); } static void rs_filter_response_class_init(RSFilterResponseClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = rs_filter_response_dispose; object_class->finalize = rs_filter_response_finalize; } static void rs_filter_response_init(RSFilterResponse *filter_response) { filter_response->roi_set = FALSE; filter_response->quick = FALSE; filter_response->image = NULL; filter_response->image8 = NULL; filter_response->width = -1; filter_response->height = -1; filter_response->dispose_has_run = FALSE; } /** * Instantiate a new RSFilterResponse object * @return A new RSFilterResponse with a refcount of 1 */ RSFilterResponse * rs_filter_response_new(void) { return g_object_new (RS_TYPE_FILTER_RESPONSE, NULL); } /** * Clone all flags of a RSFilterResponse EXCEPT images * @param filter_response A RSFilterResponse * @return A new RSFilterResponse with a refcount of 1 */ RSFilterResponse * rs_filter_response_clone(RSFilterResponse *filter_response) { RSFilterResponse *new_filter_response = rs_filter_response_new(); if (RS_IS_FILTER_RESPONSE(filter_response)) { new_filter_response->roi_set = filter_response->roi_set; new_filter_response->roi = filter_response->roi; new_filter_response->quick = filter_response->quick; new_filter_response->width = filter_response->width; new_filter_response->height = filter_response->height; rs_filter_param_clone(RS_FILTER_PARAM(new_filter_response), RS_FILTER_PARAM(filter_response)); } return new_filter_response; } /** * Set the ROI used in generating the response, if the whole image is * generated, this should NOT be set * @param filter_response A RSFilterResponse * @param roi A GdkRectangle describing the ROI or NULL to indicate complete * image data */ void rs_filter_response_set_roi(RSFilterResponse *filter_response, GdkRectangle *roi) { g_assert(RS_IS_FILTER_RESPONSE(filter_response)); filter_response->roi_set = FALSE; if (roi) { filter_response->roi_set = TRUE; filter_response->roi = *roi; } } /** * Get the ROI of the response * @param filter_response A RSFilterResponse * @return A GdkRectangle describing the ROI or NULL if the complete image is rendered */ GdkRectangle * rs_filter_response_get_roi(const RSFilterResponse *filter_response) { GdkRectangle *ret = NULL; g_assert(RS_IS_FILTER_RESPONSE(filter_response)); if (filter_response->roi_set) ret = &RS_FILTER_RESPONSE(filter_response)->roi; return ret; } /** * Set quick flag on a response, this should be set if the image has been * rendered by any quick method and a better method is available * @note There is no boolean parameter, it would make no sense to remove a * quick-flag * @param filter_response A RSFilterResponse */ void rs_filter_response_set_quick(RSFilterResponse *filter_response) { g_assert(RS_IS_FILTER_RESPONSE(filter_response)); filter_response->quick = TRUE; } /** * Get the quick flag * @param filter_response A RSFilterResponse * @return TRUE if the image data was rendered using a "quick" algorithm and a * faster is available, FALSE otherwise */ gboolean rs_filter_response_get_quick(const RSFilterResponse *filter_response) { g_assert(RS_IS_FILTER_RESPONSE(filter_response)); return filter_response->quick; } /** * Set 16 bit image data * @param filter_response A RSFilterResponse * @param image A RS_IMAGE16 */ void rs_filter_response_set_image(RSFilterResponse *filter_response, RS_IMAGE16 *image) { g_assert(RS_IS_FILTER_RESPONSE(filter_response)); if (filter_response->image) { g_object_unref(filter_response->image); filter_response->image = NULL; } if (image) filter_response->image = g_object_ref(image); } /** * Is there a 16 bit image attached? * @param filter_response A RSFilterResponse * @return A boolean indicating of there is an image attached */ gboolean rs_filter_response_has_image(const RSFilterResponse *filter_response) { g_assert(RS_IS_FILTER_RESPONSE(filter_response)); return !!filter_response->image; } /** * Get 16 bit image data * @param filter_response A RSFilterResponse * @return A RS_IMAGE16 (must be unreffed after usage) or NULL if none is set */ RS_IMAGE16 * rs_filter_response_get_image(const RSFilterResponse *filter_response) { RS_IMAGE16 *ret = NULL; g_assert(RS_IS_FILTER_RESPONSE(filter_response)); if (filter_response->image) ret = g_object_ref(filter_response->image); return ret; } /** * Set 8 bit image data * @param filter_response A RSFilterResponse * @param pixbuf A GdkPixbuf */ void rs_filter_response_set_image8(RSFilterResponse *filter_response, GdkPixbuf *pixbuf) { g_assert(RS_IS_FILTER_RESPONSE(filter_response)); if (filter_response->image8) { g_object_unref(filter_response->image8); filter_response->image8 = NULL; } if (pixbuf) filter_response->image8 = g_object_ref(pixbuf); } /** * Does the response have an 8 bit image * @param filter_response A RSFilterResponse * @return A gboolean TRUE if an image8 is attached, FALSE otherwise */ gboolean rs_filter_response_has_image8(const RSFilterResponse *filter_response) { g_assert(RS_IS_FILTER_RESPONSE(filter_response)); return !!filter_response->image8; } /** * Get 8 bit image data * @param filter_response A RSFilterResponse * @return A GdkPixbuf (must be unreffed after usage) or NULL if none is set */ GdkPixbuf * rs_filter_response_get_image8(const RSFilterResponse *filter_response) { GdkPixbuf *ret = NULL; g_assert(RS_IS_FILTER_RESPONSE(filter_response)); if (filter_response->image8) ret = g_object_ref(filter_response->image8); return ret; } /** * Set predicted width * @param filter_response A RSFilterResponse * @param width Width in pixels * @note Do not set this if width is unknown */ void rs_filter_response_set_width(RSFilterResponse *filter_response, gint width) { g_assert(RS_IS_FILTER_RESPONSE(filter_response)); filter_response->width = width; } /** * Set predicted height * @param filter_response A RSFilterResponse * @param height Height in pixels * @note Do not set this if height is unknown */ void rs_filter_response_set_height(RSFilterResponse *filter_response, gint height) { g_assert(RS_IS_FILTER_RESPONSE(filter_response)); filter_response->height = height; } /** * Get width * @param filter_response A RSFilterResponse * @return Width in pixels or -1 if unknown */ gint rs_filter_response_get_width(const RSFilterResponse *filter_response) { g_assert(RS_IS_FILTER_RESPONSE(filter_response)); if (filter_response->width > -1) return filter_response->width; else if (filter_response->image) return filter_response->image->w; else if (filter_response->image8) return gdk_pixbuf_get_width(filter_response->image8); else return -1; } /** * Get height * @param filter_response A RSFilterResponse * @return Height in pixels or -1 if unknown */ gint rs_filter_response_get_height(const RSFilterResponse *filter_response) { g_assert(RS_IS_FILTER_RESPONSE(filter_response)); if (filter_response->height > -1) return filter_response->height; else if (filter_response->image) return filter_response->image->h; else if (filter_response->image8) return gdk_pixbuf_get_height(filter_response->image8); else return -1; } rawstudio-2.0/librawstudio/rs-exif.cc0000644000175000017500000002176111526533645014732 00000000000000/* * Copyright (C) 2006-2011 Anders Brander , * Anders Kvist and Klaus Post * * 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 #include #include #include #include "rs-exif.h" #include #include "rs-library.h" #ifndef EXIV2_TEST_VERSION # define EXIV2_TEST_VERSION(major,minor,patch) \ ( EXIV2_VERSION >= EXIV2_MAKE_VERSION((major),(minor),(patch)) ) #endif #if EXIV2_TEST_VERSION(0,17,0) #include #endif extern "C" { #include #include "config.h" /* This list is mainly just a copy of the list in UFRaw - thanks again Udi! */ const static gchar *tags_to_delete[] = { /* Original TIFF data is no longer interesting */ "Exif.Image.Orientation", "Exif.Image.ImageWidth", "Exif.Image.ImageLength", "Exif.Image.BitsPerSample", "Exif.Image.Compression", "Exif.Image.PhotometricInterpretation", "Exif.Image.FillOrder", "Exif.Image.SamplesPerPixel", "Exif.Image.StripOffsets", "Exif.Image.RowsPerStrip", "Exif.Image.StripByteCounts", "Exif.Image.XResolution", "Exif.Image.YResolution", "Exif.Image.PlanarConfiguration", "Exif.Image.ResolutionUnit", /* Delete colorspace information - we add our own */ "Exif.Photo.ColorSpace", "Exif.Iop.InteroperabilityIndex", "Exif.Iop.InteroperabilityVersion", /* Delete various MakerNote fields only applicable to the raw file */ // Nikon thumbnail data #if EXIV2_TEST_VERSION(0,13,0) "Exif.Nikon3.Preview", #endif #if EXIV2_TEST_VERSION(0,18,0) "Exif.Nikon3.RawImageCenter", #else "Exif.Nikon3.NEFThumbnailSize", #endif #if EXIV2_TEST_VERSION(0,17,91) "Exif.NikonPreview.JPEGInterchangeFormat", #endif #if EXIV2_TEST_VERSION(0,15,99) /* Exiv2 0.16-pre1 */ // Pentax thumbnail data "Exif.Pentax.PreviewResolution", "Exif.Pentax.PreviewLength", "Exif.Pentax.PreviewOffset", #endif // Minolta thumbnail data "Exif.Minolta.Thumbnail", "Exif.Minolta.ThumbnailOffset", "Exif.Minolta.ThumbnailLength", #if EXIV2_TEST_VERSION(0,13,0) // Olympus thumbnail data "Exif.Olympus.Thumbnail", "Exif.Olympus.ThumbnailOffset", "Exif.Olympus.ThumbnailLength", #endif NULL }; static void exif_data_init(RS_EXIF_DATA *exif_data); static void exif_data_init(RS_EXIF_DATA *exif_data) { gint i = 0; Exiv2::ExifData::iterator pos; Exiv2::ExifData *data = (Exiv2::ExifData *) exif_data; /* Do some advertising while we're at it :) */ (*data)["Exif.Image.Software"] = "Rawstudio " RAWSTUDIO_VERSION; (*data)["Exif.Image.ProcessingSoftware"] = "Rawstudio " RAWSTUDIO_VERSION; /* Delete all tags from tags_to_delete */ while(tags_to_delete[i]) { if ((pos=(*data).findKey(Exiv2::ExifKey(tags_to_delete[i]))) != (*data).end()) (*data).erase(pos); i++; } } RS_EXIF_DATA * rs_exif_load_from_file(const gchar *filename) { RS_EXIF_DATA *exif_data; try { Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); assert(image.get() != 0); image->readMetadata(); exif_data = new Exiv2::ExifData(image->exifData()); exif_data_init(exif_data); } catch (Exiv2::AnyError& e) { g_warning("Could not load EXIF data from file %s", filename); return NULL; } return exif_data; } RS_EXIF_DATA * rs_exif_load_from_rawfile(RAWFILE *rawfile) { RS_EXIF_DATA *rs_exif_data; try { Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open( (const Exiv2::byte*) raw_get_map(rawfile), raw_get_filesize(rawfile)); assert(image.get() != 0); image->readMetadata(); rs_exif_data = new Exiv2::ExifData(image->exifData()); exif_data_init(rs_exif_data); } catch (Exiv2::AnyError& e) { g_warning("Could not load EXIF data"); return NULL; } return rs_exif_data; } void rs_exif_add_to_file(RS_EXIF_DATA *d, Exiv2::IptcData &iptc_data, const gchar *filename, RSExifFileType type) { if (!d) return; try { Exiv2::ExifData *data = (Exiv2::ExifData *) d; Exiv2::Image::AutoPtr image = Exiv2::ImageFactory::open(filename); /* Copy EXIF to XMP */ #if EXIV2_TEST_VERSION(0,17,0) Exiv2::XmpData xmp; Exiv2::copyExifToXmp(*data, xmp); image->setXmpData(xmp); #endif /* Set new metadata on output image and save */ if (type != RS_EXIF_FILE_TYPE_PNG) image->setExifData(*data); image->setIptcData(iptc_data); image->writeMetadata(); } catch (Exiv2::AnyError& e) { g_warning("Couldn't add EXIF data to %s", filename); } } void rs_exif_free(RS_EXIF_DATA *d) { Exiv2::ExifData *data = (Exiv2::ExifData *) d; delete data; } static void rs_add_cs_to_exif(RS_EXIF_DATA *d, const gchar *cs) { if (!cs) return; Exiv2::ExifData *data = (Exiv2::ExifData *) d; if (g_str_equal(cs, "RSSrgb")) { (*data)["Exif.Photo.ColorSpace"] = 1; (*data)["Exif.Iop.InteroperabilityIndex"] = "R98"; (*data)["Exif.Iop.InteroperabilityVersion"] = "0100"; } else if (g_str_equal(cs, "RSAdobeRGB")) { (*data)["Exif.Photo.ColorSpace"] = 65535; (*data)["Exif.Iop.InteroperabilityIndex"] = "R03"; (*data)["Exif.Iop.InteroperabilityVersion"] = "0100"; } else (*data)["Exif.Photo.ColorSpace"] = 65535; } static void rs_add_tags_exif(RS_EXIF_DATA *d, const gchar *input_filename) { if (!d) return; Exiv2::ExifData *data = (Exiv2::ExifData *) d; RSLibrary *lib = rs_library_get_singleton(); GList *tags = rs_library_photo_tags(lib, input_filename, FALSE); if (!tags || g_list_length (tags) == 0) return; GString *usercomment = g_string_new("charset=\"Undefined\" "); GString *xpkeyw = g_string_new(""); GList *c = tags; do { g_string_append(usercomment, (gchar*)(c->data)); g_string_append(xpkeyw, (gchar*)(c->data)); if (c->next) { g_string_append(xpkeyw, ","); g_string_append(usercomment, " "); } g_free(c->data); } while (c = c->next); g_list_free(tags); Exiv2::CommentValue comment(usercomment->str); (*data)["Exif.Photo.UserComment"] = comment; glong items_written; gunichar2 *w = g_utf8_to_utf16(xpkeyw->str, -1, NULL, &items_written, NULL); Exiv2::Value::AutoPtr v = Exiv2::Value::create(Exiv2::unsignedByte); v->read((const Exiv2::byte*)w, items_written * sizeof(gunichar2), Exiv2::invalidByteOrder); Exiv2::ExifKey key = Exiv2::ExifKey("Exif.Image.XPKeywords"); data->add(key, v.get()); g_free(w); g_string_free(usercomment, TRUE); g_string_free(xpkeyw, TRUE); } static void rs_add_tags_iptc(Exiv2::IptcData &iptc_data, const gchar *input_filename, uint16_t format) { /* Add overall tags */ iptc_data["Iptc.Envelope.CharacterSet"] = "UTF-8"; iptc_data["Iptc.Application2.Program"] = "Rawstudio"; iptc_data["Iptc.Application2.ProgramVersion"] = VERSION; iptc_data["Iptc.Envelope.ModelVersion"] = 42; iptc_data["Iptc.Envelope.FileFormat"] = format; /* Add tags */ RSLibrary *lib = rs_library_get_singleton(); GList *tags = rs_library_photo_tags(lib, input_filename, FALSE); if (!tags || g_list_length(tags) == 0) return; do { Exiv2::StringValue *v = new Exiv2::StringValue((char*)tags->data); iptc_data.add(Exiv2::IptcKey("Iptc.Application2.Keywords"), v); delete v; g_free(tags->data); } while (tags = tags->next); /* When we some day can access this information, enable this */ #if 0 enum { PRIO_U = 0, PRIO_D = 51, PRIO_1 = 1, PRIO_2 = 2, PRIO_3 = 3, PRIO_ALL = 255 }; gboolean exported; gint priority; rs_cache_load_quick(input_filename, &priority, &exported); switch (priority) { case PRIO_1: iptc_data["Iptc.Application2.Urgency"] = "1"; break; case PRIO_2: iptc_data["Iptc.Application2.Urgency"] = "2"; break; case PRIO_3: iptc_data["Iptc.Application2.Urgency"] = "3"; break; } #endif } gboolean rs_exif_copy(const gchar *input_filename, const gchar *output_filename, const gchar *color_space, RSExifFileType type) { /* Exiv2 prior to v0.20.0 cannot add tags to TIFF images without corrupting them */ if (RS_EXIF_FILE_TYPE_TIFF == type) if (Exiv2::versionNumber() < 0x1400) return FALSE; if (input_filename && output_filename) { RS_EXIF_DATA *exif; Exiv2::IptcData iptc_data; exif = rs_exif_load_from_file(input_filename); if (NULL == exif) return FALSE; rs_add_cs_to_exif(exif, color_space); rs_add_tags_exif(exif, input_filename); if (RS_EXIF_FILE_TYPE_JPEG == type) rs_add_tags_iptc(iptc_data, input_filename, 11); if (RS_EXIF_FILE_TYPE_TIFF == type) rs_add_tags_iptc(iptc_data, input_filename, 3); rs_exif_add_to_file(exif, iptc_data, output_filename, type); rs_exif_free(exif); return TRUE; } return FALSE; } } /* extern "C" */ rawstudio-2.0/librawstudio/rs-filetypes.c0000644000175000017500000001570011543674627015641 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-filetypes.h" #include "rs-metadata.h" #include "conf_interface.h" static gint tree_sort(gconstpointer a, gconstpointer b); static gpointer filetype_search(GTree *tree, const gchar *filename, gint *priority, const RSLoaderFlags flags); static void filetype_add_to_tree(GTree *tree, const gchar *extension, const gchar *description, const gpointer func, const gint priority, const RSLoaderFlags flags); static gboolean rs_filetype_is_initialized = FALSE; static GStaticMutex lock = G_STATIC_MUTEX_INIT; static GTree *loaders = NULL; static GTree *meta_loaders = NULL; typedef struct { gchar *extension; gchar *description; gint priority; RSLoaderFlags flags; } RSFiletype; struct search_needle { gchar *extension; gint *priority; RSFileLoaderFunc *func; RSLoaderFlags flags; }; static gint tree_sort(gconstpointer a, gconstpointer b) { gint extension; RSFiletype *type_a = (RSFiletype *) a; RSFiletype *type_b = (RSFiletype *) b; extension = g_utf8_collate(type_a->extension, type_b->extension); if (extension == 0) return type_a->priority - type_b->priority; else return extension; } static gboolean filetype_search_traverse(gpointer key, gpointer value, gpointer data) { RSFiletype *type = key; RSFileLoaderFunc *func = value; struct search_needle *needle = data; if (g_utf8_collate(needle->extension, type->extension) == 0) { if (type->priority > *(needle->priority)) { if (type->flags & needle->flags) { needle->func = func; *(needle->priority) = type->priority; return TRUE; } } } return FALSE; } static gpointer filetype_search(GTree *tree, const gchar *filename, gint *priority, const RSLoaderFlags flags) { gpointer func = NULL; const gchar *extension; extension = g_strrstr(filename, "."); if (extension) { struct search_needle needle; needle.extension = g_utf8_strdown(extension, -1); needle.priority = priority; needle.func = NULL; needle.flags = flags; g_static_mutex_lock(&lock); g_tree_foreach(tree, filetype_search_traverse, &needle); g_static_mutex_unlock(&lock); g_free(needle.extension); func = needle.func; } return func; } static void filetype_add_to_tree(GTree *tree, const gchar *extension, const gchar *description, const gpointer func, const gint priority, const RSLoaderFlags flags) { RSFiletype *filetype = g_new(RSFiletype, 1); g_assert(rs_filetype_is_initialized); g_assert(tree != NULL); g_assert(extension != NULL); g_assert(extension[0] == '.'); g_assert(description != NULL); g_assert(func != NULL); g_assert(priority > 0); filetype->extension = g_strdup(extension); filetype->description = g_strdup(description); filetype->priority = priority; filetype->flags = flags; g_static_mutex_lock(&lock); g_tree_insert(tree, filetype, func); g_static_mutex_unlock(&lock); } /** * Initialize the RSFiletype subsystem, this MUST be called before any other * rs_filetype_*-functions */ void rs_filetype_init(void) { g_static_mutex_lock(&lock); if (rs_filetype_is_initialized) return; rs_filetype_is_initialized = TRUE; loaders = g_tree_new(tree_sort); meta_loaders = g_tree_new(tree_sort); g_static_mutex_unlock(&lock); } /** * Register a new image loader * @param extension The filename extension including the dot, ie: ".cr2" * @param description A human readable description of the file-format/loader * @param loader The loader function * @param priority A loader priority, lowest is served first. * @param flags Flags describing the loader */ void rs_filetype_register_loader(const gchar *extension, const gchar *description, const RSFileLoaderFunc loader, const gint priority, const RSLoaderFlags flags) { filetype_add_to_tree(loaders, extension, description, loader, priority, flags); } /** * Register a new metadata loader * @param extension The filename extension including the dot, ie: ".cr2" * @param description A human readable description of the file-format/loader * @param meta_loader The loader function * @param priority A loader priority, lowest is served first. * @param flags Flags describing the loader */ void rs_filetype_register_meta_loader(const gchar *extension, const gchar *description, const RSFileMetaLoaderFunc meta_loader, const gint priority, const RSLoaderFlags flags) { filetype_add_to_tree(meta_loaders, extension, description, meta_loader, priority, flags); } /** * Check if we support loading a given extension * @param filename A filename or extension to look-up */ gboolean rs_filetype_can_load(const gchar *filename) { gboolean can_load = FALSE; gint priority = 0; RSLoaderFlags flags = RS_LOADER_FLAGS_RAW; gboolean load_8bit = FALSE; g_assert(rs_filetype_is_initialized); g_assert(filename != NULL); rs_conf_get_boolean("open_8bit_images", &load_8bit); if (load_8bit) flags |= RS_LOADER_FLAGS_8BIT; if (filetype_search(loaders, filename, &priority, flags)) can_load = TRUE; return can_load; } /** * Load an image according to registered loaders * @param filename The file to load * @return A new RS_IMAGE16 or NULL if the loading failed */ RSFilterResponse * rs_filetype_load(const gchar *filename) { RSFilterResponse* image = NULL; gint priority = 0; RSFileLoaderFunc loader; g_assert(rs_filetype_is_initialized); g_assert(filename != NULL); while((loader = filetype_search(loaders, filename, &priority, RS_LOADER_FLAGS_ALL))) { image = loader(filename); if (RS_IS_FILTER_RESPONSE(image)) if (rs_filter_response_has_image(image)) return image; } return NULL; } /** * Load metadata from a specified file * @param service The file to load metadata from OR a servicename (".exif" for example) * @param meta A RSMetadata structure to load everything into * @param rawfile An open RAWFILE * @param offset An offset in the open RAWFILE */ gboolean rs_filetype_meta_load(const gchar *service, RSMetadata *meta, RAWFILE *rawfile, guint offset) { gint priority = 0; RSFileMetaLoaderFunc loader; g_assert(rs_filetype_is_initialized); g_assert(service != NULL); g_assert(RS_IS_METADATA(meta)); while ((loader = filetype_search(meta_loaders, service, &priority, RS_LOADER_FLAGS_ALL))) if (loader(service, rawfile, offset, meta)) return TRUE; return FALSE; } rawstudio-2.0/librawstudio/rs-io-job-tagging.c0000644000175000017500000000460211526533645016424 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-io-job-tagging.h" #include "rawstudio.h" typedef struct { RSIoJob parent; gboolean dispose_has_run; gchar *path; gint tag_id; gboolean autotag; } RSIoJobTagging; G_DEFINE_TYPE(RSIoJobTagging, rs_io_job_tagging, RS_TYPE_IO_JOB) static RSLibrary *library; static void execute(RSIoJob *job) { RSIoJobTagging *tagging = RS_IO_JOB_TAGGING(job); if (tagging->tag_id == -2) { rs_library_backup_tags(library,tagging->path); } else if (tagging->tag_id == -1) { rs_library_restore_tags(tagging->path); } else { rs_library_photo_add_tag(library, tagging->path, tagging->tag_id, tagging->autotag); } } static void rs_io_job_tagging_dispose(GObject *object) { RSIoJobTagging *tagging = RS_IO_JOB_TAGGING(object); if (!tagging->dispose_has_run) { tagging->dispose_has_run = TRUE; g_free(tagging->path); } G_OBJECT_CLASS(rs_io_job_tagging_parent_class)->dispose(object); } static void rs_io_job_tagging_class_init(RSIoJobTaggingClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); RSIoJobClass *job_class = RS_IO_JOB_CLASS(klass); object_class->dispose = rs_io_job_tagging_dispose; job_class->execute = execute; } static void rs_io_job_tagging_init(RSIoJobTagging *tagging) { if (!library) library = rs_library_get_singleton(); } RSIoJob * rs_io_job_tagging_new(const gchar *path, gint tag_id, gboolean autotag) { RSIoJobTagging *tagging = g_object_new (RS_TYPE_IO_JOB_TAGGING, NULL); tagging->path = g_strdup(path); tagging->tag_id = tag_id; tagging->autotag = autotag; return RS_IO_JOB(tagging); } rawstudio-2.0/librawstudio/rs-profile-factory.c0000644000175000017500000002266411541462776016747 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-dcp-file.h" #include "rs-profile-factory.h" #include "rs-profile-factory-model.h" #include "config.h" #include "rs-utils.h" #define PROFILE_FACTORY_DEFAULT_SEARCH_PATH PACKAGE_DATA_DIR G_DIR_SEPARATOR_S PACKAGE G_DIR_SEPARATOR_S "profiles" G_DIR_SEPARATOR_S G_DEFINE_TYPE(RSProfileFactory, rs_profile_factory, G_TYPE_OBJECT) static void rs_profile_factory_class_init(RSProfileFactoryClass *klass) { } static void rs_profile_factory_init(RSProfileFactory *factory) { /* We use G_TYPE_POINTER to store some strings because they should live forever - and we avoid unneeded strdup/free */ factory->profiles = gtk_list_store_new(FACTORY_MODEL_NUM_COLUMNS, G_TYPE_INT, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_POINTER); } static gboolean add_icc_profile(RSProfileFactory *factory, const gchar *path) { gboolean readable = FALSE; RSIccProfile *profile = rs_icc_profile_new_from_file(path); g_assert(RS_IS_ICC_PROFILE(profile)); if (profile) { GtkTreeIter iter; gtk_list_store_prepend(factory->profiles, &iter); gtk_list_store_set(factory->profiles, &iter, FACTORY_MODEL_COLUMN_TYPE, FACTORY_MODEL_TYPE_ICC, FACTORY_MODEL_COLUMN_PROFILE, profile, FACTORY_MODEL_COLUMN_ID, g_path_get_basename(path), /* FIXME */ -1); readable = TRUE; } return readable; } static gboolean add_dcp_profile(RSProfileFactory *factory, const gchar *path) { gboolean readable = FALSE; RSDcpFile *profile = rs_dcp_file_new_from_file(path); const gchar *model = rs_dcp_file_get_model(profile); if (model) { GtkTreeIter iter; gtk_list_store_prepend(factory->profiles, &iter); gtk_list_store_set(factory->profiles, &iter, FACTORY_MODEL_COLUMN_TYPE, FACTORY_MODEL_TYPE_DCP, FACTORY_MODEL_COLUMN_PROFILE, profile, FACTORY_MODEL_COLUMN_MODEL, model, FACTORY_MODEL_COLUMN_ID, rs_dcp_get_id(profile), -1); readable = TRUE; rs_tiff_free_data(RS_TIFF(profile)); } return readable; } void rs_profile_factory_load_profiles(RSProfileFactory *factory, const gchar *path, gboolean load_dcp, gboolean load_icc) { const gchar *basename; gchar *filename; GDir *dir = g_dir_open(path, 0, NULL); if (NULL == dir ) return; while((basename = g_dir_read_name(dir))) { if (basename[0] == '.') continue; filename = g_build_filename(path, basename, NULL); if (g_file_test(filename, G_FILE_TEST_IS_DIR)) rs_profile_factory_load_profiles(factory, filename, load_dcp, load_icc); else if (g_file_test(filename, G_FILE_TEST_IS_REGULAR)) { if (load_dcp && (g_str_has_suffix(basename, ".dcp") || g_str_has_suffix(basename, ".DCP"))) add_dcp_profile(factory, filename); else if (load_icc && ( g_str_has_suffix(basename, ".icc") || g_str_has_suffix(basename, ".ICC") || g_str_has_suffix(basename, ".icm") || g_str_has_suffix(basename, ".ICM") )) add_icc_profile(factory, filename); } g_free(filename); } g_dir_close(dir); } RSProfileFactory * rs_profile_factory_new(const gchar *search_path) { RSProfileFactory *factory = g_object_new(RS_TYPE_PROFILE_FACTORY, NULL); rs_profile_factory_load_profiles(factory, search_path, TRUE, FALSE); GtkTreeIter iter; gtk_list_store_prepend(factory->profiles, &iter); gtk_list_store_set(factory->profiles, &iter, FACTORY_MODEL_COLUMN_TYPE, FACTORY_MODEL_TYPE_INFO, FACTORY_MODEL_COLUMN_PROFILE, NULL, FACTORY_MODEL_COLUMN_ID, "_embedded_image_profile_", -1); gtk_list_store_prepend(factory->profiles, &iter); gtk_list_store_set(factory->profiles, &iter, FACTORY_MODEL_COLUMN_TYPE, FACTORY_MODEL_TYPE_SEP, -1); gtk_list_store_prepend(factory->profiles, &iter); gtk_list_store_set(factory->profiles, &iter, FACTORY_MODEL_COLUMN_TYPE, FACTORY_MODEL_TYPE_ADD, -1); return factory; } RSProfileFactory * rs_profile_factory_new_default(void) { static RSProfileFactory *factory = NULL; static GStaticMutex lock = G_STATIC_MUTEX_INIT; g_static_mutex_lock(&lock); if (!factory) { factory = rs_profile_factory_new(PROFILE_FACTORY_DEFAULT_SEARCH_PATH); const gchar *user_profiles = rs_profile_factory_get_user_profile_directory(); rs_profile_factory_load_profiles(factory, user_profiles, TRUE, TRUE); } g_static_mutex_unlock(&lock); return factory; } const gchar * rs_profile_factory_get_user_profile_directory(void) { static GStaticMutex lock = G_STATIC_MUTEX_INIT; gchar *directory = NULL; g_static_mutex_lock(&lock); if (!directory) directory = g_strdup_printf("%s/profiles/", rs_confdir_get()); g_static_mutex_unlock(&lock); return directory; } gboolean rs_profile_factory_add_profile(RSProfileFactory *factory, const gchar *path) { g_assert(RS_IS_PROFILE_FACTORY(factory)); g_assert(path != NULL); g_assert(path[0] != '\0'); g_assert(g_path_is_absolute(path)); if (g_str_has_suffix(path, ".dcp") || g_str_has_suffix(path, ".DCP")) return add_dcp_profile(factory, path); if (g_str_has_suffix(path, ".icc") || g_str_has_suffix(path, ".ICC")) return add_icc_profile(factory, path); if (g_str_has_suffix(path, ".icm") || g_str_has_suffix(path, ".ICM")) return add_icc_profile(factory, path); return FALSE; } static gboolean visible_func(GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { gboolean visible = FALSE; gchar *model_needle = (gchar *) data; gchar *model_haystack; gint type; gtk_tree_model_get(model, iter, FACTORY_MODEL_COLUMN_MODEL, &model_haystack, FACTORY_MODEL_COLUMN_TYPE, &type, -1); /* The only thing we need to hide is mismatched DCP profiles */ if (model_needle && model_haystack) if ((type == FACTORY_MODEL_TYPE_DCP) && (g_ascii_strcasecmp(model_needle, model_haystack) == 0)) visible = TRUE; if (type != FACTORY_MODEL_TYPE_DCP) visible = TRUE; return visible; } GtkTreeModelFilter * rs_dcp_factory_get_compatible_as_model(RSProfileFactory *factory, const gchar *unique_id) { g_assert(RS_IS_PROFILE_FACTORY(factory)); GtkTreeModelFilter *filter = GTK_TREE_MODEL_FILTER(gtk_tree_model_filter_new(GTK_TREE_MODEL(factory->profiles), NULL)); gtk_tree_model_filter_set_visible_func(filter, visible_func, g_strdup(unique_id), g_free); return filter; } static GSList * rs_profile_factory_find_from_column(RSProfileFactory *factory, const gchar *id, int column) { RSDcpFile *dcp; gchar *model_id; GtkTreeIter iter; GtkTreeModel *treemodel = GTK_TREE_MODEL(factory->profiles); GSList *ret = NULL; g_assert(RS_IS_PROFILE_FACTORY(factory)); if (!id) return NULL; if (gtk_tree_model_get_iter_first(treemodel, &iter)) do { gtk_tree_model_get(treemodel, &iter, column, &model_id, -1); if (id && model_id && 0 == g_ascii_strcasecmp(id, model_id)) { gtk_tree_model_get(treemodel, &iter, FACTORY_MODEL_COLUMN_PROFILE, &dcp, -1); g_assert(RS_IS_ICC_PROFILE(dcp) || RS_IS_DCP_FILE(dcp)); ret = g_slist_append (ret, dcp); } } while (gtk_tree_model_iter_next(treemodel, &iter)); return ret; } RSDcpFile * rs_profile_factory_find_from_id(RSProfileFactory *factory, const gchar *id) { RSDcpFile *ret = NULL; g_assert(RS_IS_PROFILE_FACTORY(factory)); GSList *profiles = rs_profile_factory_find_from_column(factory, id, FACTORY_MODEL_COLUMN_ID); gint nprofiles = g_slist_length(profiles); if (nprofiles >= 1) { ret = profiles->data; if (nprofiles > 1) g_warning("Found %d profiles when searching for unique profile: %s. Using the first one.", nprofiles, id); } g_slist_free(profiles); return ret; } RSIccProfile * rs_profile_factory_find_icc_from_filename(RSProfileFactory *factory, const gchar *id) { RSIccProfile *ret = NULL; g_assert(RS_IS_PROFILE_FACTORY(factory)); GSList *profiles = rs_profile_factory_find_from_column(factory, id, FACTORY_MODEL_COLUMN_ID); gint nprofiles = g_slist_length(profiles); if (nprofiles >= 1) { ret = profiles->data; if (nprofiles > 1) g_warning("Found %d profiles when searching for unique profile: %s. Using the first one.", nprofiles, id); } g_slist_free(profiles); return ret; } GSList * rs_profile_factory_find_from_model(RSProfileFactory *factory, const gchar *id) { g_assert(RS_IS_PROFILE_FACTORY(factory)); return rs_profile_factory_find_from_column(factory, id, FACTORY_MODEL_COLUMN_MODEL); } void rs_profile_factory_set_embedded_profile(RSProfileFactory *factory, const RSIccProfile *profile) { GtkTreeIter iter; GtkTreeModel *treemodel = GTK_TREE_MODEL(factory->profiles); if (gtk_tree_model_get_iter_first(treemodel, &iter)) { do { gchar *model_id; gtk_tree_model_get(treemodel, &iter, FACTORY_MODEL_COLUMN_ID, &model_id, -1); if (model_id && g_str_equal("_embedded_image_profile_", model_id)) { gtk_list_store_set(factory->profiles, &iter, FACTORY_MODEL_COLUMN_PROFILE, profile, -1); } } while (gtk_tree_model_iter_next(treemodel, &iter)); } } rawstudio-2.0/librawstudio/rs-tiff-ifd.h0000644000175000017500000000372711526533645015333 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_TIFF_IFD_H #define RS_TIFF_IFD_H #include #include "rs-tiff.h" G_BEGIN_DECLS #define RS_TYPE_TIFF_IFD rs_tiff_ifd_get_type() #define RS_TIFF_IFD(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_TIFF_IFD, RSTiffIfd)) #define RS_TIFF_IFD_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_TIFF_IFD, RSTiffIfdClass)) #define RS_IS_TIFF_IFD(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_TIFF_IFD)) #define RS_IS_TIFF_IFD_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_TIFF_IFD)) #define RS_TIFF_IFD_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_TIFF_IFD, RSTiffIfdClass)) typedef struct { GObject parent; gboolean dispose_has_run; RSTiff *tiff; guint offset; gushort num_entries; GList *entries; guint next_ifd; } RSTiffIfd; typedef struct { GObjectClass parent_class; void (*read)(RSTiffIfd *ifd); } RSTiffIfdClass; GType rs_tiff_ifd_get_type(void); RSTiffIfd *rs_tiff_ifd_new(RSTiff *tiff, guint offset); guint rs_tiff_ifd_get_next(RSTiffIfd *ifd); RSTiffIfdEntry *rs_tiff_ifd_get_entry_by_tag(RSTiffIfd *ifd, gushort tag); G_END_DECLS #endif /* RS_TIFF_IFD_H */ rawstudio-2.0/librawstudio/rs-rawfile.h0000644000175000017500000000477611543674627015306 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RAWFILE_H #define RAWFILE_H #define ENDIANSWAP4(a) (((a) & 0x000000FF) << 24 | ((a) & 0x0000FF00) << 8 | ((a) & 0x00FF0000) >> 8) | (((a) & 0xFF000000) >> 24) #define ENDIANSWAP2(a) (((a) & 0x00FF) << 8) | (((a) & 0xFF00) >> 8) #include "rs-types.h" void raw_init(void); RAWFILE *raw_open_file(const gchar *filename); RAWFILE *raw_create_from_memory(void *memory, guint size, guint first_ifd_offset, gushort byteorder); guchar raw_init_file_tiff(RAWFILE *rawfile, guint pos); gboolean raw_get_uint(RAWFILE *rawfile, guint pos, guint *target); gboolean raw_get_ushort(RAWFILE *rawfile, guint pos, gushort *target); gushort raw_get_ushort_from_string(RAWFILE *rawfile, gchar *source); gboolean raw_get_short(RAWFILE *rawfile, guint pos, gshort *target); gshort raw_get_short_from_string(RAWFILE *rawfile, gchar *source); gboolean raw_get_float(RAWFILE *rawfile, guint pos, gfloat *target); gboolean raw_get_uchar(RAWFILE *rawfile, guint pos, guchar *target); gboolean raw_get_rational(RAWFILE *rawfile, guint pos, gfloat *target); gboolean raw_strcmp(RAWFILE *rawfile, guint pos, const gchar *needle, gint len); gboolean raw_strcpy(RAWFILE *rawfile, guint pos, void *target, gint len); gchar *raw_strdup(RAWFILE *rawfile, guint pos, gint len); GdkPixbuf *raw_get_pixbuf(RAWFILE *rawfile, guint pos, guint length); void raw_close_file(RAWFILE *rawfile); void raw_reset_base(RAWFILE *rawfile); gint raw_get_base(RAWFILE *rawfile); gushort raw_get_byteorder(RAWFILE *rawfile); void raw_set_byteorder(RAWFILE *rawfile, gushort byteorder); guint get_first_ifd_offset(RAWFILE *rawfile); void *raw_get_map(RAWFILE *rawfile); guint raw_get_filesize(RAWFILE *rawfile); #endif /* RAWFILE_H */ rawstudio-2.0/librawstudio/rs-debug.h0000644000175000017500000000263411526533645014725 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_DEBUG_H #define RS_DEBUG_H #include G_BEGIN_DECLS typedef enum { RS_DEBUG_ALL = 0xffffffff, RS_DEBUG_PLUGINS = 1 << 0, RS_DEBUG_FILTERS = 1 << 1, RS_DEBUG_PERFORMANCE = 1 << 2, RS_DEBUG_PROCESSING = 1 << 3 } RSDebugFlag; #define RS_DEBUG(type,x,a...) \ G_STMT_START { \ if (G_UNLIKELY (rs_debug_flags & RS_DEBUG_##type)) \ { \ printf("* Debug [" #type "] " G_STRLOC ": " x "\n", ##a); \ } \ } G_STMT_END void rs_debug_setup(const gchar *debug_string); extern guint rs_debug_flags; G_END_DECLS #endif /* RS_DEBUG_H */rawstudio-2.0/librawstudio/rs-stock.h0000644000175000017500000000302411526533645014754 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_STOCK_H #define RS_STOCK_H #define RS_STOCK_CROP "tool-crop" #define RS_STOCK_ROTATE "tool-rotate" #define RS_STOCK_COLOR_PICKER "tool-color-picker" #define RS_STOCK_ROTATE_CLOCKWISE "tool-rotate-clockwise" #define RS_STOCK_ROTATE_COUNTER_CLOCKWISE "tool-rotate-counter-clockwise" #define RS_STOCK_FLIP "tool-flip" #define RS_STOCK_MIRROR "tool-mirror" void rs_stock_init(void); typedef enum { RS_CURSOR_CROP = 0, RS_CURSOR_ROTATE, RS_CURSOR_COLOR_PICKER } RSCursorType; GdkCursor* rs_cursor_new(GdkDisplay *display, RSCursorType cursor_type); #endif /* RS_STOCK_H */ rawstudio-2.0/librawstudio/rs-lens-db.c0000644000175000017500000002514711526533645015162 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include "config.h" #include "rs-lens-db.h" struct _RSLensDb { GObject parent; gboolean dispose_has_run; gchar *path; GList *lenses; }; static void open_db(RSLensDb *lens_db); G_DEFINE_TYPE (RSLensDb, rs_lens_db, G_TYPE_OBJECT) enum { PROP_0, PROP_PATH }; static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSLensDb *lens_db = RS_LENS_DB(object); switch (property_id) { case PROP_PATH: g_value_set_string(value, lens_db->path); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSLensDb *lens_db = RS_LENS_DB(object); switch (property_id) { case PROP_PATH: lens_db->path = g_value_dup_string(value); open_db(lens_db); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } } static void dispose(GObject *object) { RSLensDb *lens_db = RS_LENS_DB(object); if (!lens_db->dispose_has_run) { g_free(lens_db->path); lens_db->dispose_has_run = TRUE; } G_OBJECT_CLASS (rs_lens_db_parent_class)->dispose (object); } static void rs_lens_db_class_init(RSLensDbClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->get_property = get_property; object_class->set_property = set_property; object_class->dispose = dispose; g_object_class_install_property(object_class, PROP_PATH, g_param_spec_string( "path", "Path", "Path to XML database", NULL, G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE)); } static void rs_lens_db_init(RSLensDb *lens_db) { lens_db->dispose_has_run = FALSE; lens_db->path = NULL; lens_db->lenses = NULL; } static void save_db(RSLensDb *lens_db) { xmlTextWriterPtr writer; GList *list; static GStaticMutex lock = G_STATIC_MUTEX_INIT; g_static_mutex_lock(&lock); writer = xmlNewTextWriterFilename(lens_db->path, 0); if (!writer) { g_static_mutex_unlock(&lock); return; } xmlTextWriterSetIndent(writer, 1); xmlTextWriterStartDocument(writer, NULL, "ISO-8859-1", NULL); xmlTextWriterStartElement(writer, BAD_CAST "rawstudio-lens-database"); list = lens_db->lenses; while (list) { gchar *identifier; gchar *lensfun_make; gchar *lensfun_model; gdouble min_focal, max_focal, min_aperture, max_aperture; gchar *camera_make; gchar *camera_model; gboolean enabled; RSLens *lens = list->data; g_assert(RS_IS_LENS(lens)); g_object_get(lens, "identifier", &identifier, "lensfun-make", &lensfun_make, "lensfun-model", &lensfun_model, "min-focal", &min_focal, "max-focal", &max_focal, "min-aperture", &min_aperture, "max-aperture", &max_aperture, "camera-make", &camera_make, "camera-model", &camera_model, "enabled", &enabled, NULL); xmlTextWriterStartElement(writer, BAD_CAST "lens"); if (identifier) xmlTextWriterWriteFormatElement(writer, BAD_CAST "identifier", "%s", identifier); if (lensfun_make) xmlTextWriterWriteFormatElement(writer, BAD_CAST "lensfun-make", "%s", lensfun_make); if (lensfun_model) xmlTextWriterWriteFormatElement(writer, BAD_CAST "lensfun-model", "%s", lensfun_model); if (min_focal > 0.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "min-focal", "%f", min_focal); if (max_focal > 0.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "max-focal", "%f", max_focal); if (min_aperture > 0.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "min-aperture", "%f", min_aperture); if (max_aperture > 0.0) xmlTextWriterWriteFormatElement(writer, BAD_CAST "max-aperture", "%f", max_aperture); if (camera_make) xmlTextWriterWriteFormatElement(writer, BAD_CAST "camera-make", "%s", camera_make); if (camera_model) xmlTextWriterWriteFormatElement(writer, BAD_CAST "camera-model", "%s", camera_model); if (enabled) xmlTextWriterWriteFormatElement(writer, BAD_CAST "enabled", "%s", "TRUE"); if (!enabled) xmlTextWriterWriteFormatElement(writer, BAD_CAST "enabled", "%s", "FALSE"); xmlTextWriterEndElement(writer); g_free(identifier); g_free(lensfun_make); g_free(lensfun_model); g_free(camera_make); g_free(camera_model); list = g_list_next (list); } xmlTextWriterEndDocument(writer); xmlFreeTextWriter(writer); g_static_mutex_unlock(&lock); return; } /** * Force save of RSLensDb * @param lens_db the RSLensDb to save */ void rs_lens_db_save(RSLensDb *lens_db) { save_db(lens_db); } static void open_db(RSLensDb *lens_db) { xmlDocPtr doc; xmlNodePtr cur; xmlNodePtr entry = NULL; xmlChar *val; /* Some sanity checks */ doc = xmlParseFile(lens_db->path); if (!doc) return; cur = xmlDocGetRootElement(doc); if (cur && (xmlStrcmp(cur->name, BAD_CAST "rawstudio-lens-database") == 0)) { cur = cur->xmlChildrenNode; while(cur) { if ((!xmlStrcmp(cur->name, BAD_CAST "lens"))) { RSLens *lens = rs_lens_new(); entry = cur->xmlChildrenNode; while (entry) { val = xmlNodeListGetString(doc, entry->xmlChildrenNode, 1); if ((!xmlStrcmp(entry->name, BAD_CAST "identifier"))) g_object_set(lens, "identifier", val, NULL); else if ((!xmlStrcmp(entry->name, BAD_CAST "lensfun-make"))) g_object_set(lens, "lensfun-make", val, NULL); else if ((!xmlStrcmp(entry->name, BAD_CAST "lensfun-model"))) g_object_set(lens, "lensfun-model", val, NULL); else if ((!xmlStrcmp(entry->name, BAD_CAST "min-focal"))) g_object_set(lens, "min-focal", rs_atof((gchar *) val), NULL); else if ((!xmlStrcmp(entry->name, BAD_CAST "max-focal"))) g_object_set(lens, "max-focal", rs_atof((gchar *) val), NULL); else if ((!xmlStrcmp(entry->name, BAD_CAST "min-aperture"))) g_object_set(lens, "min-aperture", rs_atof((gchar *) val), NULL); else if ((!xmlStrcmp(entry->name, BAD_CAST "max-aperture"))) g_object_set(lens, "max-aperture", rs_atof((gchar *) val), NULL); else if ((!xmlStrcmp(entry->name, BAD_CAST "camera-make"))) g_object_set(lens, "camera-make", val, NULL); else if ((!xmlStrcmp(entry->name, BAD_CAST "camera-model"))) g_object_set(lens, "camera-model", val, NULL); else if ((!xmlStrcmp(entry->name, BAD_CAST "enabled"))) { gboolean enabled = FALSE; if (g_strcmp0((gchar *) val, "TRUE") == 0) enabled = TRUE; g_object_set(lens, "enabled", enabled, NULL); } xmlFree(val); entry = entry->next; } lens_db->lenses = g_list_prepend(lens_db->lenses, lens); } cur = cur->next; } } else g_warning(PACKAGE " did not understand the format in %s", lens_db->path); xmlFreeDoc(doc); } /** * Instantiate a new RSLensDb * @param path An absolute path to a XML-file containing the database * @return A new RSLensDb with a refcount of 1 */ RSLensDb * rs_lens_db_new(const char *path) { g_assert(path != NULL); g_assert(g_path_is_absolute(path)); return g_object_new (RS_TYPE_LENS_DB, "path", path, NULL); } /** * Get the default RSLensDb as used globally by Rawstudio * @return A new RSLensDb, this should not be unref'ed after use! */ RSLensDb * rs_lens_db_get_default(void) { static GStaticMutex lock = G_STATIC_MUTEX_INIT; static RSLensDb *lens_db = NULL; g_static_mutex_lock(&lock); if (!lens_db) { gchar *path = g_build_filename(rs_confdir_get(), "lens-database.xml", NULL); lens_db = rs_lens_db_new(path); save_db(lens_db); g_free(path); } g_static_mutex_unlock(&lock); return lens_db; } /** * Look up identifer in database * @param lens_db A RSLensDb to search in * @param identifier A lens identifier as generated by metadata subsystem */ RSLens * rs_lens_db_get_from_identifier(RSLensDb *lens_db, const gchar *identifier) { GList *list; RSLens *lens, *ret = NULL; g_assert(RS_IS_LENS_DB(lens_db)); g_assert(identifier != NULL); list = lens_db->lenses; while (list) { gchar *rs_identifier = NULL; lens = list->data; g_assert(RS_IS_LENS(lens)); g_object_get(lens, "identifier", &rs_identifier, NULL); /* If we got a match, raise refcount by 1 and break out of the loop */ if (rs_identifier && g_str_equal(rs_identifier, identifier)) { ret = g_object_ref(lens); break; } list = g_list_next (list); } return ret; } /** * Add a lens to the database - will only be added if the lens appear unique * @param lens_db A RSLensDb * @param lens A RSLens to add */ void rs_lens_db_add_lens(RSLensDb *lens_db, RSLens *lens) { gchar *rs_identifier = NULL; g_assert(RS_IS_LENS_DB(lens_db)); g_assert(RS_IS_LENS(lens)); g_object_get(lens, "identifier", &rs_identifier, NULL); if (rs_identifier) { RSLens *locallens = rs_lens_db_get_from_identifier(lens_db, rs_identifier); /* If we got a hit, no need to do anymore - we do not wan't duplicates */ if (locallens) g_object_unref(locallens); else { lens_db->lenses = g_list_prepend(lens_db->lenses, g_object_ref(lens)); save_db(lens_db); } } } /** * Lookup a lens in the database based on information in a RSMetadata * @param lens_db A RSLensDb * @param metadata A RSMetadata * @return A RSLens or NULL if unsuccesful */ RSLens *rs_lens_db_lookup_from_metadata(RSLensDb *lens_db, RSMetadata *metadata) { RSLens *lens = NULL; g_assert(RS_IS_LENS_DB(lens_db)); g_assert(RS_IS_METADATA(metadata)); /* Lookup lens based on generated identifier */ if (metadata->lens_identifier) lens = rs_lens_db_get_from_identifier(lens_db, metadata->lens_identifier); /* If we didn't find any matches, we should try to add the lens to our database */ if (!lens) { lens = rs_lens_new_from_medadata(metadata); if (lens) rs_lens_db_add_lens(lens_db, lens); } return lens; } /** * Gets the lenses in RSLensDb * @param lens_db A RSLensDb * @return A GList of RSLens'es */ GList * rs_lens_db_get_lenses(RSLensDb *lens_db) { return lens_db->lenses; } rawstudio-2.0/librawstudio/rs-settings.c0000644000175000017500000004602211542235065015462 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-settings.h" #include "rs-utils.h" #include #include "gettext.h" #include /* memcmp() */ G_DEFINE_TYPE (RSSettings, rs_settings, G_TYPE_OBJECT) enum { SETTINGS_CHANGED, WB_CHANGED, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = { 0 }; static void get_property (GObject *object, guint property_id, GValue *value, GParamSpec *pspec); static void set_property (GObject *object, guint property_id, const GValue *value, GParamSpec *pspec); static void rs_settings_finalize (GObject *object) { if (G_OBJECT_CLASS (rs_settings_parent_class)->finalize) G_OBJECT_CLASS (rs_settings_parent_class)->finalize (object); } enum { PROP_0, PROP_EXPOSURE, PROP_SATURATION, PROP_HUE, PROP_CONTRAST, PROP_WARMTH, PROP_TINT, PROP_DCP_TEMP, PROP_DCP_TINT, PROP_WB_ASCII, PROP_SHARPEN, PROP_DENOISE_LUMA, PROP_DENOISE_CHROMA, PROP_TCA_KR, PROP_TCA_KB, PROP_VIGNETTING, PROP_CHANNELMIXER_RED, PROP_CHANNELMIXER_GREEN, PROP_CHANNELMIXER_BLUE, PROP_RECALC_TEMP }; static void rs_settings_class_init (RSSettingsClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = rs_settings_finalize; object_class->get_property = get_property; object_class->set_property = set_property; g_object_class_install_property(object_class, PROP_EXPOSURE, g_param_spec_float( /* @TRANSLATORS: "Expos" is short version of "Exposure". You cannot use more than 5 characters for this! */ "exposure", _("Expos"), _("Exposure Compensation"), -3.0, 3.0, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_SATURATION, g_param_spec_float( /* @TRANSLATORS: "Satur" is short version of "Saturation". You cannot use more than 5 characters for this! */ "saturation", _("Satur"), _("Saturation"), 0.0, 2.0, 1.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_HUE, g_param_spec_float( /* @TRANSLATORS: You cannot use more than 5 characters for "Hue" */ "hue", _("Hue"), _("Hue Shift"), -180.0, 180.0, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_CONTRAST, g_param_spec_float( /* @TRANSLATORS: "Contr" is short version of "Contrast". You cannot use more than 5 characters for this! */ "contrast", _("Contr"), _("Contrast"), 0.5, 2.5, 1.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_WARMTH, g_param_spec_float( /* @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! */ "warmth", _("Temp"), _("Temperature"), -1.0, 1.0, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_TINT, g_param_spec_float( /* @TRANSLATORS: You cannot use more than 5 characters for "Tint" */ "tint", _("Tint"), _("Tint Shift"), -2.0, 2.0, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_DCP_TEMP, g_param_spec_float( /* @TRANSLATORS: "Temp" is short version of "Temperature". You cannot use more than 5 characters for this! */ "dcp-temp", _("Temp"), _("Temperature"), 2000.0, 12000.0, 5000.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_DCP_TINT, g_param_spec_float( /* @TRANSLATORS: You cannot use more than 5 characters for "Tint" */ "dcp-tint", _("Tint"), _("Tint Shift"), -150.0, 150.0, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_WB_ASCII, g_param_spec_string( "wb_ascii", _("WBAscii"), _("WBAscii"), NULL, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_SHARPEN, g_param_spec_float( /* @TRANSLATORS: "Sharp" is short version of "Sharpen". You cannot use more than 5 characters for this! */ "sharpen", _("Sharp"), _("Sharpen Amount"), 0.0, 100.0, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_DENOISE_LUMA, g_param_spec_float( /* @TRANSLATORS: "Denoi" is short version of "Denoise". You cannot use more than 5 characters for this! */ "denoise_luma", _("Denoi"), _("Light Denoising"), 0.0, 100.0, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_DENOISE_CHROMA, g_param_spec_float( /* @TRANSLATORS: "ColDn" is short version of "Colour Denoise". You cannot use more than 5 characters for this! */ "denoise_chroma", _("ColDn"), _("Colour Denoising"), 0.0, 100.0, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_TCA_KR, g_param_spec_float( /* @TRANSLATORS: "CA R" is short version of "Chromatic Aberration Red". You cannot use more than 5 characters for this! */ "tca_kr", _("CA R"), _("Red Chromatic Aberration Correction"), -0.5, 0.5, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_TCA_KB, g_param_spec_float( /* @TRANSLATORS: "CA B" is short version of "Chromatic Aberration Blue". You cannot use more than 5 characters for this! */ "tca_kb", _("CA B"), _("Blue Chromatic Aberration Correction"), -0.5, 0.5, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_VIGNETTING, g_param_spec_float( /* @TRANSLATORS: "Vign" is short version of "Vignetting". You cannot use more than 5 characters for this! */ "vignetting", _("Vign"), _("Vignetting Correction"), -1.0, 1.0, 0.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_CHANNELMIXER_RED, g_param_spec_float( /* @TRANSLATORS: You cannot use more than 5 characters for "Red" */ "channelmixer_red", _("Red"), _("Red Amount Adjustment"), 0.0, 300.0, 100.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_CHANNELMIXER_GREEN, g_param_spec_float( /* @TRANSLATORS: You cannot use more than 5 characters for "Green" */ "channelmixer_green", _("Green"), _("Green Amount Adjustment"), 0.0, 300.0, 100.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_CHANNELMIXER_BLUE, g_param_spec_float( /* @TRANSLATORS: You cannot use more than 5 characters for "Blue" */ "channelmixer_blue", _("Blue"), _("Blue Amount Adjustment"), 0.0, 300.0, 100.0, G_PARAM_READWRITE) ); g_object_class_install_property(object_class, PROP_RECALC_TEMP, g_param_spec_boolean( "recalc-temp", "recalc-temp", "Recalculate Temperature", FALSE, G_PARAM_READWRITE) ); signals[SETTINGS_CHANGED] = g_signal_new ("settings-changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, /* Is this right? */ NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); signals[WB_CHANGED] = g_signal_new ("wb-recalculated", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, /* Is this right? */ NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); } static void rs_settings_init (RSSettings *self) { self->commit = 0; self->commit_todo = 0; self->curve_knots = NULL; self->wb_ascii = NULL; rs_settings_reset(self, MASK_ALL); } RSSettings * rs_settings_new (void) { return g_object_new (RS_TYPE_SETTINGS, NULL); } static void get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { RSSettings *settings = RS_SETTINGS(object); #define CASE(upper, lower) \ case PROP_##upper: \ g_value_set_float(value, settings->lower); \ break switch (property_id) { CASE(EXPOSURE, exposure); CASE(SATURATION, saturation); CASE(HUE, hue); CASE(CONTRAST, contrast); CASE(WARMTH, warmth); CASE(TINT, tint); CASE(DCP_TEMP, dcp_temp); CASE(DCP_TINT, dcp_tint); case PROP_WB_ASCII: g_value_set_string(value, settings->wb_ascii); break; CASE(SHARPEN, sharpen); CASE(DENOISE_LUMA, denoise_luma); CASE(DENOISE_CHROMA, denoise_chroma); CASE(TCA_KR, tca_kr); CASE(TCA_KB, tca_kb); CASE(VIGNETTING, vignetting); CASE(CHANNELMIXER_RED, channelmixer_red); CASE(CHANNELMIXER_GREEN, channelmixer_green); CASE(CHANNELMIXER_BLUE, channelmixer_blue); case PROP_RECALC_TEMP: g_value_set_boolean(value, settings->recalc_temp); break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } #undef CASE } static void set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { RSSettings *settings = RS_SETTINGS(object); RSSettingsMask changed_mask = 0; #define CASE(upper, lower) \ case PROP_##upper: \ if (settings->lower != g_value_get_float(value)) \ { \ settings->lower = g_value_get_float(value); \ changed_mask |= MASK_##upper; \ } \ break switch (property_id) { CASE(EXPOSURE, exposure); CASE(SATURATION, saturation); CASE(HUE, hue); CASE(CONTRAST, contrast); case PROP_WARMTH: if (settings->warmth != g_value_get_float(value)) { settings->warmth = g_value_get_float(value); changed_mask |= MASK_WARMTH; g_object_set(settings, "wb_ascii", NULL, NULL); } break; case PROP_TINT: if (settings->tint != g_value_get_float(value)) { settings->tint = g_value_get_float(value); changed_mask |= MASK_TINT; g_object_set(settings, "wb_ascii", NULL, NULL); } break; case PROP_DCP_TEMP: if (settings->dcp_temp != g_value_get_float(value)) { settings->dcp_temp = g_value_get_float(value); changed_mask |= MASK_WARMTH; g_object_set(settings, "wb_ascii", NULL, NULL); } break; case PROP_DCP_TINT: if (settings->dcp_tint != g_value_get_float(value)) { settings->dcp_tint = g_value_get_float(value); changed_mask |= MASK_TINT; g_object_set(settings, "wb_ascii", NULL, NULL); } break; case PROP_WB_ASCII: if (settings->wb_ascii) g_free(settings->wb_ascii); settings->wb_ascii = g_strdup(g_value_get_string(value)); changed_mask |= MASK_WB; break; CASE(SHARPEN, sharpen); CASE(DENOISE_LUMA, denoise_luma); CASE(DENOISE_CHROMA, denoise_chroma); CASE(TCA_KR, tca_kr); CASE(TCA_KB, tca_kb); CASE(VIGNETTING, vignetting); CASE(CHANNELMIXER_RED, channelmixer_red); CASE(CHANNELMIXER_GREEN, channelmixer_green); CASE(CHANNELMIXER_BLUE, channelmixer_blue); case PROP_RECALC_TEMP: settings->recalc_temp = g_value_get_boolean(value); if (settings->recalc_temp) changed_mask |= MASK_WB; break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); } #undef CASE if (changed_mask > 0) { if (settings->commit > 0) settings->commit_todo |= changed_mask; else g_signal_emit(settings, signals[SETTINGS_CHANGED], 0, changed_mask); } } /** * Reset a RSSettings * @param settings A RSSettings * @param mask A mask for only resetting some values */ void rs_settings_reset(RSSettings *settings, const RSSettingsMask mask) { g_assert(RS_IS_SETTINGS(settings)); GObject *object = G_OBJECT(settings); rs_settings_commit_start(settings); if (mask & MASK_EXPOSURE) rs_object_class_property_reset(object, "exposure"); if (mask & MASK_SATURATION) rs_object_class_property_reset(object, "saturation"); if (mask & MASK_HUE) rs_object_class_property_reset(object, "hue"); if (mask & MASK_CONTRAST) rs_object_class_property_reset(object, "contrast"); if (mask & MASK_WARMTH) rs_object_class_property_reset(object, "warmth"); if (mask & MASK_TINT) rs_object_class_property_reset(object, "tint"); if (mask & MASK_WARMTH) rs_object_class_property_reset(object, "dcp-temp"); if (mask & MASK_TINT) rs_object_class_property_reset(object, "dcp-tint"); if (mask & MASK_SHARPEN) rs_object_class_property_reset(object, "sharpen"); if (mask & MASK_DENOISE_LUMA) rs_object_class_property_reset(object, "denoise_luma"); if (mask & MASK_DENOISE_CHROMA) rs_object_class_property_reset(object, "denoise_chroma"); if (mask & MASK_TCA_KR) rs_object_class_property_reset(object, "tca_kr"); if (mask & MASK_TCA_KB) rs_object_class_property_reset(object, "tca_kb"); if (mask & MASK_VIGNETTING) rs_object_class_property_reset(object, "vignetting"); if (mask & MASK_CHANNELMIXER_RED) rs_object_class_property_reset(object, "channelmixer_red"); if (mask & MASK_CHANNELMIXER_GREEN) rs_object_class_property_reset(object, "channelmixer_green"); if (mask & MASK_CHANNELMIXER_BLUE) rs_object_class_property_reset(object, "channelmixer_blue"); if (mask && MASK_CURVE) { if (settings->curve_knots) g_free(settings->curve_knots); settings->curve_knots = g_new(gfloat, 4); settings->curve_knots[0] = 0.0; settings->curve_knots[1] = 0.0; settings->curve_knots[2] = 1.0; settings->curve_knots[3] = 1.0; settings->curve_nknots = 2; settings->commit_todo |= MASK_CURVE; } rs_settings_commit_stop(settings); } /** * Stop signal emission from a RSSettings and queue up signals * @param settings A RSSettings */ void rs_settings_commit_start(RSSettings *settings) { g_assert(RS_IS_SETTINGS(settings)); g_assert(settings->commit >= 0); /* If we have no current commit running, reset todo */ if (settings->commit == 0) settings->commit_todo = 0; /* Increment commit */ settings->commit++; } /** * Restart signal emission and process signal queue if any * @param settings A RSSettings * @return The mask of changes since rs_settings_commit_start() */ RSSettingsMask rs_settings_commit_stop(RSSettings *settings) { g_assert(RS_IS_SETTINGS(settings)); g_assert(settings->commit >= 0); /* If this is the last nested commit, do the todo */ if ((settings->commit == 1) && (settings->commit_todo != 0)) { g_signal_emit(settings, signals[SETTINGS_CHANGED], 0, settings->commit_todo); } /* Make sure we never go below 0 */ settings->commit = MAX(settings->commit-1, 0); return settings->commit_todo; } /** * Copy settings from one RSSettins to another * @param source The source RSSettings * @param mask A RSSettingsMask to do selective copying * @param target The target RSSettings */ RSSettingsMask rs_settings_copy(RSSettings *source, RSSettingsMask mask, RSSettings *target) { RSSettingsMask changed_mask = 0; g_assert(RS_IS_SETTINGS(source)); g_assert(RS_IS_SETTINGS(target)); /* Convenience macro */ #define SETTINGS_COPY(upper, lower) \ do { \ if ((mask & MASK_##upper) && (target->lower != source->lower)) \ { \ changed_mask |= MASK_ ##upper; \ target->lower = source->lower; \ } \ } while(0) if ((mask & MASK_WB) && (g_strcmp0(target->wb_ascii, source->wb_ascii) != 0)) { if (target->wb_ascii) g_free(target->wb_ascii); changed_mask |= MASK_WB; \ target->wb_ascii = g_strdup(source->wb_ascii); } SETTINGS_COPY(EXPOSURE, exposure); SETTINGS_COPY(SATURATION, saturation); SETTINGS_COPY(HUE, hue); SETTINGS_COPY(CONTRAST, contrast); SETTINGS_COPY(WARMTH, warmth); SETTINGS_COPY(TINT, tint); SETTINGS_COPY(DCP_TEMP, dcp_temp); SETTINGS_COPY(DCP_TINT, dcp_tint); SETTINGS_COPY(SHARPEN, sharpen); SETTINGS_COPY(DENOISE_LUMA, denoise_luma); SETTINGS_COPY(DENOISE_CHROMA, denoise_chroma); SETTINGS_COPY(TCA_KR, tca_kr); SETTINGS_COPY(TCA_KB, tca_kb); SETTINGS_COPY(VIGNETTING, vignetting); SETTINGS_COPY(CHANNELMIXER_RED, channelmixer_red); SETTINGS_COPY(CHANNELMIXER_GREEN, channelmixer_green); SETTINGS_COPY(CHANNELMIXER_BLUE, channelmixer_blue); #undef SETTINGS_COPY if (mask & MASK_WB) target->recalc_temp = source->recalc_temp; if (mask & MASK_CURVE) { /* Check if we actually have changed */ if (target->curve_nknots != source->curve_nknots) changed_mask |= MASK_CURVE; else { if (memcmp(source->curve_knots, target->curve_knots, sizeof(gfloat)*2*source->curve_nknots)!=0) changed_mask |= MASK_CURVE; } /* Copy the knots if needed */ if (changed_mask & MASK_CURVE) { g_free(target->curve_knots); target->curve_knots = g_memdup(source->curve_knots, sizeof(gfloat)*2*source->curve_nknots); target->curve_nknots = source->curve_nknots; } } /* Emit seignal if needed */ if (changed_mask > 0) g_signal_emit(target, signals[SETTINGS_CHANGED], 0, changed_mask); return changed_mask; } /** * Set curve knots * @param settings A RSSettings * @param knots Knots for curve * @param nknots Number of knots */ void rs_settings_set_curve_knots(RSSettings *settings, const gfloat *knots, const gint nknots) { g_assert(RS_IS_SETTINGS(settings)); g_assert(nknots > 0); g_assert(knots != NULL); g_free(settings->curve_knots); settings->curve_knots = g_memdup(knots, sizeof(gfloat)*2*nknots); settings->curve_nknots = nknots; g_signal_emit(settings, signals[SETTINGS_CHANGED], 0, MASK_CURVE); } /** * Set the warmth and tint values of a RSSettings * @param settings A RSSettings * @param exposure New value */ void rs_settings_set_wb(RSSettings *settings, const gfloat warmth, const gfloat tint, const gchar *ascii) { g_assert(RS_IS_SETTINGS(settings)); rs_settings_commit_start(settings); g_object_set(settings, "warmth", warmth, "tint", tint, "wb_ascii", ascii, "recalc-temp", TRUE, NULL); rs_settings_commit_stop(settings); } /** * Get the knots from the curve * @param settings A RSSettings * @return All knots as a newly allocated array */ gfloat * rs_settings_get_curve_knots(RSSettings *settings) { g_assert(RS_IS_SETTINGS(settings)); return g_memdup(settings->curve_knots, sizeof(gfloat)*2*settings->curve_nknots); } /** * Get number of knots in curve in a RSSettings * @param settings A RSSettings * @return Number of knots */ gint rs_settings_get_curve_nknots(RSSettings *settings) { g_assert(RS_IS_SETTINGS(settings)); return settings->curve_nknots; } /** * Link two RSSettings together, if source gets updated, it will propagate to target * @param source A RSSettings * @param target A RSSettings */ void rs_settings_link(RSSettings *source, RSSettings *target) { g_assert(RS_IS_SETTINGS(source)); g_assert(RS_IS_SETTINGS(target)); /* Add a weak reference to target, we would really like to know if it disappears */ g_object_weak_ref(G_OBJECT(target), (GWeakNotify) rs_settings_unlink, source); /* Use glib signals to propagate changes */ g_signal_connect(source, "settings-changed", G_CALLBACK(rs_settings_copy), target); } /** * Unlink two RSSettings - this will be done automaticly if target from a * previous rs_settings_link() is finalized * @param source A RSSettings * @param target A RSSettings - can be destroyed, doesn't matter, we just need the pointer */ void rs_settings_unlink(RSSettings *source, RSSettings *target) { gulong signal_id; g_assert(RS_IS_SETTINGS(source)); /* If we can find a signal linking these two pointers, disconnect it */ signal_id = g_signal_handler_find(source, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, target); if (signal_id > 0) g_signal_handler_disconnect(source, signal_id); } rawstudio-2.0/librawstudio/rs-huesat-map.c0000644000175000017500000001302111526533645015666 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 G_DEFINE_TYPE (RSHuesatMap, rs_huesat_map, G_TYPE_OBJECT) static void rs_huesat_map_finalize(GObject *object) { RSHuesatMap *map = RS_HUESAT_MAP(object); if (map->deltas) g_free(map->deltas); G_OBJECT_CLASS (rs_huesat_map_parent_class)->finalize (object); } static void rs_huesat_map_class_init(RSHuesatMapClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = rs_huesat_map_finalize; } static void rs_huesat_map_init(RSHuesatMap *self) { } RSHuesatMap * rs_huesat_map_new(guint hue_divisions, guint sat_division, guint val_divisions) { RSHuesatMap *map = g_object_new(RS_TYPE_HUESAT_MAP, NULL); if (val_divisions == 0) val_divisions = 1; map->hue_divisions = hue_divisions; map->sat_divisions = sat_division; map->val_divisions = val_divisions; map->hue_step = sat_division; map->val_step = hue_divisions * map->hue_step; map->deltas = g_new0(RS_VECTOR3, rs_huesat_map_get_deltacount(map)); return map; } RSHuesatMap * rs_huesat_map_new_from_dcp(RSTiff *tiff, const guint ifd, const gushort dims_tag, const gushort table_tag) { RSHuesatMap *map = NULL; RSTiffIfdEntry *entry; guint hue_count = 0, sat_count = 0, val_count = 0; g_assert(RS_IS_TIFF(tiff)); entry = rs_tiff_get_ifd_entry(tiff, ifd, dims_tag); if (entry && (entry->count > 1)) { hue_count = rs_tiff_get_uint(tiff, entry->value_offset); sat_count = rs_tiff_get_uint(tiff, entry->value_offset+4); if (entry->count > 2) val_count = rs_tiff_get_uint(tiff, entry->value_offset+8); entry = rs_tiff_get_ifd_entry(tiff, ifd, table_tag); if (entry && (entry->count == (hue_count * sat_count * val_count * 3))) { gboolean skipSat0 = FALSE; /* FIXME */ gint val, hue, sat; gint offset = entry->value_offset; map = rs_huesat_map_new(hue_count, sat_count, val_count); for (val = 0; val < val_count; val++) { for (hue = 0; hue < hue_count; hue++) { for (sat = (skipSat0) ? 1 : 0; sat < sat_count; sat++) { RS_VECTOR3 modify; modify.h = rs_tiff_get_float(tiff, offset); modify.s = rs_tiff_get_float(tiff, offset+4); modify.v = rs_tiff_get_float(tiff, offset+8); offset += 12; rs_huesat_map_set_delta(map, hue, sat, val, &modify); } } } } } return map; } RSHuesatMap * rs_huesat_map_new_interpolated(const RSHuesatMap *map1, RSHuesatMap *map2, gfloat weight1) { RSHuesatMap *map = NULL; g_assert(RS_IS_HUESAT_MAP(map1)); g_assert(RS_IS_HUESAT_MAP(map2)); if (weight1 >= 1.0) return RS_HUESAT_MAP(g_object_ref(G_OBJECT(map1))); else if (weight1 <= 0.0) return RS_HUESAT_MAP(g_object_ref(G_OBJECT(map2))); if ((map1->hue_divisions == map2->hue_divisions) && (map1->sat_divisions == map2->sat_divisions) && (map1->val_divisions == map2->val_divisions)) { map = rs_huesat_map_new(map1->hue_divisions, map1->sat_divisions, map1->val_divisions); gfloat weight2 = 1.0 - weight1; const RS_VECTOR3 *data1 = map1->deltas; const RS_VECTOR3 *data2 = map1->deltas; RS_VECTOR3 *data3 = map1->deltas; gint count = map1->hue_divisions * map1->sat_divisions * map1->val_divisions; gint index; for (index = 0; index < count; index++) { data3->h = weight1 * data1->h + weight2 * data2->h; data3->s = weight1 * data1->s + weight2 * data2->s; data3->v = weight1 * data1->v + weight2 * data2->v; data1++; data2++; data3++; } } return map; } guint rs_huesat_map_get_deltacount(RSHuesatMap *map) { return map->val_divisions * map->hue_divisions * map->sat_divisions; } void rs_huesat_map_get_delta(RSHuesatMap *map, const guint hue_div, const guint sat_div, const guint val_div, RS_VECTOR3 *modify) { g_assert(RS_IS_HUESAT_MAP(map)); if (hue_div >= map->hue_divisions || sat_div >= map->sat_divisions || val_div >= map->val_divisions) { modify->h = 0.0; modify->s = 1.0; modify->v = 1.0; return; } gint offset = val_div * map->val_step + hue_div * map->hue_step + sat_div; *modify = map->deltas[offset]; } void rs_huesat_map_set_delta(RSHuesatMap *map, const guint hue_div, const guint sat_div, const guint val_div, const RS_VECTOR3 *modify) { g_assert(RS_IS_HUESAT_MAP(map)); if (hue_div >= map->hue_divisions || sat_div >= map->sat_divisions || val_div >= map->val_divisions) return; gint offset = val_div * map->val_step + hue_div * map->hue_step + sat_div; map->deltas[offset] = *modify; if (sat_div == 0) map->deltas[offset].v = 1.0; else if (sat_div == 1) { RS_VECTOR3 zero_sat_modify; rs_huesat_map_get_delta(map, hue_div, 0, val_div, &zero_sat_modify); if (zero_sat_modify.v != 1.0f) { zero_sat_modify = *modify; zero_sat_modify.v = 1.0; rs_huesat_map_set_delta(map, hue_div, 0, val_div, &zero_sat_modify); } } } rawstudio-2.0/librawstudio/rs-curve.c0000644000175000017500000006455011526533645014763 00000000000000/***************************************************************************** * Curve widget * * Copyright (C) 2007 Edouard Gomez * * 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 #include #include #include #include /* memset() */ struct _RSCurveWidget { GtkDrawingArea parent; RSSpline *spline; gint active_knot; gfloat *array; guint array_length; gulong size_signal; /* For drawing the histogram */ guint histogram_data[256]; RSFilter *input; guchar *bg_buffer; RSColorSpace *display_color_space; gfloat rgb_values[3]; gint last_width[2]; PangoLayout* help_layout; }; struct _RSCurveWidgetClass { GtkDrawingAreaClass parent_class; }; static void rs_curve_widget_class_init(RSCurveWidgetClass *klass); static void rs_curve_widget_init(RSCurveWidget *curve); static void rs_curve_widget_destroy(GtkObject *object); static gboolean rs_curve_size_allocate_helper(RSCurveWidget *curve); static void rs_curve_size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data); static void rs_curve_changed(RSCurveWidget *curve); static void rs_curve_draw(RSCurveWidget *curve); static gboolean rs_curve_widget_expose(GtkWidget *widget, GdkEventExpose *event); static gboolean rs_curve_widget_button_press(GtkWidget *widget, GdkEventButton *event); static gboolean rs_curve_widget_button_release(GtkWidget *widget, GdkEventButton *event); static gboolean rs_curve_widget_motion_notify(GtkWidget *widget, GdkEventMotion *event); static void rs_curve_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data); enum { CHANGED_SIGNAL, RIGHTCLICK_SIGNAL, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = { 0 }; /* Define the boiler plate stuff using the predefined macro */ G_DEFINE_TYPE (RSCurveWidget, rs_curve_widget, GTK_TYPE_DRAWING_AREA); /** * Class initializer */ static void rs_curve_widget_class_init(RSCurveWidgetClass *klass) { GtkWidgetClass *widget_class; GtkObjectClass *object_class; widget_class = GTK_WIDGET_CLASS(klass); object_class = GTK_OBJECT_CLASS(klass); signals[CHANGED_SIGNAL] = g_signal_new ("changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, /* Is this right? */ NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); signals[RIGHTCLICK_SIGNAL] = g_signal_new ("right-click", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, /* Is this right? */ NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); object_class->destroy = rs_curve_widget_destroy; widget_class->expose_event = rs_curve_widget_expose; widget_class->button_press_event = rs_curve_widget_button_press; widget_class->button_release_event = rs_curve_widget_button_release; widget_class->motion_notify_event = rs_curve_widget_motion_notify; } /** * Instance initialization */ static void rs_curve_widget_init(RSCurveWidget *curve) { curve->array = NULL; curve->array_length = 0; curve->spline = rs_spline_new(NULL, 0, NATURAL); curve->bg_buffer = NULL; /* Let us know about pointer movements */ gtk_widget_set_events(GTK_WIDGET(curve), 0 | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK); curve->size_signal = g_signal_connect(curve, "size-allocate", G_CALLBACK(rs_curve_size_allocate), NULL); g_signal_connect(G_OBJECT(curve), "size-allocate", G_CALLBACK(rs_curve_widget_size_allocate), NULL); /* Initialize help */ curve->help_layout = gtk_widget_create_pango_layout(GTK_WIDGET(curve), "Mouse Controls:\nLeft: New point\nShift+Left: Delete point\nRight: Load/Save/Reset Curve"); PangoFontDescription *font_desc = pango_font_description_from_string("sans light 7"); pango_layout_set_font_description(curve->help_layout, font_desc); pango_layout_context_changed(curve->help_layout); curve->rgb_values[0] = -1; curve->rgb_values[1] = -1; curve->rgb_values[2] = -1; } /** * Instance Constructor */ GtkWidget * rs_curve_widget_new(void) { return g_object_new (RS_CURVE_TYPE_WIDGET, NULL); } float rs_curve_widget_get_marker(RSCurveWidget *curve) { g_return_val_if_fail (curve != NULL, -1.0f); g_return_val_if_fail (RS_IS_CURVE_WIDGET(curve), -1.0f); gfloat position = MAX(MAX(curve->rgb_values[0], curve->rgb_values[1]),curve->rgb_values[2]); /* Clamp values above 1.0 */ if (position > 1.0) position = 1.0; if (curve->display_color_space && position >= 0.0f) { const RS1dFunction *func = rs_color_space_get_gamma_function(curve->display_color_space); position = rs_1d_function_evaluate_inverse(func, position); position = sqrtf(position); } else position = -1.0; return position; } /** * Sets sample array for a RSCurveWidget, this array will be updates whenever the curve changes * @param curve A RSCurveWidget * @param array An array of gfloats to be updated or NULL to unset * @params array_length: Length of array or 0 to unset */ void rs_curve_widget_set_array(RSCurveWidget *curve, gfloat *array, guint array_length) { g_return_if_fail (curve != NULL); g_return_if_fail (RS_IS_CURVE_WIDGET(curve)); if (array && array_length) { curve->array = array; curve->array_length = array_length; } else { curve->array = NULL; curve->array_length = 0; } } #define LUM_PRECISION 15 #define LUM_FIXED(a) ((guint)((a)*(1<histogram_data[i] = input[i]; } /** * Set an image to base the histogram of * @param curve A RSCurveWidget * @param image An image * @param display_color_space Colorspace to use to transform the input. */ void rs_curve_set_input(RSCurveWidget *curve, RSFilter* input, RSColorSpace *display_color_space) { g_return_if_fail (RS_IS_CURVE_WIDGET(curve)); g_return_if_fail (RS_IS_FILTER(input)); curve->input = input; if (curve->input) rs_filter_set_recursive(RS_FILTER(input), "read-out-curve", curve, NULL); curve->display_color_space = display_color_space; } /** * Draw a histogram in the background of the widget * @param curve A RSCurveWidget * @param image A image to sample from * @param setting Settings to use, curve and saturation will be ignored */ void rs_curve_draw_histogram(RSCurveWidget *curve) { g_assert(RS_IS_CURVE_WIDGET(curve)); if (curve->input) { RSFilterRequest *request = rs_filter_request_new(); rs_filter_request_set_quick(RS_FILTER_REQUEST(request), TRUE); rs_filter_param_set_object(RS_FILTER_PARAM(request), "colorspace", curve->display_color_space); rs_filter_set_recursive(RS_FILTER(curve->input), "read-out-curve", curve, NULL); RSFilterResponse *response = rs_filter_get_image8(curve->input, request); g_object_unref(request); g_object_unref(response); } if (curve->bg_buffer) g_free(curve->bg_buffer); curve->bg_buffer = NULL; rs_curve_draw(curve); } void rs_curve_set_highlight(RSCurveWidget *curve, const guchar* rgb_values) { g_return_if_fail (RS_IS_CURVE_WIDGET(curve)); if (rgb_values) { curve->rgb_values[0] = (float)rgb_values[0]/255.0f; curve->rgb_values[1] = (float)rgb_values[1]/255.0f; curve->rgb_values[2] = (float)rgb_values[2]/255.0f; } else { curve->rgb_values[0] = -1; curve->rgb_values[1] = -1; curve->rgb_values[2] = -1; } rs_curve_draw(curve); } /** * Instance destruction */ static void rs_curve_widget_destroy(GtkObject *object) { RSCurveWidget *curve = NULL; g_return_if_fail (object != NULL); g_return_if_fail (RS_IS_CURVE_WIDGET(object)); curve = RS_CURVE_WIDGET(object); if (curve->spline != NULL) { g_object_unref(curve->spline); } g_object_unref(curve->help_layout); if (curve->input) rs_filter_set_recursive(RS_FILTER(curve->input), "read-out-curve", NULL, NULL); } /** * Add a knot to a curve widget * @param widget A RSCurveWidget * @param x X coordinate * @param y Y coordinate */ void rs_curve_widget_add_knot(RSCurveWidget *curve, gfloat x, gfloat y) { g_return_if_fail (curve != NULL); g_return_if_fail (RS_IS_CURVE_WIDGET(curve)); /* Reset active knot */ curve->active_knot = -1; /* Add the knot */ rs_spline_add(curve->spline, x, y); /* Redraw the widget */ rs_curve_draw(curve); /* Propagate the change */ rs_curve_changed(curve); } /** * Move a knot of a RSCurveWidget * @param curve A RSCurveWidget * @param knot Knot to move or -1 for last * @param x X coordinate * @param y Y coordinate */ void rs_curve_widget_move_knot(RSCurveWidget *curve, gint knot, gfloat x, gfloat y) { g_return_if_fail (curve != NULL); g_return_if_fail (RS_IS_CURVE_WIDGET(curve)); /* Do we want the last knot? */ if (knot < 0) knot = rs_spline_length(curve->spline)-1; /* Check limits */ if (knot >= rs_spline_length(curve->spline)) knot = rs_spline_length(curve->spline)-1; /* Move the knot */ rs_spline_move(curve->spline, knot, x, y); /* Propagate the change */ rs_curve_changed(curve); /* Redraw everything */ rs_curve_draw(curve); return; } /** * Get samples from curve * @param widget A RSCurveWidget * @param samples Pointer to output array or NULL * @param nbsamples number of samples * @return An array of floats, should be freed */ gfloat * rs_curve_widget_sample(RSCurveWidget *curve, gfloat *samples, guint nbsamples) { g_return_val_if_fail (curve != NULL, NULL); g_return_val_if_fail (RS_IS_CURVE_WIDGET(curve), NULL); samples = rs_spline_sample(curve->spline, samples, nbsamples); return(samples); } /** * Set knots of a RSCurveWidget * @param curve A RSCurveWidget * @param knots An array of knots (two values/knot) * @param nknots Number of knots */ void rs_curve_widget_set_knots(RSCurveWidget *curve, const gfloat *knots, const guint nknots) { gint i; g_assert(RS_IS_CURVE_WIDGET(curve)); /* Free thew current spline */ if (curve->spline) g_object_unref(curve->spline); /* Allocate new spline */ curve->spline = rs_spline_new(NULL, 0, NATURAL); /* Add the knot */ for(i=0;ispline, knots[i*2], knots[i*2+1]); /* Redraw the widget */ rs_curve_draw(curve); /* Propagate the change */ rs_curve_changed(curve); } /** * Get knots from a RSCurveWidget * @param curve A RSCurveWidget * @param knots An array of knots (two values/knot) (out) * @param nknots Number of knots written (out) */ extern void rs_curve_widget_get_knots(RSCurveWidget *curve, gfloat **knots, guint *nknots) { rs_spline_get_knots(curve->spline, knots, nknots); } /** * Resets a RSCurveWidget * @param curve A RSCurveWidget */ extern void rs_curve_widget_reset(RSCurveWidget *curve) { g_return_if_fail (curve != NULL); g_return_if_fail (RS_IS_CURVE_WIDGET(curve)); /* Free thew current spline */ if (curve->spline) g_object_unref(curve->spline); /* Allocate new spline */ curve->spline = rs_spline_new(NULL, 0, NATURAL); /* Redraw changes */ rs_curve_draw(curve); /* Propagate changes */ rs_curve_changed(curve); } /** * Saves a RSCurveWidgets knots to a XML-file. * @param curve A RSCurveWidget * @param filename The filename to save to * @return TRUE if succeded, FALSE otherwise */ extern gboolean rs_curve_widget_save(RSCurveWidget *curve, const gchar *filename) { xmlTextWriterPtr writer; guint nknots, i; gfloat *curve_knots; rs_curve_widget_get_knots(curve, &curve_knots, &nknots); if ((writer = xmlNewTextWriterFilename(filename, 0))) { xmlTextWriterStartDocument(writer, NULL, "ISO-8859-1", NULL); xmlTextWriterStartElement(writer, BAD_CAST "Curve"); xmlTextWriterWriteFormatAttribute(writer, BAD_CAST "num", "%d", nknots); for(i=0;iname, BAD_CAST "Curve"))) { gchar **vals; gfloat x,y; guint nknots; gfloat *knots; xmlNodePtr curknot = NULL; rs_curve_widget_get_knots(curve, &knots, &nknots); while (nknots--) { rs_spline_delete(curve->spline, nknots); } g_free(knots); curknot = cur->xmlChildrenNode; while (curknot) { if ((!xmlStrcmp(curknot->name, BAD_CAST "AnchorXY"))) { val = xmlNodeListGetString(doc, curknot->xmlChildrenNode, 1); vals = g_strsplit((gchar *)val, " ", 4); if (vals[0] && vals[1]) { x = rs_atof(vals[0]); y = rs_atof(vals[1]); rs_curve_widget_add_knot(curve, x,y); } g_strfreev(vals); xmlFree(val); } curknot = curknot->next; } } cur = cur->next; } xmlFreeDoc(doc); return TRUE; } /* Background color */ static const GdkColor darkgrey = {0, 0x7777, 0x7777, 0x7777}; /* Foreground color */ static const GdkColor lightgrey = {0, 0xcccc, 0xcccc, 0xcccc}; /* White */ static const GdkColor white = {0, 0xffff, 0xffff, 0xffff}; /* Red */ static const GdkColor red = {0, 0xffff, 0x0000, 0x0000}; /* Light Red */ static const GdkColor light_red = {0, 0xf000, 0x9000, 0x9000}; static void rs_curve_draw_background(GtkWidget *widget) { gint i, j, x, y; gint max[3]; memset(max, 0, 3*sizeof(gint)); /* Width */ gint width; /* Height */ gint height; RSCurveWidget *curve; GdkDrawable *window; GdkGC *gc; /* Get back our curve widget */ curve = RS_CURVE_WIDGET(widget); /* Get the drawing window */ window = GDK_DRAWABLE(widget->window); if (!window) return; /* Graphics context */ gc = gdk_gc_new(window); /* Width and height */ gdk_drawable_get_size(window, &width, &height); /* Scaled histogram */ gint hist[width]; if (!curve->bg_buffer) { curve->bg_buffer = g_new(guchar, width*height*4); /* Clear the window */ memset(curve->bg_buffer, 0x99, width*height*4); /* Prepare histogram */ if (curve->histogram_data) { /* find the third largest value */ for (i = 0; i < 256; i++) for (j = 0; j < 3; j++) if (curve->histogram_data[i] > max[j]) { /* Move subsequence entires one down the stack */ for (x = 1; x >= j; x--) max[x+1] = max[x]; max[j] = curve->histogram_data[i]; j = 3; } /* Find height scale factor */ gfloat factor = (gfloat)height * (1.0f /(gfloat)(max[2])); /* Find width scale factor */ gfloat source, scale = 253.0/width; gint source1, source2; gfloat weight1, weight2; for (i = 0; i < width; i++) { source = ((gdouble)i)*scale; source1 = floor(source); source2 = source1+1; weight1 = 1.0 - (source-source1); weight2 = 1.0 - weight1; hist[i] = MIN(height-1, (curve->histogram_data[1+source1] * weight1 + curve->histogram_data[1+source2] * weight2) * factor); } for (x = 0; x < width; x++) { for (y = 0; y < hist[x]; y++) { guchar *p = curve->bg_buffer + ((height-1)-y) * width*3 + x * 3; p[R] = 0xB0; p[G] = 0xB0; p[B] = 0xB0; } } } } /* Prepare the graphics context */ gdk_gc_set_rgb_fg_color(gc, &darkgrey); /* Draw histogram to screen */ gdk_draw_rgb_image(window, gc, 0, 0, width, height, GDK_RGB_DITHER_NONE, curve->bg_buffer, width*3); /* Draw all lines */ for (i=0; i<=4; i++) { gint x = i*width/4; gint y = i*height/4; gdk_draw_line(window, gc, x, 0, x, height); gdk_draw_line(window, gc, 0, y, width, y); } gdk_draw_layout_with_colors(window, gc, 2, 2, curve->help_layout, &white, NULL); g_object_unref(gc); } static void rs_curve_draw_knots(GtkWidget *widget) { gfloat *knots = NULL; guint n = 0; gint width; gint height; guint i; RSCurveWidget *curve; GdkDrawable *window; GdkGC *gc; /* Get back our curve widget */ curve = RS_CURVE_WIDGET(widget); /* Get the drawing window */ window = GDK_DRAWABLE(widget->window); if (!window) return; /* Graphics context */ gc = gdk_gc_new(window); /* Get the knots from the spline */ rs_spline_get_knots(curve->spline, &knots, &n); /* Get the width and height */ gdk_drawable_get_size(window, &width, &height); /* Put the right bg color */ gdk_gc_set_rgb_fg_color(gc, &white); /* Draw the stuff */ for (i=0; iactive_knot>=0) && (n>0)) { gint x = (gint)(knots[2*curve->active_knot + 0]*width); gint y = (gint)(height*(1-knots[2*curve->active_knot + 1])); gdk_gc_set_rgb_fg_color(gc, &red); gdk_draw_rectangle(window, gc, FALSE, x-3, y-3, 6, 6); } g_free(knots); } static void rs_curve_draw_spline(GtkWidget *widget) { RSCurveWidget *curve; /* Get back our curve widget */ curve = RS_CURVE_WIDGET(widget); /* Get the drawing window */ GdkDrawable *window = GDK_DRAWABLE(widget->window); if (!window) return; /* Graphics context */ GdkGC *gc = gdk_gc_new(window); /* Curve samples */ gfloat *samples = NULL; /* Width and height */ gint width; gint height; gint i; /* Width and height */ gdk_drawable_get_size(window, &width, &height); /* Put the right bg color */ gdk_gc_set_rgb_fg_color(gc, &white); samples = rs_curve_widget_sample(curve, NULL, width); if (!samples) return; for (i=0; i (height-1)) y = height-1; gdk_draw_point(window, gc, i, y); } /* Draw current luminance */ gfloat marker = rs_curve_widget_get_marker(curve); gint current = (int)(marker*(height-1)); if (current >=0 && current < height) { gdk_gc_set_rgb_fg_color(gc, &light_red); gint x = 0; while ((samples[x] < marker) && (x < (width-1))) x++; current = height - current; gdk_draw_line(window, gc, x, current, width, current); gdk_draw_line(window, gc, x, current, x, height); } g_free(samples); } /** * Draw everything */ static void rs_curve_draw(RSCurveWidget *curve) { GtkWidget *widget; g_return_if_fail (curve != NULL); g_return_if_fail (RS_IS_CURVE_WIDGET(curve)); widget = GTK_WIDGET(curve); if (GTK_WIDGET_VISIBLE(widget) && GTK_WIDGET_REALIZED(widget)) { /* Draw the background */ rs_curve_draw_background(widget); /* Draw the control points */ rs_curve_draw_knots(widget); /* Draw the curve */ rs_curve_draw_spline(widget); } } static gboolean rs_curve_size_allocate_helper(RSCurveWidget *curve) { gboolean ret = FALSE; gdk_threads_enter(); if (GTK_WIDGET(curve)->allocation.width != GTK_WIDGET(curve)->allocation.height) { if (ABS(GTK_WIDGET(curve)->allocation.width - GTK_WIDGET(curve)->allocation.height) > 10) { gint new_height = GTK_WIDGET(curve)->allocation.width; if (GTK_WIDGET(curve)->allocation.width == curve->last_width[0]) new_height = GTK_WIDGET(curve)->allocation.height; g_signal_handler_block(RS_CURVE_WIDGET(curve), RS_CURVE_WIDGET(curve)->size_signal); gtk_widget_set_size_request(GTK_WIDGET(curve), -1, new_height); GUI_CATCHUP(); g_signal_handler_unblock(RS_CURVE_WIDGET(curve), RS_CURVE_WIDGET(curve)->size_signal); curve->last_width[0] = curve->last_width[1]; curve->last_width[1] = GTK_WIDGET(curve)->allocation.width; } } gdk_threads_leave(); return ret; } /** * Make the curve widget squared */ static void rs_curve_size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data) { RSCurveWidget *curve = RS_CURVE_WIDGET(widget); rs_curve_size_allocate_helper(curve); } /** * Propagate changes */ static void rs_curve_changed(RSCurveWidget *curve) { g_return_if_fail (curve != NULL); g_return_if_fail (RS_IS_CURVE_WIDGET(curve)); if (curve->array_length>0) rs_curve_widget_sample(curve, curve->array, curve->array_length); g_signal_emit (G_OBJECT (curve), signals[CHANGED_SIGNAL], 0); } /** * Expose event handler */ static gboolean rs_curve_widget_expose(GtkWidget *widget, GdkEventExpose *event) { g_return_val_if_fail(widget != NULL, FALSE); g_return_val_if_fail(RS_IS_CURVE_WIDGET (widget), FALSE); g_return_val_if_fail(event != NULL, FALSE); RSCurveWidget *curve = RS_CURVE_WIDGET(widget); /* Do nothing if there's more expose events */ if (event->count > 0) return FALSE; if (curve->input) rs_filter_set_recursive(RS_FILTER(curve->input), "read-out-curve", curve, NULL); rs_curve_draw(RS_CURVE_WIDGET(widget)); return FALSE; } /** * Handle button press */ static gboolean rs_curve_widget_button_press(GtkWidget *widget, GdkEventButton *event) { gint w, h; gfloat x,y; RSCurveWidget *curve; g_return_val_if_fail(widget != NULL, FALSE); g_return_val_if_fail(RS_IS_CURVE_WIDGET (widget), FALSE); g_return_val_if_fail(event != NULL, FALSE); /* Get back our curve widget */ curve = RS_CURVE_WIDGET(widget); gdk_drawable_get_size(GDK_DRAWABLE(widget->window), &w, &h); x = event->x/w; y = 1.0 - event->y/h; gint button = event->button; /* Shift+Left = Middle button */ if (button == 1 && (event->state&GDK_SHIFT_MASK)) button = 2; /* Add a point */ if ((button==1) && (curve->active_knot==-1)) rs_curve_widget_add_knot(curve, x, y); else if (button == 1 && (curve->active_knot >= 0)) rs_spline_move(curve->spline, curve->active_knot, x, y); /* Delete a point if not first or last */ else if (button == 2 && (curve->active_knot>0) && (curve->active_knot<(rs_spline_length(curve->spline)-1))) { rs_spline_delete(curve->spline, curve->active_knot); curve->active_knot = -1; } else if (button == 3) g_signal_emit (G_OBJECT (curve), signals[RIGHTCLICK_SIGNAL], 0); rs_curve_draw(curve); return(TRUE); } /* * Update when button is released */ static gboolean rs_curve_widget_button_release(GtkWidget *widget, GdkEventButton *event) { rs_curve_changed(RS_CURVE_WIDGET(widget)); return(TRUE); } /* * Handle motion */ static gboolean rs_curve_widget_motion_notify(GtkWidget *widget, GdkEventMotion *event) { gint w, h; gfloat x,y; guint i, n = 0; gfloat *knots; RSCurveWidget *curve; gint old_active_knot; g_return_val_if_fail(widget != NULL, FALSE); g_return_val_if_fail(RS_IS_CURVE_WIDGET (widget), FALSE); g_return_val_if_fail(event != NULL, FALSE); /* Get back our curve widget */ curve = RS_CURVE_WIDGET(widget); /* Remember the last active knot */ old_active_knot = curve->active_knot; gdk_drawable_get_size(GDK_DRAWABLE(widget->window), &w, &h); /* Get a working copy of current knots */ rs_spline_get_knots(curve->spline, &knots, &n); /* Calculate pixel coordinates for X-axis */ for(i=0;istate&GDK_BUTTON1_MASK) && (curve->active_knot>=0)) { x = event->x/w; y = 1.0f - event->y/h; /* Clamp Y value */ if (y<0.0f) y = 0.0f; if (y>1.0f) y = 1.0f; /* Clamp X value */ if (x<0.0f) x = 0.0f; if (x>1.0f) x = 1.0f; /* Restrict X-axis for first and last knot */ if (curve->active_knot == 0) /* first */ rs_spline_move(curve->spline, curve->active_knot, x, y); else if (curve->active_knot == rs_spline_length(curve->spline)-1) /* last */ rs_spline_move(curve->spline, curve->active_knot, x, y); else { /* Delete knot if we collide with neighbour */ if (event->x <= knots[(curve->active_knot-1)*2+0]) { rs_spline_delete(curve->spline, curve->active_knot); curve->active_knot--; } else if (event->x >= knots[(curve->active_knot+1)*2+0]) rs_spline_delete(curve->spline, curve->active_knot); /* Move the knot */ rs_spline_move(curve->spline, curve->active_knot, x, y); } rs_curve_draw(curve); } else /* Only reset active_knot if we're not moving anything */ { /* Find knot below cursor if any */ curve->active_knot = -1; for(i=0;ix-knots[i*2+0]) < 16.0) { curve->active_knot = i; break; } } } /* Update knots if needed */ if (old_active_knot != curve->active_knot) rs_curve_draw(RS_CURVE_WIDGET(widget)); g_free(knots); return(TRUE); } static void rs_curve_widget_size_allocate(GtkWidget *widget, GtkAllocation *allocation, gpointer user_data) { /* Get back our curve widget */ RSCurveWidget *curve = RS_CURVE_WIDGET(widget); /* Free our bg_buffer, since it must be useless by now */ if (curve->bg_buffer) g_free(curve->bg_buffer); /* Mark it as not existing */ curve->bg_buffer = NULL; } #ifdef RS_CURVE_TEST void changed(GtkWidget *widget, gpointer user_data) { gfloat *s; gint i; s = rs_curve_widget_sample(RS_CURVE_WIDGET(widget), 20); for(i=0;i<20;i++) { printf("%.05f\n", s[i]); } g_free(s); } int main(int argc, char **argv) { /* Iterator */ gint i; /* A window */ GtkWidget *window; /* The curve */ GtkWidget *curve; /* A simple S-curve */ const gfloat scurve_knots[] = { 0.625f, 0.75f, 0.125f, 0.25f, 0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 1.0f }; gtk_init (&argc, &argv); window = gtk_window_new(GTK_WINDOW_TOPLEVEL); /* Build a nice curve */ curve = rs_curve_widget_new(); for (i=0; i, * * Anders Kvist and Klaus Post * * 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 RS_IO_JOB_CHECKSUM_H #define RS_IO_JOB_CHECKSUM_H #include "rs-io-job.h" #include G_BEGIN_DECLS #define RS_TYPE_IO_JOB_CHECKSUM rs_io_job_checksum_get_type() #define RS_IO_JOB_CHECKSUM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_IO_JOB_CHECKSUM, RSIoJobChecksum)) #define RS_IO_JOB_CHECKSUM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_IO_JOB_CHECKSUM, RSIoJobChecksumClass)) #define RS_IS_IO_JOB_CHECKSUM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_IO_JOB_CHECKSUM)) #define RS_IS_IO_JOB_CHECKSUM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_IO_JOB_CHECKSUM)) #define RS_IO_JOB_CHECKSUM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_IO_JOB_CHECKSUM, RSIoJobChecksumClass)) typedef void (*RSGotChecksumCB)(const gchar *checksum, gpointer user_data); typedef struct { RSIoJobClass parent_class; } RSIoJobChecksumClass; GType rs_io_job_checksum_get_type(void); RSIoJob *rs_io_job_checksum_new(const gchar *path, RSGotChecksumCB callback); G_END_DECLS #endif /* RS_IO_JOB_CHECKSUM_H */ rawstudio-2.0/librawstudio/rs-color.h0000644000175000017500000000255511526533645014757 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_COLOR_H #define RS_COLOR_H extern const RS_MATRIX3 PCStoProPhoto; extern const RS_XYZ_VECTOR XYZ_WP_D50; extern void rs_color_whitepoint_to_temp(const RS_xy_COORD *xy, gfloat *temp, gfloat *tint); extern RS_xy_COORD rs_color_temp_to_whitepoint(gfloat temp, gfloat tint); extern RS_XYZ_VECTOR xy_to_XYZ(const RS_xy_COORD *xy); extern RS_xy_COORD XYZ_to_xy(const RS_XYZ_VECTOR *XYZ); extern RS_MATRIX3 rs_calculate_map_white_matrix(const RS_xy_COORD *from_xy, const RS_xy_COORD *to_xy); #endif /* RS_COLOR_H */ rawstudio-2.0/librawstudio/rs-rawfile.c0000644000175000017500000001717611526533645015272 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include #include #include #ifdef G_OS_WIN32 #include #else #include #include #endif #include #include "rs-rawfile.h" struct _RAWFILE { #ifdef G_OS_WIN32 HANDLE filehandle; HANDLE maphandle; #else gint fd; #endif gboolean is_map; guint size; void *map; gushort byteorder; guint first_ifd_offset; guint base; }; #if BYTE_ORDER == LITTLE_ENDIAN const static gushort cpuorder = 0x4949; #elif BYTE_ORDER == BIG_ENDIAN const static gushort cpuorder = 0x4D4D; #endif void raw_init(void) { /* stub */ return; } gboolean raw_get_uint(RAWFILE *rawfile, guint pos, guint *target) { if((rawfile->base+pos+4)>rawfile->size) return(FALSE); if (rawfile->byteorder == cpuorder) *target = *(guint *)(rawfile->map+pos+rawfile->base); else *target = ENDIANSWAP4(*(guint *)(rawfile->map+pos+rawfile->base)); return(TRUE); } gboolean raw_get_ushort(RAWFILE *rawfile, guint pos, gushort *target) { if((rawfile->base+pos+2)>rawfile->size) return(FALSE); if (rawfile->byteorder == cpuorder) *target = *(gushort *)(rawfile->map+rawfile->base+pos); else *target = ENDIANSWAP2(*(gushort *)(rawfile->map+rawfile->base+pos)); return(TRUE); } gushort raw_get_ushort_from_string(RAWFILE *rawfile, gchar *source) { gushort target; if (rawfile->byteorder == cpuorder) target = *(gushort *)(source); else target = ENDIANSWAP2(*(gushort *)(source)); return(target); } gboolean raw_get_short(RAWFILE *rawfile, guint pos, gshort *target) { if((rawfile->base+pos+2)>rawfile->size) return(FALSE); if (rawfile->byteorder == cpuorder) *target = *(gshort *)(rawfile->map+rawfile->base+pos); else *target = ENDIANSWAP2(*(gshort *)(rawfile->map+rawfile->base+pos)); return(TRUE); } gshort raw_get_short_from_string(RAWFILE *rawfile, gchar *source) { gushort target; if (rawfile->byteorder == cpuorder) target = *(gshort *)(source); else target = ENDIANSWAP2(*(gshort *)(source)); return(target); } gboolean raw_get_float(RAWFILE *rawfile, guint pos, gfloat *target) { if((rawfile->base+pos+4)>rawfile->size) return(FALSE); if (rawfile->byteorder == cpuorder) *target = *(gfloat *)(rawfile->map+rawfile->base+pos); else *target = (gfloat) (ENDIANSWAP4(*(gint *)(rawfile->map+rawfile->base+pos))); return(TRUE); } gboolean raw_get_uchar(RAWFILE *rawfile, guint pos, guchar *target) { if((rawfile->base+pos+1)>rawfile->size) return(FALSE); *target = *(guchar *)(rawfile->map+rawfile->base+pos); return(TRUE); } gboolean raw_get_rational(RAWFILE *rawfile, guint pos, gfloat *target) { if((rawfile->base+pos+8)>rawfile->size) return(FALSE); guint counter, divisor; if (!raw_get_uint(rawfile, pos, &counter)) return FALSE; if (!raw_get_uint(rawfile, pos+4, &divisor)) return FALSE; if (divisor == 0) return(FALSE); *target = (gfloat) counter / (gfloat) divisor; return(TRUE); } gboolean raw_strcmp(RAWFILE *rawfile, guint pos, const gchar *needle, gint len) { if((rawfile->base+pos+len) > rawfile->size) return(FALSE); if(0 == g_ascii_strncasecmp(needle, rawfile->map+rawfile->base+pos, len)) return(TRUE); else return(FALSE); } gboolean raw_strcpy(RAWFILE *rawfile, guint pos, void *target, gint len) { if((rawfile->base+pos+len) > rawfile->size) return(FALSE); g_memmove(target, rawfile->map+rawfile->base+pos, len); return(TRUE); } gchar * raw_strdup(RAWFILE *rawfile, guint pos, gint len) { if((rawfile->base+pos+len) > rawfile->size) return(FALSE); return(g_strndup(rawfile->map+rawfile->base+pos, len)); } GdkPixbuf * raw_get_pixbuf(RAWFILE *rawfile, guint pos, guint length) { GdkPixbufLoader *pl; GdkPixbuf *pixbuf = NULL; gboolean cont = TRUE; /* Are we good to continue? */ if((rawfile->base+pos+length)>rawfile->size) return(NULL); pl = gdk_pixbuf_loader_new(); while((length > 100000) && cont) { cont = gdk_pixbuf_loader_write(pl, rawfile->map+rawfile->base+pos, 80000, NULL); length -= 80000; pos += 80000; } if (cont) gdk_pixbuf_loader_write(pl, rawfile->map+rawfile->base+pos, length, NULL); pixbuf = gdk_pixbuf_loader_get_pixbuf(pl); gdk_pixbuf_loader_close(pl, NULL); return(pixbuf); } RAWFILE * raw_create_from_memory(void *memory, guint size, guint first_ifd_offset, gushort byteorder) { RAWFILE *rawfile; rawfile = g_malloc(sizeof(RAWFILE)); rawfile->is_map = FALSE; rawfile->size = size; rawfile->map = memory; rawfile->base = 0; rawfile->byteorder = byteorder; rawfile->first_ifd_offset = first_ifd_offset; return rawfile; } RAWFILE * raw_open_file(const gchar *filename) { struct stat st; #ifndef G_OS_WIN32 gint fd; #endif RAWFILE *rawfile; if(stat(filename, &st)) return(NULL); rawfile = g_malloc(sizeof(RAWFILE)); rawfile->size = st.st_size; #ifdef G_OS_WIN32 rawfile->filehandle = CreateFile(filename, FILE_READ_DATA, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); if (rawfile->filehandle == INVALID_HANDLE_VALUE) { g_free(rawfile); return(NULL); } if ((rawfile->maphandle = CreateFileMapping(rawfile->filehandle, NULL, PAGE_READONLY, 0, 0, NULL))==NULL) { g_free(rawfile); return(NULL); } rawfile->map = MapViewOfFile(rawfile->maphandle, FILE_MAP_READ, 0, 0, rawfile->size); if (rawfile->map == NULL) { g_free(rawfile); return(NULL); } #else if ((fd = open(filename, O_RDONLY)) == -1) { g_free(rawfile); return(NULL); } rawfile->map = mmap(NULL, rawfile->size, PROT_READ, MAP_SHARED, fd, 0); if(rawfile->map == MAP_FAILED) { g_free(rawfile); return(NULL); } rawfile->is_map = TRUE; rawfile->fd = fd; #endif rawfile->base = 0; rawfile->byteorder = 0x4D4D; return(rawfile); } guchar raw_init_file_tiff(RAWFILE *rawfile, guint pos) { guchar version = 0; if((pos+12)>rawfile->size) return version; rawfile->byteorder = *((gushort *) (rawfile->map+pos)); raw_get_uint(rawfile, pos+4, &rawfile->first_ifd_offset); if (rawfile->first_ifd_offset > rawfile->size) return version; raw_get_uchar(rawfile, pos+2, &version); rawfile->base = pos; return version; } void raw_close_file(RAWFILE *rawfile) { if (rawfile->is_map) { #ifdef G_OS_WIN32 UnmapViewOfFile(rawfile->map); CloseHandle(rawfile->maphandle); CloseHandle(rawfile->filehandle); #else munmap(rawfile->map, rawfile->size); close(rawfile->fd); #endif } g_free(rawfile); return; } void raw_reset_base(RAWFILE *rawfile) { rawfile->base = 0; return; } gint raw_get_base(RAWFILE *rawfile) { return rawfile->base; } gushort raw_get_byteorder(RAWFILE *rawfile) { return rawfile->byteorder; } void raw_set_byteorder(RAWFILE *rawfile, gushort byteorder) { rawfile->byteorder = byteorder; } guint get_first_ifd_offset(RAWFILE *rawfile) { return rawfile->first_ifd_offset; } void * raw_get_map(RAWFILE *rawfile) { return rawfile->map; } guint raw_get_filesize(RAWFILE *rawfile) { return rawfile->size; } rawstudio-2.0/librawstudio/rs-image.c0000644000175000017500000000624511526533645014716 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include "rs-image.h" struct _RSImage { GObject parent; gint width; gint height; gint number_of_planes; gfloat **planes; }; G_DEFINE_TYPE (RSImage, rs_image, G_TYPE_OBJECT) typedef enum { RS_IMAGE_CHANGED, RS_IMAGE_LAST_SIGNAL } RSImageSignals; static guint signals[RS_IMAGE_LAST_SIGNAL] = { 0 }; static void rs_image_finalize (GObject *object) { RSImage *image = RS_IMAGE(object); gint plane; for (plane=0; planenumber_of_planes; plane++) g_free(image->planes[plane]); g_free(image->planes); if (G_OBJECT_CLASS (rs_image_parent_class)->finalize) G_OBJECT_CLASS (rs_image_parent_class)->finalize (object); } static void rs_image_class_init (RSImageClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->finalize = rs_image_finalize; signals[RS_IMAGE_CHANGED] = g_signal_newv( "rs-image-changed", G_TYPE_FROM_CLASS (klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, NULL, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, NULL); } static void rs_image_init(RSImage *self) { } RSImage * rs_image_new(gint width, gint height, gint number_of_planes) { gint plane; RSImage *image; g_assert (width < 65536); g_assert (height < 65536); g_assert (width > 0); g_assert (height > 0); g_assert (number_of_planes > 0); image = g_object_new(RS_TYPE_IMAGE, NULL); image->number_of_planes = number_of_planes; image->width = width; image->height = height; /* Allocate space for all planes and all pixels */ image->planes = g_new(gfloat *, number_of_planes); for(plane=0; planenumber_of_planes; plane++) image->planes[plane] = g_new(gfloat, image->width*image->height); return image; } void rs_image_changed(RSImage *image) { g_assert (RS_IS_IMAGE(image)); g_signal_emit(image, signals[RS_IMAGE_CHANGED], 0, NULL); } gint rs_image_get_width(RSImage *image) { g_assert (RS_IS_IMAGE(image)); return image->width; } gint rs_image_get_height(RSImage *image) { g_assert (RS_IS_IMAGE(image)); return image->height; } gint rs_image_get_number_of_planes(RSImage *image) { g_assert (RS_IS_IMAGE(image)); return image->number_of_planes; } gfloat * rs_image_get_plane(RSImage *image, gint plane_num) { g_assert (RS_IS_IMAGE(image)); g_assert (plane_num > 0); g_assert (plane_num < image->number_of_planes); return image->planes[plane_num]; } rawstudio-2.0/librawstudio/rs-filter-request.h0000644000175000017500000000701511526533645016610 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 RS_FILTER_REQUEST_H #define RS_FILTER_REQUEST_H #include #include "rs-filter-param.h" G_BEGIN_DECLS #define RS_TYPE_FILTER_REQUEST rs_filter_request_get_type() #define RS_FILTER_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), RS_TYPE_FILTER_REQUEST, RSFilterRequest)) #define RS_FILTER_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), RS_TYPE_FILTER_REQUEST, RSFilterRequestClass)) #define RS_IS_FILTER_REQUEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), RS_TYPE_FILTER_REQUEST)) #define RS_IS_FILTER_REQUEST_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), RS_TYPE_FILTER_REQUEST)) #define RS_FILTER_REQUEST_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), RS_TYPE_FILTER_REQUEST, RSFilterRequestClass)) typedef struct _RSFilterRequest RSFilterRequest; typedef struct { RSFilterParamClass parent_class; } RSFilterRequestClass; GType rs_filter_request_get_type(void); /** * Instantiate a new RSFilterRequest * @return A new RSFilterRequest with a refcount of 1 */ RSFilterRequest *rs_filter_request_new(void); #define RS_FILTER_REQUEST_QUICK rs_filter_request_get_quick_singleton() /** * Get a RSFilterRequest singleton with quick set to TRUE * @return A RSFilterRequest, this should not be unreffed */ const RSFilterRequest *rs_filter_request_get_quick_singleton(void); /** * Clone a RSFilterRequest * @param filter_request A RSFilterRequest * @return A new RSFilterRequest with a refcount of 1 with the same settings as * filter_request */ RSFilterRequest *rs_filter_request_clone(const RSFilterRequest *filter_request); /** * Set a region of interest * @param filter_request A RSFilterRequest * @param roi A GdkRectangle describing the ROI or NULL to disable */ void rs_filter_request_set_roi(RSFilterRequest *filter_request, GdkRectangle *roi); /** * Get the region of interest from a RSFilterRequest * @param filter_request A RSFilterRequest * @return A GdkRectangle describing the ROI or NULL if none is set, the * GdkRectangle belongs to the filter_request and should not be freed */ GdkRectangle *rs_filter_request_get_roi(const RSFilterRequest *filter_request); /** * Mark a request as "quick" allowing filters to priotize speed over quality * @param filter_request A RSFilterRequest * @param quick TRUE to mark a request as QUICK, FALSE to set normal (default) */ void rs_filter_request_set_quick(RSFilterRequest *filter_request, gboolean quick); /** * Get quick status of a RSFilterRequest * @param filter_request A RSFilterRequest * @return TRUE if quality should be sacrified for speed, FALSE otherwise */ gboolean rs_filter_request_get_quick(const RSFilterRequest *filter_request); G_END_DECLS #endif /* RS_FILTER_REQUEST_H */ rawstudio-2.0/librawstudio/rs-job-queue.c0000644000175000017500000002232011543674627015525 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include "rs-job-queue.h" struct _RSJobQueueSlot { GtkWidget *container; GtkWidget *label; GtkWidget *progress; }; struct _RSJob { RSJobFunc func; RSJobQueue *job_queue; RSJobQueueSlot *slot; gpointer data; gpointer result; gboolean done; GCond *done_cond; GMutex *done_mutex; }; struct _RSJobQueue { GObject parent; gboolean dispose_has_run; GMutex *lock; GThreadPool *pool; gint n_slots; GtkWidget *window; GtkWidget *box; }; G_DEFINE_TYPE (RSJobQueue, rs_job_queue, G_TYPE_OBJECT) static void job_consumer(gpointer data, gpointer unused); static void rs_job_queue_dispose (GObject *object) { RSJobQueue *job_queue = RS_JOB_QUEUE(object); if (!job_queue->dispose_has_run) { job_queue->dispose_has_run = TRUE; g_mutex_free(job_queue->lock); } /* Chain up */ G_OBJECT_CLASS(rs_job_queue_parent_class)->dispose(object); } static void rs_job_queue_class_init (RSJobQueueClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); object_class->dispose = rs_job_queue_dispose; } static void rs_job_queue_init(RSJobQueue *job_queue) { job_queue->dispose_has_run = FALSE; job_queue->lock = g_mutex_new(); job_queue->pool = g_thread_pool_new(((GFunc) job_consumer), NULL, rs_get_number_of_processor_cores(), TRUE, NULL); job_queue->n_slots = 0; job_queue->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); job_queue->box = gtk_vbox_new(TRUE, 1); gtk_container_add(GTK_CONTAINER(job_queue->window), job_queue->box); gtk_window_set_accept_focus(GTK_WINDOW(job_queue->window), FALSE); gtk_window_set_keep_above(GTK_WINDOW(job_queue->window), TRUE); gtk_window_set_skip_pager_hint(GTK_WINDOW(job_queue->window), TRUE); gtk_window_set_skip_taskbar_hint(GTK_WINDOW(job_queue->window), TRUE); gtk_window_set_title(GTK_WINDOW(job_queue->window), ""); gtk_window_set_type_hint(GTK_WINDOW(job_queue->window), GDK_WINDOW_TYPE_HINT_NOTIFICATION); /* Let's spice it up a notch! :) */ #if GTK_CHECK_VERSION(2,12,0) gtk_window_set_opacity(GTK_WINDOW(job_queue->window), 0.75); #endif #if GTK_CHECK_VERSION(2,10,0) gtk_window_set_deletable(GTK_WINDOW(job_queue->window), FALSE); #endif /* Set the gravity, so that resizes will still result in a window * positioned in the lower left */ gtk_window_set_gravity(GTK_WINDOW(job_queue->window), GDK_GRAVITY_SOUTH_EAST); /* Place the window in lower left corner of screen */ gtk_window_move(GTK_WINDOW(job_queue->window), 0, gdk_screen_get_height(gdk_display_get_default_screen(gdk_display_get_default()))-50); } /** * Get a new RSJobQueue * @return A new RSJobQueue */ static RSJobQueue * rs_job_queue_new(void) { return g_object_new (RS_TYPE_JOB_QUEUE, NULL); } /** * Return the RSJobQueue singleton * @note THis function should be thread safe * @return A RSJobQueue singleton */ static RSJobQueue * rs_job_queue_get_singleton(void) { static RSJobQueue *singleton = NULL; static GStaticMutex lock = G_STATIC_MUTEX_INIT; g_static_mutex_lock(&lock); if (!singleton) singleton = rs_job_queue_new(); g_static_mutex_unlock(&lock); g_assert(RS_IS_JOB_QUEUE(singleton)); return singleton; } /** * Add a new processing slot to a RSJobQueue window * @param job_queue A RSJobQueue * @return A new RSJobQueueSlot */ static RSJobQueueSlot * rs_job_queue_add_slot(RSJobQueue *job_queue) { RSJobQueueSlot *slot = g_new0(RSJobQueueSlot, 1); g_mutex_lock(job_queue->lock); gdk_threads_enter(); slot->container = gtk_vbox_new(FALSE, 0); slot->progress = gtk_progress_bar_new(); gtk_progress_bar_set_text(GTK_PROGRESS_BAR(slot->progress), "Hello..."); gtk_box_pack_start(GTK_BOX(slot->container), slot->progress, FALSE, TRUE, 1); gtk_box_pack_start(GTK_BOX(job_queue->box), slot->container, FALSE, TRUE, 1); /* If we previously got 0 slots open, position the window again */ if (job_queue->n_slots == 0) gtk_window_move(GTK_WINDOW(job_queue->window), 0, gdk_screen_get_height(gdk_display_get_default_screen(gdk_display_get_default()))-50); /* For some reason this must be called everytime to trigger correct placement?! */ gtk_widget_show_all(job_queue->window); job_queue->n_slots++; gdk_threads_leave(); g_mutex_unlock(job_queue->lock); return slot; } /** * Remove and frees a RSJobQueueSlot from a RSJobQueue window * @param job_queue A RSJobQueue * @param slot The slot to remove and free */ static void rs_job_queue_remove_slot(RSJobQueue *job_queue, RSJobQueueSlot *slot) { g_mutex_lock(job_queue->lock); gdk_threads_enter(); gtk_container_remove(GTK_CONTAINER(job_queue->box), slot->container); job_queue->n_slots--; /* If we got less than 1 slot left, we hide the window, no reason to * show an empty window */ if (job_queue->n_slots < 1) gtk_widget_hide_all(job_queue->window); /* We resize the window to 1,1 to make it as small as _possible_ to * avoid blank space after removing a slot */ gtk_window_resize(GTK_WINDOW(job_queue->window), 1, 1); gdk_threads_leave(); g_mutex_unlock(job_queue->lock); } /** * A function to consume jobs, this should run in its own thread * @note Will never return */ static void job_consumer(gpointer data, gpointer unused) { RSJob *job = (RSJob *) data; RSJobQueueSlot *slot = rs_job_queue_add_slot(job->job_queue); /* Call the job */ if (!job->done) job->result = job->func(slot, job->data); rs_job_queue_remove_slot(job->job_queue, slot); g_object_unref(job->job_queue); if (job->done_cond) { /* If we take this path, we shouldn't free the job, rs_job_queue_wait() * must take care of that */ g_mutex_lock(job->done_mutex); job->done = TRUE; g_cond_signal(job->done_cond); g_mutex_unlock(job->done_mutex); } else g_free(job); } /** * Add a new job to the job queue * @note When func is called, it WILL be from another thread, it may be * required to acquire the GDK lock if any GTK+ stuff is done in the * callback! * @param func A function to call for performing the job * @param data Data to pass to func * @param waitable If TRUE, rs_job_queue_wait() will wait until completion */ RSJob * rs_job_queue_add_job(RSJobFunc func, gpointer data, gboolean waitable) { RSJobQueue *job_queue = rs_job_queue_get_singleton(); g_assert(func != NULL); g_mutex_lock(job_queue->lock); RSJob *job = g_new0(RSJob, 1); job->func = func; job->job_queue = g_object_ref(job_queue); job->data = data; job->done = FALSE; if (waitable) { job->done_cond = g_cond_new(); job->done_mutex = g_mutex_new(); } else { job->done_cond = NULL; job->done_mutex = NULL; } g_thread_pool_push(job_queue->pool, job, NULL); g_mutex_unlock(job_queue->lock); return job; } /** * Wait (hang) until a job is finished and then free the memory allocated to job * @param job The RSJob to wait for * @return The value returned by the func given to rs_job_queue_add() */ gpointer rs_job_queue_wait(RSJob *job) { gpointer result = NULL; g_assert(job != NULL); g_assert(job->done_cond != NULL); g_assert(job->done_mutex != NULL); /* Wait for it */ g_mutex_lock(job->done_mutex); while(!job->done) g_cond_wait(job->done_cond, job->done_mutex); g_mutex_unlock(job->done_mutex); /* Free everything */ g_cond_free(job->done_cond); g_mutex_free(job->done_mutex); g_free(job); result = job->result; return result; } /** * Update the job description * @note You should NOT have aquired the GDK thread lock when calling this * function. * @param slot A job_slot as recieved in the job callback function * @param description The new description or NULL to show nothing */ void rs_job_update_description(RSJobQueueSlot *slot, const gchar *description) { gdk_threads_enter(); if (description) gtk_progress_bar_set_text(GTK_PROGRESS_BAR(slot->progress), description); else gtk_progress_bar_set_text(GTK_PROGRESS_BAR(slot->progress), ""); gdk_threads_leave(); } /** * Update the job progress bar * @note You should NOT have aquired the GDK thread lock when calling this * function. * @param slot A job_slot as recieved in the job callback function * @param fraction A value between 0.0 and 1.0 to set the progress bar at * the specific fraction or -1.0 to pulse the progress bar. */ void rs_job_update_progress(RSJobQueueSlot *slot, const gdouble fraction) { gdk_threads_enter(); if (fraction < 0.0) gtk_progress_bar_pulse(GTK_PROGRESS_BAR(slot->progress)); else gtk_progress_bar_set_fraction(GTK_PROGRESS_BAR(slot->progress), fraction); gdk_threads_leave(); } rawstudio-2.0/librawstudio/rs-plugin-manager.c0000644000175000017500000001116311526533645016535 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 #include #include "config.h" #include "rs-plugin.h" static GList *plugins = NULL; /** * Load all installed Rawstudio plugins */ gint rs_plugin_manager_load_all_plugins() { gint num = 0; gchar *plugin_directory; GDir *dir; const gchar *filename; GTimer *gt = g_timer_new(); g_assert(g_module_supported()); plugin_directory = g_build_filename(PACKAGE_DATA_DIR, PACKAGE, "plugins", NULL); RS_DEBUG(PLUGINS, "Loading modules from %s", plugin_directory); dir = g_dir_open(plugin_directory, 0, NULL); while(dir && (filename = g_dir_read_name(dir))) { if (g_str_has_suffix(filename, "." G_MODULE_SUFFIX)) { RSPlugin *plugin; gchar *path; /* Load the plugin */ path = g_build_filename(plugin_directory, filename, NULL); plugin = rs_plugin_new(path); g_free(path); g_assert(g_type_module_use(G_TYPE_MODULE(plugin))); /* This doesn't work for some reason, GType's blow up */ // g_type_module_unuse(G_TYPE_MODULE(plugin)); plugins = g_list_prepend (plugins, plugin); RS_DEBUG(PLUGINS, "%s loaded", filename); num++; } } RS_DEBUG(PLUGINS, "%d plugins loaded in %.03f second", num, g_timer_elapsed(gt, NULL)); /* Print some debug info about loaded plugins */ GType *plugins; guint n_plugins, i; plugins = g_type_children (RS_TYPE_FILTER, &n_plugins); RS_DEBUG(PLUGINS, "%d filters loaded:", n_plugins); for (i = 0; i < n_plugins; i++) { RSFilterClass *klass; GParamSpec **specs; guint n_specs = 0; gint s; /* NOTE: Some plugins depend on all classes is initialized before ANY * instance instantiation takes place, it is NOT safe to just remove * the next line! */ klass = g_type_class_ref(plugins[i]); RS_DEBUG(PLUGINS, "* %s: %s", g_type_name(plugins[i]), klass->name); specs = g_object_class_list_properties(G_OBJECT_CLASS(klass), &n_specs); for(s=0;sname, (specs[s]->flags & G_PARAM_READABLE) ? " READABLE" : "", (specs[s]->flags & G_PARAM_WRITABLE) ? " WRITABLE" : "", (specs[s]->flags & G_PARAM_CONSTRUCT) ? " CONSTRUCT" : "", (specs[s]->flags & G_PARAM_CONSTRUCT_ONLY) ? " CONSTRUCT_ONLY" : "", (specs[s]->flags & G_PARAM_LAX_VALIDATION) ? " LAX_VALIDATION" : "", (specs[s]->flags & G_PARAM_STATIC_NAME) ? " STATIC_NAME" : "", (specs[s]->flags & G_PARAM_STATIC_NICK) ? " STATIC_NICK" : "", (specs[s]->flags & G_PARAM_STATIC_BLURB) ? " STATIC_BLURB" : "", g_param_spec_get_blurb(specs[s]) ); } g_free(specs); g_type_class_unref(klass); } g_free(plugins); plugins = g_type_children (RS_TYPE_OUTPUT, &n_plugins); RS_DEBUG(PLUGINS, "%d exporters loaded:", n_plugins); for (i = 0; i < n_plugins; i++) { RSOutputClass *klass; GParamSpec **specs; guint n_specs = 0; gint s; klass = g_type_class_ref(plugins[i]); RS_DEBUG(PLUGINS, "* %s: %s", g_type_name(plugins[i]), klass->display_name); specs = g_object_class_list_properties(G_OBJECT_CLASS(klass), &n_specs); for(s=0;sname, (specs[s]->flags & G_PARAM_READABLE) ? " READABLE" : "", (specs[s]->flags & G_PARAM_WRITABLE) ? " WRITABLE" : "", (specs[s]->flags & G_PARAM_CONSTRUCT) ? " CONSTRUCT" : "", (specs[s]->flags & G_PARAM_CONSTRUCT_ONLY) ? " CONSTRUCT_ONLY" : "", (specs[s]->flags & G_PARAM_LAX_VALIDATION) ? " LAX_VALIDATION" : "", (specs[s]->flags & G_PARAM_STATIC_NAME) ? " STATIC_NAME" : "", (specs[s]->flags & G_PARAM_STATIC_NICK) ? " STATIC_NICK" : "", (specs[s]->flags & G_PARAM_STATIC_BLURB) ? " STATIC_BLURB" : "", g_param_spec_get_blurb(specs[s]) ); } g_free(specs); g_type_class_unref(klass); } g_free(plugins); if (dir) g_dir_close(dir); g_timer_destroy(gt); return num; } rawstudio-2.0/librawstudio/rs-profile-selector.c0000644000175000017500000002041611526533645017106 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "config.h" #include "gettext.h" #include "rs-profile-selector.h" #include "rs-icc-profile.h" #include "rs-profile-factory-model.h" G_DEFINE_TYPE(RSProfileSelector, rs_profile_selector, GTK_TYPE_COMBO_BOX) enum { DCP_SELECTED_SIGNAL, ICC_SELECTED_SIGNAL, ADD_SELECTED_SIGNAL, LAST_SIGNAL }; static guint signals[LAST_SIGNAL] = {0}; enum { COLUMN_NAME, COLUMN_POINTER, COLUMN_TYPE, NUM_COLUMNS }; static void rs_profile_selector_dispose(GObject *object) { G_OBJECT_CLASS(rs_profile_selector_parent_class)->dispose(object); } static void rs_profile_selector_finalize(GObject *object) { G_OBJECT_CLASS(rs_profile_selector_parent_class)->finalize(object); } static void rs_profile_selector_class_init(RSProfileSelectorClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); signals[DCP_SELECTED_SIGNAL] = g_signal_new("dcp-selected", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, RS_TYPE_DCP_FILE); signals[ICC_SELECTED_SIGNAL] = g_signal_new("icc-selected", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, NULL, NULL, g_cclosure_marshal_VOID__OBJECT, G_TYPE_NONE, 1, RS_TYPE_ICC_PROFILE); signals[ADD_SELECTED_SIGNAL] = g_signal_new("add-selected", G_TYPE_FROM_CLASS(klass), G_SIGNAL_RUN_FIRST | G_SIGNAL_ACTION, 0, NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); object_class->dispose = rs_profile_selector_dispose; object_class->finalize = rs_profile_selector_finalize; } static void changed(GtkComboBox *combo, gpointer data) { GtkTreeIter iter, child_iter; gint type; gpointer profile; GtkTreeModel *model, *child_model; if (gtk_combo_box_get_active_iter(combo, &iter)) { model = gtk_combo_box_get_model(combo); /* Find the original iter before sorting */ gtk_tree_model_sort_convert_iter_to_child_iter(GTK_TREE_MODEL_SORT(model), &child_iter, &iter); child_model = gtk_tree_model_sort_get_model(GTK_TREE_MODEL_SORT(model)); gtk_tree_model_get(child_model, &child_iter, COLUMN_POINTER, &profile, COLUMN_TYPE, &type, -1); RSProfileSelector *selector = RS_PROFILE_SELECTOR(combo); if (type == FACTORY_MODEL_TYPE_DCP) { g_signal_emit(RS_PROFILE_SELECTOR(combo), signals[DCP_SELECTED_SIGNAL], 0, profile); selector->selected = profile; } else if (type == FACTORY_MODEL_TYPE_ICC || type == FACTORY_MODEL_TYPE_INFO) { g_signal_emit(RS_PROFILE_SELECTOR(combo), signals[ICC_SELECTED_SIGNAL], 0, profile); selector->selected = profile; } else if (type == FACTORY_MODEL_TYPE_ADD) { /* If the user selects "add profile", we should not stay at this selection */ rs_profile_selector_select_profile(selector, selector->selected); g_signal_emit(RS_PROFILE_SELECTOR(combo), signals[ADD_SELECTED_SIGNAL], 0, NULL); } } } static gboolean separator_func(GtkTreeModel *model, GtkTreeIter *iter, gpointer data) { gint type = 0; gtk_tree_model_get(model, iter, COLUMN_TYPE, &type, -1); return (type == FACTORY_MODEL_TYPE_SEP); } static void rs_profile_selector_init(RSProfileSelector *selector) { GtkComboBox *combo = GTK_COMBO_BOX(selector); g_signal_connect(combo, "changed", G_CALLBACK(changed), NULL); GtkCellRenderer *cell = gtk_cell_renderer_text_new(); gtk_cell_layout_pack_start(GTK_CELL_LAYOUT(combo), cell, TRUE ); gtk_cell_layout_set_attributes(GTK_CELL_LAYOUT(combo), cell, "markup", 0, NULL); gtk_combo_box_set_row_separator_func(combo, separator_func, NULL, NULL); } RSProfileSelector * rs_profile_selector_new(void) { return g_object_new(RS_TYPE_PROFILE_SELECTOR, NULL); } void rs_profile_selector_select_profile(RSProfileSelector *selector, gpointer profile) { GtkTreeModel *model; GtkTreeIter iter; gpointer current = NULL; g_assert(RS_IS_PROFILE_SELECTOR(selector)); model = gtk_combo_box_get_model(GTK_COMBO_BOX(selector)); if (gtk_tree_model_get_iter_first(model, &iter)) do { gtk_tree_model_get(model, &iter, COLUMN_POINTER, ¤t, -1); if (current == profile) { gtk_combo_box_set_active_iter(GTK_COMBO_BOX(selector), &iter); break; } } while (gtk_tree_model_iter_next(model, &iter)); } static void modify_func(GtkTreeModel *filter, GtkTreeIter *iter, GValue *value, gint column, gpointer data) { GtkTreeModel *model; GtkTreeIter child_iter; gint type; gpointer profile; gchar *str; gchar *escaped; const gchar *profile_name; gchar *filename, *path; g_object_get(filter, "child-model", &model, NULL); gtk_tree_model_filter_convert_iter_to_child_iter(GTK_TREE_MODEL_FILTER(filter), &child_iter, iter); gtk_tree_model_get(model, &child_iter, FACTORY_MODEL_COLUMN_TYPE, &type, FACTORY_MODEL_COLUMN_PROFILE, &profile, -1); if (column == COLUMN_TYPE) g_value_set_int(value, type); else if (column == COLUMN_POINTER) g_value_set_pointer(value, profile); else if (column == COLUMN_NAME) { switch(type) { case FACTORY_MODEL_TYPE_DCP: profile_name = rs_dcp_file_get_name(profile); str = g_strdup_printf("%s (dcp)", profile_name); g_value_set_string(value, str); g_free(str); break; case FACTORY_MODEL_TYPE_ICC: profile_name = rs_icc_profile_get_description(profile); g_object_get(profile, "filename", &path, NULL); filename = g_path_get_basename(path); g_free(path); escaped = g_markup_escape_text(profile_name, -1); str = g_strdup_printf("%s (%s)", profile_name, filename); g_free(filename); g_free(escaped); g_value_set_string(value, str); g_free(str); break; case FACTORY_MODEL_TYPE_ADD: g_value_set_string(value, _("Add profile ...")); break; case FACTORY_MODEL_TYPE_INFO: if (profile) g_value_set_string(value, _("Embedded Profile")); else g_value_set_string(value, _("(Select Profile)")); break; } } } static gint sort_func(GtkTreeModel *model, GtkTreeIter *a, GtkTreeIter *b, gpointer user_data) { gint a_type, b_type; gchar *a_name, *b_name; /* You never know */ if (a == b) return 0; if (!a) return 1; if (!b) return -1; gtk_tree_model_get(model, a, COLUMN_TYPE, &a_type, -1); gtk_tree_model_get(model, b, COLUMN_TYPE, &b_type, -1); if (a_type < b_type) return -1; else if (a_type > b_type) return 1; /* If we get here, both a and b have same type, sort by name */ gtk_tree_model_get(model, a, COLUMN_NAME, &a_name, -1); gtk_tree_model_get(model, b, COLUMN_NAME, &b_name, -1); gint ret = g_strcmp0(a_name, b_name); g_free(a_name); g_free(b_name); return ret; } void rs_profile_selector_set_model_filter(RSProfileSelector *selector, GtkTreeModelFilter *filter) { g_assert(RS_IS_PROFILE_SELECTOR(selector)); g_assert(GTK_IS_TREE_MODEL_FILTER(filter)); /* We set up a modify function, to write correct names for the combobox */ GType types[NUM_COLUMNS] = {G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_INT}; gtk_tree_model_filter_set_modify_func(filter, NUM_COLUMNS, types, modify_func, NULL, NULL); /* Sort the damn thing, we do it this late to avoid sorting the complete list */ GtkTreeSortable *sortable = GTK_TREE_SORTABLE(gtk_tree_model_sort_new_with_model(GTK_TREE_MODEL(filter))); gtk_tree_sortable_set_default_sort_func(sortable, sort_func, NULL, NULL); gtk_tree_sortable_set_sort_column_id(sortable, GTK_TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, GTK_SORT_ASCENDING); gtk_combo_box_set_model(GTK_COMBO_BOX(selector), GTK_TREE_MODEL(sortable)); } rawstudio-2.0/librawstudio/rs-tiff-ifd-entry.c0000644000175000017500000001656511526533645016471 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-tiff-ifd-entry.h" #include "rs-tiff.h" G_DEFINE_TYPE (RSTiffIfdEntry, rs_tiff_ifd_entry, G_TYPE_OBJECT) static const struct { gushort tag; const char *description; } tiff_tags[] = { { 0x00fe, "NewSubfileType" }, { 0x00ff, "SubfileType" }, { 0x0100, "ImageWidth" }, { 0x0101, "ImageLength" }, { 0x0102, "BitsPerSample" }, { 0x0103, "Compression" }, { 0x0106, "PhotometricInterpretation" }, { 0x0107, "Threshholding" }, { 0x0108, "CellWidth" }, { 0x0109, "CellLength" }, { 0x0100, "ImageWidth" }, { 0x010a, "FillOrder" }, { 0x010d, "DocumentName" }, { 0x010e, "ImageDescription" }, { 0x010f, "Make" }, { 0x0110, "Model" }, { 0x0111, "StripOffsets" }, { 0x0112, "Orientation" }, { 0x0115, "SamplesPerPixel" }, { 0x0116, "RowsPerStrip" }, { 0x0117, "StripByteCounts" }, { 0x0118, "MinSampleValue" }, { 0x0119, "MaxSampleValue" }, { 0x011a, "XResolution" }, { 0x011b, "YResolution" }, { 0x011c, "PlanarConfiguration" }, { 0x011d, "PageName" }, { 0x011e, "XPosition" }, { 0x011f, "YPosition" }, { 0x0120, "FreeOffsets" }, { 0x0121, "FreeByteCounts" }, { 0x0122, "GrayResponseUnit" }, { 0x0123, "GrayResponseCurve" }, { 0x0124, "T4Options" }, { 0x0125, "T6Options" }, { 0x0128, "ResolutionUnit" }, { 0x0129, "PageNumber" }, { 0x012d, "TransferFunction" }, { 0x0131, "Software" }, { 0x0132, "DateTime" }, { 0x013b, "Artist" }, { 0x013c, "HostComputer" }, { 0x013d, "Predictor" }, { 0x013e, "WhitePoint" }, { 0x013f, "PrimaryChromaticities" }, { 0x0140, "ColorMap" }, { 0x0141, "HalftoneHints" }, { 0x0142, "TileWidth" }, { 0x0143, "TileLength" }, { 0x0144, "TileOffsets" }, { 0x0145, "TileByteCounts" }, { 0x014c, "InkSet" }, { 0x014d, "InkNames" }, { 0x014e, "NumberOfInks" }, { 0x0200, "JPEGProc" }, { 0x0201, "JPEGInterchangeFormat" }, { 0x0202, "JPEGInterchangeFormatLength" }, { 0x0203, "JPEGRestartInterval" }, { 0x0205, "JPEGLosslessPredictors" }, { 0x0206, "JPEGPointTransforms" }, { 0x0207, "JPEGQTables" }, { 0x0208, "JPEGDCTables" }, { 0x0209, "JPEGACTables" }, { 0x0211, "YCbCrCoefficients" }, { 0x0212, "YCbCrSubSampling" }, { 0x0213, "YCbCrPositioning" }, { 0x0214, "ReferenceBlackWhite" }, { 0x0150, "DotRange" }, { 0x0151, "TargetPrinter" }, { 0x0152, "ExtraSamples" }, { 0x0153, "SampleFormat" }, { 0x0154, "SMinSampleValue" }, { 0x0155, "SMaxSampleValue" }, { 0x0156, "TransferRange" }, { 0x8298, "Copyright" }, /* EXIF specifics */ { 0x8769, "Exif IFD Pointer" }, { 0x8825, "GPS Info IFD Pointer" }, /* DNG tags */ { 0xc612, "DNGVersion" }, { 0xc613, "DNGBackwardVersion" }, { 0xc614, "UniqueCameraModel" }, { 0xc615, "LocalizedCameraModel" }, { 0xc616, "CFAPlaneColor" }, { 0xc617, "CFALayout" }, { 0xc618, "LinearizationTable" }, { 0xc619, "BlackLevelRepeatDim" }, { 0xc61a, "BlackLevel" }, { 0xc61b, "BlackLevelDeltaH" }, { 0xc61c, "BlackLevelDeltaV" }, { 0xc61d, "WhiteLevel" }, { 0xc61e, "DefaultScale" }, { 0xc61f, "DefaultCropOrigin" }, { 0xc620, "DefaultCropSize" }, { 0xc621, "ColorMatrix1" }, { 0xc622, "ColorMatrix2" }, { 0xc623, "CameraCalibration1" }, { 0xc624, "CameraCalibration2" }, { 0xc625, "ReductionMatrix1" }, { 0xc626, "ReductionMatrix2" }, { 0xc627, "AnalogBalance" }, { 0xc628, "AsShotNeutral" }, { 0xc629, "AsShotWhiteXY" }, { 0xc62a, "BaselineExposure" }, { 0xc62b, "BaselineNoise" }, { 0xc62c, "BaselineSharpness" }, { 0xc62d, "BayerGreenSplit" }, { 0xc62e, "LinearResponseLimit" }, { 0xc62f, "CameraSerialNumber" }, { 0xc630, "LensInfo" }, { 0xc631, "ChromaBlurRadius" }, { 0xc632, "AntiAliasStrength" }, { 0xc633, "ShadowScale" }, { 0xc634, "DNGPrivateData" }, { 0xc635, "MakerNoteSafety" }, { 0xc65a, "CalibrationIlluminant1" }, { 0xc65b, "CalibrationIlluminant2" }, { 0xc65c, "BestQualityScale" }, { 0xc65d, "RawDataUniqueID" }, { 0xc68b, "OriginalRawFileName" }, { 0xc68c, "OriginalRawFileData" }, { 0xc68d, "ActiveArea" }, { 0xc68e, "MaskedAreas" }, { 0xc68f, "AsShotICCProfile" }, { 0xc690, "AsShotPreProfileMatrix" }, { 0xc691, "CurrentICCProfile" }, { 0xc692, "CurrentPreProfileMatrix" }, { 0xc6bf, "ColorimetricReference" }, { 0xc6f3, "CameraCalibrationSignature" }, { 0xc6f4, "ProfileCalibrationSignature" }, { 0xc6f5, "ExtraCameraProfiles" }, { 0xc6f6, "AsShotProfileName" }, { 0xc6f7, "NoiseReductionApplied" }, { 0xc6f8, "ProfileName" }, { 0xc6f9, "ProfileHueSatMapDims" }, { 0xc6fa, "ProfileHueSatMapData1" }, { 0xc6fb, "ProfileHueSatMapData2" }, { 0xc6fc, "ProfileToneCurve" }, { 0xc6fd, "ProfileEmbedPolicy" }, { 0xc6fe, "ProfileCopyright" }, { 0xc714, "ForwardMatrix1" }, { 0xc715, "ForwardMatrix2" }, { 0xc716, "PreviewApplicationName" }, { 0xc717, "PreviewApplicationVersion" }, { 0xc718, "PreviewSettingsName" }, { 0xc719, "PreviewSettingsDigest" }, { 0xc71a, "PreviewColorSpace" }, { 0xc71b, "PreviewDateTime" }, { 0xc71c, "RawImageDigest" }, { 0xc71d, "OriginalRawFileDigest" }, { 0xc71e, "SubTileBlockSize" }, { 0xc71f, "RowInterleaveFactor" }, { 0xc725, "ProfileLookTableDims" }, { 0xc726, "ProfileLookTableData" }, { 0xc740, "OpcodeList1" }, { 0xc741, "OpcodeList2" }, { 0xc74e, "OpcodeList3" }, { 0xc761, "NoiseProfile" }, { 0x0, NULL } }; static void rs_tiff_ifd_entry_get_property(GObject *object, guint property_id, GValue *value, GParamSpec *pspec) { switch (property_id) { default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } } static void rs_tiff_ifd_entry_set_property(GObject *object, guint property_id, const GValue *value, GParamSpec *pspec) { switch (property_id) { default: G_OBJECT_WARN_INVALID_PROPERTY_ID(object, property_id, pspec); } } static void rs_tiff_ifd_entry_dispose(GObject *object) { G_OBJECT_CLASS(rs_tiff_ifd_entry_parent_class)->dispose (object); } static void rs_tiff_ifd_entry_finalize(GObject *object) { G_OBJECT_CLASS(rs_tiff_ifd_entry_parent_class)->finalize (object); } static void rs_tiff_ifd_entry_class_init(RSTiffIfdEntryClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS(klass); object_class->get_property = rs_tiff_ifd_entry_get_property; object_class->set_property = rs_tiff_ifd_entry_set_property; object_class->dispose = rs_tiff_ifd_entry_dispose; object_class->finalize = rs_tiff_ifd_entry_finalize; } static void rs_tiff_ifd_entry_init(RSTiffIfdEntry *self) { } RSTiffIfdEntry * rs_tiff_ifd_entry_new(RSTiff *tiff, guint offset) { RSTiffIfdEntry *entry = g_object_new(RS_TYPE_TIFF_IFD_ENTRY, NULL); entry->tag = rs_tiff_get_ushort(tiff, offset+0); entry->type = rs_tiff_get_ushort(tiff, offset+2); entry->count = rs_tiff_get_uint(tiff, offset+4); entry->value_offset = rs_tiff_get_uint(tiff, offset+8); return entry; } rawstudio-2.0/librawstudio/rs-io-job.c0000644000175000017500000000267511526533645015016 00000000000000/* * * Copyright (C) 2006-2011 Anders Brander , * * Anders Kvist and Klaus Post * * 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 "rs-io-job.h" G_DEFINE_TYPE(RSIoJob, rs_io_job, G_TYPE_OBJECT) static void rs_io_job_class_init(RSIoJobClass *klass) { } static void rs_io_job_init(RSIoJob *job) { } RSIoJob * rs_io_job_new(void) { return g_object_new(RS_TYPE_IO_JOB, NULL); } void rs_io_job_execute(RSIoJob *job) { g_assert(RS_IS_IO_JOB(job)); RSIoJobClass *klass = RS_IO_JOB_GET_CLASS(job); if (klass->execute) klass->execute(job); } void rs_io_job_do_callback(RSIoJob *job) { g_assert(RS_IS_IO_JOB(job)); RSIoJobClass *klass = RS_IO_JOB_GET_CLASS(job); if (klass->do_callback) klass->do_callback(job); } rawstudio-2.0/librawstudio/lens_fix.xml0000644000175000017500000001263511532304443015364 00000000000000 Canon EF 28-135mm f/3.5-5.6 IS USM Canon EF 35-105mm f/3.5-4.5 Sigma UC Zoom 35-135mm f/4-5.6 Canon EF 28-70mm f/3.5-4.5 Sigma 18-50mm f/3.5-5.6 DC Sigma 18-125mm f/3.5-5.6 DC IF ASP Tokina AF193-2 19-35mm f/3.5-4.5 Sigma 28-80mm f/3.5-5.6 II Macro Sigma 70-300mm f/4-5.6 [APO] DG Macro Tokina AT-X242AF 24-200mm f/3.5-5.6 Sigma 55-200mm f/4-5.6 DC Canon EF 80-200mm f/4.5-5.6 Tamron AF 70-300mm f/4.5-5.6 Di LD 1:2 Macro Zoom Tamron AF Aspherical 28-200mm f/3.8-5.6 Canon EF 75-300mm f/4-5.6 Canon EF 35-80mm f/4-5.6 Tamron AF 18-270mm f/3.5-6.3 Di II VC LD Aspherical (IF) Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro Model A20 Canon EF 28-200mm f/3.5-5.6 Tamron AF 28-300mm f/3.5-6.3 XR Di VC LD Aspherical [IF] Macro Model A20 Canon EF 28-80mm f/2.8-4L Sigma 17-35mm f/2.8-4 EX DG Aspherical HSM Sigma 17-70mm f/2.8-4.5 DC Macro Sigma 18-50mm f/2.8-4.5 DC OS HSM Sigma 50-200mm f/4-5.6 DC OS HSM Sigma 18-250mm f/3.5-6.3 DC OS HSM Sigma 18-125mm f/3.8-5.6 DC OS HSM Sigma 17-70mm f/2.8-4 DC Macro OS HSM Tamron AF 18-270mm f/3.5-6.3 Di II VC PZD Sigma 12-24mm f/4.5-5.6 EX DG ASPHERICAL HSM Sigma 10-20mm f/4-5.6 EX DC Canon EF 35-350mm f/3.5-5.6L Sigma 50-500mm f/4-6.3 APO HSM EX Tamron AF 28-300mm f/3.5-6.3 XR LD Aspherical [IF] Macro Tamron AF 18-200mm f/3.5-6.3 XR Di II LD Aspherical [IF] Macro Model A14 Tamron 18-250mm f/3.5-6.3 Di II LD Aspherical [IF] Macro Canon EF 28-105mm f/3.5-4.5 USM Tamron SP 70-300mm f/4.0-5.6 Di VC USD Canon EF 20-35mm f/3.5-4.5 USM Tamron AF 19-35mm f/3.5-4.5 Tamron AF 17-50mm f/2.8 Di-II LD Aspherical Sigma 18-200mm f/3.5-6.3 DC OS Sigma 15-30mm f/3.5-4.5 EX DG Aspherical rawstudio-2.0/librawstudio/rawstudio-2.0.pc.in0000644000175000017500000000053011547410760016277 00000000000000prefix=@prefix@ exec_prefix=${prefix} libdir=@libdir@ includedir=${prefix}/include plugindir=@prefix@/share/rawstudio/plugins Name: @PACKAGE@ Description: Rawstudio backend library Version: @VERSION@ Libs: -L${libdir} -l@PACKAGE@-@VERSION@ Cflags: -I${includedir}/@PACKAGE@-@VERSION@ -I${libdir}/@PACKAGE@-@VERSION@/include Requires: gtk+-2.0 rawstudio-2.0/TODO0000644000175000017500000000052311526533646011020 00000000000000General TODO ------------ - save tab A,B & C (selectable) as Layered TIFF Misc Check (and correct if possible) GNOME HIG-compliance. Misc features Levels Documentation We need some online documentation - and a tutorial. We need inline developer documentation (Doxygen?). Maybe someone could do a screencast of Rawstudio in action. rawstudio-2.0/config.h.in0000644000175000017500000000447111547407341012354 00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Enable experimental code */ #undef EXPERIMENTAL /* Gettext package. */ #undef GETTEXT_PACKAGE /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the `memmem' function. */ #undef HAVE_MEMMEM /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* "Public revision" */ #undef RAWSTUDIO_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION rawstudio-2.0/.version0000644000175000017500000000000411547407011011775 000000000000002.0 rawstudio-2.0/missing0000755000175000017500000002623311331674343011727 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2009-04-28.21; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # 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, 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, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; tar*) if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then exit 1 fi ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG="\${$#}" case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; tar*) shift # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case $firstarg in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case $firstarg in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: rawstudio-2.0/config.sub0000755000175000017500000010344511371534605012314 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 # Free Software Foundation, Inc. timestamp='2010-01-22' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file 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. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | ubicom32 \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile-* | tilegx-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; # This must be matched before tile*. tilegx*) basic_machine=tilegx-unknown os=-linux-gnu ;; tile*) basic_machine=tile-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: rawstudio-2.0/configure.in0000644000175000017500000001275511547407045012647 00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) AM_INIT_AUTOMAKE(rawstudio, 2.0) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AM_PROG_LIBTOOL AC_CONFIG_MACRO_DIR([m4]) AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC AC_PROG_CXX AC_HEADER_STDC AC_ARG_ENABLE(experimental, AS_HELP_STRING( [--enable-experimental], [Enable experimental code (default: disabled)]), [EXPERIMENTAL=yes] ) AC_DEFUN([AX_CHECK_COMPILER_FLAGS], [AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1]) dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname: AS_LITERAL_IF([$1], [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1]), [ ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$1" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes, AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no) _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])], [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS _AC_LANG_PREFIX[]FLAGS="$1" AC_COMPILE_IFELSE([AC_LANG_PROGRAM()], eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes, eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no) _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS]) eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1]) AC_MSG_RESULT($ax_check_compiler_flags) if test "x$ax_check_compiler_flags" = xyes; then m4_default([$2], :) else m4_default([$3], :) fi ])dnl AX_CHECK_COMPILER_FLAGS if test "$EXPERIMENTAL" == "yes"; then AC_DEFINE([EXPERIMENTAL],[1],[Enable experimental code]) fi dnl libjpeg if test -z "$LIBJPEG"; then AC_CHECK_LIB(jpeg, jpeg_destroy_decompress, jpeg_ok=yes, jpeg_ok=no) if test "$jpeg_ok" = yes; then AC_CHECK_HEADER(jpeglib.h, jpeg_ok=yes, jpeg_ok=no) if test "$jpeg_ok" = yes; then LIBJPEG='-ljpeg' else AC_MSG_ERROR([*** JPEG header files not found.]) fi else AC_MSG_ERROR([*** Rawstudio requires libjpeg.]) fi fi AC_SUBST(LIBJPEG) dnl libtiff if test -z "$LIBTIFF"; then AC_CHECK_LIB(tiff, TIFFOpen, tiff_ok=yes, tiff_ok=no) if test "$tiff_ok" = yes; then AC_CHECK_HEADER(tiffio.h, tiff_ok=yes, tiff_ok=no) if test "$tiff_ok" = yes; then LIBTIFF='-ltiff' else AC_MSG_ERROR([*** libtiff header files not found.]) fi else AC_MSG_ERROR([*** Rawstudio requires libtiff.]) fi fi AC_SUBST(LIBTIFF) pkg_modules="gtk+-2.0 >= 2.8.0 libxml-2.0 >= 2.4 gconf-2.0 >= 2.0 lcms dbus-1 exiv2 fftw3f lensfun libcurl flickcurl sqlite3 libssl libgphoto2 x11" PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) GETTEXT_PACKAGE=rawstudio AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.]) dnl Add the languages which your application supports here. ALL_LINGUAS="cs da de en fr it nb pl ru fi es sv nl pt_BR ca hu ja" AM_GLIB_GNU_GETTEXT AC_CHECK_FUNCS(memmem) AX_CHECK_COMPILER_FLAGS("-msse2", [_CAN_COMPILE_SSE2=yes], [_CAN_COMPILE_SSE2=no]) AX_CHECK_COMPILER_FLAGS("-msse4.1", [_CAN_COMPILE_SSE4_1=yes],[_CAN_COMPILE_SSE4_1=no]) AX_CHECK_COMPILER_FLAGS("-mavx", [_CAN_COMPILE_AVX=yes],[_CAN_COMPILE_AVX=no]) AM_CONDITIONAL(CAN_COMPILE_SSE4_1, test "$_CAN_COMPILE_SSE4_1" = yes) AM_CONDITIONAL(CAN_COMPILE_SSE2, test "$_CAN_COMPILE_SSE2" = yes) AM_CONDITIONAL(CAN_COMPILE_AVX, test "$_CAN_COMPILE_AVX" = yes) [ branchname() { awk ' /^Repository Root:/ { root=$3; } /^URL:/ { url=$2; } END{ sub(root, "", url); if (index(url, "/branches/") == 1) { branch = substr(url, 11); printf(" (branch %s)", branch); } else if (index(url, "/tags/") == 1) { tag = substr(url, 7); printf(" (tag %s)", tag); } else { printf(" (trunk)"); } } ' } if test -f .version ; then RAWSTUDIO_VERSION=$(cat .version) else RAWSTUDIO_VERSION="${VERSION}" fi if test -d .svn && svn --version>/dev/null 2>&1 ; then RAWSTUDIO_SVNREV=$(LC_ALL=C svn info | awk '/^Revision:/ {printf("-svn%s",$2); }') RAWSTUDIO_BRANCH=$(LC_ALL=C svn info |branchname) elif test -f .svninfo ; then RAWSTUDIO_SVNREV=$(awk '/^Revision:/ {printf("-snapshot%s",$2); }' .svninfo) RAWSTUDIO_BRANCH=$(cat .svninfo|branchname) else RAWSTUDIO_SVNREV="" RAWSTUDIO_BRANCH="" fi ] RAWSTUDIO_VERSION="${RAWSTUDIO_VERSION}${RAWSTUDIO_SVNREV}${RAWSTUDIO_BRANCH}" AC_DEFINE_UNQUOTED([RAWSTUDIO_VERSION], ["$RAWSTUDIO_VERSION"], ["Public revision"]) if test -f .svninfo; then SVNINFO=".svninfo" else SVNINFO="" fi AC_SUBST([SVNINFO]) AC_OUTPUT([ Makefile librawstudio/Makefile librawstudio/rawstudio-2.0.pc plugins/Makefile plugins/cache/Makefile plugins/colorspace-adobergb/Makefile plugins/colorspace-prophoto/Makefile plugins/colorspace-srgb/Makefile plugins/colorspace-transform/Makefile plugins/crop/Makefile plugins/dcp/Makefile plugins/demosaic/Makefile plugins/denoise/Makefile plugins/exposure-mask/Makefile plugins/fuji-rotate/Makefile plugins/input-file/Makefile plugins/input-image16/Makefile plugins/lensfun/Makefile plugins/load-dcraw/Makefile plugins/load-gdk/Makefile plugins/load-rawspeed/Makefile plugins/meta-ciff/Makefile plugins/meta-exiv2/Makefile plugins/meta-mrw/Makefile plugins/meta-raf/Makefile plugins/meta-tiff/Makefile plugins/meta-x3f/Makefile plugins/output-jpegfile/Makefile plugins/output-pngfile/Makefile plugins/output-picasa/Makefile plugins/output-facebook/Makefile plugins/output-flickr/Makefile plugins/output-tifffile/Makefile plugins/resample/Makefile plugins/rotate/Makefile src/Makefile po/Makefile.in pixmaps/Makefile profiles/Makefile ]) rawstudio-2.0/NEWS0000644000175000017500000000564011547426316011032 00000000000000News for release 2.0: This release adds RawSpeed - a new much faster raw loading library, support for DNG camera profiles, tethered shooting, a loupe, a nice little navigator view, color prpofiles for almost 300 cameras, a denoise filter, LensFun based lens correction, a tagging system, lots of performance improvements and many many bugfixes and small improvements. Mews for version 1.2: This release adds a lot of small incremental improvements like sorting photos based on various photo data, more verbose tooltips for thumbnails and threaded loading of thumbnails and the usual swarm of bugfixes. News for version 1.1.1: This is a bugfix release fixing bug 221, 222, 223, 227, 230. News for version 1.1: This release adds the much needed EXIF-awareness! We have added support for a lot of new cameras and the usual truckload of bugfixes. News for version 1.0: This release adds a new sharpen-tool, exporting to GIMP for further editing, a nice in-window directory selector with optional recursive loading, the GUI has been spiced up to look much more modern, Rawstudio has been translated to more than 10 languages and as usual a ton of bugfixes and minor enhancements! News for version 0.7: This release finally adds demosaic allowing photographers to work with and export photos at full resolution. We got nicer Cairo-based graphics and a ton of bugfixes as usual. News for version 0.6: This release adds the much awaited curve-tool and supprt for DNG-files and more cameras. Rawstudio now remembers the state of the GUI and a progressbar is added for slow operations. Adjustments can be added to multiple files in one operation and finally we got a lot of shiny new icons. News for version 0.5.1: This release fixes numerous minor bugs. News for version 0.5: This release has a lot of new features like batch processing, crop and straighten tools. There has also been added support for a lot more camers, support for 16 bit export, more output formats and last of all various GUI enhancements. News for version 0.4.1: This release fixes a nasty bug when loading images on non 32bit x86. News for version 0.4: This release adds much needed color management with Little CMS, more sensible defaults when opening photos from Canon/Nikon cameras, lots of small improvements and even a shiny new icon. News for version 0.3: This release adds better zoom, tooltips, for camera whitebalance and native thumbnail support for most supported cameras, saving in more file formats, one-key export, many cosmetic enhancements and bugfixes. News for version 0.2: Local cache directory, support for older glib. Lots of code cleanups. Many bugfixes. New features for version 0.1: Preference dialog, fullscreen mode, whitebalance-adjustment, xml settings cache, photo-sorting, runtime mmx/sse/3dnow-optimization - more speed!, basic exif-reading, native thumbnail reading for some cameras, exposure mask, copy/paste settings, nice graphics - many bugfixes and much more. rawstudio-2.0/ltmain.sh0000755000175000017500000073341511547430027012160 00000000000000# Generated from ltmain.m4sh. # ltmain.sh (GNU libtool) 2.2.6b # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool 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. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool 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 GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print informational messages (default) # --version print version information # -h, --help print short or long help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . PROGRAM=ltmain.sh PACKAGE=libtool VERSION="2.2.6b Debian-2.2.6b-2ubuntu1" TIMESTAMP="" package_revision=1.3017 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # NLS nuisances: We save the old values to restore during execute mode. # Only set LANG and LC_ALL to C if already set. # These must not be set unconditionally because not all systems understand # e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done $lt_unset CDPATH : ${CP="cp -f"} : ${ECHO="echo"} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SED="/bin/sed"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` } # Generated shell functions inserted here. # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: # In the unlikely event $progname began with a '-', it would play havoc with # func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result case $progname in -*) progname=./$progname ;; esac # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=: for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname${mode+: }$mode: $*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` done my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "X$my_tmpdir" | $Xsed } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "X$1" | $Xsed \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_version # Echo version message to standard output and exit. func_version () { $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $SED -n '/^# Usage:/,/# -h/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" $ECHO $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help # Echo long help message to standard output and exit. func_help () { $SED -n '/^# Usage:/,/# Report bugs to/ { s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p }' < "$progpath" exit $? } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { func_error "missing argument for $1" exit_cmd=exit } exit_cmd=: # Check that we have a working $ECHO. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then # Yippee, $ECHO works! : else # Restart under the correct shell, and then maybe $ECHO will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # Parse options once, thoroughly. This comes as soon as possible in # the script to make things like `libtool --version' happen quickly. { # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Parse non-mode specific arguments: while test "$#" -gt 0; do opt="$1" shift case $opt in --config) func_config ;; --debug) preserve_args="$preserve_args $opt" func_echo "enabling shell trace mode" opt_debug='set -x' $opt_debug ;; -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break execute_dlfiles="$execute_dlfiles $1" shift ;; --dry-run | -n) opt_dry_run=: ;; --features) func_features ;; --finish) mode="finish" ;; --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break case $1 in # Valid mode arguments: clean) ;; compile) ;; execute) ;; finish) ;; install) ;; link) ;; relink) ;; uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac mode="$1" shift ;; --preserve-dup-deps) opt_duplicate_deps=: ;; --quiet|--silent) preserve_args="$preserve_args $opt" opt_silent=: ;; --verbose| -v) preserve_args="$preserve_args $opt" opt_silent=false ;; --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break preserve_args="$preserve_args $opt $1" func_enable_tag "$1" # tagname is set here shift ;; # Separate optargs to long options: -dlopen=*|--mode=*|--tag=*) func_opt_split "$opt" set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} shift ;; -\?|-h) func_usage ;; --help) opt_help=: ;; --version) func_version ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) nonopt="$opt" break ;; esac done case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_duplicate_deps ;; esac # Having warned about all mis-specified options, bail out if # anything was wrong. $exit_cmd $EXIT_FAILURE } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } ## ----------- ## ## Main. ## ## ----------- ## $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi test -z "$mode" && func_fatal_error "error: you must specify a MODE." # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$mode' for more information." } # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_ltwrapper_scriptname_result="" if func_ltwrapper_executable_p "$1"; then func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" fi } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_quote_for_eval "$arg" CC_quoted="$CC_quoted $func_quote_for_eval_result" done case "$@ " in " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T <?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi removelist="$removelist $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist removelist="$removelist $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir command="$command -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then command="$command -o $obj" fi # Suppress compiler output if we already did a PIC compilation. command="$command$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$mode'" ;; esac $ECHO $ECHO "Try \`$progname --help' for more information about other modes." exit $? } # Now that we've collected a possible --mode arg, show help if necessary $opt_help && func_mode_help # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $execute_dlfiles; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_quote_for_eval "$file" args="$args $func_quote_for_eval_result" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" $ECHO "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS $ECHO "X----------------------------------------------------------------------" | $Xsed $ECHO "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done $ECHO $ECHO "If you ever happen to want to link against installed libraries" $ECHO "in a given directory, LIBDIR, you must either use libtool, and" $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" $ECHO "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" $ECHO " during execution" fi if test -n "$runpath_var"; then $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" $ECHO " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $ECHO $ECHO "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" $ECHO "pages." ;; *) $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac $ECHO "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS } test "$mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $ECHO "X$nonopt" | $GREP shtool >/dev/null; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" install_prog="$install_prog$func_quote_for_eval_result" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" install_prog="$install_prog $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for progfile in $progfiles; do func_verbose "extracting global C symbols from \`$progfile'" $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" } done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" fi $ECHO >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; " case $host in *cygwin* | *mingw* | *cegcc* ) $ECHO >> "$output_objdir/$my_dlsyms" "\ /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */" lt_dlsym_const= ;; *osf5*) echo >> "$output_objdir/$my_dlsyms" "\ /* This system does not cope well with relocations in const data */" lt_dlsym_const= ;; *) lt_dlsym_const=const ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ extern $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; $lt_dlsym_const lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac $ECHO >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) symtab_cflags="$symtab_cflags $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper_part1 [arg=no] # # Emit the first part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part1 () { func_emit_wrapper_part1_arg1=no if test -n "$1" ; then func_emit_wrapper_part1_arg1=$1 fi $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then ECHO=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then # Yippee, \$ECHO works! : else # Restart under the correct shell, and then maybe \$ECHO will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $ECHO "\ # Find the directory that this script lives in. thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done " } # end: func_emit_wrapper_part1 # func_emit_wrapper_part2 [arg=no] # # Emit the second part of a libtool wrapper script on stdout. # For more information, see the description associated with # func_emit_wrapper(), below. func_emit_wrapper_part2 () { func_emit_wrapper_part2_arg1=no if test -n "$1" ; then func_emit_wrapper_part2_arg1=$1 fi $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # end: func_emit_wrapper_part2 # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=no if test -n "$1" ; then func_emit_wrapper_arg1=$1 fi # split this up so that func_emit_cwrapperexe_src # can call each part independently. func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" } # func_to_host_path arg # # Convert paths to host format when used with build tools. # Intended for use with "native" mingw (where libtool itself # is running under the msys shell), or in the following cross- # build environments: # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # where wine is equipped with the `winepath' executable. # In the native mingw case, the (msys) shell automatically # converts paths for any non-msys applications it launches, # but that facility isn't available from inside the cwrapper. # Similar accommodations are necessary for $host mingw and # $build cygwin. Calling this function does no harm for other # $host/$build combinations not listed above. # # ARG is the path (on $build) that should be converted to # the proper representation for $host. The result is stored # in $func_to_host_path_result. func_to_host_path () { func_to_host_path_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' case $build in *mingw* ) # actually, msys # awkward: cmd appends spaces to result lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_path_tmp1=`( cmd //c echo "$1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_path_tmp1=`cygpath -w "$1"` func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # Unfortunately, winepath does not exit with a non-zero # error code, so we are forced to check the contents of # stdout. On the other hand, if the command is not # found, the shell will set an exit code of 127 and print # *an error message* to stdout. So we must check for both # error code of zero AND non-empty stdout, which explains # the odd construction: func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ $SED -e "$lt_sed_naive_backslashify"` else # Allow warning below. func_to_host_path_result="" fi ;; esac if test -z "$func_to_host_path_result" ; then func_error "Could not determine host path corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_path_result="$1" fi ;; esac fi } # end: func_to_host_path # func_to_host_pathlist arg # # Convert pathlists to host format when used with build tools. # See func_to_host_path(), above. This function supports the # following $build/$host combinations (but does no harm for # combinations not listed here): # $build $host # mingw (msys) mingw [e.g. native] # cygwin mingw # *nix + wine mingw # # Path separators are also converted from $build format to # $host format. If ARG begins or ends with a path separator # character, it is preserved (but converted to $host format) # on output. # # ARG is a pathlist (on $build) that should be converted to # the proper representation on $host. The result is stored # in $func_to_host_pathlist_result. func_to_host_pathlist () { func_to_host_pathlist_result="$1" if test -n "$1" ; then case $host in *mingw* ) lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_to_host_pathlist_tmp2="$1" # Once set for this call, this variable should not be # reassigned. It is used in tha fallback case. func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e 's|^:*||' -e 's|:*$||'` case $build in *mingw* ) # Actually, msys. # Awkward: cmd appends spaces to result. lt_sed_strip_trailing_spaces="s/[ ]*\$//" func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; *cygwin* ) func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ $SED -e "$lt_sed_naive_backslashify"` ;; * ) # unfortunately, winepath doesn't convert pathlists func_to_host_pathlist_result="" func_to_host_pathlist_oldIFS=$IFS IFS=: for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do IFS=$func_to_host_pathlist_oldIFS if test -n "$func_to_host_pathlist_f" ; then func_to_host_path "$func_to_host_pathlist_f" if test -n "$func_to_host_path_result" ; then if test -z "$func_to_host_pathlist_result" ; then func_to_host_pathlist_result="$func_to_host_path_result" else func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" fi fi fi IFS=: done IFS=$func_to_host_pathlist_oldIFS ;; esac if test -z "$func_to_host_pathlist_result" ; then func_error "Could not determine the host path(s) corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This may break if $1 contains DOS-style drive # specifications. The fix is not to complicate the expression # below, but for the user to provide a working wine installation # with winepath so that path translation in the cross-to-mingw # case works properly. lt_replace_pathsep_nix_to_dos="s|:|;|g" func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ $SED -e "$lt_replace_pathsep_nix_to_dos"` fi # Now, add the leading and trailing path separators back case "$1" in :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" ;; esac case "$1" in *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" ;; esac ;; esac fi } # end: func_to_host_pathlist # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include # define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include # define HAVE_SETENV # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif # endif #endif #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif #ifdef _MSC_VER # define S_IXUSR _S_IEXEC # define stat _stat # ifndef _INTPTR_T_DEFINED # define intptr_t int # endif #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifdef __CYGWIN__ # define FOPEN_WB "wb" #endif #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #undef LTWRAPPER_DEBUGPRINTF #if defined DEBUGWRAPPER # define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args static void ltwrapper_debugprintf (const char *fmt, ...) { va_list args; va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } #else # define LTWRAPPER_DEBUGPRINTF(args) #endif const char *program_name = NULL; void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_fatal (const char *message, ...); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_opt_process_env_set (const char *arg); void lt_opt_process_env_prepend (const char *arg); void lt_opt_process_env_append (const char *arg); int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); static const char *script_text_part1 = EOF func_emit_wrapper_part1 yes | $SED -e 's/\([\\"]\)/\\\1/g' \ -e 's/^/ "/' -e 's/$/\\n"/' echo ";" cat <"))); for (i = 0; i < newargc; i++) { LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); } EOF case $host_os in mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); return 127; } return rval; EOF ;; *) cat <<"EOF" execv (lt_argv_zero, newargz); return rval; /* =127, but avoids unused variable warning */ EOF ;; esac cat <<"EOF" } void * xmalloc (size_t num) { void *p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char) name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable (const char *path) { struct stat st; LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!")); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", tmp_pathspec)); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { char *errstr = strerror (errno); lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal ("Could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } void lt_setenv (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", (name ? name : ""), (value ? value : ""))); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } int lt_split_name_value (const char *arg, char** name, char** value) { const char *p; int len; if (!arg || !*arg) return 1; p = strchr (arg, (int)'='); if (!p) return 1; *value = xstrdup (++p); len = strlen (arg) - strlen (*value); *name = XMALLOC (char, len); strncpy (*name, arg, len-1); (*name)[len - 1] = '\0'; return 0; } void lt_opt_process_env_set (const char *arg) { char *name = NULL; char *value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); } lt_setenv (name, value); XFREE (name); XFREE (value); } void lt_opt_process_env_prepend (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); } new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_opt_process_env_append (const char *arg) { char *name = NULL; char *value = NULL; char *new_value = NULL; if (lt_split_name_value (arg, &name, &value) != 0) { XFREE (name); XFREE (value); lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); } new_value = lt_extend_str (getenv (name), value, 1); lt_setenv (name, new_value); XFREE (new_value); XFREE (name); XFREE (value); } void lt_update_exe_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", (name ? name : ""), (value ? value : ""))); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF } # end: func_emit_cwrapperexe_src # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) deplibs="$deplibs $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) weak_libs="$weak_libs $arg" prev= continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname '-L' '' "$arg" dir=$func_stripname_result if test -z "$dir"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" arg="$arg $wl$func_quote_for_eval_result" compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" linker_flags="$linker_flags $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -F/path gives path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" compiler_flags="$compiler_flags $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_duplicate_deps ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= case $lib in *.la) func_source "$lib" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` case " $weak_libs " in *" $deplib_base "*) ;; *) deplibs="$deplibs $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" dir=$func_stripname_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $ECHO $ECHO "*** Warning: Trying to link with static lib archive $deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because the file extensions .$libext of this argument makes me believe" $ECHO "*** that it is just a static archive that I should not use here." else $ECHO $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" newlib_search_path="$newlib_search_path $func_stripname_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) temp_rpath="$temp_rpath$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded notinst_deplibs="$notinst_deplibs $lib" need_relink=no ;; *) if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then $ECHO if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $ECHO $ECHO "*** And there doesn't seem to be a static archive available" $ECHO "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $ECHO $ECHO "*** Warning: This system can not link to static lib archive $lib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $ECHO "*** But as you try to build a module library, libtool will still create " $ECHO "*** a static module, that should work as long as the dlopening application" $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if $opt_duplicate_deps ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_dirname "$deplib" "" "." dir="$func_dirname_result" # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else $ECHO $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type \`$version_type'" ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" libobjs="$libobjs $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $ECHO $ECHO "*** Warning: linker path does not have real file for library $a_deplib." $ECHO "*** I have the capability to make that library automatically link in when" $ECHO "*** you link to this library. But I can only do this if you have a" $ECHO "*** shared version of the library, which you do not appear to have" $ECHO "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` done fi if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | $GREP . >/dev/null; then $ECHO if test "X$deplibs_check_method" = "Xnone"; then $ECHO "*** Warning: inter-library dependencies are not supported in this platform." else $ECHO "*** Warning: inter-library dependencies are not known to be supported." fi $ECHO "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $ECHO $ECHO "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" $ECHO "*** a static module, that should work as long as the dlopening" $ECHO "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $ECHO $ECHO "*** However, this would only work if libtool was able to extract symbol" $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" $ECHO "*** not find such a program. So, this module is probably useless." $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $ECHO "*** The inter-library dependencies that have been dropped here will be" $ECHO "*** automatically added whenever a program is linked with this library" $ECHO "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $ECHO $ECHO "*** Since this library must not contain undefined symbols," $ECHO "*** because either the platform does not support them or" $ECHO "*** it was explicitly requested with -no-undefined," $ECHO "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" delfiles="$delfiles $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" func_len " $cmd" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then func_show_eval "$cmd" 'exit $?' skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$ECHO "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" $ECHO 'INPUT (' > $output for obj in $save_libobjs do $ECHO "$obj" >> $output done $ECHO ')' >> $output delfiles="$delfiles $output" elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do $ECHO "$obj" >> $output done delfiles="$delfiles $output" output=$firstobj\"$file_list_spec$output\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=$obj func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi delfiles="$delfiles $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles libobjs="$libobjs $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *cegcc) # Disable wrappers for cegcc, we are cross compiling anyway. wrappers_required=no ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $ECHO for shipping. if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then oldobjs="$oldobjs $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $dlprefiles oldobjs="$oldobjs $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else $ECHO "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlfiles="$newdlfiles $libdir/$name" ;; *) newdlfiles="$newdlfiles $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" newdlprefiles="$newdlprefiles $libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$mode" = link || test "$mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) RM="$RM $arg"; rmforce=yes ;; -*) RM="$RM $arg" ;; *) files="$files $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then objdir="$origobjdir" else objdir="$dir/$origobjdir" fi func_basename "$file" name="$func_basename_result" test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result rmfiles="$rmfiles $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$mode" = uninstall || test "$mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 rawstudio-2.0/Makefile.in0000644000175000017500000006140611547430041012370 00000000000000# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ TODO config.guess config.sub depcomp install-sh ltmain.sh \ missing mkinstalldirs ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.in am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(desktopdir)" DATA = $(desktop_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DATADIRNAME = @DATADIRNAME@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBJPEG = @LIBJPEG@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTIFF = @LIBTIFF@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT = @MSGFMT@ MSGFMT_OPTS = @MSGFMT_OPTS@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ SVNINFO = @SVNINFO@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ XGETTEXT = @XGETTEXT@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = librawstudio plugins src po pixmaps profiles desktopdir = $(datadir)/applications desktop_DATA = rawstudio.desktop EXTRA_DIST = \ autogen.sh \ ChangeLog \ rawstudio.desktop \ gettext.h \ .version all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-desktopDATA: $(desktop_DATA) @$(NORMAL_INSTALL) test -z "$(desktopdir)" || $(MKDIR_P) "$(DESTDIR)$(desktopdir)" @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(desktopdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(desktopdir)" || exit $$?; \ done uninstall-desktopDATA: @$(NORMAL_UNINSTALL) @list='$(desktop_DATA)'; test -n "$(desktopdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(desktopdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(desktopdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(desktopdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-desktopDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-desktopDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ dist-gzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-libtool distclean-tags distcleancheck distdir \ distuninstallcheck dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-desktopDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ uninstall uninstall-am uninstall-desktopDATA ChangeLog: svn2cl -i # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: rawstudio-2.0/INSTALL0000644000175000017500000003633211331674343011362 00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. rawstudio-2.0/AUTHORS0000644000175000017500000000054611526533646011405 00000000000000Maintained and developed by: Anders Brander Anders Kvist Klaus Post Contributions by: Anders Lauritsen - scaling Edouard Gomez - curve widget and x86_64 port Henri Nielsen - win32 port Soren Hansen - gconf code rawstudio-2.0/mkinstalldirs0000755000175000017500000000370411547430026013131 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here rawstudio-2.0/README0000644000175000017500000000102711547427341011205 00000000000000Rawstudio is an open source raw-image converter written in GTK+. Features: * Read most raw file formats using RawSpeed and uses dcraw as fallback * Supports DNG Camera profiles * Tethered shooting * Tagging * Lens correction using LensFun * Exporters for Facebook, Flickr and Picasa * Internal 16bit rgb * Various post-shot controls (white balance, saturation and exposure compensation among others) * Realtime histogram * Optimized for SSE (detected runtime) * Easy sorting of images * Fullscreen mode for better overview Enjoy!